mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 01:55:01 +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:
@@ -2,11 +2,25 @@
|
||||
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
||||
import Create from "ChillMainAssets/vuejs/OnTheFly/components/Create.vue";
|
||||
import { CreateComponentConfig } from "ChillMainAssets/types";
|
||||
import {trans, SAVE} from "translator";
|
||||
import {useTemplateRef} from "vue";
|
||||
|
||||
const emit = defineEmits<(e: "close") => void>();
|
||||
|
||||
const props = defineProps<CreateComponentConfig>();
|
||||
const modalDialogClass = { "modal-xl": true, "modal-scrollable": true };
|
||||
|
||||
type CreateComponentType = InstanceType<typeof Create>
|
||||
|
||||
const create = useTemplateRef<CreateComponentType>("create");
|
||||
|
||||
function save(): void {
|
||||
console.log('save from CreateModal');
|
||||
create.value?.save();
|
||||
}
|
||||
|
||||
defineExpose({save})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -22,12 +36,16 @@ const modalDialogClass = { "modal-xl": true, "modal-scrollable": true };
|
||||
<template #body-head>
|
||||
<div class="modal-body">
|
||||
<Create
|
||||
ref="create"
|
||||
:allowedTypes="props.allowedTypes"
|
||||
:action="props.action"
|
||||
:query="props.query"
|
||||
></Create>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button class="btn btn-save" type="button" @click.prevent="save">{{ trans(SAVE) }}</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user