Skip to content

Commit

Permalink
updated with new PRs, removed unneccessary comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mRosenthal937 committed Dec 13, 2024
2 parents b73a292 + e03a467 commit d768110
Show file tree
Hide file tree
Showing 24 changed files with 1,346 additions and 254 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"start": "node ./src/bin/www",
"start:dev": "nodemon --legacy-watch --inspect=0.0.0.0 ./src/bin/www",
"checkWebsiteStatus": "node src/server/services/checkWebsiteStatus.js",
"webpack:dev": "webpack watch --color --progress --mode development",
"webpack:build": "webpack build --node-env production",
"webpack": "webpack build --color --progress --mode development",
Expand Down Expand Up @@ -43,7 +44,8 @@
"generateCosineSquaredTestingData": "node -e 'require(\"./src/server/data/automatedTestingData\").generateCosineSquaredTestingData(2.5)'",
"generateTestingData": "node -e 'require(\"./src/server/data/automatedTestingData\").generateTestingData()'",
"testData": "node -e 'require(\"./src/server/data/automatedTestingData.js\").insertSpecialUnitsConversionsMetersGroups()'",
"webData": "node -e 'require(\"./src/server/data/websiteData.js\").insertWebsiteData()'"
"webData": "node -e 'require(\"./src/server/data/websiteData.js\").insertWebsiteData()'",
"addLogMsg": "node -e 'require(\"./src/server/services/addLogMsg.js\").addLogMsgToDB()'"
},
"nodemonConfig": {
"watch": [
Expand Down Expand Up @@ -135,4 +137,4 @@
"webpack": "~5.76.0",
"webpack-cli": "~5.1.4"
}
}
}
11 changes: 10 additions & 1 deletion src/client/app/components/HeaderButtonsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function HeaderButtonsComponent() {
shouldCSVReadingsButtonDisabled: true,
shouldUnitsButtonDisabled: true,
shouldConversionsButtonDisabled: true,
shouldLogMsgButtonDisabled: true,
shouldVisualUnitMapButtonDisabled: true,
// Translated menu title that depend on whether logged in.
menuTitle: '',
Expand Down Expand Up @@ -101,6 +102,7 @@ export default function HeaderButtonsComponent() {
shouldCSVReadingsButtonDisabled: pathname === '/csvReadings',
shouldUnitsButtonDisabled: pathname === '/units',
shouldConversionsButtonDisabled: pathname === '/conversions',
shouldLogMsgButtonDisabled: pathname === '/logmsg',
shouldVisualUnitMapButtonDisabled: pathname === '/visual-unit'
}));
}, [pathname]);
Expand Down Expand Up @@ -244,6 +246,13 @@ export default function HeaderButtonsComponent() {
to="/admin">
<FormattedMessage id='admin.settings' />
</DropdownItem>
<DropdownItem
style={state.adminViewableLinkStyle}
disabled={state.shouldLogMsgButtonDisabled}
tag={Link}
to="/logmsg">
<FormattedMessage id='log.messages' />
</DropdownItem>
<DropdownItem
style={state.adminViewableLinkStyle}
disabled={state.shouldUsersButtonDisabled}
Expand Down Expand Up @@ -306,7 +315,7 @@ export default function HeaderButtonsComponent() {
{translate('log.in')}
</ModalHeader>
<ModalBody>
<LoginComponent handleClose={handleClose}/>
<LoginComponent handleClose={handleClose} />
</ModalBody>
</Modal>
</>
Expand Down
3 changes: 3 additions & 0 deletions src/client/app/components/RouteComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import RoleOutlet from './router/RoleOutlet';
import UnitsDetailComponent from './unit/UnitsDetailComponent';
import ErrorComponent from './router/ErrorComponent';
import { selectSelectedLanguage } from '../redux/slices/appStateSlice';
import LogMsgComponent from './admin/LogMsgComponent';
import VisualUnitDetailComponent from './visual-unit/VisualUnitDetailComponent';

/**
Expand Down Expand Up @@ -60,6 +61,8 @@ const router = createBrowserRouter([
{ path: 'maps', element: <MapsDetailContainer /> },
{ path: 'units', element: <UnitsDetailComponent /> },
{ path: 'users', element: <UsersDetailComponent /> },
{ path: 'logmsg', element: <LogMsgComponent /> },
{ path: 'users', element: <UsersDetailComponent /> },
{ path: 'visual-unit', element: <VisualUnitDetailComponent/> }
]
},
Expand Down
Loading

0 comments on commit d768110

Please sign in to comment.