mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 01:55:01 +00:00
Enhance person creation workflow: Add onPersonCreated
event handling in Create
, CreateModal
, and AddPersons
. Update type definitions and integrate event emission for streamlined person management.
This commit is contained in:
@@ -4,8 +4,12 @@ import Create from "ChillMainAssets/vuejs/OnTheFly/components/Create.vue";
|
||||
import { CreateComponentConfig } from "ChillMainAssets/types";
|
||||
import {trans, SAVE} from "translator";
|
||||
import {useTemplateRef} from "vue";
|
||||
import {Person} from "ChillPersonAssets/types";
|
||||
|
||||
const emit = defineEmits<(e: "close") => void>();
|
||||
const emit = defineEmits<{
|
||||
(e: "onPersonCreated", payload: { person: Person }): void;
|
||||
(e: "close"): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<CreateComponentConfig>();
|
||||
const modalDialogClass = { "modal-xl": true, "modal-scrollable": true };
|
||||
@@ -40,6 +44,7 @@ defineExpose({save})
|
||||
:allowedTypes="props.allowedTypes"
|
||||
:action="props.action"
|
||||
:query="props.query"
|
||||
@onPersonCreated="(payload) => emit('onPersonCreated', payload)"
|
||||
></Create>
|
||||
</div>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user