Skip to content

Commit

Permalink
Merge branch 'release-0.2.0' into fix/daniel-fix-frontend-allocation-…
Browse files Browse the repository at this point in the history
…options-1321
  • Loading branch information
dhaselhan authored Dec 5, 2024
2 parents a8e81a7 + a1aa138 commit 1ef4105
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 41 deletions.
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/Logout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,27 @@ export const Logout = () => {
<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>
)}
<BCButton
style={{ whiteSpace: 'nowrap', flexShrink: 0 }}
onClick={() => {
logout()
}}
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 1ef4105

Please sign in to comment.