diff --git a/frontend/src/components/BCForm/BCFormCheckbox.jsx b/frontend/src/components/BCForm/BCFormCheckbox.jsx index 13f28a215..811a49e5c 100644 --- a/frontend/src/components/BCForm/BCFormCheckbox.jsx +++ b/frontend/src/components/BCForm/BCFormCheckbox.jsx @@ -2,9 +2,9 @@ import { Checkbox, FormControl, FormControlLabel, - FormLabel, - Typography + FormLabel } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { Controller } from 'react-hook-form' import { CustomLabel } from './CustomLabel' import PropTypes from 'prop-types' @@ -22,9 +22,9 @@ export const BCFormCheckbox = ({ name, form, label, options, disabled }) => { return ( - + {label} - +
diff --git a/frontend/src/components/BCForm/BCFormRadio.jsx b/frontend/src/components/BCForm/BCFormRadio.jsx index 215840d61..1854ae761 100644 --- a/frontend/src/components/BCForm/BCFormRadio.jsx +++ b/frontend/src/components/BCForm/BCFormRadio.jsx @@ -3,9 +3,9 @@ import { FormControlLabel, FormLabel, Radio, - RadioGroup, - Typography + RadioGroup } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { Controller } from 'react-hook-form' import PropTypes from 'prop-types' import { CustomLabel } from './CustomLabel' @@ -34,9 +34,9 @@ export const BCFormRadio = ({ name, control, label, options, disabled }) => { return ( - + {label} - + { @@ -14,14 +15,14 @@ export const BCFormText = ({ name, control, label, optional }) => { }) => ( <> - + {label}  {optional && ( (optional) )} - + ( - + {header} — {text} - + ) CustomLabel.propTypes = { diff --git a/frontend/src/components/BCTypography/BCTypographyRoot.jsx b/frontend/src/components/BCTypography/BCTypographyRoot.jsx index 605bcc6e9..b08b8ef3e 100644 --- a/frontend/src/components/BCTypography/BCTypographyRoot.jsx +++ b/frontend/src/components/BCTypography/BCTypographyRoot.jsx @@ -3,7 +3,7 @@ import Typography from '@mui/material/Typography' import { styled } from '@mui/material/styles' const BCTypographyRoot = styled(Typography)(({ theme, ownerState }) => { - const { palette, typography, functions } = theme + const { palette, typography, functions = {} } = theme const { color, textTransform, diff --git a/frontend/src/components/DisclaimerBanner.jsx b/frontend/src/components/DisclaimerBanner.jsx index fb0b2b87a..ac4e7e507 100644 --- a/frontend/src/components/DisclaimerBanner.jsx +++ b/frontend/src/components/DisclaimerBanner.jsx @@ -1,5 +1,6 @@ import PropTypes from 'prop-types' -import { Box, Typography } from '@mui/material' +import { Box } from '@mui/material' +import BCTypography from '@/components/BCTypography' import colors from '@/themes/base/colors' const DisclaimerBanner = ({ messages }) => { @@ -16,9 +17,9 @@ const DisclaimerBanner = ({ messages }) => { }} > {messages.map((message, index) => ( - + {message} - + ))} ) diff --git a/frontend/src/components/Loading.jsx b/frontend/src/components/Loading.jsx index 53575eac7..d1906365b 100644 --- a/frontend/src/components/Loading.jsx +++ b/frontend/src/components/Loading.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import CircularProgress from '@mui/material/CircularProgress' import Box from '@mui/material/Box' -import Typography from '@mui/material/Typography' +import BCTypography from '@/components/BCTypography' import colors from '@/themes/base/colors' import borders from '@/themes/base/borders' @@ -36,9 +36,9 @@ const Loading = ({ message = 'Loading...', fixed = false }) => { }} > - + {message} - + ) diff --git a/frontend/src/components/ProgressBreadcrumb.jsx b/frontend/src/components/ProgressBreadcrumb.jsx index 91743d589..c90d70988 100644 --- a/frontend/src/components/ProgressBreadcrumb.jsx +++ b/frontend/src/components/ProgressBreadcrumb.jsx @@ -1,6 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' -import { Breadcrumbs, Typography, Box, useMediaQuery } from '@mui/material' +import { Breadcrumbs, Box, useMediaQuery } from '@mui/material' +import BCTypography from '@/components/BCTypography' /** * ProgressBreadcrumb Component @@ -62,19 +63,19 @@ const ProgressBreadcrumb = ({ steps, currentStep }) => { mb: 1 }} > - {index + 1} - + - {step} - + ) } diff --git a/frontend/src/views/Admin/AdminMenu/components/AuditLog.jsx b/frontend/src/views/Admin/AdminMenu/components/AuditLog.jsx index 91f7bba1a..a6f994c90 100644 --- a/frontend/src/views/Admin/AdminMenu/components/AuditLog.jsx +++ b/frontend/src/views/Admin/AdminMenu/components/AuditLog.jsx @@ -1,7 +1,7 @@ import { useRef, useCallback } from 'react' import BCBox from '@/components/BCBox' import BCDataGridServer from '@/components/BCDataGrid/BCDataGridServer' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { useTranslation } from 'react-i18next' import { auditLogColDefs, defaultAuditLogSortModel } from './_schema' import { apiRoutes, ROUTES } from '@/constants/routes' @@ -38,9 +38,9 @@ export const AuditLog = () => { return ( - + {t('admin:AuditLog')} - + { return ( - + {t('AuditLogDetails', { id })} - + {/* Display the additional information */} - + {t('auditLogColLabels.tableName')}: {tableName} - - + + {t('auditLogColLabels.operation')}: {operation} - - + + {t('auditLogColLabels.rowId')}: {rowId} - - + + {t('auditLogColLabels.createDate')}:{' '} {new Date(createDate).toLocaleString()} - - + + {t('auditLogColLabels.userId')}:{' '} {createUser || t('System')} - + diff --git a/frontend/src/views/AllocationAgreements/AddEditAllocationAgreements.jsx b/frontend/src/views/AllocationAgreements/AddEditAllocationAgreements.jsx index 66cf71927..f09d3ee0e 100644 --- a/frontend/src/views/AllocationAgreements/AddEditAllocationAgreements.jsx +++ b/frontend/src/views/AllocationAgreements/AddEditAllocationAgreements.jsx @@ -1,5 +1,5 @@ import { useState, useEffect, useMemo, useRef, useCallback } from 'react' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import Grid2 from '@mui/material/Unstable_Grid2/Grid2' import { useTranslation } from 'react-i18next' import { useLocation, useNavigate, useParams } from 'react-router-dom' @@ -253,17 +253,17 @@ export const AddEditAllocationAgreements = () => { !allocationAgreementsLoading && (
- + {t('allocationAgreement:addAllocationAgreementRowsTitle')} - - + {t('allocationAgreement:allocationAgreementSubtitle')} - +
[ }, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellStyle: (params) => StandardCellErrors(params, errors), suppressKeyboardEvent, minWidth: 120, @@ -95,7 +95,7 @@ export const allocationAgreementColDefs = (optionsData, errors) => [ cellRenderer: (params) => params.value || (!params.value && ( - Enter or search a name + Enter or search a name )), cellStyle: (params) => StandardCellErrors(params, errors), suppressKeyboardEvent, @@ -177,7 +177,7 @@ export const allocationAgreementColDefs = (optionsData, errors) => [ }, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellStyle: (params) => StandardCellErrors(params, errors), suppressKeyboardEvent, minWidth: 200, @@ -276,7 +276,7 @@ export const allocationAgreementColDefs = (optionsData, errors) => [ }, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellStyle: (params) => StandardCellErrors(params, errors), suppressKeyboardEvent, minWidth: 300, diff --git a/frontend/src/views/ComplianceReports/ComplianceReports.jsx b/frontend/src/views/ComplianceReports/ComplianceReports.jsx index 75476cd50..973b6f46b 100644 --- a/frontend/src/views/ComplianceReports/ComplianceReports.jsx +++ b/frontend/src/views/ComplianceReports/ComplianceReports.jsx @@ -1,5 +1,5 @@ // mui components -import { Typography, Stack } from '@mui/material' +import { Stack } from '@mui/material' import BCBox from '@/components/BCBox' import BCAlert from '@/components/BCAlert' import BCDataGridServer from '@/components/BCDataGrid/BCDataGridServer' @@ -19,6 +19,7 @@ import { useCreateComplianceReport } from '@/hooks/useComplianceReports' // internal components import { reportsColDefs, defaultSortModel } from './components/_schema' import { NewComplianceReportButton } from './components/NewComplianceReportButton' +import BCTypography from '@/components/BCTypography' export const ComplianceReports = () => { const { t } = useTranslation(['common', 'report']) @@ -39,7 +40,10 @@ export const ComplianceReports = () => { }), [t] ) - const getRowId = useCallback((params) => params.data.complianceReportId.toString(), []) + const getRowId = useCallback( + (params) => params.data.complianceReportId.toString(), + [] + ) // eslint-disable-next-line react-hooks/exhaustive-deps const handleRowClicked = useCallback( ({ data }) => { @@ -114,9 +118,9 @@ export const ComplianceReports = () => { )}
- + {t('report:title')} - + { return ( <> - {t('report:errorRetrieving')} + {t('report:errorRetrieving')} ) } @@ -180,22 +181,22 @@ export const EditViewComplianceReport = () => { data={modalData} /> - {compliancePeriod + ' ' + t('report:complianceReport')} -{' '} {reportData?.report.nickname} - - + Status: {currentStatus} - + @@ -242,9 +243,9 @@ export const EditViewComplianceReport = () => { {/* Internal Comments */} {isGovernmentUser && ( - + {t(`report:internalComments`)} - + { gap: 2 }} > - { }} /> - + {t('report:activityLinksList')}: - + - {t('report:uploadLabel')} - + - + {orgData?.name} - + @@ -190,7 +190,7 @@ export const AssessmentCard = ({ {!isGovernmentUser && ( - - {t('report:renewableFuelTarget')} - + @@ -223,13 +223,13 @@ export const AssessmentCard = ({ - {t('report:lowCarbonFuelTargetSummary')} - + @@ -248,14 +248,14 @@ export const AssessmentCard = ({ )} {!!chain.length && ( <> - {t('report:reportHistory')} - + {chain.map((report) => ( ))} @@ -266,13 +266,13 @@ export const AssessmentCard = ({ {isFeatureEnabled(FEATURE_FLAGS.SUPPLEMENTAL_REPORTING) && currentStatus === COMPLIANCE_REPORT_STATUSES.ASSESSED && ( <> - {t('report:supplementalWarning')} - + {t('report:errorRetrieving')} + return {t('report:errorRetrieving')} } return ( <> - + {t('report:summaryAndDeclaration')} - + } diff --git a/frontend/src/views/ComplianceReports/components/Introduction.jsx b/frontend/src/views/ComplianceReports/components/Introduction.jsx index 2a804dc96..ec3747941 100644 --- a/frontend/src/views/ComplianceReports/components/Introduction.jsx +++ b/frontend/src/views/ComplianceReports/components/Introduction.jsx @@ -3,22 +3,22 @@ import { Accordion, AccordionDetails, AccordionSummary, - Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { GlobalStyles } from '@mui/system' import { useTranslation } from 'react-i18next' // Reusable Section Component const Section = ({ header, content }) => ( <> - + > {content.map((paragraph, index) => ( - ( } }} dangerouslySetInnerHTML={{ __html: paragraph }} - > + > ))} ) @@ -58,9 +58,9 @@ export const Introduction = ({ expanded, compliancePeriod }) => { id="compliance-report-intro" data-test="compliance-report-intro" > - + {t('report:introduction')} - + {/* Render each section using map */} @@ -69,10 +69,10 @@ export const Introduction = ({ expanded, compliancePeriod }) => { ))} - + {t('report:questions')} - - + { } }} dangerouslySetInnerHTML={{ __html: t('report:contact') }} - > + > ) } diff --git a/frontend/src/views/ComplianceReports/components/OrgDetailsCard.jsx b/frontend/src/views/ComplianceReports/components/OrgDetailsCard.jsx index fde2af7a1..c2c990dd7 100644 --- a/frontend/src/views/ComplianceReports/components/OrgDetailsCard.jsx +++ b/frontend/src/views/ComplianceReports/components/OrgDetailsCard.jsx @@ -1,5 +1,6 @@ import { useTranslation } from 'react-i18next' -import { Stack, Typography } from '@mui/material' +import { Stack } from '@mui/material' +import BCTypography from '@/components/BCTypography' import BCWidgetCard from '@/components/BCWidgetCard/BCWidgetCard' import { constructAddress } from '@/utils/constructAddress' @@ -12,24 +13,24 @@ export const OrgDetailsCard = ({ orgName, orgAddress, orgAttorneyAddress, isGove title={t('report:orgDetails')} content={ - + {orgName} - +
- + {t('report:serviceAddrLabel')}: - {' '} - + {' '} + {orgAddress && constructAddress(orgAddress)} - +
- {t('report:bcAddrLabel')}:{' '} - + {t('report:bcAddrLabel')}:{' '} + {orgAttorneyAddress && constructAddress(orgAttorneyAddress)} - +
- {!isGovernmentUser && { return ( <> - + {t('report:reportDetails')} { > {t('report:collapseAll')} - + {activityList.map((activity, index) => { const { data, error, isLoading } = activity.useFetch(complianceReportId) return ( @@ -223,7 +223,7 @@ const ReportDetails = ({ currentStatus = 'Draft' }) => { id={`panel${index}-header`} data-test={`panel${index}-summary`} > - {
)} - + {isLoading ? ( ) : error ? ( - Error loading data + Error loading data ) : activity.component ? ( activity.component(data) ) : ( - {JSON.stringify(data)} + {JSON.stringify(data)} )} diff --git a/frontend/src/views/FinalSupplyEquipments/AddEditFinalSupplyEquipments.jsx b/frontend/src/views/FinalSupplyEquipments/AddEditFinalSupplyEquipments.jsx index fbfa3ceb3..fb9fcafaa 100644 --- a/frontend/src/views/FinalSupplyEquipments/AddEditFinalSupplyEquipments.jsx +++ b/frontend/src/views/FinalSupplyEquipments/AddEditFinalSupplyEquipments.jsx @@ -1,5 +1,5 @@ import { useState, useEffect, useMemo, useRef, useCallback } from 'react' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import Grid2 from '@mui/material/Unstable_Grid2/Grid2' import { useTranslation } from 'react-i18next' import { useLocation, useNavigate, useParams } from 'react-router-dom' @@ -262,17 +262,17 @@ export const AddEditFinalSupplyEquipments = () => { !equipmentsLoading && (
- + {t('finalSupplyEquipment:addFSErowsTitle')} - - + {t('finalSupplyEquipment:fseSubtitle')} - +
( - + {params.value[0] ? `${params.value[0]} to ${params.value[1]}` : 'YYYY-MM-DD to YYYY-MM-DD'} - + ), suppressKeyboardEvent, cellStyle: (params) => StandardCellErrors(params, errors), @@ -198,7 +198,7 @@ export const finalSupplyEquipmentColDefs = ( cellStyle: (params) => StandardCellErrors(params, errors), cellRenderer: (params) => params.value || - (!params.value && Select) + (!params.value && Select) }, { field: 'ports', @@ -219,7 +219,7 @@ export const finalSupplyEquipmentColDefs = ( cellStyle: (params) => StandardCellErrors(params, errors), cellRenderer: (params) => params.value || - (!params.value && Select) + (!params.value && Select) }, { field: 'fuelMeasurementType', @@ -240,7 +240,7 @@ export const finalSupplyEquipmentColDefs = ( cellStyle: (params) => StandardCellErrors(params, errors), cellRenderer: (params) => params.value || - (!params.value && Select) + (!params.value && Select) }, { field: 'intendedUses', @@ -260,7 +260,7 @@ export const finalSupplyEquipmentColDefs = ( (params.value && params.value !== '' && ( )) || - (!params.value && Select), + (!params.value && Select), suppressKeyboardEvent, minWidth: 560 }, @@ -282,7 +282,7 @@ export const finalSupplyEquipmentColDefs = ( (params.value && params.value !== '' && ( )) || - (!params.value && Select), + (!params.value && Select), suppressKeyboardEvent, minWidth: 315 }, diff --git a/frontend/src/views/FuelCodes/AddFuelCode/AddEditFuelCode.jsx b/frontend/src/views/FuelCodes/AddFuelCode/AddEditFuelCode.jsx index 6841ea7ac..c06a73a7b 100644 --- a/frontend/src/views/FuelCodes/AddFuelCode/AddEditFuelCode.jsx +++ b/frontend/src/views/FuelCodes/AddFuelCode/AddEditFuelCode.jsx @@ -1,6 +1,6 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Stack, Typography } from '@mui/material' +import { Stack } from '@mui/material' import Grid2 from '@mui/material/Unstable_Grid2/Grid2' import { v4 as uuid } from 'uuid' import { BCGridEditor } from '@/components/BCDataGrid/BCGridEditor' @@ -376,13 +376,13 @@ const AddEditFuelCodeBase = () => { <>
- + {!existingFuelCode && t('fuelCode:newFuelCodeTitle')} {existingFuelCode?.fuelCodeStatus.status === FUEL_CODE_STATUSES.DRAFT && t('fuelCode:editFuelCodeTitle')} {existingFuelCode?.fuelCodeStatus.status === FUEL_CODE_STATUSES.APPROVED && t('fuelCode:viewFuelCodeTitle')} - +
{ } onClick={handleOpenApprovalModal} > - + {t('fuelCode:approveFuelCodeBtn')} - +
)} diff --git a/frontend/src/views/FuelCodes/AddFuelCode/_schema.jsx b/frontend/src/views/FuelCodes/AddFuelCode/_schema.jsx index 96186c584..66d033af6 100644 --- a/frontend/src/views/FuelCodes/AddFuelCode/_schema.jsx +++ b/frontend/src/views/FuelCodes/AddFuelCode/_schema.jsx @@ -9,7 +9,7 @@ import { import { apiRoutes } from '@/constants/routes' import i18n from '@/i18n' import { CommonArrayRenderer } from '@/utils/grid/cellRenderers' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { actions, validation } from '@/components/BCDataGrid/columns' import { numberFormatter } from '@/utils/formatters' @@ -30,7 +30,7 @@ const createCellRenderer = (field, customRenderer = null) => { const content = customRenderer ? customRenderer(params) : params.value || - (!params.value && Select) + (!params.value && Select) return
{content}
} @@ -257,9 +257,9 @@ export const fuelCodeColDefs = (optionsData, errors, isCreate, canEdit) => [ maxWidth: 220, minWidth: 200, cellRenderer: createCellRenderer('applicationDate', (params) => ( - + {params.value ? params.value : 'YYYY-MM-DD'} - + )), suppressKeyboardEvent, cellEditor: DateEditor @@ -272,9 +272,9 @@ export const fuelCodeColDefs = (optionsData, errors, isCreate, canEdit) => [ maxWidth: 220, minWidth: 220, cellRenderer: createCellRenderer('approvalDate', (params) => ( - + {params.value ? params.value : 'YYYY-MM-DD'} - + )), suppressKeyboardEvent, @@ -288,9 +288,9 @@ export const fuelCodeColDefs = (optionsData, errors, isCreate, canEdit) => [ maxWidth: 220, minWidth: 220, cellRenderer: createCellRenderer('effectiveDate', (params) => ( - + {params.value ? params.value : 'YYYY-MM-DD'} - + )), suppressKeyboardEvent, cellEditor: DateEditor @@ -303,9 +303,9 @@ export const fuelCodeColDefs = (optionsData, errors, isCreate, canEdit) => [ maxWidth: 220, minWidth: 220, cellRenderer: createCellRenderer('expirationDate', (params) => ( - + {params.value ? params.value : 'YYYY-MM-DD'} - + )), suppressKeyboardEvent, cellEditor: DateEditor @@ -562,7 +562,7 @@ export const fuelCodeColDefs = (optionsData, errors, isCreate, canEdit) => [ params.value && params.value.length > 0 ? ( ) : ( - Select + Select ) ), cellRendererParams: { @@ -587,7 +587,7 @@ export const fuelCodeColDefs = (optionsData, errors, isCreate, canEdit) => [ params.value && params.value.length > 0 ? ( ) : ( - Select + Select ) ), cellRendererParams: { diff --git a/frontend/src/views/FuelCodes/FuelCodes.jsx b/frontend/src/views/FuelCodes/FuelCodes.jsx index 094ee425d..fba322f9a 100644 --- a/frontend/src/views/FuelCodes/FuelCodes.jsx +++ b/frontend/src/views/FuelCodes/FuelCodes.jsx @@ -11,7 +11,8 @@ import { useApiService } from '@/services/useApiService' import withRole from '@/utils/withRole' import { faCirclePlus } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { Stack, Typography } from '@mui/material' +import { Stack } from '@mui/material' +import BCTypography from '@/components/BCTypography' import Grid2 from '@mui/material/Unstable_Grid2/Grid2' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -68,9 +69,9 @@ const FuelCodesBase = () => { )} - + {t('FuelCodes')} - + { data-test="new-fuel-code-btn" onClick={() => navigate(ROUTES.FUELCODES_ADD)} > - + {t('fuelCode:newFuelCodeBtn')} - + [ filter: false, headerName: t('fuelCode:fuelCodeColLabels.lastUpdated'), cellRenderer: (params) => ( - + {params.value ? timezoneFormatter({ value: params.value }) : 'YYYY-MM-DD'} - + ), minWidth: 300 }, diff --git a/frontend/src/views/FuelExports/AddEditFuelExports.jsx b/frontend/src/views/FuelExports/AddEditFuelExports.jsx index 5e6a3cf76..ebaa03498 100644 --- a/frontend/src/views/FuelExports/AddEditFuelExports.jsx +++ b/frontend/src/views/FuelExports/AddEditFuelExports.jsx @@ -7,7 +7,7 @@ import { useSaveFuelExport } from '@/hooks/useFuelExport' import { isArrayEmpty } from '@/utils/formatters' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import Grid2 from '@mui/material/Unstable_Grid2/Grid2' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -228,17 +228,17 @@ export const AddEditFuelExports = () => { !fuelExportsLoading && (
- + {t('fuelExport:addFuelExportRowsTitle')} - - + {t('fuelExport:fuelExportSubtitle')} - +
[ maxWidth: 220, minWidth: 200, cellRenderer: (params) => ( - + {params.value ? params.value : 'YYYY-MM-DD'} - + ), suppressKeyboardEvent, cellEditor: DateEditor, @@ -112,7 +112,7 @@ export const fuelExportColDefs = (optionsData, errors) => [ cellEditor: AutocompleteCellEditor, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellEditorParams: { options: optionsData?.fuelTypes?.map((obj) => obj.fuelType).sort(), multiple: false, @@ -181,7 +181,7 @@ export const fuelExportColDefs = (optionsData, errors) => [ cellEditor: AutocompleteCellEditor, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellEditorParams: (params) => ({ options: optionsData?.fuelTypes ?.find((obj) => params.data.fuelType === obj.fuelType) @@ -255,7 +255,7 @@ export const fuelExportColDefs = (optionsData, errors) => [ cellEditor: AutocompleteCellEditor, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellStyle: (params) => cellErrorStyle(params, errors), suppressKeyboardEvent, valueGetter: (params) => { @@ -288,7 +288,7 @@ export const fuelExportColDefs = (optionsData, errors) => [ cellEditor: 'agSelectCellEditor', cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellEditorParams: (params) => ({ values: optionsData?.fuelTypes ?.find((obj) => params.data.fuelType === obj.fuelType) @@ -370,7 +370,7 @@ export const fuelExportColDefs = (optionsData, errors) => [ }), cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), suppressKeyboardEvent, editable: (params) => isFuelTypeOther(params), cellStyle: (params) => { diff --git a/frontend/src/views/FuelSupplies/AddEditFuelSupplies.jsx b/frontend/src/views/FuelSupplies/AddEditFuelSupplies.jsx index f5e3b6506..a6289c0d7 100644 --- a/frontend/src/views/FuelSupplies/AddEditFuelSupplies.jsx +++ b/frontend/src/views/FuelSupplies/AddEditFuelSupplies.jsx @@ -8,7 +8,7 @@ import { useSaveFuelSupply } from '@/hooks/useFuelSupply' import { isArrayEmpty } from '@/utils/formatters' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import Grid2 from '@mui/material/Unstable_Grid2/Grid2' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -267,17 +267,17 @@ export const AddEditFuelSupplies = () => { !fuelSuppliesLoading && (
- + {t('fuelSupply:addFuelSupplyRowsTitle')} - - + {t('fuelSupply:fuelSupplySubtitle')} - +
[ cellEditor: AutocompleteCellEditor, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellEditorParams: { options: optionsData?.fuelTypes?.map((obj) => obj.fuelType).sort(), multiple: false, @@ -150,7 +150,7 @@ export const fuelSupplyColDefs = (optionsData, errors, warnings) => [ cellEditor: AutocompleteCellEditor, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellEditorParams: (params) => ({ options: optionsData?.fuelTypes ?.find((obj) => params.data.fuelType === obj.fuelType) @@ -223,7 +223,7 @@ export const fuelSupplyColDefs = (optionsData, errors, warnings) => [ cellEditor: AutocompleteCellEditor, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellStyle: (params) => StandardCellWarningAndErrors(params, errors, warnings), suppressKeyboardEvent, @@ -260,7 +260,7 @@ export const fuelSupplyColDefs = (optionsData, errors, warnings) => [ cellEditor: 'agSelectCellEditor', cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellEditorParams: (params) => ({ values: optionsData?.fuelTypes ?.find((obj) => params.data.fuelType === obj.fuelType) @@ -369,7 +369,7 @@ export const fuelSupplyColDefs = (optionsData, errors, warnings) => [ }), cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), suppressKeyboardEvent, editable: (params) => isFuelTypeOther(params), cellStyle: (params) => diff --git a/frontend/src/views/NotionalTransfers/AddEditNotionalTransfers.jsx b/frontend/src/views/NotionalTransfers/AddEditNotionalTransfers.jsx index dae931de3..2360dfb19 100644 --- a/frontend/src/views/NotionalTransfers/AddEditNotionalTransfers.jsx +++ b/frontend/src/views/NotionalTransfers/AddEditNotionalTransfers.jsx @@ -1,5 +1,5 @@ import { useState, useEffect, useMemo, useRef, useCallback } from 'react' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import Grid2 from '@mui/material/Unstable_Grid2/Grid2' import { useTranslation } from 'react-i18next' import { useLocation, useNavigate, useParams } from 'react-router-dom' @@ -201,9 +201,9 @@ export const AddEditNotionalTransfers = () => { !transfersLoading && (
- + {t('notionalTransfer:newNotionalTransferTitle')} - +
[ cellRenderer: (params) => params.value || (!params.value && ( - Enter or search a name + Enter or search a name )), suppressKeyboardEvent, minWidth: 300, @@ -107,7 +107,7 @@ export const notionalTransferColDefs = (optionsData, errors) => [ cellStyle: (params) => StandardCellErrors(params, errors), cellRenderer: (params) => params.value || - (!params.value && Select) + (!params.value && Select) }, { field: 'receivedOrTransferred', @@ -128,7 +128,7 @@ export const notionalTransferColDefs = (optionsData, errors) => [ cellStyle: (params) => StandardCellErrors(params, errors), cellRenderer: (params) => params.value || - (!params.value && Select) + (!params.value && Select) }, { field: 'quantity', diff --git a/frontend/src/views/Organizations/AddEditOrg/AddEditOrg.jsx b/frontend/src/views/Organizations/AddEditOrg/AddEditOrg.jsx index db41edc62..829ce2114 100644 --- a/frontend/src/views/Organizations/AddEditOrg/AddEditOrg.jsx +++ b/frontend/src/views/Organizations/AddEditOrg/AddEditOrg.jsx @@ -13,9 +13,9 @@ import { Paper, Radio, RadioGroup, - TextField, - Typography + TextField } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { useMutation } from '@tanstack/react-query' import { useCallback, useEffect, useState } from 'react' import { useForm, Controller } from 'react-hook-form' @@ -136,9 +136,9 @@ export const AddEditOrg = () => { } return ( errors[fieldName] && ( - + {errors[fieldName].message} - + ) ) } @@ -301,9 +301,9 @@ export const AddEditOrg = () => { {t('common:submitError')} )} - + {orgID ? t('org:editOrgTitle') : t('org:addOrgTitle')} - + { /> } label={ - + {t('org:sameAsLegalNameLabel')} - + } /> @@ -413,9 +413,9 @@ export const AddEditOrg = () => { - + {t('org:supplierTypLabel')}: - + @@ -435,9 +435,9 @@ export const AddEditOrg = () => { /> } label={ - + {t('supplier')} - + } /> @@ -451,9 +451,9 @@ export const AddEditOrg = () => { - + {t('org:regTrnLabel')}: - + @@ -474,9 +474,9 @@ export const AddEditOrg = () => { } label={ - + {t('yes')} - + } /> { } label={ - + {t('no')} - + } /> @@ -522,9 +522,9 @@ export const AddEditOrg = () => { - + {t('org:serviceAddrLabel')} - + {t('org:streetAddrLabel')}: @@ -612,9 +612,9 @@ export const AddEditOrg = () => { - + {t('org:bcAddrLabel')} - + { /> } label={ - + {t('org:sameAddrLabel')} - + } /> @@ -762,9 +762,9 @@ export const AddEditOrg = () => { } onClick={() => navigate(ROUTES.ORGANIZATIONS)} > - + {t('backBtn')} - + { } > - {t('saveBtn')} + {t('saveBtn')} diff --git a/frontend/src/views/Organizations/ViewOrganization/ViewOrganization.jsx b/frontend/src/views/Organizations/ViewOrganization/ViewOrganization.jsx index 2bf32af03..5fbac39bc 100644 --- a/frontend/src/views/Organizations/ViewOrganization/ViewOrganization.jsx +++ b/frontend/src/views/Organizations/ViewOrganization/ViewOrganization.jsx @@ -5,7 +5,7 @@ import BCTypography from '@/components/BCTypography' import BCAlert from '@/components/BCAlert' import BCDataGridServer from '@/components/BCDataGrid/BCDataGridServer' import Loading from '@/components/Loading' -import { IconButton, Typography } from '@mui/material' +import { IconButton } from '@mui/material' // icons import colors from '@/themes/base/colors.js' import { faCirclePlus } from '@fortawesome/free-solid-svg-icons' @@ -175,10 +175,10 @@ export const ViewOrganization = () => { {t('org:complianceUnitBalance')}: - + {orgBalaceInfo?.totalBalance.toLocaleString()} ( {Math.abs(orgBalaceInfo?.reservedBalance).toLocaleString()}) - + { isFetched && (
- + {t('otherUses:newOtherUsesTitle')} - +
[ }, suppressKeyboardEvent, cellRenderer: (params) => - params.value || Select, + params.value || Select, cellStyle: (params) => StandardCellErrors(params, errors) }, { @@ -58,7 +58,7 @@ export const otherUsesColDefs = (optionsData, errors) => [ }, suppressKeyboardEvent, cellRenderer: (params) => - params.value || Select, + params.value || Select, cellStyle: (params) => StandardCellErrors(params, errors), minWidth: 200 }, @@ -84,7 +84,7 @@ export const otherUsesColDefs = (optionsData, errors) => [ }, cellRenderer: (params) => params.value || - (!params.value && Select), + (!params.value && Select), cellStyle: (params) => StandardCellErrors(params, errors), suppressKeyboardEvent, valueSetter: (params) => { @@ -121,7 +121,7 @@ export const otherUsesColDefs = (optionsData, errors) => [ params.data.provisionOfTheAct === PROVISION_APPROVED_FUEL_CODE && fuelType?.fuelCodes?.length > 0 ) { - return params.value || Select; + return params.value || Select; } return null; }, @@ -193,7 +193,7 @@ export const otherUsesColDefs = (optionsData, errors) => [ }, suppressKeyboardEvent, cellRenderer: (params) => - params.value || Select, + params.value || Select, cellStyle: (params) => StandardCellErrors(params, errors) }, { @@ -246,7 +246,7 @@ export const otherUsesColDefs = (optionsData, errors) => [ }, suppressKeyboardEvent, cellRenderer: (params) => - params.value || Select, + params.value || Select, cellStyle: (params) => StandardCellErrors(params, errors), minWidth: 200 }, diff --git a/frontend/src/views/Transactions/AddEditViewTransaction.jsx b/frontend/src/views/Transactions/AddEditViewTransaction.jsx index 0470f3797..766559a92 100644 --- a/frontend/src/views/Transactions/AddEditViewTransaction.jsx +++ b/frontend/src/views/Transactions/AddEditViewTransaction.jsx @@ -23,12 +23,12 @@ import { import { useTheme, Stack, - Typography, useMediaQuery, Step, StepLabel, Stepper } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faArrowLeft } from '@fortawesome/free-solid-svg-icons' import BCBox from '@/components/BCBox' @@ -345,9 +345,9 @@ export const AddEditViewTransaction = () => { /> {/* Header section */} - + {title} - + {/* Progress bar */} { {/* Internal Comments */} - + {t(`txn:internalCommentsOptional`)} - + { onClick={() => navigate(ROUTES.TRANSACTIONS)} > - + {t('backBtn')} - + {buttonClusterConfig[ transactionId ? currentStatus : TRANSACTION_STATUSES.NEW diff --git a/frontend/src/views/Transactions/components/Comments.jsx b/frontend/src/views/Transactions/components/Comments.jsx index a630c7533..52de50b7e 100644 --- a/frontend/src/views/Transactions/components/Comments.jsx +++ b/frontend/src/views/Transactions/components/Comments.jsx @@ -1,5 +1,6 @@ import { useState, useEffect } from 'react' -import { Box, Typography, Collapse, IconButton, TextField } from '@mui/material' +import { Box, Collapse, IconButton, TextField } from '@mui/material' +import BCTypography from '@/components/BCTypography' import ExpandLessIcon from '@mui/icons-material/ExpandLess' import ExpandMoreIcon from '@mui/icons-material/ExpandMore' import { useFormContext } from 'react-hook-form' @@ -37,7 +38,7 @@ export const Comments = ({ commentField, isEditable }) => { onClick={handleToggle} sx={{ cursor: 'pointer' }} > - {t('txn:commentsDescText')} + {t('txn:commentsDescText')} {isExpanded ? : } diff --git a/frontend/src/views/Transactions/components/LabelBox.jsx b/frontend/src/views/Transactions/components/LabelBox.jsx index a5e837539..5fa29ae1d 100644 --- a/frontend/src/views/Transactions/components/LabelBox.jsx +++ b/frontend/src/views/Transactions/components/LabelBox.jsx @@ -28,9 +28,9 @@ export const LabelBox = ({ > {description && ( - + {description} - + )} {children} diff --git a/frontend/src/views/Transactions/components/OrgTransactionDetails.jsx b/frontend/src/views/Transactions/components/OrgTransactionDetails.jsx index b25fb2e1f..b48ea7897 100644 --- a/frontend/src/views/Transactions/components/OrgTransactionDetails.jsx +++ b/frontend/src/views/Transactions/components/OrgTransactionDetails.jsx @@ -1,5 +1,6 @@ import React from 'react' -import { Box, Grid, Typography } from '@mui/material' +import { Box, Grid } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { useTranslation } from 'react-i18next' import { dateFormatter, numberFormatter } from '@/utils/formatters' import BCWidgetCard from '@/components/BCWidgetCard/BCWidgetCard' @@ -33,32 +34,32 @@ export const OrgTransactionDetails = ({ transactionType, transactionData }) => { // Construct the content based on the transaction type const content = ( - + {transactionType === ADMIN_ADJUSTMENT ? t('txn:administrativeAdjustment') : t('txn:initiativeAgreement')}{' '} {t('txn:for')} {transactionData.toOrganization.name} - - + + {t('txn:complianceUnitsLabel')}{' '} {numberFormatter({ value: transactionData.complianceUnits })} - - + + {t('txn:effectiveDateLabel')}{' '} {dateFormatter({ value: effectiveDate })} - + {transactionData.govComment && ( - + {t('txn:commentsTextLabel')}{' '} {transactionData.govComment} - + )} - + {t('txn:approvedLabel')}{' '} {dateFormatter({ value: approvedDate })} {t('txn:approvedByDirector')} - + ) diff --git a/frontend/src/views/Transactions/components/OrganizationList.jsx b/frontend/src/views/Transactions/components/OrganizationList.jsx index e2f9719dd..1bc750edb 100644 --- a/frontend/src/views/Transactions/components/OrganizationList.jsx +++ b/frontend/src/views/Transactions/components/OrganizationList.jsx @@ -1,6 +1,7 @@ import { useEffect, useState } from 'react' import PropTypes from 'prop-types' -import { Box, Stack, Typography, Autocomplete, TextField } from '@mui/material' +import { Box, Stack, Autocomplete, TextField } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { useTranslation } from 'react-i18next' import { useOrganizationNames } from '@/hooks/useOrganizations' import { numberFormatter } from '@/utils/formatters' @@ -47,9 +48,9 @@ const OrganizationList = ({ onOrgChange }) => { return ( - + {org} - + { useFlexGap flexWrap="wrap" > - + {t('txn:showTransactionsInvolve')}:  - + { return ( - + {t('txn:txnHistoryLabel')} - +
    {transactionHistory?.map((item, index) => (
  • - + {getTransactionStatusLabel(getStatusObject(item))} @@ -50,7 +50,7 @@ export const TransactionHistory = ({ transactionHistory }) => { of {t('govOrg')} - +
  • ))}
diff --git a/frontend/src/views/Transfers/AddEditViewTransfer.jsx b/frontend/src/views/Transfers/AddEditViewTransfer.jsx index 6e15fd993..2968b16a8 100644 --- a/frontend/src/views/Transfers/AddEditViewTransfer.jsx +++ b/frontend/src/views/Transfers/AddEditViewTransfer.jsx @@ -23,10 +23,10 @@ import { Step, StepLabel, Stepper, - Typography, useMediaQuery, useTheme } from '@mui/material' +import BCTypography from '@/components/BCTypography' import BCAlert from '@/components/BCAlert' import BCBox from '@/components/BCBox' import BCButton from '@/components/BCButton' @@ -365,18 +365,18 @@ export const AddEditViewTransfer = () => { /> {/* Header section */} - + {title} - + {transferStatus !== TRANSFER_STATUSES.RECORDED && ( - + {t('transfer:effectiveText')} - +
- + {t('transfer:considerationText')} - +
)} {/* Progress bar */} @@ -470,12 +470,12 @@ export const AddEditViewTransfer = () => { onClick={() => navigate(ROUTES.TRANSACTIONS)} > - {t('backBtn')} - + {buttonClusterConfig[transferId ? currentStatus : 'New']?.map( (config) => diff --git a/frontend/src/views/Transfers/components/AgreementDate.jsx b/frontend/src/views/Transfers/components/AgreementDate.jsx index c05887356..10effa986 100644 --- a/frontend/src/views/Transfers/components/AgreementDate.jsx +++ b/frontend/src/views/Transfers/components/AgreementDate.jsx @@ -1,4 +1,5 @@ -import { Box, TextField, Typography } from '@mui/material' +import { Box, TextField } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { useFormContext } from 'react-hook-form' import { LabelBox } from './LabelBox' import { useTranslation } from 'react-i18next' @@ -25,7 +26,9 @@ export const AgreementDate = () => { justifyContent="flex-start" gap="10px" > - {t('transfer:agrDateHeader')} + + {t('transfer:agrDateHeader')} + { return ( - + Attachments - + {attachments.map((attachment) => ( { key={attachment.attachmentID} alignItems="flex-start" > - + ({ diff --git a/frontend/src/views/Transfers/components/CommentList.jsx b/frontend/src/views/Transfers/components/CommentList.jsx index 8d7e135e3..33b88cf1a 100644 --- a/frontend/src/views/Transfers/components/CommentList.jsx +++ b/frontend/src/views/Transfers/components/CommentList.jsx @@ -1,7 +1,6 @@ import BCBox from '@/components/BCBox' import PropTypes from 'prop-types' import { - Typography, List, ListItem, ListItemAvatar, @@ -9,12 +8,13 @@ import { Avatar, Divider } from '@mui/material' +import BCTypography from '@/components/BCTypography' export const CommentList = ({ comments = [] }) => ( - + Comments - + ( - ( > {comment.name} {':'} - + } secondary={ <> - {comment.comment} - + } /> diff --git a/frontend/src/views/Transfers/components/LabelBox.jsx b/frontend/src/views/Transfers/components/LabelBox.jsx index a5e837539..5fa29ae1d 100644 --- a/frontend/src/views/Transfers/components/LabelBox.jsx +++ b/frontend/src/views/Transfers/components/LabelBox.jsx @@ -28,9 +28,9 @@ export const LabelBox = ({ > {description && ( - + {description} - + )} {children} diff --git a/frontend/src/views/Transfers/components/OrganizationBadge.jsx b/frontend/src/views/Transfers/components/OrganizationBadge.jsx index 132debc01..6ddeaee2a 100644 --- a/frontend/src/views/Transfers/components/OrganizationBadge.jsx +++ b/frontend/src/views/Transfers/components/OrganizationBadge.jsx @@ -1,6 +1,7 @@ import { PropTypes } from 'prop-types' import BCBadge from '@/components/BCBadge' -import { Stack, Typography } from '@mui/material' +import { Stack } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { Role } from '@/components/Role' import { roles } from '@/constants/roles' import { useOrganizationBalance } from '@/hooks/useOrganization' @@ -23,16 +24,16 @@ export const OrganizationBadge = ({ badgeContent={ <> - {organizationName} + {organizationName} {['Submitted', 'Recommended'].includes(transferStatus) && ( - + Balance: {orgInfo?.totalBalance.toLocaleString()} ( {Math.abs(orgInfo?.reservedBalance).toLocaleString()}) - - + + Registered: {orgInfo?.registered ? 'Yes' : 'No'} - + )} diff --git a/frontend/src/views/Transfers/components/Recommendation.jsx b/frontend/src/views/Transfers/components/Recommendation.jsx index 100568e89..aedaaf7da 100644 --- a/frontend/src/views/Transfers/components/Recommendation.jsx +++ b/frontend/src/views/Transfers/components/Recommendation.jsx @@ -1,7 +1,8 @@ import BCBox from '@/components/BCBox' import { TRANSFER_STATUSES } from '@/constants/statuses' import { useTransfer } from '@/hooks/useTransfer' -import { FormControlLabel, Radio, RadioGroup, Typography } from '@mui/material' +import { FormControlLabel, Radio, RadioGroup } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { Controller, useFormContext } from 'react-hook-form' import { useTranslation } from 'react-i18next' import { useParams } from 'react-router-dom' @@ -18,9 +19,9 @@ export const Recommendation = ({ currentStatus }) => { return ( - + {t('transfer:analystRecommend')} - + {transferData.currentStatus.status === TRANSFER_STATUSES.SUBMITTED ? ( { )} /> ) : ( - + The analyst has recommended that you to{' '} {transferData.recommendation} this transfer. - + )} ) diff --git a/frontend/src/views/Transfers/components/SigningAuthority.jsx b/frontend/src/views/Transfers/components/SigningAuthority.jsx index 910a6cdd0..2d734a2b5 100644 --- a/frontend/src/views/Transfers/components/SigningAuthority.jsx +++ b/frontend/src/views/Transfers/components/SigningAuthority.jsx @@ -1,4 +1,4 @@ -import { Box, FormControlLabel, Checkbox, Typography } from '@mui/material' +import { Box, FormControlLabel, Checkbox } from '@mui/material' import BCTypography from '@/components/BCTypography' import withRole from '@/utils/withRole' import { useFormContext } from 'react-hook-form' @@ -34,15 +34,15 @@ export const SigningAuthority = () => { /> } label={ - + {t('transfer:saConfirmation')} - + } /> {errors.signingAuthorityDeclaration && ( - + {errors.signingAuthorityDeclaration.message} - + )}
diff --git a/frontend/src/views/Transfers/components/TransferDetailsCard.jsx b/frontend/src/views/Transfers/components/TransferDetailsCard.jsx index 4e45cfb45..b215cef39 100644 --- a/frontend/src/views/Transfers/components/TransferDetailsCard.jsx +++ b/frontend/src/views/Transfers/components/TransferDetailsCard.jsx @@ -1,7 +1,8 @@ import PropTypes from 'prop-types' import SyncAltIcon from '@mui/icons-material/SyncAlt' import SwapVertIcon from '@mui/icons-material/SwapVert' -import { Stack, Typography, useMediaQuery, useTheme } from '@mui/material' +import { Stack, useMediaQuery, useTheme } from '@mui/material' +import BCTypography from '@/components/BCTypography' import BCBox from '@/components/BCBox' import { OrganizationBadge } from '@/views/Transfers/components' import { useTranslation } from 'react-i18next' @@ -42,11 +43,11 @@ export const TransferDetailsCard = ({ transferStatus={transferStatus} /> - + {isMobileSize ? `$${decimalFormatter(totalValue)}` : `${quantity} ${t('transfer:complianceUnits')}`} - + )} - + {!isMobileSize ? `$${decimalFormatter(totalValue)}` : `${quantity} ${t('transfer:complianceUnits')}`} - + { )?.name || '' const pricePerUnit = parseFloat(watch('pricePerUnit')) - const totalValue = - quantity && pricePerUnit ? quantity * pricePerUnit : 0 + const totalValue = quantity && pricePerUnit ? quantity * pricePerUnit : 0 const isNumberOfCreditsValid = (number) => !isNaN(number) && number > 0 const isTotalValueValid = (value) => typeof value === 'number' && value > 0 @@ -99,7 +99,7 @@ export const TransferGraphic = () => { overflow: 'hidden' }} > - {creditsFrom} + {creditsFrom} { }} > {isNumberOfCreditsValid(quantity) && ( - + {`${formattedNumberOfCredits} compliance units`} - + )} {renderIcon()} {isTotalValueValid(totalValue) && ( - + {formatCurrency(totalValue)} - + )} @@ -145,7 +145,7 @@ export const TransferGraphic = () => { justifyContent: 'center' }} > - {creditsTo || ''} + {creditsTo || ''} ) diff --git a/frontend/src/views/Transfers/components/TransferHistory.jsx b/frontend/src/views/Transfers/components/TransferHistory.jsx index f6be941ef..b4f50bf17 100644 --- a/frontend/src/views/Transfers/components/TransferHistory.jsx +++ b/frontend/src/views/Transfers/components/TransferHistory.jsx @@ -4,7 +4,7 @@ import { TRANSFER_RECOMMENDATION } from '@/constants/statuses' import { useTransfer } from '@/hooks/useTransfer' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import dayjs from 'dayjs' import localizedFormat from 'dayjs/plugin/localizedFormat' import duration from 'dayjs/plugin/duration' @@ -65,9 +65,9 @@ function TransferHistory({ transferHistory }) { return ( - + {t('transfer:txnHistory')} - +
    {[ @@ -78,7 +78,7 @@ function TransferHistory({ transferHistory }) { ].includes(currentStatus) && agreementDate && (
  • - + Date of written agreement reached between the two organizations: {agreementDate.format('LL')} (proposal falls @@ -101,12 +101,12 @@ function TransferHistory({ transferHistory }) { )} ) - +
  • )} {transferHistory?.map((item, index) => (
  • - + {getTransferStatusLabel(item.transferStatus?.status)}{' '} on {dayjs(item.createDate).format('LL')} @@ -122,7 +122,7 @@ function TransferHistory({ transferHistory }) { ? item.userProfile.organization.name : t('govOrg')}{' '} - +
  • ))}
diff --git a/frontend/src/views/Transfers/components/TransferView.jsx b/frontend/src/views/Transfers/components/TransferView.jsx index a33bbb62e..8bcd1a1a1 100644 --- a/frontend/src/views/Transfers/components/TransferView.jsx +++ b/frontend/src/views/Transfers/components/TransferView.jsx @@ -8,7 +8,7 @@ import { } from '@/constants/statuses' import { useCurrentUser } from '@/hooks/useCurrentUser' import { decimalFormatter } from '@/utils/formatters' -import { Typography } from '@mui/material' +import BCTypography from '@/components/BCTypography' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import TransferHistory from './TransferHistory' @@ -55,7 +55,7 @@ export const TransferView = ({ transferId, editorMode, transferData }) => { backgroundColor: 'transparent.main' }} > - + {fromOrganization} {t('transfer:transfers')} {quantity} @@ -64,7 +64,7 @@ export const TransferView = ({ transferId, editorMode, transferData }) => { ${decimalFormatter({ value: pricePerUnit })} {t('transfer:complianceUnitsPerTvo')} ${decimalFormatter(totalValue)} CAD. - +
{/* Comments */} {transferData?.comments.length > 0 && ( diff --git a/frontend/src/views/Users/AddEditUser/AddEditUser.jsx b/frontend/src/views/Users/AddEditUser/AddEditUser.jsx index 18b129042..bcb3db66b 100644 --- a/frontend/src/views/Users/AddEditUser/AddEditUser.jsx +++ b/frontend/src/views/Users/AddEditUser/AddEditUser.jsx @@ -21,7 +21,8 @@ import colors from '@/themes/base/colors' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faFloppyDisk, faArrowLeft } from '@fortawesome/free-solid-svg-icons' import BCButton from '@/components/BCButton' -import { Box, Stack, Typography } from '@mui/material' +import { Box, Stack } from '@mui/material' +import BCTypography from '@/components/BCTypography' import Grid2 from '@mui/material/Unstable_Grid2' import BCAlert from '@/components/BCAlert' import Loading from '@/components/Loading' @@ -232,10 +233,10 @@ export const AddEditUser = ({ userType }) => { {t('common:submitError')} )} - + {userID ? 'Edit' : 'Add'} user  {userType === 'bceid' && `to ${orgName}`} - +
@@ -310,9 +311,9 @@ export const AddEditUser = ({ userType }) => { ) } > - + {t('backBtn')} - + { /> } > - {t('saveBtn')} + {t('saveBtn')} diff --git a/frontend/src/views/Users/AddEditUser/components/BCeIDSpecificRoleFields.jsx b/frontend/src/views/Users/AddEditUser/components/BCeIDSpecificRoleFields.jsx index d0a30b0ff..95bb47b3a 100644 --- a/frontend/src/views/Users/AddEditUser/components/BCeIDSpecificRoleFields.jsx +++ b/frontend/src/views/Users/AddEditUser/components/BCeIDSpecificRoleFields.jsx @@ -1,4 +1,5 @@ -import { Box, Typography } from '@mui/material' +import { Box } from '@mui/material' +import BCTypography from '@/components/BCTypography' import { BCFormCheckbox, BCFormRadio } from '@/components/BCForm' import { nonGovRoles } from '@/constants/roles' import { bceidRoleOptions } from '../_schema' @@ -7,9 +8,9 @@ export const BCeIDSpecificRoleFields = ({ form, disabled, t }) => { const { control } = form return ( - + {t('admin:Roles')} - + { const { control } = form return ( - + {t('admin:Roles')} - +