diff --git a/backend/lcfs/prestart.sh b/backend/lcfs/prestart.sh index 952f220c6..3fe3f9cda 100755 --- a/backend/lcfs/prestart.sh +++ b/backend/lcfs/prestart.sh @@ -1,6 +1,13 @@ #!/usr/bin/env bash -echo "running prestart.sh from $(pwd)" +echo "Running prestart.sh from $(pwd)" + +# Check for Alembic head conflicts +HEAD_COUNT=$(poetry run alembic heads | wc -l) +if [ "$HEAD_COUNT" -gt 1 ]; then + echo "Alembic head conflict detected: Multiple migration heads present." + exit 1 +fi # Apply base database migrations echo "Applying base migrations." @@ -23,5 +30,4 @@ if [ $? -ne 0 ]; then fi echo "Migrations and seeding completed successfully." - -echo "done running prestart.sh from $(pwd)" +echo "Done running prestart.sh from $(pwd)" diff --git a/backend/lcfs/start.sh b/backend/lcfs/start.sh index b84880611..7e19eb1ef 100755 --- a/backend/lcfs/start.sh +++ b/backend/lcfs/start.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# Enable strict error handling +set -e + # Wait for the database to be ready ./wait-for-it.sh $LCFS_DB_HOST:5432 --timeout=30 diff --git a/frontend/src/components/BCNavbar/components/DefaultNavbarLink.jsx b/frontend/src/components/BCNavbar/components/DefaultNavbarLink.jsx index 2d488647b..347b5d6b3 100644 --- a/frontend/src/components/BCNavbar/components/DefaultNavbarLink.jsx +++ b/frontend/src/components/BCNavbar/components/DefaultNavbarLink.jsx @@ -31,7 +31,7 @@ function DefaultNavbarLink({ mb={isMobileView ? 0.2 : -1} mr={isMobileView ? 2 : 1} py={1} - px={2} + px={1} display="flex" alignItems="center" sx={({ transitions, palette }) => ({ @@ -54,8 +54,7 @@ function DefaultNavbarLink({ backgroundColor: isMobileView ? 'rgba(0, 0, 0, 0.2)' : 'rgba(0, 0, 0, 0.3)', - paddingBottom: isMobileView ? '11px' : '12px', - paddingLeft: isMobileView ? '13px' : 2 + paddingBottom: isMobileView ? '11px' : '12px' }, transform: 'translateX(0)', transition: transitions.create('transform', { @@ -87,7 +86,9 @@ function DefaultNavbarLink({ lineHeight: 0, '&:hover': { textDecoration: 'none' - } + }, + whiteSpace: 'nowrap', + flexShrink: 0 }} > {name} diff --git a/frontend/src/components/BCNavbar/components/MenuBar.jsx b/frontend/src/components/BCNavbar/components/MenuBar.jsx index 0e9f738fd..5844d82b4 100644 --- a/frontend/src/components/BCNavbar/components/MenuBar.jsx +++ b/frontend/src/components/BCNavbar/components/MenuBar.jsx @@ -17,18 +17,19 @@ const MenuBar = (props) => { backdropFilter: `saturate(200%) blur(30px)`, color: white.main, maxHeight: '50px', - display: { xs: 'none', sm: 'flex' } + display: { xs: 'none', sm: 'flex' }, + justifyContent: 'space-between' })} disableGutters variant="dense" > {routes.map( diff --git a/frontend/src/components/Header.jsx b/frontend/src/components/Header.jsx deleted file mode 100644 index 49c90cb5e..000000000 --- a/frontend/src/components/Header.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import logo from '@/assets/images/gov3_bc_logo.png' -import { Logout } from './Logout' - -const Header = () => { - return ( -
-
-
- - Government of B.C. - -
-
- -
-
-
-

Low Carbon Fuel Standard

-
-
- ) -} -export default Header diff --git a/frontend/src/layouts/MainLayout/components/UserProfileActions.jsx b/frontend/src/layouts/MainLayout/components/UserProfileActions.jsx index bea4ace6c..f5f7dbc68 100644 --- a/frontend/src/layouts/MainLayout/components/UserProfileActions.jsx +++ b/frontend/src/layouts/MainLayout/components/UserProfileActions.jsx @@ -50,12 +50,23 @@ export const UserProfileActions = () => { {currentUser?.firstName && ( <> - + {`${currentUser.firstName} ${currentUser.lastName}`} { /> [ +export const finalSupplyEquipmentColDefs = ( + optionsData, + compliancePeriod, + errors +) => [ validation, actions({ enableDuplicate: true, @@ -76,13 +82,15 @@ export const finalSupplyEquipmentColDefs = (optionsData, compliancePeriod, error 'finalSupplyEquipment:finalSupplyEquipmentColLabels.kwhUsage' ), minWidth: 220, - cellEditor: 'agTextCellEditor', - cellDataType: 'text', - cellStyle: (params) => StandardCellErrors(params, errors), - valueFormatter: (params) => { - const value = parseFloat(params.value) - return !isNaN(value) ? value.toFixed(2) : '' - } + valueFormatter: numberFormatter, + cellEditor: NumberEditor, + type: 'numericColumn', + cellEditorParams: { + precision: 0, + min: 0, + showStepperButtons: false + }, + cellStyle: (params) => StandardCellErrors(params, errors) }, { field: 'serialNbr',