mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-25 16:14:59 +00:00
Filter PersonIdentifierWorker
by presence
during initialization and update type definitions. Add presence
field to PersonIdentifierWorkerNormalizer
.
This commit is contained in:
@@ -28,6 +28,7 @@ final readonly class PersonIdentifierWorkerNormalizer implements NormalizerInter
|
||||
'engine' => $object->getDefinition()->getEngine(),
|
||||
'label' => $object->getDefinition()->getLabel(),
|
||||
'isActive' => $object->getDefinition()->isActive(),
|
||||
'presence' => $object->getDefinition()->getPresence()->value,
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -423,12 +423,15 @@ export interface SearchOptions {
|
||||
};
|
||||
}
|
||||
|
||||
type PersonIdentifierPresence = 'NOT_EDITABLE' | 'ON_EDIT' | 'ON_CREATION' | 'REQUIRED';
|
||||
|
||||
export interface PersonIdentifierWorker {
|
||||
type: "person_identifier_worker";
|
||||
definition_id: number;
|
||||
engine: string;
|
||||
label: TranslatableString;
|
||||
isActive: boolean;
|
||||
presence: PersonIdentifierPresence;
|
||||
}
|
||||
|
||||
export class MakeFetchException extends Error {
|
||||
|
@@ -649,7 +649,10 @@ onMounted(() => {
|
||||
config.genders = genders;
|
||||
});
|
||||
getPersonIdentifiers().then((identifiers) => {
|
||||
config.identifiers = identifiers;
|
||||
config.identifiers = identifiers.filter(
|
||||
(w: PersonIdentifierWorker) =>
|
||||
w.presence === 'ON_CREATION' || w.presence === 'REQUIRED'
|
||||
);
|
||||
});
|
||||
if (props.action !== "create") {
|
||||
loadData();
|
||||
|
Reference in New Issue
Block a user