Skip to content

Commit

Permalink
feat: other license categories
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Oct 6, 2023
1 parent b1bac10 commit 0876a47
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/client/src/components/citizen/licenses/licenses-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ export function CitizenLicenses({ citizen }: Props) {
DriversLicenseCategoryType.HUNTING,
["huntingLicense", "huntingLicenseTimeEnd", "huntingLicenseNumber"],
],
// todo: other license categories
};

const otherLicenseCategories = citizen.dlCategory.filter(
(v) => v.type === DriversLicenseCategoryType.OTHER,
);

return (
<>
{types.map((type) => {
Expand Down Expand Up @@ -187,6 +190,12 @@ export function CitizenLicenses({ citizen }: Props) {
</div>
);
})}

{otherLicenseCategories.length > 0 ? (
<Infofield label={t("Citizen.otherLicenseCategory")}>
{otherLicenseCategories.map((v) => v?.value?.value).join(", ")}
</Infofield>
) : null}
</>
);
}

0 comments on commit 0876a47

Please sign in to comment.