Skip to content

Commit

Permalink
chore: resolve conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-valiollahi committed Dec 5, 2024
2 parents 1a30273 + a1aa138 commit 09f594e
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 44 deletions.
12 changes: 9 additions & 3 deletions backend/lcfs/prestart.sh
Original file line number Diff line number Diff line change
@@ -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."
Expand All @@ -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)"
3 changes: 3 additions & 0 deletions backend/lcfs/start.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => ({
Expand All @@ -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', {
Expand Down Expand Up @@ -87,7 +86,9 @@ function DefaultNavbarLink({
lineHeight: 0,
'&:hover': {
textDecoration: 'none'
}
},
whiteSpace: 'nowrap',
flexShrink: 0
}}
>
{name}
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/components/BCNavbar/components/MenuBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
<BCBox
sx={{
flexGrow: 1,
display: { xs: 'none', lg: 'flex' },
flexDirection: 'row',
margin: 0,
padding: 0
padding: 0,
marginLeft: 1
}}
>
{routes.map(
Expand Down
23 changes: 0 additions & 23 deletions frontend/src/components/Header.jsx

This file was deleted.

16 changes: 14 additions & 2 deletions frontend/src/layouts/MainLayout/components/UserProfileActions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,23 @@ export const UserProfileActions = () => {
<BCBox
display="flex"
alignItems="center"
justifyContent="space-around"
justifyContent="space-between"
mr={3}
>
{currentUser?.firstName && (
<>
<BCTypography variant="subtitle1" color="light" mx={3}>
<BCTypography
style={{
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
flexShrink: 1,
marginRight: '12px',
maxWidth: '17vw'
}}
variant="subtitle1"
color="light"
>
{`${currentUser.firstName} ${currentUser.lastName}`}
</BCTypography>
<Divider
Expand Down Expand Up @@ -108,6 +119,7 @@ export const UserProfileActions = () => {
/>
</>
<BCButton
style={{ whiteSpace: 'nowrap', flexShrink: 0 }}
onClick={logout}
color="light"
size="small"
Expand Down
26 changes: 17 additions & 9 deletions frontend/src/views/FinalSupplyEquipments/_schema.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ import {
RequiredHeader,
DateRangeCellEditor,
TextCellEditor,
AsyncSuggestionEditor
AsyncSuggestionEditor,
NumberEditor
} from '@/components/BCDataGrid/components'
import i18n from '@/i18n'
import { actions, validation } from '@/components/BCDataGrid/columns'
import moment from 'moment'
import { CommonArrayRenderer } from '@/utils/grid/cellRenderers'
import { StandardCellErrors } from '@/utils/grid/errorRenderers'
import { apiRoutes } from '@/constants/routes'
import { numberFormatter } from '@/utils/formatters.js'

export const finalSupplyEquipmentColDefs = (optionsData, compliancePeriod, errors) => [
export const finalSupplyEquipmentColDefs = (
optionsData,
compliancePeriod,
errors
) => [
validation,
actions({
enableDuplicate: true,
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 09f594e

Please sign in to comment.