Re-establish normal behavior for component within twig

This commit is contained in:
Julie Lenaerts 2025-04-02 12:44:55 +02:00
parent ab23a4efb5
commit 12dff82248

View File

@ -12,6 +12,15 @@
</div> </div>
</div> </div>
<ul v-if="!showModal" class="record_actions">
<li>
<a class="btn btn-sm btn-create mt-3" @click="openModal">
{{ trans(ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK) }}
</a>
</li>
</ul>
<teleport to="body"> <teleport to="body">
<modal <modal
v-if="showModal" v-if="showModal"
@ -89,6 +98,10 @@ watch(selectedAcpw, (newValue) => {
inputField.value = String(newValue?.id); inputField.value = String(newValue?.id);
} }
}); });
const openModal = () => {
showModal.value = true
}
const closeModal = () => { const closeModal = () => {
showModal.value = false showModal.value = false
emit('closeModal') emit('closeModal')