This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
FC, | |
ReactNode, | |
createContext, | |
useContext, | |
useState, | |
useCallback, | |
} from "react"; | |
export interface IDrawerProviderProps { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{(spas.length >= 0) && ( | |
<ModelList | |
inverted | |
infiniteScroll | |
onInfiniteLoad={this.handleFetchNextPageOfSpas} | |
shouldInfiniteLoad={!onLastPaginationPage} | |
onRowClick={this.handleRowClick} | |
modelType="Spas" | |
models={spas} | |
tableRowNumbers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import * as React from 'react'; | |
import { | |
get as _get, | |
throttle as _throttle, | |
orderBy as _orderBy, | |
} from 'lodash'; | |
import { Table, Icon } from 'semantic-ui-react'; | |
import EmptyListPlaceholder from '../emptyListPlaceholder/EmptyListPlaceholder'; | |
import styles from './ModelList.scss'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { format, addDays, differenceInDays } from 'date-fns'; | |
import BaseModel from './BaseModel'; | |
export default class Milestone extends BaseModel { | |
static tableName = 'Milestones'; | |
static tracker = true; | |
static timestamps = true; | |
static auditKeys = ['isComplete', 'startDate', 'endDate', 'name', 'status', 'parentMilestoneId']; | |
static jsonSchema = { | |
type: 'object', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Model } from 'objection'; | |
import { pick as _pick } from 'lodash'; | |
import User from './User'; | |
import utils from '../utils'; | |
export default class AuditLog extends Model { | |
static tableName = 'AuditLog'; | |
static jsonAttributes = []; | |
static jsonSchema = { | |
type: 'object', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Model } from 'objection'; | |
import AuditLog from './AuditLog'; | |
export default class BaseModel extends Model { | |
static auditKeys = []; | |
static auditSanitize = modelObj => ( | |
// upto other models to implent their own logic | |
// for auditSanitize | |
this.constructor.auditSanitize | |
? this.constructor.auditSanitize(modelObj) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createNamespacedAction } from '../../utils/actionsUtils'; | |
const stompAction = createNamespacedAction('@stomp'); | |
export const connect = stompAction('CONNECT'); | |
export const messageRecevied = stompAction('MESSAGE_RECEVIED'); | |
export const disconnect = stompAction('DISCONNECT'); | |
export const subscribe = stompAction('SUBSCRIBE', ({ subscriptionName, destination, onmessage }) => ({ | |
subscriptionName, | |
destination, | |
onmessage, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Stomp from 'stompjs'; | |
import { | |
APP_STOMP_URL, | |
APP_STOMP_LOGIN, | |
APP_STOMP_PASSCODE, | |
} from '../../constants'; | |
import { | |
connect, | |
connecting, | |
connected, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const ManifestPlugin = require('webpack-manifest-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); | |
const eslintFormatter = require('react-dev-utils/eslintFormatter'); | |
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Bundler = requrie('parcel-bundler'); | |
const express = require('express'); | |
const chalk = require('chalk'); | |
const httpProxyMiddleware = require('http-proxy-middleware'); | |
const openBrowser = require('react-dev-utils/openBrowser'); | |
const devServer = express(); | |
// setup parcel | |
const bundle = new Bundler(paths.appHtml, { | |
outDir: paths.appBuild, |
NewerOlder