feat(captain): add status field to manual reservation modal
This commit is contained in:
parent
adcadcf12c
commit
e8b51109cb
@ -13,6 +13,8 @@
|
|||||||
"CONTACT_ID_PLACEHOLDER": "Enter the contact ID",
|
"CONTACT_ID_PLACEHOLDER": "Enter the contact ID",
|
||||||
"INBOX": "Inbox",
|
"INBOX": "Inbox",
|
||||||
"INBOX_PLACEHOLDER": "Select an inbox",
|
"INBOX_PLACEHOLDER": "Select an inbox",
|
||||||
|
"STATUS": "Reservation Status",
|
||||||
|
"STATUS_PLACEHOLDER": "Select status",
|
||||||
"SUITE_IDENTIFIER": "Suite Identifier (Ex: 101, Master Suite)",
|
"SUITE_IDENTIFIER": "Suite Identifier (Ex: 101, Master Suite)",
|
||||||
"CHECK_IN": "Check-in",
|
"CHECK_IN": "Check-in",
|
||||||
"CHECK_OUT": "Check-out",
|
"CHECK_OUT": "Check-out",
|
||||||
|
|||||||
@ -13,6 +13,8 @@
|
|||||||
"CONTACT_ID_PLACEHOLDER": "Digite o ID do contato",
|
"CONTACT_ID_PLACEHOLDER": "Digite o ID do contato",
|
||||||
"INBOX": "Canal (Caixa de Entrada)",
|
"INBOX": "Canal (Caixa de Entrada)",
|
||||||
"INBOX_PLACEHOLDER": "Selecione a caixa de entrada",
|
"INBOX_PLACEHOLDER": "Selecione a caixa de entrada",
|
||||||
|
"STATUS": "Status da Reserva",
|
||||||
|
"STATUS_PLACEHOLDER": "Selecione o status",
|
||||||
"SUITE_IDENTIFIER": "Identificador da Suíte (Ex: 101, Suíte Master)",
|
"SUITE_IDENTIFIER": "Identificador da Suíte (Ex: 101, Suíte Master)",
|
||||||
"CHECK_IN": "Check-in",
|
"CHECK_IN": "Check-in",
|
||||||
"CHECK_OUT": "Check-out",
|
"CHECK_OUT": "Check-out",
|
||||||
|
|||||||
@ -40,6 +40,7 @@ const form = ref({
|
|||||||
check_in_at: '',
|
check_in_at: '',
|
||||||
check_out_at: '',
|
check_out_at: '',
|
||||||
total_amount: '',
|
total_amount: '',
|
||||||
|
status: 'scheduled',
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
@ -65,6 +66,21 @@ const inboxOptions = computed(() => {
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const statusOptions = computed(() => [
|
||||||
|
{
|
||||||
|
label: t('CAPTAIN_RESERVATIONS.STATUS.SCHEDULED'),
|
||||||
|
value: 'scheduled',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('CAPTAIN_RESERVATIONS.STATUS.PENDING_PAYMENT'),
|
||||||
|
value: 'pending_payment',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('CAPTAIN_RESERVATIONS.STATUS.ACTIVE'),
|
||||||
|
value: 'active',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
emit('close');
|
emit('close');
|
||||||
};
|
};
|
||||||
@ -136,6 +152,22 @@ const submitReservation = async () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Status -->
|
||||||
|
<div>
|
||||||
|
<label class="block mb-1 text-sm font-medium text-n-slate-12">
|
||||||
|
{{ $t('CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.FIELDS.STATUS') }}
|
||||||
|
</label>
|
||||||
|
<ComboBox
|
||||||
|
v-model="form.status"
|
||||||
|
:options="statusOptions"
|
||||||
|
:placeholder="
|
||||||
|
$t(
|
||||||
|
'CAPTAIN_RESERVATIONS.NEW_RESERVATION_MODAL.FIELDS.STATUS_PLACEHOLDER'
|
||||||
|
)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Suite Identifier -->
|
<!-- Suite Identifier -->
|
||||||
<Input
|
<Input
|
||||||
v-model="form.suite_identifier"
|
v-model="form.suite_identifier"
|
||||||
|
|||||||
@ -23,6 +23,8 @@ Antes, a rotina de criação de reservas ocorria exclusivamente de forma automat
|
|||||||
4. **Integração nas Telas (Views):**
|
4. **Integração nas Telas (Views):**
|
||||||
- **`Index.vue`** (Reservas em Lista Geral): Renderiza o subcomponente modal em overlay disparado pelo Header Button "Nova Reserva", onde recarrega as reservas (`fetchReservations(1)`) após inserção de sucesso.
|
- **`Index.vue`** (Reservas em Lista Geral): Renderiza o subcomponente modal em overlay disparado pelo Header Button "Nova Reserva", onde recarrega as reservas (`fetchReservations(1)`) após inserção de sucesso.
|
||||||
- **`ReservationSummary.vue`** (Painel lateral das conversas): Disponibilizado um novo botão que repassa diretamente os identificadores do Contato Atual e a Inbox Atual para que o formulário da Reserva seja gerado já pré-povoado e associado devidamente, exibido caso `!hasMarker`.
|
- **`ReservationSummary.vue`** (Painel lateral das conversas): Disponibilizado um novo botão que repassa diretamente os identificadores do Contato Atual e a Inbox Atual para que o formulário da Reserva seja gerado já pré-povoado e associado devidamente, exibido caso `!hasMarker`.
|
||||||
|
- **Simplificação do Modal:** O campo de seleção de 'Unidade' foi removido do modal de criação manual, pois o sistema vincula a unidade automaticamente com base na Caixa de Entrada (Inbox) selecionada. Isso evita erros de preenchimento e facilita a operação.
|
||||||
|
- **Traduções:** Atualizadas as chaves de tradução para tornar os campos mais descritivos (ex: Identificador da Suíte).
|
||||||
|
|
||||||
**Principais Códigos e Arquivos Alterados:**
|
**Principais Códigos e Arquivos Alterados:**
|
||||||
- `app/javascript/dashboard/routes/dashboard/captain/reservations/components/NewReservationModal.vue`
|
- `app/javascript/dashboard/routes/dashboard/captain/reservations/components/NewReservationModal.vue`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user