Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #184 from bcgov/feature/add-admin-page
Browse files Browse the repository at this point in the history
Feature/add admin page
  • Loading branch information
ronald-rgr authored Jan 7, 2020
2 parents 515829a + 4dc3f1f commit 6960bf7
Show file tree
Hide file tree
Showing 189 changed files with 13,232 additions and 1,565 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ package-lock.json
*.sql
*.sqlite

# IDE generated files #
#######################
.idea

# OS generated files #
######################
.DS_Store
Expand Down
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"prepare": "patch-package",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"update-api": "yarn add github:bcgov/jag-shuber-api",
"update-api": "yarn remove jag-shuber-api && yarn add github:bcgov/jag-shuber-api#feature/implement-roles",
"snyk-protect": "snyk protect",
"prepublish": "npm run snyk-protect"
},
Expand All @@ -24,6 +24,9 @@
"chalk": "1.1.3",
"color": "^3.0.0",
"css-loader": "0.28.4",
"deep-diff": "^1.0.2",
"deep-object-diff": "^1.1.0",
"deepmerge": "^4.2.2",
"dotenv": "4.0.0",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "^1.1.11",
Expand All @@ -33,19 +36,20 @@
"interact.js": "^1.2.8",
"interactjs": "^1.3.4",
"istanbul": "^0.4.5",
"jag-shuber-api": "github:bcgov/jag-shuber-api",
"jag-shuber-api": "github:bcgov/jag-shuber-api#feature/implement-roles",
"jest": "20.0.4",
"map": "^1.0.1",
"moment": "^2.22.2",
"object-assign": "4.1.1",
"object-diff": "^0.0.4",
"open-iconic": "^1.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.6",
"promise": "8.0.1",
"rc-slider": "^8.6.1",
"rc-tooltip": "^3.7.2",
"react": "^16.4.2",
"react-bootstrap": "^0.32.0",
"react-bootstrap": "^0.32.4",
"react-calendar-timeline": "^0.22.0",
"react-datetime": "^2.11.1",
"react-dev-utils": "^4.2.1",
Expand All @@ -63,6 +67,7 @@
"redux-modal": "^1.7.3",
"redux-thunk": "^2.2.0",
"reselect": "^3.0.1",
"snyk": "^1.120.0",
"source-map-loader": "^0.2.3",
"style-loader": "0.18.2",
"superagent": "^3.8.3",
Expand All @@ -73,8 +78,7 @@
"webpack-manifest-plugin": "1.2.1",
"webpack-version-file": "^0.1.3",
"whatwg-fetch": "2.0.3",
"yarn": "^1.9.4",
"snyk": "^1.120.0"
"yarn": "^1.9.4"
},
"devDependencies": {
"@storybook/addon-actions": "^3.3.10",
Expand All @@ -93,7 +97,7 @@
"@types/prop-types": "^15.5.2",
"@types/rc-slider": "^8.2.3",
"@types/rc-tooltip": "^3.4.11",
"@types/react": "16.0.25",
"@types/react": "16.4.2",
"@types/react-bootstrap": "^0.31.8",
"@types/react-bootstrap-date-picker": "^4.0.4",
"@types/react-dom": "^16.0.3",
Expand Down
83 changes: 56 additions & 27 deletions src/app/RootLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,55 @@ import {
DragDropContext
} from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import Navigation from './components/Navigation';
import DutyRoster from './pages/DutyRoster';
import ManageSheriffs from './pages/ManageSheriffs';
import DefaultAssignments from './pages/DefaultAssignments';
import Scheduling from './pages/Scheduling';
import AssignmentDutyEditModal from './containers/AssignmentDutyEditModal';
import LocationSelector from './containers/LocationSelector';

import { Well, Alert, Button } from 'react-bootstrap';
import SheriffProfileModal from './containers/SheriffProfileModal';
import ScheduleShiftCopyModal from './containers/ScheduleShiftCopyModal';
import ScheduleShiftAddModal from './containers/ScheduleShiftAddModal';
import AssignmentSheriffDutyReassignmentModal from './containers/AssignmentSheriffDutyReassignmentModal';
import PublishSchedule from './pages/PublishSchedule/PublishSchedule';
import Footer from './components/Footer/Footer';

// Import generic infrastructure constructs and modules
import resolveAppUrl from './infrastructure/resolveAppUrl';
import CustomDragLayer from './infrastructure/DragDrop/CustomDragLayer';
import {
isLocationSet as isCurrentLocationSet,
isLoggedIn as isUserLoggedIn,
isLoadingToken as isLoadingUserToken,
loadingTokenError
} from './modules/user/selectors';

// Import core layout components
import Navigation from './components/Navigation';

// Import pages
import AuditPage from './pages/Audit';
import AssignmentPage from './pages/Assignments';
import DefaultAssignmentsPage from './pages/DefaultAssignments';
import DutyRosterPage from './pages/DutyRoster';
import ManageCourtroomsPage from './pages/ManageCourtrooms';
import ManageCodesPage from './pages/ManageCodes';
import ManageComponentsPage from './pages/ManageComponents';
import ManageApisPage from './pages/ManageApis';
import ManageRolesPage from './pages/ManageRoles';
import ManageUserRolesPage from './pages/ManageUserRoles';
import ManageSheriffsPage from './pages/ManageSheriffs';
import ManageUsersPage from './pages/ManageUsers';
import SchedulingPage from './pages/Scheduling';
import PublishSchedulePage from './pages/PublishSchedule/PublishSchedule';

// Import container components
import ToastManager from './components/ToastManager/ToastManager';
import LocationSelector from './containers/NavLocationSelector';
import Footer from './components/Footer/Footer';

// Import app-level modal components
import ConnectedConfirmationModal from './containers/ConfirmationModal';
import SheriffProfileCreateModal from './containers/SheriffProfileCreateModal';
import resolveAppUrl from './infrastructure/resolveAppUrl';
import CustomDragLayer from './infrastructure/DragDrop/CustomDragLayer';
import ScheduleShiftMultiEditModal from './containers/ScheduleMultiShiftEditModal';
import DutyRosterToolsModal from './containers/DutyRosterToolsModal';
import AssignmentPage from './pages/Assignments';
import AssignmentScheduleAddModal from './containers/AssignmentScheduleAddModal';
import AssignmentScheduleEditModal from './containers/AssignmentScheduleEditModal';
import AssignmentDutyEditModal from './containers/AssignmentDutyEditModal';
import AssignmentSheriffDutyReassignmentModal from './containers/AssignmentSheriffDutyReassignmentModal';
import DutyRosterToolsModal from './containers/DutyRosterToolsModal';
import ScheduleShiftCopyModal from './containers/ScheduleShiftCopyModal';
import ScheduleShiftAddModal from './containers/ScheduleShiftAddModal';
import ScheduleShiftMultiEditModal from './containers/ScheduleMultiShiftEditModal';
import SheriffProfileModal from './containers/SheriffProfileModal';
import SheriffProfileCreateModal from './containers/SheriffProfileCreateModal';

export interface LayoutStateProps {
isLocationSet?: boolean;
Expand All @@ -49,6 +68,7 @@ export interface LayoutStateProps {

export interface LayoutDispatchProps {
}

class Layout extends React.Component<LayoutStateProps & LayoutDispatchProps> {

componentWillReceiveProps(nextProps: LayoutStateProps) {
Expand Down Expand Up @@ -93,10 +113,11 @@ class Layout extends React.Component<LayoutStateProps & LayoutDispatchProps> {
<Well
style={{
backgroundColor: 'white',
maxWidth: '80%',
maxWidth: '85%',
minWidth: 800,
height: '100%',
margin: 'auto'
margin: 'auto',
borderRadius: 0
}}
>
<div style={{ paddingTop: 10 }}>
Expand All @@ -109,12 +130,20 @@ class Layout extends React.Component<LayoutStateProps & LayoutDispatchProps> {

{isLocationSet && (
<div className="mainArea">
<Route exact={true} path={Navigation.Routes.dutyRoster.timeline.path} component={DutyRoster} />
<Route path={Navigation.Routes.schedule.manage.path} component={Scheduling} />
<Route path={Navigation.Routes.team.path} component={ManageSheriffs} />
<Route path={Navigation.Routes.dutyRoster.setup.path} component={DefaultAssignments} />
<Route exact={true} path={Navigation.Routes.dutyRoster.timeline.path} component={DutyRosterPage} />
<Route path={Navigation.Routes.schedule.manage.path} component={SchedulingPage} />
<Route path={Navigation.Routes.schedule.distribute.path} component={PublishSchedulePage} />
<Route path={Navigation.Routes.dutyRoster.setup.path} component={DefaultAssignmentsPage} />
<Route path={Navigation.Routes.assignment.path} component={AssignmentPage} />
<Route path={Navigation.Routes.schedule.distribute.path} component={PublishSchedule} />
<Route path={Navigation.Routes.courtrooms.path} component={ManageCourtroomsPage} />
<Route path={Navigation.Routes.team.path} component={ManageSheriffsPage} />
<Route path={Navigation.Routes.team.children.roles.path} component={ManageRolesPage} />
<Route path={Navigation.Routes.team.children.users.path} component={ManageUsersPage} />
<Route path={Navigation.Routes.team.children.userRoles.path} component={ManageUserRolesPage} />
<Route path={Navigation.Routes.system.children.codes.path} component={ManageCodesPage} />
<Route path={Navigation.Routes.system.children.components.path} component={ManageComponentsPage} />
<Route path={Navigation.Routes.audit.path} component={AuditPage} />
<Route path={Navigation.Routes.system.children.apis.path} component={ManageApisPage} />
<DutyRosterToolsModal />
<AssignmentDutyEditModal />
<SheriffProfileModal />
Expand All @@ -125,7 +154,7 @@ class Layout extends React.Component<LayoutStateProps & LayoutDispatchProps> {
<AssignmentScheduleEditModal />
<ConnectedConfirmationModal />
<AssignmentSheriffDutyReassignmentModal />
<ScheduleShiftMultiEditModal />
<ScheduleShiftMultiEditModal />
</div>
)}
<div className="footerArea">
Expand Down
Loading

0 comments on commit 6960bf7

Please sign in to comment.