-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(FGR result): show multiple courts
Co-Authored-By: SannyNguyenHung <[email protected]> Co-Authored-By: Joschka <[email protected]>
- Loading branch information
1 parent
fa02fee
commit 4535936
Showing
3 changed files
with
85 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,35 @@ | ||
import { guards as fluggastrechteVorabcheckGuards } from "~/models/flows/fluggastrechte/guards"; | ||
import fluggastrechteVorabcheckFlow from "~/models/flows/fluggastrechte/config.json"; | ||
import { fluggastrechteVorabcheckContext } from "~/models/flows/fluggastrechte/context"; | ||
import { findCourt } from "~/services/gerichtsfinder/amtsgerichtData.server"; | ||
import { type Jmtd14VTErwerberGerbeh } from "~/services/gerichtsfinder/types"; | ||
|
||
export const fluggastrechteVorabcheck = { | ||
cmsSlug: "vorab-check-pages", | ||
flow: fluggastrechteVorabcheckFlow, | ||
guards: fluggastrechteVorabcheckGuards, | ||
context: fluggastrechteVorabcheckContext, | ||
} as const; | ||
|
||
export const partnerCourtAirports = { | ||
BRE: "28199", | ||
BER: "12529", | ||
DUS: "40474", | ||
FRA: "60549", // eigtl 60547 | ||
HAM: "22335", | ||
MUC: "85356", | ||
STR: "70629", | ||
} as const; | ||
|
||
function partnerCourtFromAirport(airport: string) { | ||
if (airport in partnerCourtAirports) { | ||
const zipCode = | ||
partnerCourtAirports[airport as keyof typeof partnerCourtAirports]; | ||
return findCourt({ zipCode }); | ||
} | ||
} | ||
|
||
export const partnerCourtFromAirports = (airports: string[]) => | ||
airports | ||
.map(partnerCourtFromAirport) | ||
.filter((airport) => airport) as Jmtd14VTErwerberGerbeh[]; |
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