fix(captain): force dialog open modal on mounted

This commit is contained in:
Rodrigo Borba 2026-03-01 03:19:43 -03:00
parent 7108bb135e
commit 8896482b1d

View File

@ -1,5 +1,5 @@
<script setup>
import { ref, computed, watch } from 'vue';
import { ref, computed, watch, onMounted } from 'vue';
import { useStore, useMapGetter } from 'dashboard/composables/store';
import { useAlert } from 'dashboard/composables';
import { useI18n } from 'vue-i18n';
@ -27,8 +27,13 @@ const { t } = useI18n();
const units = useMapGetter('captainUnits/getUnits');
const inboxes = useMapGetter('inboxes/getInboxes');
const dialogRef = ref(null);
const isLoading = ref(false);
onMounted(() => {
dialogRef.value?.open();
});
const form = ref({
contact_id: '',
inbox_id: '',
@ -95,6 +100,7 @@ const submitReservation = async () => {
<template>
<Dialog
ref="dialogRef"
:title="$t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.TITLE')"
:confirm-button-label="
$t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.CONFIRM')