Skip to content

Commit

Permalink
add place as column on dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Petter Andersson committed Feb 11, 2025
1 parent 60c7196 commit 5f0a92b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/adverts/dashboard/AdvertsTable/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface AdvertTableRow {
tags: string[]
reference: string
notes: string
place: string
lendingPeriod: number
expectedReturnDate: string
isOverdue: boolean
Expand Down
4 changes: 4 additions & 0 deletions src/adverts/dashboard/createColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export const createColumns = ({
field: 'notes',
headerName: fields.notes?.label || '',
},
{
field: 'place',
headerName: fields.place?.label || '',
},
{
field: 'lendingPeriod',
type: 'number',
Expand Down
1 change: 1 addition & 0 deletions src/adverts/dashboard/createRows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const createRows = (adverts: Advert[]): AdvertTableRow[] =>
tags: advert.tags,
reference: advert.reference,
notes: advert.notes,
place: advert.place,
lendingPeriod: advert.lendingPeriod,
expectedReturnDate: (advert.meta.returnInfo[0]?.at || '').split('T')[0],
isOverdue: advert.meta.claims.some(({ isOverdue }) => isOverdue),
Expand Down

0 comments on commit 5f0a92b

Please sign in to comment.