-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from maykinmedia/feature/show-zaaktypen-as-opt…
…ions-in-filter ✨ Support selecting zaaktype from list in filter in destruct…
- Loading branch information
Showing
3 changed files
with
45 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { request } from "./request"; | ||
|
||
export type ZaaktypeChoice = { | ||
/** The description field of the zaaktype. */ | ||
label: string; | ||
|
||
/** The URL field of the zaaktype. */ | ||
value: string; | ||
|
||
/** A combination of the identification and the date on which the zaaktype will no longer be valid (if present). */ | ||
extra: string; | ||
}; | ||
|
||
/** | ||
* Retrieve zaaktypen from Open Zaak and return a value and a label per zaaktype. The label is the 'omschrijving' field | ||
* an the value is the URL. The response is cached for 15 minutes. | ||
*/ | ||
export async function listZaaktypeChoices() { | ||
const response = await request("GET", "/_zaaktypen-choices"); | ||
const promise: Promise<ZaaktypeChoice[]> = response.json(); | ||
return promise; | ||
} |
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