Skip to content

Commit

Permalink
Merge branch 'main' into 953_edit_departure_date_useredit
Browse files Browse the repository at this point in the history
  • Loading branch information
IanMayo authored Jan 2, 2024
2 parents 87da05d + 2361e95 commit 2b07b65
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/components/Layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import preval from 'preval.macro'

const Footer = (): React.ReactElement => {
const buildDate = preval`module.exports = new Date().toISOString().slice(0, 19).replace('T', ' ')`
const trimmedAppBuildDate = buildDate.substring(0, buildDate.length - 3)
const trimmedAppBuildDate = `Build Date: ${buildDate.substring(
0,
buildDate.length - 3
)}`

return (
<div
Expand Down
2 changes: 1 addition & 1 deletion src/resources/addresses/AddressList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function AddressList(): React.ReactElement {
<TextField<Address> source='fullAddress' />
<BooleanField<Address> source='active' looseValue />
<DateField<Address> source='createdAt' />
<TextField<Address> source='Remarks' />
<TextField<Address> source='remarks' />
</Datagrid>
</List>
)
Expand Down
2 changes: 1 addition & 1 deletion src/resources/reference-data/ReferenceDataForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const FormContent = ({
{name === constants.R_MEDIA_TYPE ? (
<NumberInput
source='itemSize'
sx={{ width: '100%', visibility: 'hidden' }}
sx={{ width: '100%', visibility: 'show' }}
defaultValue={10}
/>
) : null}
Expand Down
12 changes: 9 additions & 3 deletions src/resources/reference-data/ReferenceDataShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const Actions = ({ resource }: ShowActionProps): React.ReactElement => {
const redirect = useRedirect()
return (
<TopToolbar sx={{ alignItems: 'center' }}>
<EditButton />
<HistoryButton
onClick={() => {
redirect(
Expand Down Expand Up @@ -58,9 +59,14 @@ export default function ReferenceDataShow({
<TextField<VaultLocation> variant='h6' source='name' />
</ValueField>
{name === R_MEDIA_TYPE ? (
<ValueField label='Item size' sx={{ visibility: 'hidden' }}>
<TextField variant='h6' source='itemSize' />
</ValueField>
<Typography>
<ValueField label='Item size' sx={{ visibility: 'show' }}>
<TextField variant='h6' source='itemSize' />
&nbsp;
<span style={{ fontWeight: 'bold' }}>(Note: </span> Item-size is
stored to facilitate future shelf loading calculations)
</ValueField>
</Typography>
) : null}
<ValueField label='active'>
<BooleanField<VaultLocation> source='active' looseValue />
Expand Down
2 changes: 1 addition & 1 deletion src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ interface Address {
createdAt: string
fullAddress: string
active: boolean
Remarks: string
remarks: string
}

interface Dispatch {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/init-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const getAddresses = (
id: index + 1,
fullAddress: `${ctr} Some St, Some Town, Some County, DD${ctr} ${ctr}EF`,
createdAt: DateTime.now().toISO() ?? '',
Remarks: '',
remarks: '',
active
}
})
Expand Down

0 comments on commit 2b07b65

Please sign in to comment.