jws-frontend/src/components/01_branch-management/FormBranchContact.vue

115 lines
2.9 KiB
Vue
Raw Normal View History

2024-04-18 13:55:43 +07:00
<script setup lang="ts">
const telephoneNo = defineModel<string>('telephoneNo');
const contact = defineModel<string>('contact');
const email = defineModel<string>('email');
const contactName = defineModel<string>('contactName');
2024-04-19 14:22:23 +07:00
// const operatingHours = defineModel<string>('operatingHours');
2024-04-18 13:55:43 +07:00
const lineId = defineModel<string>('lineId');
2024-06-28 10:49:23 +07:00
const typeBranch = defineModel<string>('typeBranch');
2024-04-18 13:55:43 +07:00
defineProps<{
title?: string;
dense?: boolean;
outlined?: boolean;
readonly?: boolean;
separator?: boolean;
}>();
</script>
<template>
2024-07-01 08:40:37 +00:00
<div class="row col-12">
2024-08-01 08:44:40 +00:00
<div class="col-12 q-pb-sm text-weight-bold text-body1">
<q-icon
flat
size="xs"
class="q-pa-sm rounded q-mr-xs"
color="info"
name="mdi-phone"
style="background-color: var(--surface-3)"
/>
{{ $t(`${title}`) }}
2024-07-23 04:57:35 +00:00
</div>
2024-08-01 08:44:40 +00:00
<div class="col-12 row q-col-gutter-sm">
2024-07-01 08:40:37 +00:00
<q-input
lazy-rules="ondemand"
2024-07-01 08:40:37 +00:00
:dense="dense"
outlined
:readonly="readonly"
hide-bottom-space
2024-08-01 08:44:40 +00:00
class="col-md-3 col-12"
2024-07-01 08:40:37 +00:00
:label="
typeBranch === 'headOffice'
? $t('formDialogInputEmailHq')
: $t('formDialogInputEmailSubBranch')
"
v-model="email"
for="input-email"
2024-08-01 08:44:40 +00:00
>
<template #prepend>
<q-icon color="primary" name="mdi-email" size="xs" class="q-mr-xs" />
</template>
</q-input>
2024-04-18 13:55:43 +07:00
2024-07-01 08:40:37 +00:00
<q-input
lazy-rules="ondemand"
2024-07-01 08:40:37 +00:00
:dense="dense"
outlined
:readonly="readonly"
hide-bottom-space
2024-08-01 08:44:40 +00:00
class="col-md-3 col-12"
2024-07-01 08:40:37 +00:00
:label="
typeBranch === 'headOffice'
? $t('formDialogInputTelephoneHq')
: $t('formDialogInputTelephoneSubBranch')
"
v-model="telephoneNo"
for="input-telephone-no"
2024-08-01 08:44:40 +00:00
>
<template #prepend>
<q-icon color="primary" name="mdi-phone" size="xs" class="q-mr-xs" />
</template>
</q-input>
2024-04-18 13:55:43 +07:00
2024-07-01 08:40:37 +00:00
<q-input
lazy-rules="ondemand"
2024-07-01 08:40:37 +00:00
:dense="dense"
outlined
:readonly="readonly"
hide-bottom-space
2024-08-01 08:44:40 +00:00
class="col-md-3 col-12"
2024-07-01 08:40:37 +00:00
:label="$t('formDialogInputContactName')"
v-model="contactName"
for="input-contact-name"
/>
2024-04-18 13:55:43 +07:00
2024-07-01 08:40:37 +00:00
<q-input
lazy-rules="ondemand"
2024-07-01 08:40:37 +00:00
:dense="dense"
outlined
:readonly="readonly"
hide-bottom-space
2024-08-01 08:44:40 +00:00
class="col-3"
2024-07-01 08:40:37 +00:00
:label="$t('formDialogInputTelephoneContact')"
v-model="contact"
for="input-contact"
2024-08-01 08:44:40 +00:00
>
<template #prepend>
<q-icon color="primary" name="mdi-phone" size="xs" class="q-mr-xs" />
</template>
</q-input>
2024-04-18 13:55:43 +07:00
2024-07-01 08:40:37 +00:00
<q-input
lazy-rules="ondemand"
2024-07-01 08:40:37 +00:00
:dense="dense"
outlined
:readonly="readonly"
hide-bottom-space
2024-08-01 08:44:40 +00:00
class="col-3"
2024-07-01 08:40:37 +00:00
label="Line ID"
v-model="lineId"
for="input-line-id"
/>
</div>
2024-04-18 13:55:43 +07:00
</div>
</template>