-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(my-pages): health vaccination tags & locale (#16567)
* fix: tags * feat: add locale to service WIP * feat: add locale from service * feat: add locale to query call
- Loading branch information
Showing
13 changed files
with
127 additions
and
541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
libs/api/domains/health-directorate/src/lib/models/enums.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { registerEnumType } from '@nestjs/graphql' | ||
|
||
export enum VaccinationStatusEnum { | ||
valid = 'valid', // mint | ||
expired = 'expired', // blue | ||
complete = 'complete', // mint | ||
incomplete = 'incomplete', // blue | ||
undocumented = 'undocumented', // purple | ||
unvaccinated = 'unvaccinated', // red | ||
rejected = 'rejected', // purple | ||
undetermined = 'undetermined', // purple | ||
} | ||
registerEnumType(VaccinationStatusEnum, { | ||
name: 'HealthDirectorateVaccinationStatusEnum', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
libs/api/domains/health-directorate/src/lib/utils/mappers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { DiseaseVaccinationDtoVaccinationStatusEnum } from '@island.is/clients/health-directorate' | ||
import { VaccinationStatusEnum } from '../models/enums' | ||
|
||
export const mapVaccinationStatus = ( | ||
status?: DiseaseVaccinationDtoVaccinationStatusEnum, | ||
): VaccinationStatusEnum => { | ||
switch (status) { | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Valid: | ||
return VaccinationStatusEnum.valid | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Complete: | ||
return VaccinationStatusEnum.complete | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Expired: | ||
return VaccinationStatusEnum.expired | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Incomplete: | ||
return VaccinationStatusEnum.incomplete | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Rejected: | ||
return VaccinationStatusEnum.rejected | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Undetermined: | ||
return VaccinationStatusEnum.undetermined | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Undocumented: | ||
return VaccinationStatusEnum.undocumented | ||
case DiseaseVaccinationDtoVaccinationStatusEnum.Unvaccinated: | ||
return VaccinationStatusEnum.unvaccinated | ||
default: | ||
return VaccinationStatusEnum.undetermined | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
libs/service-portal/health/src/screens/Vaccinations/Vaccinations.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.