mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 17:15:02 +00:00
Add support for person identifiers workflow: update PersonEdit
component, API methods, and modals for identifier handling during person creation. Adjust related types for improved consistency.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { fetchResults, makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||
import { Center, Civility, Gender } from "ChillMainAssets/types";
|
||||
import { AltName, Person } from "ChillPersonAssets/types";
|
||||
import {AltName, Person, PersonIdentifierWorker, PersonWrite} from "ChillPersonAssets/types";
|
||||
import person from "ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue";
|
||||
|
||||
/*
|
||||
* GET a person by id
|
||||
@@ -31,3 +32,10 @@ export const getGenders = async (): Promise<Gender[]> =>
|
||||
|
||||
export const getCentersForPersonCreation = async (): Promise<{showCenters: boolean; centers: Center[];}> =>
|
||||
makeFetch("GET", "/api/1.0/person/creation/authorized-centers", null);
|
||||
|
||||
export const getPersonIdentifiers = async (): Promise<PersonIdentifierWorker[]> =>
|
||||
fetchResults("/api/1.0/person/identifiers/workers");
|
||||
|
||||
export const createPerson = async (person: PersonWrite): Promise<Person> => {
|
||||
return makeFetch("POST", "/api/1.0/person/person.json", person);
|
||||
}
|
||||
|
Reference in New Issue
Block a user