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": "Contact ID",
|
||||||
"CONTACT_ID_PLACEHOLDER": "Enter the contact ID",
|
"CONTACT_ID_PLACEHOLDER": "Enter the contact ID",
|
||||||
"INBOX": "Inbox",
|
"INBOX": "Inbox",
|
||||||
"INBOX_PLACEHOLDER": "Select inbox",
|
"INBOX_PLACEHOLDER": "Select an inbox",
|
||||||
"UNIT": "Unit",
|
"SUITE_IDENTIFIER": "Suite Identifier (Ex: 101, Master Suite)",
|
||||||
"UNIT_PLACEHOLDER": "Select unit",
|
|
||||||
"SUITE_IDENTIFIER": "Suite Identifier",
|
|
||||||
"CHECK_IN": "Check-in",
|
"CHECK_IN": "Check-in",
|
||||||
"CHECK_OUT": "Check-out",
|
"CHECK_OUT": "Check-out",
|
||||||
"TOTAL_AMOUNT": "Total Amount"
|
"TOTAL_AMOUNT": "Total Amount"
|
||||||
|
|||||||
@ -12,10 +12,8 @@
|
|||||||
"CONTACT_ID": "ID do Contato",
|
"CONTACT_ID": "ID do Contato",
|
||||||
"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",
|
"INBOX_PLACEHOLDER": "Selecione a caixa de entrada",
|
||||||
"UNIT": "Unidade",
|
"SUITE_IDENTIFIER": "Identificador da Suíte (Ex: 101, Suíte Master)",
|
||||||
"UNIT_PLACEHOLDER": "Selecione a unidade",
|
|
||||||
"SUITE_IDENTIFIER": "Identificador da Suíte",
|
|
||||||
"CHECK_IN": "Check-in",
|
"CHECK_IN": "Check-in",
|
||||||
"CHECK_OUT": "Check-out",
|
"CHECK_OUT": "Check-out",
|
||||||
"TOTAL_AMOUNT": "Valor Total"
|
"TOTAL_AMOUNT": "Valor Total"
|
||||||
|
|||||||
@ -271,7 +271,6 @@ const statusColor = reservationStatus => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
readFiltersFromRoute();
|
readFiltersFromRoute();
|
||||||
store.dispatch('captainUnits/get');
|
|
||||||
if (isRevenueView.value) {
|
if (isRevenueView.value) {
|
||||||
fetchRevenue();
|
fetchRevenue();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -24,7 +24,6 @@ const emit = defineEmits(['close', 'success']);
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const units = useMapGetter('captainUnits/getUnits');
|
|
||||||
const inboxes = useMapGetter('inboxes/getInboxes');
|
const inboxes = useMapGetter('inboxes/getInboxes');
|
||||||
|
|
||||||
const dialogRef = ref(null);
|
const dialogRef = ref(null);
|
||||||
@ -37,7 +36,6 @@ onMounted(() => {
|
|||||||
const form = ref({
|
const form = ref({
|
||||||
contact_id: '',
|
contact_id: '',
|
||||||
inbox_id: '',
|
inbox_id: '',
|
||||||
captain_unit_id: '',
|
|
||||||
suite_identifier: '',
|
suite_identifier: '',
|
||||||
check_in_at: '',
|
check_in_at: '',
|
||||||
check_out_at: '',
|
check_out_at: '',
|
||||||
@ -60,13 +58,6 @@ watch(
|
|||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
const unitOptions = computed(() => {
|
|
||||||
return (units.value || []).map(unit => ({
|
|
||||||
label: unit.name,
|
|
||||||
value: unit.id,
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
|
|
||||||
const inboxOptions = computed(() => {
|
const inboxOptions = computed(() => {
|
||||||
return (inboxes.value || []).map(inbox => ({
|
return (inboxes.value || []).map(inbox => ({
|
||||||
label: inbox.name,
|
label: inbox.name,
|
||||||
@ -145,22 +136,6 @@ const submitReservation = async () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</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 -->
|
<!-- Suite Identifier -->
|
||||||
<Input
|
<Input
|
||||||
v-model="form.suite_identifier"
|
v-model="form.suite_identifier"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user