fix(captain): force dialog open modal on mounted
This commit is contained in:
parent
7108bb135e
commit
8896482b1d
@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, watch } from 'vue';
|
import { ref, computed, watch, onMounted } from 'vue';
|
||||||
import { useStore, useMapGetter } from 'dashboard/composables/store';
|
import { useStore, useMapGetter } from 'dashboard/composables/store';
|
||||||
import { useAlert } from 'dashboard/composables';
|
import { useAlert } from 'dashboard/composables';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
@ -27,8 +27,13 @@ const { t } = useI18n();
|
|||||||
const units = useMapGetter('captainUnits/getUnits');
|
const units = useMapGetter('captainUnits/getUnits');
|
||||||
const inboxes = useMapGetter('inboxes/getInboxes');
|
const inboxes = useMapGetter('inboxes/getInboxes');
|
||||||
|
|
||||||
|
const dialogRef = ref(null);
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
dialogRef.value?.open();
|
||||||
|
});
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
contact_id: '',
|
contact_id: '',
|
||||||
inbox_id: '',
|
inbox_id: '',
|
||||||
@ -95,6 +100,7 @@ const submitReservation = async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
|
ref="dialogRef"
|
||||||
:title="$t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.TITLE')"
|
:title="$t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.TITLE')"
|
||||||
:confirm-button-label="
|
:confirm-button-label="
|
||||||
$t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.CONFIRM')
|
$t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.CONFIRM')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user