refactor(captain): remove manual unit selection from reservation modal
This commit is contained in:
parent
8896482b1d
commit
adcadcf12c
@ -12,10 +12,8 @@
|
||||
"CONTACT_ID": "Contact ID",
|
||||
"CONTACT_ID_PLACEHOLDER": "Enter the contact ID",
|
||||
"INBOX": "Inbox",
|
||||
"INBOX_PLACEHOLDER": "Select inbox",
|
||||
"UNIT": "Unit",
|
||||
"UNIT_PLACEHOLDER": "Select unit",
|
||||
"SUITE_IDENTIFIER": "Suite Identifier",
|
||||
"INBOX_PLACEHOLDER": "Select an inbox",
|
||||
"SUITE_IDENTIFIER": "Suite Identifier (Ex: 101, Master Suite)",
|
||||
"CHECK_IN": "Check-in",
|
||||
"CHECK_OUT": "Check-out",
|
||||
"TOTAL_AMOUNT": "Total Amount"
|
||||
|
||||
@ -12,10 +12,8 @@
|
||||
"CONTACT_ID": "ID do Contato",
|
||||
"CONTACT_ID_PLACEHOLDER": "Digite o ID do contato",
|
||||
"INBOX": "Canal (Caixa de Entrada)",
|
||||
"INBOX_PLACEHOLDER": "Selecione a caixa",
|
||||
"UNIT": "Unidade",
|
||||
"UNIT_PLACEHOLDER": "Selecione a unidade",
|
||||
"SUITE_IDENTIFIER": "Identificador da Suíte",
|
||||
"INBOX_PLACEHOLDER": "Selecione a caixa de entrada",
|
||||
"SUITE_IDENTIFIER": "Identificador da Suíte (Ex: 101, Suíte Master)",
|
||||
"CHECK_IN": "Check-in",
|
||||
"CHECK_OUT": "Check-out",
|
||||
"TOTAL_AMOUNT": "Valor Total"
|
||||
|
||||
@ -271,7 +271,6 @@ const statusColor = reservationStatus => {
|
||||
|
||||
onMounted(() => {
|
||||
readFiltersFromRoute();
|
||||
store.dispatch('captainUnits/get');
|
||||
if (isRevenueView.value) {
|
||||
fetchRevenue();
|
||||
return;
|
||||
|
||||
@ -24,7 +24,6 @@ const emit = defineEmits(['close', 'success']);
|
||||
const store = useStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const units = useMapGetter('captainUnits/getUnits');
|
||||
const inboxes = useMapGetter('inboxes/getInboxes');
|
||||
|
||||
const dialogRef = ref(null);
|
||||
@ -37,7 +36,6 @@ onMounted(() => {
|
||||
const form = ref({
|
||||
contact_id: '',
|
||||
inbox_id: '',
|
||||
captain_unit_id: '',
|
||||
suite_identifier: '',
|
||||
check_in_at: '',
|
||||
check_out_at: '',
|
||||
@ -60,13 +58,6 @@ watch(
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const unitOptions = computed(() => {
|
||||
return (units.value || []).map(unit => ({
|
||||
label: unit.name,
|
||||
value: unit.id,
|
||||
}));
|
||||
});
|
||||
|
||||
const inboxOptions = computed(() => {
|
||||
return (inboxes.value || []).map(inbox => ({
|
||||
label: inbox.name,
|
||||
@ -145,22 +136,6 @@ const submitReservation = async () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Unit -->
|
||||
<div>
|
||||
<label class="block mb-1 text-sm font-medium text-n-slate-12">
|
||||
{{ $t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.FIELDS.UNIT') }}
|
||||
</label>
|
||||
<ComboBox
|
||||
v-model="form.captain_unit_id"
|
||||
:options="unitOptions"
|
||||
:placeholder="
|
||||
$t(
|
||||
'CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.FIELDS.UNIT_PLACEHOLDER'
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Suite Identifier -->
|
||||
<Input
|
||||
v-model="form.suite_identifier"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user