Skip to content

Commit

Permalink
fix(procu): types (#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
OverGlass committed Jun 24, 2024
1 parent 03afa87 commit a701eec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/api/Procuration/procuration.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface ProcurationDetailsModel extends ReadableLightUserModel {
vote_zone: VoteZoneModel
created_at: string
post_address: PostAddressModel
actions: ActionModel[] | null
tags: null | LabelTypeModel[]
age: number
vote_place_name: string
Expand All @@ -53,6 +54,7 @@ export interface ProcurationDetailsModel extends ReadableLightUserModel {
export interface ProcurationProxyDetailModel extends EmailPhoneModel {
first_names: string
last_name: string
actions: ActionModel[] | null
uuid: string
status: ProcurationStatusEnum
id: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('Mandate person card', () => {
location: faker.person.jobArea(),
onExpend: vitest.fn(),
onNarrow: vitest.fn(),
history: null,
peopleInSameVotePlace: faker.number.int({
min: 0,
max: 10,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Procurations/Pages/MandateEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default function MandateEditPage() {
<Grid item xs={12} sm={12} md={6}>
{proxy ? (
<MandatePersonCard
history={data.actions}
history={proxy.actions}
firstName={proxy.first_names}
lastName={proxy.last_name}
status={proxy.status}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Procurations/Pages/MandateMatchPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ const MandateInfo = memo((data: ProcurationDetailsModel) => {
const navigate = useNavigate()
return (
<MandatePersonCard
history={data.actions}
firstName={data.first_names}
lastName={data.last_name}
status={data.status}
Expand Down Expand Up @@ -243,6 +244,7 @@ const Proxy = memo(
return (
<MandatePersonCard
key={el.uuid}
history={el.actions}
firstName={el.first_names}
lastName={el?.last_name}
status={el?.status}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Procurations/Pages/MandateValidationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export default function MandateValidationPage() {
<Grid item xs={12} sm={12} md={6}>
{data ? (
<MandatePersonCard
history={data.actions}
firstName={data.first_names}
lastName={data.last_name}
status={data.status}
Expand All @@ -194,6 +195,7 @@ export default function MandateValidationPage() {
<Grid item xs={12} sm={12} md={6}>
{proxy ? (
<MandatePersonCard
history={proxy.actions}
firstName={proxy.first_names}
lastName={proxy.last_name}
status={proxy.status}
Expand Down

0 comments on commit a701eec

Please sign in to comment.