custom brief > add images modal : close modal on add
This commit is contained in:
parent
70d2d33cbf
commit
732c91459a
3 changed files with 10 additions and 7 deletions
|
|
@ -7,11 +7,8 @@ columns:
|
|||
label: Titre
|
||||
client: true
|
||||
currentStep:
|
||||
label: Étape
|
||||
label: Étape en cours
|
||||
value: "{{ page.getStepLabel }}"
|
||||
managers:
|
||||
label: Chefs de projet
|
||||
value: "{{ page.printManagers }}"
|
||||
empty: Pas encore de projet
|
||||
image: false
|
||||
search: true
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
/>
|
||||
</template>
|
||||
</div>
|
||||
<ImagesEditPanel />
|
||||
<ImagesEditPanel @close="close" />
|
||||
</div>
|
||||
</div>
|
||||
</Dialog>
|
||||
|
|
@ -84,7 +84,7 @@ const { isAddImagesModalOpen } = defineProps({
|
|||
isAddImagesModalOpen: Boolean,
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:isAddImagesModalOpen"]);
|
||||
const emit = defineEmits("close");
|
||||
const { activeTab, activeTabId, tabs } = storeToRefs(useAddImagesModalStore());
|
||||
|
||||
const isOpen = ref(isAddImagesModalOpen);
|
||||
|
|
@ -92,6 +92,10 @@ watch(isOpen, () => {
|
|||
emit("close");
|
||||
});
|
||||
|
||||
function close() {
|
||||
isOpen.value = false;
|
||||
}
|
||||
|
||||
const deleteIsOpen = false;
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -114,6 +114,8 @@ const { page } = storeToRefs(usePageStore());
|
|||
|
||||
const { activeTab } = storeToRefs(useAddImagesModalStore());
|
||||
|
||||
const emit = defineEmits("close");
|
||||
|
||||
const images = computed(() => {
|
||||
return activeTab.value.selectedImages;
|
||||
});
|
||||
|
|
@ -198,7 +200,7 @@ function addImagesToBrief() {
|
|||
.then((res) => res.json())
|
||||
.then((json) => {
|
||||
page.value.moodboard = json.images;
|
||||
console.log(json);
|
||||
emit("close");
|
||||
})
|
||||
.catch((error) => console.error("Error:", error));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue