Merge refactor/i18n into develop

This commit is contained in:
Methapon Metanipat 2024-08-26 16:24:08 +07:00
parent 3da5bf9079
commit c681b19e39
99 changed files with 2192 additions and 2987 deletions

View file

@ -4,8 +4,8 @@ import { createI18n } from 'vue-i18n';
import messages from 'src/i18n'; import messages from 'src/i18n';
export type MessageLanguages = keyof typeof messages; export type MessageLanguages = keyof typeof messages;
// Type-define 'en-US' as the master schema for the resource // Type-define 'eng' as the master schema for the resource
export type MessageSchema = (typeof messages)['en-US']; export type MessageSchema = (typeof messages)['eng'];
// See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition
/* eslint-disable @typescript-eslint/no-empty-interface */ /* eslint-disable @typescript-eslint/no-empty-interface */
@ -23,7 +23,7 @@ declare module 'vue-i18n' {
export default boot(({ app }) => { export default boot(({ app }) => {
const i18n = createI18n({ const i18n = createI18n({
locale: 'th-th', locale: 'tha',
legacy: false, legacy: false,
messages, messages,
}); });

View file

@ -86,7 +86,7 @@ defineProps<{
]" ]"
class="branch-card__data" class="branch-card__data"
> >
<div>{{ $t(key) }}</div> <div>{{ $t(`branch.card.${key}`) }}</div>
<div>{{ data[key as keyof typeof data] }}</div> <div>{{ data[key as keyof typeof data] }}</div>
</div> </div>
</div> </div>

View file

@ -110,10 +110,10 @@ watch(
spaced="lg" spaced="lg"
/> />
<span class="col-12 app-text-muted-2 flex justify-between items-center"> <span class="col-12 app-text-muted-2 flex justify-between items-center">
{{ `${$t('bankBookNo')} ${i + 1}` }} {{ `${$t('branch.form.bankAccountNo')} ${i + 1}` }}
<div class="row items-center"> <div class="row items-center">
<div style="height: 30.8px" /> <div style="height: 30.8px" />
{{ $t('accountStatus') }} {{ $t('branch.form.bankAccountStatus') }}
<ToggleButton <ToggleButton
id="toggle-bank-status" id="toggle-bank-status"
:disable="readonly" :disable="readonly"
@ -145,9 +145,10 @@ watch(
input-debounce="0" input-debounce="0"
option-label="label" option-label="label"
lazy-rules="ondemand" lazy-rules="ondemand"
class="col-3" class="col-12 col-md-4"
autocomplete="off"
:dense="dense" :dense="dense"
:label="$t('bankBook')" :label="$t('branch.form.bank')"
:options="bankBookOptions" :options="bankBookOptions"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
@ -195,7 +196,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -203,51 +204,17 @@ watch(
<q-input <q-input
outlined outlined
for="input-bankbook" for="input-bankbook"
class="col-3" class="col-4"
lazy-rules="ondemand" lazy-rules="ondemand"
hide-bottom-space hide-bottom-space
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:label="$t('accountNumber')" :label="$t('branch.form.bankBranch')"
:maxlength="13"
:rules="[
(val: string) =>
(val.length >= 7 && val.length <= 13) ||
$t('form.error.please', { msg: $t('accountNumber') }),
]"
:model-value="readonly ? book.accountNumber || '-' : book.accountNumber"
@update:model-value="
(v) => (typeof v === 'string' ? (book.accountNumber = v) : '')
"
/>
<q-input
outlined
for="input-bankbook"
class="col-3"
lazy-rules="ondemand"
hide-bottom-space
:dense="dense"
:readonly="readonly"
:label="$t('bankBranch')"
:model-value="readonly ? book.bankBranch || '-' : book.bankBranch" :model-value="readonly ? book.bankBranch || '-' : book.bankBranch"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (book.bankBranch = v) : '') (v) => (typeof v === 'string' ? (book.bankBranch = v) : '')
" "
/> />
<q-input
outlined
for="input-bankbook"
class="col-3"
lazy-rules="ondemand"
hide-bottom-space
:dense="dense"
:readonly="readonly"
:label="$t('accountName')"
:model-value="readonly ? book.accountName || '-' : book.accountName"
@update:model-value="
(v) => (typeof v === 'string' ? (book.accountName = v) : '')
"
/>
<q-select <q-select
outlined outlined
clearable clearable
@ -261,9 +228,10 @@ watch(
input-debounce="0" input-debounce="0"
option-label="label" option-label="label"
lazy-rules="ondemand" lazy-rules="ondemand"
class="col-4" class="col-12 col-md-4"
autocomplete="off"
:dense="dense" :dense="dense"
:label="$t('bankType')" :label="$t('branch.form.bankAccountType')"
:options="accountTypeOptions" :options="accountTypeOptions"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
@ -278,11 +246,46 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<q-input
outlined
for="input-bankbook"
class="col-12 col-md-4"
lazy-rules="ondemand"
hide-bottom-space
:dense="dense"
:readonly="readonly"
:label="$t('branch.form.bankAccountNumber')"
:maxlength="13"
:rules="[
(val: string) =>
(val.length >= 7 && val.length <= 13) ||
$t('form.error.please', { msg: $t('accountNumber') }),
]"
:model-value="readonly ? book.accountNumber || '-' : book.accountNumber"
@update:model-value="
(v) => (typeof v === 'string' ? (book.accountNumber = v) : '')
"
/>
<q-input
outlined
for="input-bankbook"
class="col-12 col-md-4"
lazy-rules="ondemand"
hide-bottom-space
:dense="dense"
:readonly="readonly"
:label="$t('branch.form.bankAccountName')"
:model-value="readonly ? book.accountName || '-' : book.accountName"
@update:model-value="
(v) => (typeof v === 'string' ? (book.accountName = v) : '')
"
/>
</div> </div>
</div> </div>
</template> </template>

View file

@ -18,12 +18,12 @@ defineProps<{
name="mdi-account-outline" name="mdi-account-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t(`branchAdminTitle`) }} {{ $t(`branch.form.group.admin`) }}
</div> </div>
<div class="col-12"> <div class="col-12">
<template v-if="!admin"> <template v-if="!admin">
<span>{{ $t('branchAdminNone') }}</span> <span>{{ $t('general.noData') }}</span>
</template> </template>
<template v-else> <template v-else>
<div class="row items-center"> <div class="row items-center">
@ -47,9 +47,9 @@ defineProps<{
<div class="col column q-pl-md"> <div class="col column q-pl-md">
<span> <span>
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? admin.firstNameEN + ' ' + admin.lastNameEN ? admin.firstNameEN || '-' + ' ' + admin.lastNameEN
: admin.firstName + ' ' + admin.lastName : admin.firstName || '-' + ' ' + admin.lastName
}} }}
</span> </span>
</div> </div>

View file

@ -36,12 +36,8 @@ defineProps<{
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-12 col-md-4"
:label=" :label="$t('form.email')"
typeBranch === 'headOffice'
? $t('formDialogInputEmailHq')
: $t('formDialogInputEmailSubBranch')
"
for="input-email" for="input-email"
:model-value="readonly ? email || '-' : email" :model-value="readonly ? email || '-' : email"
@update:model-value="(v) => (typeof v === 'string' ? (email = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (email = v) : '')"
@ -62,12 +58,8 @@ defineProps<{
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-12 col-md-4"
:label=" :label="$t('form.telephone')"
typeBranch === 'headOffice'
? $t('formDialogInputTelephoneHq')
: $t('formDialogInputTelephoneSubBranch')
"
for="input-telephone-no" for="input-telephone-no"
:model-value="readonly ? telephoneNo || '-' : telephoneNo" :model-value="readonly ? telephoneNo || '-' : telephoneNo"
@update:model-value=" @update:model-value="
@ -90,53 +82,51 @@ defineProps<{
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-12 col-md-4"
label="Line ID" label="Line ID"
for="input-line-id" for="input-line-id"
:model-value="readonly ? lineId || '-' : lineId" :model-value="readonly ? lineId || '-' : lineId"
@update:model-value="(v) => (typeof v === 'string' ? (lineId = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (lineId = v) : '')"
/> />
<div class="col-12 row q-col-gutter-sm"> <q-input
<q-input lazy-rules="ondemand"
lazy-rules="ondemand" :dense="dense"
:dense="dense" outlined
outlined :readonly="readonly"
:readonly="readonly" hide-bottom-space
hide-bottom-space class="col-12 col-md-4"
class="col-3" :label="$t('branch.form.contactName')"
:label="$t('formDialogInputContactName')" for="input-contact-name"
for="input-contact-name" :model-value="readonly ? contactName || '-' : contactName"
:model-value="readonly ? contactName || '-' : contactName" @update:model-value="
@update:model-value=" (v) => (typeof v === 'string' ? (contactName = v) : '')
(v) => (typeof v === 'string' ? (contactName = v) : '') "
" />
/>
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-12 col-md-4"
:label="$t('formDialogInputTelephoneContact')" :label="$t('branch.form.contactTelephone')"
for="input-contact" for="input-contact"
:model-value="readonly ? contact || '-' : contact" :model-value="readonly ? contact || '-' : contact"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (contact = v) : '') (v) => (typeof v === 'string' ? (contact = v) : '')
" "
> >
<template #prepend> <template #prepend>
<q-icon <q-icon
color="primary" color="primary"
name="mdi-phone-outline" name="mdi-phone-outline"
size="xs" size="xs"
class="q-mr-xs" class="q-mr-xs"
/> />
</template> </template>
</q-input> </q-input>
</div>
</div> </div>
</div> </div>
</template> </template>

View file

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted } from 'vue';
const code = defineModel<string>('code'); const code = defineModel<string>('code');
const codeSubBranch = defineModel<string>('codeSubBranch'); const codeSubBranch = defineModel<string>('codeSubBranch');
const taxNo = defineModel<string>('taxNo'); const taxNo = defineModel<string>('taxNo');
@ -40,13 +38,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<div <div class="col-12 row q-col-gutter-sm">
class="col-6 row q-col-gutter-sm"
:class="{
'col-8': typeBranch !== 'headOffice',
'col-6': typeBranch === 'headOffice',
}"
>
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
:dense="dense" :dense="dense"
@ -55,13 +47,13 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col" class="col"
:label="$t('formDialogHqAbbreviation')" :label="$t('branch.form.abbrev')"
for="input-abbreviation" for="input-abbreviation"
:model-value="view ? formatCode(abbreviation, 'code') : abbreviation" :model-value="view ? formatCode(abbreviation, 'code') : abbreviation"
:rules="[ :rules="[
(val) => (val) =>
(val && val.length > 0 && /[a-zA-Z]+/.test(val)) || (val && val.length > 0 && /^[a-zA-Z]+$/.test(val)) ||
$t('formDialogInputHqAbbreviation'), $t('form.error.invalid'),
]" ]"
@update:model-value="(v) => (abbreviation = v as string)" @update:model-value="(v) => (abbreviation = v as string)"
/> />
@ -73,7 +65,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:disable="!readonly" :disable="!readonly"
hide-bottom-space hide-bottom-space
class="col" class="col"
:label="$t('formDialogInputCode')" :label="$t('branch.form.code')"
for="input-code" for="input-code"
:model-value="view ? formatCode(code, 'number') : code" :model-value="view ? formatCode(code, 'number') : code"
@update:model-value="(v) => (code = v as string)" @update:model-value="(v) => (code = v as string)"
@ -87,7 +79,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col" class="col"
:label="$t('branchLabelCode')" :label="$t('branch.form.codeBranch')"
for="input-code-sub-branch" for="input-code-sub-branch"
:model-value=" :model-value="
view ? formatCode(codeSubBranch, 'number') : codeSubBranch view ? formatCode(codeSubBranch, 'number') : codeSubBranch
@ -102,12 +94,13 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-5" class="col-5"
:label="$t('formDialogInputTaxNo')" :label="$t('branch.form.taxNo')"
v-model="taxNo" v-model="taxNo"
:rules="[ :rules="[
(val) => (val && val.length > 0) || $t('form.error.required'),
(val) => (val) =>
(val && val.length === 13 && /[0-9]+/.test(val)) || (val && val.length === 13 && /[0-9]+/.test(val)) ||
$t('formDialogInputTaxNoValidate'), $t('form.error.invalid'),
]" ]"
for="input-tax-no" for="input-tax-no"
/> />
@ -123,16 +116,12 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
class="col-6" class="col-6"
:label=" :label="
typeBranch === 'headOffice' typeBranch === 'headOffice'
? $t('formDialogInputNameHq') ? $t('branch.form.headofficeName')
: $t('formDialogInputNameSubBranch') : $t('branch.form.branchName')
" "
v-model="name" v-model="name"
:rules="[(val) => val && val.length > 0]" :rules="[(val) => val && val.length > 0]"
:error-message=" :error-message="$t('form.error.required')"
typeBranch === 'headOffice'
? $t('formDialogInputNameHqValidate')
: $t('formDialogInputNameSubBranchValidate')
"
for="input-name" for="input-name"
/> />
<q-input <q-input
@ -145,15 +134,11 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
v-model="nameEN" v-model="nameEN"
:label=" :label="
typeBranch === 'headOffice' typeBranch === 'headOffice'
? $t('formDialogInputNameHqEn') ? $t('branch.form.headofficeNameEN')
: $t('formDialogInputNameSubBranchEn') : $t('branch.form.branchNameEN')
" "
:rules="[(val) => val && val.length > 0]" :rules="[(val) => val && val.length > 0]"
:error-message=" :error-message="$t('form.error.required')"
typeBranch === 'headOffice'
? $t('formDialogInputNameHqEnValidate')
: $t('formDialogInputNameSubBranchEnValidate')
"
for="input-name-en" for="input-name-en"
/> />
</div> </div>

View file

@ -64,7 +64,7 @@ defineProps<{
" "
unelevated unelevated
rounded rounded
:label="$t('formDialogBtnLocation')" :label="$t('branch.form.shareLocation')"
@click="getLocation()" @click="getLocation()"
id="btn-get-location" id="btn-get-location"
/> />

View file

@ -73,7 +73,7 @@ defineEmits<{
" "
unelevated unelevated
rounded rounded
:label="$t('formDialogUploadQrCode')" :label="$t('general.upload')"
@click="$emit('upload')" @click="$emit('upload')"
id="btn-upload-qr-code" id="btn-upload-qr-code"
/> />

View file

@ -137,7 +137,7 @@ watch(
name="mdi-briefcase-outline" name="mdi-briefcase-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t('formDialogTitleByType') }} {{ $t('personnel.form.workInformation') }}
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<div <div
@ -151,7 +151,7 @@ watch(
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputRegisNo')" :label="$t('personnel.form.regisNo')"
class="col-12" class="col-12"
:model-value="readonly ? registrationNo || '-' : registrationNo" :model-value="readonly ? registrationNo || '-' : registrationNo"
@update:model-value=" @update:model-value="
@ -163,7 +163,7 @@ watch(
class="col-6" class="col-6"
id="input-start-date" id="input-start-date"
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputStartDate')" :label="$t('personnel.form.startDate')"
v-model="startDate" v-model="startDate"
clearable clearable
/> />
@ -172,7 +172,7 @@ watch(
class="col-6" class="col-6"
id="input-retire-date" id="input-retire-date"
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputRetireDate')" :label="$t('personnel.form.retireDate')"
v-model="retireDate" v-model="retireDate"
clearable clearable
/> />
@ -196,7 +196,7 @@ watch(
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('formDialogInputResponsibleArea')" :label="$t('personnel.form.responsibleArea')"
:options="responsibleAreaOptions" :options="responsibleAreaOptions"
@filter="responsibleAreaFilter" @filter="responsibleAreaFilter"
:model-value="readonly ? responsibleArea || '-' : responsibleArea" :model-value="readonly ? responsibleArea || '-' : responsibleArea"
@ -208,7 +208,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -225,7 +225,7 @@ watch(
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputDiscount')" :label="$t('personnel.form.discount')"
class="col-12" class="col-12"
type="textarea" type="textarea"
:model-value="readonly ? discountCondition || '-' : discountCondition" :model-value="readonly ? discountCondition || '-' : discountCondition"
@ -258,7 +258,7 @@ watch(
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('formDialogInputSourceNationality')" :label="$t('personnel.form.sourceNationality')"
:options="nationalityOptions" :options="nationalityOptions"
@filter="nationalityFilter" @filter="nationalityFilter"
:model-value="readonly ? sourceNationality || '-' : sourceNationality" :model-value="readonly ? sourceNationality || '-' : sourceNationality"
@ -270,7 +270,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -293,7 +293,7 @@ watch(
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('formDialogInputImportNationality')" :label="$t('personnel.form.importNationality')"
:options="nationalityOptions" :options="nationalityOptions"
@filter="nationalityFilter" @filter="nationalityFilter"
:model-value="readonly ? importNationality || '-' : importNationality" :model-value="readonly ? importNationality || '-' : importNationality"
@ -305,7 +305,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -328,7 +328,7 @@ watch(
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('formDialogInputTrainingPlace')" :label="$t('personnel.form.trainingPlace')"
:options="trainingPlaceOptions" :options="trainingPlaceOptions"
@filter="trainingPlaceFilter" @filter="trainingPlaceFilter"
:model-value="readonly ? trainingPlace || '-' : trainingPlace" :model-value="readonly ? trainingPlace || '-' : trainingPlace"
@ -340,7 +340,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -351,7 +351,7 @@ watch(
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputCheckpoint')" :label="$t('personnel.form.checkpoint')"
class="col-6" class="col-6"
:model-value="readonly ? checkpoint || '-' : checkpoint" :model-value="readonly ? checkpoint || '-' : checkpoint"
@update:model-value=" @update:model-value="
@ -365,7 +365,7 @@ watch(
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputCheckpoint') + ' ENG'" :label="$t('personnel.form.checkpointEN')"
class="col-6" class="col-6"
:model-value="readonly ? checkpointEN || '-' : checkpointEN" :model-value="readonly ? checkpointEN || '-' : checkpointEN"
@update:model-value=" @update:model-value="
@ -381,7 +381,7 @@ watch(
:readonly="readonly" :readonly="readonly"
multiple multiple
append append
:label="$t('formDialogAttachment')" :label="$t('personnel.form.attachment')"
class="col-12" class="col-12"
v-model="agencyFile" v-model="agencyFile"
> >

View file

@ -51,7 +51,7 @@ const userTypeOptions = ref<Record<string, unknown>[]>([]);
const userTypeFilter = selectFilterOptionRefMod( const userTypeFilter = selectFilterOptionRefMod(
ref( ref(
userStore.userOption.userTypeOpts.map((v) => ({ userStore.userOption.userTypeOpts.map((v) => ({
label: t(v.label), label: t(`personnel.${v.label}`),
value: v.value, value: v.value,
})), })),
), ),
@ -101,20 +101,24 @@ onMounted(async () => {
option-label="label" option-label="label"
option-value="value" option-value="value"
lazy-rules="ondemand" lazy-rules="ondemand"
class="col-2" class="col-md-2 col-12"
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('formDialogInputCode')" :label="$t('branch.form.code')"
:options="hqOptions" :options="hqOptions"
:rules="[(val: string) => !!val || $t('formDialogInputHqIdValidate')]" :rules="[
(val: string) =>
!!val ||
$t('form.error.selectField', { field: $t('branch.form.code') }),
]"
@update:model-value="(val: string) => selectHq(val)" @update:model-value="(val: string) => selectHq(val)"
@filter="hqFilter" @filter="hqFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -133,11 +137,11 @@ onMounted(async () => {
option-label="label" option-label="label"
option-value="value" option-value="value"
lazy-rules="ondemand" lazy-rules="ondemand"
class="col-2" class="col-md-2 col-12"
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('formDialogInputBrId')" :label="$t('branch.form.codeBranch')"
:options="brOptions" :options="brOptions"
@filter="brFilter" @filter="brFilter"
:model-value="readonly ? brId || '-' : brId" :model-value="readonly ? brId || '-' : brId"
@ -147,7 +151,7 @@ onMounted(async () => {
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -162,13 +166,10 @@ onMounted(async () => {
map-options map-options
options-dense options-dense
hide-bottom-space hide-bottom-space
class="col" class="col-md col-12"
:label="$t('formDialogInputUsername')" :label="$t('personnel.form.username')"
v-model="username" v-model="username"
:rules="[ :rules="[(val: string) => val.length > 2 || $t('form.error.required')]"
(val: string) =>
val.length > 2 || $t('formDialogInputUsernameValidate'),
]"
/> />
<q-select <q-select
outlined outlined
@ -189,17 +190,21 @@ onMounted(async () => {
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('formDialogInputUserType')" :label="$t('personnel.form.userType')"
:options="userTypeOptions" :options="userTypeOptions"
:rules="[ :rules="[
(val: string) => !!val || $t('formDialogInputUserTypeValidate'), (val: string) =>
!!val ||
$t('form.error.selectField', {
field: $t('personnel.form.userType'),
}),
]" ]"
@filter="userTypeFilter" @filter="userTypeFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -223,17 +228,21 @@ onMounted(async () => {
v-model="userRole" v-model="userRole"
:readonly="readonly" :readonly="readonly"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('userRole')" :label="$t('personnel.form.userRole')"
:options="roleOptions" :options="roleOptions"
:rules="[ :rules="[
(val: string) => !!val || $t('formDialogInputUserRoleValidate'), (val: string) =>
!!val ||
$t('form.error.selectField', {
field: $t('personnel.form.userRole'),
}),
]" ]"
@filter="roleFilter" @filter="roleFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>

View file

@ -2,21 +2,13 @@
import { QSelect } from 'quasar'; import { QSelect } from 'quasar';
import useOptionStore from 'stores/options'; import useOptionStore from 'stores/options';
import { selectFilterOptionRefMod } from 'stores/utils'; import { selectFilterOptionRefMod } from 'stores/utils';
import { import { calculateAge, disabledAfterToday } from 'src/utils/datetime';
dateFormat,
calculateAge,
parseAndFormatDate,
disabledAfterToday,
} from 'src/utils/datetime';
import { ref, onMounted, watch } from 'vue'; import { ref, onMounted, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { capitalize } from 'vue'; import { capitalize } from 'vue';
import DatePicker from '../shared/DatePicker.vue'; import DatePicker from '../shared/DatePicker.vue';
const { locale } = useI18n();
const optionStore = useOptionStore(); const optionStore = useOptionStore();
const prefixName = defineModel<string | null>('prefixName'); const prefixName = defineModel<string | null>('prefixName');
const prefixNameEN = defineModel<string | null>('prefixNameEn');
const firstName = defineModel<string>('firstName'); const firstName = defineModel<string>('firstName');
const lastName = defineModel<string>('lastName'); const lastName = defineModel<string>('lastName');
const firstNameEN = defineModel<string>('firstNameEn'); const firstNameEN = defineModel<string>('firstNameEn');
@ -125,12 +117,12 @@ watch(
option-value="value" option-value="value"
lazy-rules="ondemand" lazy-rules="ondemand"
hide-dropdown-icon hide-dropdown-icon
class="col-1" class="col-md-1 col-6"
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:options="prefixNameOptions" :options="prefixNameOptions"
:for="`${prefixId}-select-prefix-name`" :for="`${prefixId}-select-prefix-name`"
:label="$t('formDialogInputPrefixName')" :label="$t('personnel.form.prefixName')"
@filter="prefixNameFilter" @filter="prefixNameFilter"
:model-value="readonly ? prefixName || '-' : prefixName" :model-value="readonly ? prefixName || '-' : prefixName"
@update:model-value=" @update:model-value="
@ -141,7 +133,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -155,11 +147,9 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col" class="col"
:label="$t('formDialogInputFirstName')" :label="$t('personnel.form.firstName')"
v-model="firstName" v-model="firstName"
:rules="[ :rules="[(val: string) => !!val || $t('form.error.required')]"
(val: string) => !!val || $t('formDialogInputFirstNameValidate'),
]"
/> />
<q-input <q-input
@ -169,8 +159,8 @@ watch(
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-6"
:label="$t('formDialogInputMidName')" :label="$t('personnel.form.middleName')"
:model-value="readonly ? midName || '-' : midName" :model-value="readonly ? midName || '-' : midName"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (midName = v) : '') (v) => (typeof v === 'string' ? (midName = v) : '')
@ -186,11 +176,9 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col" class="col"
:label="$t('formDialogInputLastName')" :label="$t('personnel.form.lastName')"
v-model="lastName" v-model="lastName"
:rules="[ :rules="[(val: string) => !!val || $t('form.error.required')]"
(val: string) => !!val || $t('formDialogInputLastNameValidate'),
]"
/> />
</div> </div>
@ -203,8 +191,8 @@ watch(
hide-bottom-space hide-bottom-space
:readonly="readonly" :readonly="readonly"
:disable="!readonly" :disable="!readonly"
class="col-1" class="col-md-1 col-6"
:label="$t('formDialogInputPrefixName')" :label="$t('personnel.form.prefixName')"
:model-value=" :model-value="
readonly readonly
? capitalize(prefixName || '') || '-' ? capitalize(prefixName || '') || '-'
@ -224,11 +212,9 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col" class="col"
:label="$t('formDialogInputFirstNameEN')" :label="$t('personnel.form.firstNameEN')"
v-model="firstNameEN" v-model="firstNameEN"
:rules="[ :rules="[(val: string) => !!val || $t('form.error.required')]"
(val: string) => !!val || $t('formDialogInputFirstNameENValidate'),
]"
/> />
<q-input <q-input
@ -238,8 +224,8 @@ watch(
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-6"
:label="$t('formDialogInputMidNameEN')" :label="$t('personnel.form.middleNameEN')"
:model-value="readonly ? midNameEn || '-' : midNameEn" :model-value="readonly ? midNameEn || '-' : midNameEn"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (midNameEn = v) : '') (v) => (typeof v === 'string' ? (midNameEn = v) : '')
@ -254,11 +240,9 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col" class="col"
:label="$t('formDialogInputLastNameEN')" :label="$t('personnel.form.lastNameEN')"
v-model="lastNameEN" v-model="lastNameEN"
:rules="[ :rules="[(val: string) => !!val || $t('form.error.required')]"
(val: string) => !!val || $t('formDialogInputLastNameENValidate'),
]"
/> />
</div> </div>
@ -269,8 +253,8 @@ watch(
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly" :readonly="readonly"
class="col-3" class="col-md-3 col-6"
:label="$t('formDialogInputTelephone')" :label="$t('form.telephone')"
:mask="readonly ? '' : '##########'" :mask="readonly ? '' : '##########'"
:model-value="readonly ? telephoneNo || '-' : telephoneNo" :model-value="readonly ? telephoneNo || '-' : telephoneNo"
@update:model-value=" @update:model-value="
@ -285,8 +269,8 @@ watch(
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputEmail')" :label="$t('form.email')"
class="col-3" class="col-md-3 col-6"
:model-value="readonly ? email || '-' : email" :model-value="readonly ? email || '-' : email"
@update:model-value="(v) => (typeof v === 'string' ? (email = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (email = v) : '')"
@clear="email = ''" @clear="email = ''"
@ -305,13 +289,13 @@ watch(
option-label="label" option-label="label"
option-value="value" option-value="value"
lazy-rules="ondemand" lazy-rules="ondemand"
class="col-2" class="col-md-2 col-6"
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:options="genderOptions" :options="genderOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:for="`${prefixId}-select-gender`" :for="`${prefixId}-select-gender`"
:label="$t('formDialogInputGender')" :label="$t('form.gender')"
@filter="genderFilter" @filter="genderFilter"
:model-value="readonly ? gender || '-' : gender" :model-value="readonly ? gender || '-' : gender"
@update:model-value="(v) => (typeof v === 'string' ? (gender = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (gender = v) : '')"
@ -320,7 +304,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -328,14 +312,15 @@ watch(
<DatePicker <DatePicker
v-model="birthDate" v-model="birthDate"
class="col-2" class="col-md-2 col-6"
:id="`${prefixId}-input-birth-date`" :id="`${prefixId}-input-birth-date`"
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputBirthDate')" :label="$t('form.birthDate')"
:disabled-dates="disabledAfterToday" :disabled-dates="disabledAfterToday"
:rules="[ :rules="[
(val: string) => (val: string) =>
!!val || $t('selectValidate') + $t('formDialogInputBirthDate'), !!val ||
$t('form.error.selectField', { field: $t('form.birthDate') }),
]" ]"
/> />
@ -346,8 +331,8 @@ watch(
:dense="dense" :dense="dense"
outlined outlined
readonly readonly
:label="$t('formDialogInputAge')" :label="$t('personnel.age')"
class="col-2" class="col-md-2 col-12"
:model-value=" :model-value="
birthDate?.toString() === 'Invalid Date' || birthDate?.toString() === 'Invalid Date' ||
birthDate?.toString() === undefined birthDate?.toString() === undefined
@ -377,17 +362,14 @@ watch(
:options="genderOptions" :options="genderOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:for="`${prefixId}-select-gender`" :for="`${prefixId}-select-gender`"
:label="$t('formDialogInputGender')" :label="$t('form.gender')"
:rules="[ :rules="[(val: string) => !!val || $t('form.error.required')]"
(val: string) =>
!!val || $t('selectValidate') + $t('formDialogInputGender'),
]"
@filter="genderFilter" @filter="genderFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -413,17 +395,14 @@ watch(
:options="nationalityOptions" :options="nationalityOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:for="`${prefixId}-select-nationality`" :for="`${prefixId}-select-nationality`"
:label="$t('formDialogInputNationality')" :label="$t('general.nationality')"
:rules="[ :rules="[(val: string) => !!val || $t('form.error.required')]"
(val: string) =>
!!val || $t('selectValidate') + $t('formDialogInputNationality'),
]"
@filter="nationalityFilter" @filter="nationalityFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>

View file

@ -158,7 +158,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
name="mdi-hospital-box-outline" name="mdi-hospital-box-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t(`formDialogTitleHealthCheck`) }} {{ $t(`customerEmployee.formHealthCheck.title`) }}
<AddButton <AddButton
v-if="!readonly" v-if="!readonly"
id="btn-add-bank" id="btn-add-bank"
@ -184,7 +184,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
spaced="lg" spaced="lg"
/> />
<span class="col-12 flex justify-between items-center"> <span class="col-12 flex justify-between items-center">
{{ $t('customer.form.instance', { index: index + 1 }) }} {{ $t('general.times', { number: index + 1 }) }}
<div class="row items-center"> <div class="row items-center">
<UndoButton <UndoButton
v-if="!readonly && !!checkup.id && !checkup.statusSave" v-if="!readonly && !!checkup.id && !checkup.statusSave"
@ -228,7 +228,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
:readonly="readonly || checkup.statusSave" :readonly="readonly || checkup.statusSave"
hide-bottom-space hide-bottom-space
class="col-5" class="col-5"
:label="$t('formDialogInputCheckupRes')" :label="$t('customerEmployee.formHealthCheck.result')"
v-model="checkup.checkupResult" v-model="checkup.checkupResult"
/> />
<q-select <q-select
@ -251,13 +251,13 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
:options="checkupTypeOptions" :options="checkupTypeOptions"
:hide-dropdown-icon="readonly || checkup.statusSave" :hide-dropdown-icon="readonly || checkup.statusSave"
:for="`${prefixId}-select-checkup-type`" :for="`${prefixId}-select-checkup-type`"
:label="$t('formDialogInputCheckupType')" :label="$t('customerEmployee.formHealthCheck.checkupType')"
@filter="checkupTypeFilter" @filter="checkupTypeFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -279,7 +279,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
v-model="checkup.provinceId" v-model="checkup.provinceId"
:dense="dense" :dense="dense"
:readonly="readonly || checkup.statusSave" :readonly="readonly || checkup.statusSave"
:label="$t('province')" :label="$t('form.province')"
:hide-dropdown-icon="readonly || checkup.statusSave" :hide-dropdown-icon="readonly || checkup.statusSave"
:for="`${prefixId}-select-province`" :for="`${prefixId}-select-province`"
:options="provinceOptions" :options="provinceOptions"
@ -288,7 +288,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -301,7 +301,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
:readonly="readonly || checkup.statusSave" :readonly="readonly || checkup.statusSave"
hide-bottom-space hide-bottom-space
class="col-5" class="col-5"
:label="$t('formDialogInputHospital')" :label="$t('customerEmployee.formHealthCheck.hospital')"
v-model="checkup.hospitalName" v-model="checkup.hospitalName"
:for="`${prefixId}-input-hospital`" :for="`${prefixId}-input-hospital`"
/> />
@ -325,20 +325,20 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
:hide-dropdown-icon="readonly || checkup.statusSave" :hide-dropdown-icon="readonly || checkup.statusSave"
:options="medicalBenefitOptions" :options="medicalBenefitOptions"
:for="`${prefixId}-select-province`" :for="`${prefixId}-select-province`"
:label="$t('formDialogInputMedicalBenefit')" :label="$t('customerEmployee.formHealthCheck.medicalBenefit')"
@filter="medicalBenefitFilter" @filter="medicalBenefitFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
:label="$t('formDialogInputRemark')" :label="$t('general.remark')"
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly || checkup.statusSave" :readonly="readonly || checkup.statusSave"
@ -349,7 +349,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
:for="`${prefixId}-input-remark`" :for="`${prefixId}-input-remark`"
/> />
<DatePicker <DatePicker
:label="$t('formDialogInputCoverageStartDate')" :label="$t('customerEmployee.formHealthCheck.coverageStartDate')"
v-model="checkup.coverageStartDate" v-model="checkup.coverageStartDate"
class="col" class="col"
:id="`${prefixId}-input-coverage-start-date`" :id="`${prefixId}-input-coverage-start-date`"
@ -357,7 +357,7 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
clearable clearable
/> />
<DatePicker <DatePicker
:label="$t('formDialogInputCoverageExpiretDate')" :label="$t('customerEmployee.formHealthCheck.coverageExpireDate')"
v-model="checkup.coverageExpireDate" v-model="checkup.coverageExpireDate"
class="col" class="col"
:id="`${prefixId}-input-coverage-expire-date`" :id="`${prefixId}-input-coverage-expire-date`"
@ -385,13 +385,13 @@ const insuranceCompanyFilter = selectFilterOptionRefMod(
:hide-dropdown-icon="readonly || checkup.statusSave" :hide-dropdown-icon="readonly || checkup.statusSave"
:options="insuranceCompanyOptions" :options="insuranceCompanyOptions"
:for="`${prefixId}-select-province`" :for="`${prefixId}-select-province`"
:label="$t('formDialogInputInsuranceCompany')" :label="$t('customerEmployee.formHealthCheck.insuranceCompany')"
@filter="insuranceCompanyFilter" @filter="insuranceCompanyFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>

View file

@ -30,8 +30,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
name="mdi-human-male-female-child" name="mdi-human-male-female-child"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t('formDialogTitleFamilyHistory') }} {{ $t('customerEmployee.form.group.family') }}
<div class="row q-ml-auto"> <div class="row q-ml-auto">
<UndoButton <UndoButton
v-if="!readonly && !!employeeOther.id && !employeeOther.statusSave" v-if="!readonly && !!employeeOther.id && !employeeOther.statusSave"
@ -73,14 +72,14 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
outlined outlined
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
:label="$t('formDialogInputCitizenId')" :label="$t('customerEmployee.formFamily.citizenId')"
class="col" class="col"
v-model="employeeOther.citizenId" v-model="employeeOther.citizenId"
/> />
</div> </div>
<div class="col-12 app-text-muted-2"> <div class="col-12 app-text-muted-2">
<q-icon size="xs" class="q-mr-xs" name="mdi-human-male" /> <q-icon size="xs" class="q-mr-xs" name="mdi-human-male" />
{{ $t('formDialogTitleFamilyHistoryDad') }} {{ $t('customerEmployee.formFamily.father') }}
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<q-input <q-input
@ -91,7 +90,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputFirstName')" :label="$t('form.firstName')"
v-model="employeeOther.fatherFirstName" v-model="employeeOther.fatherFirstName"
/> />
<q-input <q-input
@ -102,7 +101,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputLastName')" :label="$t('form.lastName')"
v-model="employeeOther.fatherLastName" v-model="employeeOther.fatherLastName"
/> />
<q-input <q-input
@ -113,7 +112,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputFirstNameEN')" :label="$t('form.firstNameEN')"
v-model="employeeOther.fatherFirstNameEN" v-model="employeeOther.fatherFirstNameEN"
/> />
<q-input <q-input
@ -124,7 +123,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputLastNameEN')" :label="$t('form.lastNameEN')"
v-model="employeeOther.fatherLastNameEN" v-model="employeeOther.fatherLastNameEN"
/> />
<q-input <q-input
@ -135,14 +134,14 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-6" class="col-6"
:label="$t('formDialogInputFamilyBirthPlace')" :label="$t('customerEmployee.formFamily.fatherBirthPlace')"
v-model="employeeOther.fatherBirthPlace" v-model="employeeOther.fatherBirthPlace"
/> />
</div> </div>
<div class="col-12 app-text-muted-2"> <div class="col-12 app-text-muted-2">
<q-icon size="xs" class="q-mr-xs" name="mdi-human-female" /> <q-icon size="xs" class="q-mr-xs" name="mdi-human-female" />
{{ $t('formDialogTitleFamilyHistoryMom') }} {{ $t('customerEmployee.formFamily.mother') }}
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<q-input <q-input
@ -153,7 +152,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputFirstName')" :label="$t('form.firstName')"
v-model="employeeOther.motherFirstName" v-model="employeeOther.motherFirstName"
/> />
<q-input <q-input
@ -164,7 +163,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputLastName')" :label="$t('form.lastName')"
v-model="employeeOther.motherLastName" v-model="employeeOther.motherLastName"
/> />
<q-input <q-input
@ -175,7 +174,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputFirstNameEN')" :label="$t('form.firstNameEN')"
v-model="employeeOther.motherFirstNameEN" v-model="employeeOther.motherFirstNameEN"
/> />
<q-input <q-input
@ -186,7 +185,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputLastNameEN')" :label="$t('form.lastNameEN')"
v-model="employeeOther.motherLastNameEN" v-model="employeeOther.motherLastNameEN"
/> />
<q-input <q-input
@ -197,7 +196,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
:readonly="readonly || employeeOther.statusSave" :readonly="readonly || employeeOther.statusSave"
hide-bottom-space hide-bottom-space
class="col-6" class="col-6"
:label="$t('formDialogInputFamilyBirthPlace')" :label="$t('customerEmployee.formFamily.motherBirthPlace')"
v-model="employeeOther.motherBirthPlace" v-model="employeeOther.motherBirthPlace"
/> />
</div> </div>

View file

@ -115,7 +115,7 @@ watch(
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:options="passportTypeOptions" :options="passportTypeOptions"
:for="`${prefixId}-select-passport-type`" :for="`${prefixId}-select-passport-type`"
:label="$t('formDialogInputPassportType')" :label="$t('customerEmployee.form.passportType')"
:rules="[ :rules="[
(val: string) => (val: string) =>
!!val || $t('selectValidate') + $t('formDialogInputPassportType'), !!val || $t('selectValidate') + $t('formDialogInputPassportType'),
@ -125,7 +125,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -138,7 +138,7 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputPassportNo')" :label="$t('customerEmployee.form.passportNo')"
v-model="passportNumber" v-model="passportNumber"
:rules="[ :rules="[
(val: string) => (val: string) =>
@ -153,7 +153,7 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-6" class="col-6"
:label="$t('formDialogInputPassportRef')" :label="$t('customerEmployee.form.passportRef')"
:model-value=" :model-value="
readonly readonly
? previousPassportReference || '-' ? previousPassportReference || '-'
@ -171,7 +171,7 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-md-3 col-6" class="col-md-3 col-6"
:label="$t('formDialogInputWPassportPlace')" :label="$t('customerEmployee.form.passportPlace')"
v-model="passportIssuingPlace" v-model="passportIssuingPlace"
:rules="[ :rules="[
(val: string) => (val: string) =>
@ -198,7 +198,7 @@ watch(
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:options="passportIssuingCountryOptions" :options="passportIssuingCountryOptions"
:for="`${prefixId}-select-passport-country`" :for="`${prefixId}-select-passport-country`"
:label="$t('formDialogInputPassportCountry')" :label="$t('customerEmployee.form.passportIssuer')"
:rules="[ :rules="[
(val: string) => (val: string) =>
!!val || !!val ||
@ -209,14 +209,14 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<DatePicker <DatePicker
:id="`${prefixId}-date-picker-passport-issueance`" :id="`${prefixId}-date-picker-passport-issueance`"
:label="$t('formDialogInputPassportIssuance')" :label="$t('customerEmployee.form.passportIssueDate')"
v-model="passportIssueDate" v-model="passportIssueDate"
class="col-md-3 col-6" class="col-md-3 col-6"
:readonly="readonly" :readonly="readonly"
@ -228,7 +228,7 @@ watch(
/> />
<DatePicker <DatePicker
:id="`${prefixId}-date-picker-passport-expire`" :id="`${prefixId}-date-picker-passport-expire`"
:label="$t('formDialogInputPassportExpire')" :label="$t('customerEmployee.form.passportExpireDate')"
v-model="passportExpiryDate" v-model="passportExpiryDate"
class="col-md-3 col-6" class="col-md-3 col-6"
:readonly="readonly" :readonly="readonly"

View file

@ -117,7 +117,7 @@ watch(
:options="visaTypeOptions" :options="visaTypeOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:for="`${prefixId}-select-visa-type`" :for="`${prefixId}-select-visa-type`"
:label="$t('formDialogInputVisaType')" :label="$t('customerEmployee.form.visaType')"
@filter="visaTypeFilter" @filter="visaTypeFilter"
:model-value="readonly ? visaType || '-' : visaType" :model-value="readonly ? visaType || '-' : visaType"
@update:model-value=" @update:model-value="
@ -128,7 +128,7 @@ watch(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -145,7 +145,7 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-4" class="col-4"
:label="$t('formDialogInputVisaNo')" :label="$t('customerEmployee.form.visaNo')"
:model-value="readonly ? visaNumber || '-' : visaNumber" :model-value="readonly ? visaNumber || '-' : visaNumber"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (visaNumber = v) : '') (v) => (typeof v === 'string' ? (visaNumber = v) : '')
@ -159,7 +159,7 @@ watch(
class="col-2" class="col-2"
:id="`${prefixId}-date-picker-visa-issuance`" :id="`${prefixId}-date-picker-visa-issuance`"
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputVisaIssuance')" :label="$t('customerEmployee.form.visaIssuance')"
v-model="visaIssueDate" v-model="visaIssueDate"
clearable clearable
/> />
@ -167,7 +167,7 @@ watch(
class="col-2" class="col-2"
:id="`${prefixId}-date-picker-visa-expire`" :id="`${prefixId}-date-picker-visa-expire`"
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputVisaExpire')" :label="$t('customerEmployee.form.visaExpire')"
v-model="visaExpiryDate" v-model="visaExpiryDate"
clearable clearable
/> />
@ -180,7 +180,7 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-5" class="col-5"
:label="$t('formDialogInputVisaPlace')" :label="$t('customerEmployee.form.visaPlace')"
:model-value="readonly ? visaIssuingPlace || '-' : visaIssuingPlace" :model-value="readonly ? visaIssuingPlace || '-' : visaIssuingPlace"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (visaIssuingPlace = v) : '') (v) => (typeof v === 'string' ? (visaIssuingPlace = v) : '')
@ -194,7 +194,7 @@ watch(
class="col-4" class="col-4"
:id="`${prefixId}-date-picker-visa-until`" :id="`${prefixId}-date-picker-visa-until`"
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputVisaStayUntil')" :label="$t('customerEmployee.form.visaStayUntil')"
v-model="visaStayUntilDate" v-model="visaStayUntilDate"
clearable clearable
/> />
@ -207,7 +207,7 @@ watch(
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-5" class="col-5"
:label="$t('formDialogInputVisaTM6')" :label="$t('customerEmployee.form.visaTM6')"
:model-value="readonly ? tm6Number || '-' : tm6Number" :model-value="readonly ? tm6Number || '-' : tm6Number"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (tm6Number = v) : '') (v) => (typeof v === 'string' ? (tm6Number = v) : '')
@ -222,7 +222,7 @@ watch(
class="col-4" class="col-4"
:id="`${prefixId}-date-picker-visa-enter`" :id="`${prefixId}-date-picker-visa-enter`"
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputVisaEnter')" :label="$t('customerEmployee.form.visaEnter')"
v-model="entryDate" v-model="entryDate"
clearable clearable
/> />

View file

@ -114,7 +114,7 @@ const workplaceFilter = selectFilterOptionRefMod(
name="mdi-briefcase-outline" name="mdi-briefcase-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t(`workHistory`) }} {{ $t(`customerEmployee.formWorkHistory.title`) }}
<AddButton <AddButton
v-if="!readonly" v-if="!readonly"
id="btn-add-bank" id="btn-add-bank"
@ -140,7 +140,7 @@ const workplaceFilter = selectFilterOptionRefMod(
spaced="lg" spaced="lg"
/> />
<span class="col-12 flex justify-between items-center"> <span class="col-12 flex justify-between items-center">
{{ $t('customer.form.instance', { index: index + 1 }) }} {{ $t('general.times', { number: index + 1 }) }}
<div class="row items-center"> <div class="row items-center">
<UndoButton <UndoButton
@ -196,13 +196,13 @@ const workplaceFilter = selectFilterOptionRefMod(
:options="jobTypeOptions" :options="jobTypeOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:for="`${prefixId}-select-job-type`" :for="`${prefixId}-select-job-type`"
:label="$t('formDialogInputJobType')" :label="$t('customerEmployee.formWorkHistory.jobType')"
@filter="jobTypeFilter" @filter="jobTypeFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -227,13 +227,13 @@ const workplaceFilter = selectFilterOptionRefMod(
:options="workplaceOptions" :options="workplaceOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:for="`${prefixId}-select-province`" :for="`${prefixId}-select-province`"
:label="$t('formDialogInputWorkPlace')" :label="$t('customerEmployee.formWorkHistory.workplace')"
@filter="workplaceFilter" @filter="workplaceFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -241,7 +241,7 @@ const workplaceFilter = selectFilterOptionRefMod(
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
:for="`${prefixId}-input-work-end-date`" :for="`${prefixId}-input-work-end-date`"
:label="$t('formDialogInputRemark')" :label="$t('general.remark')"
:dense="dense" :dense="dense"
outlined outlined
:readonly="readonly || work.statusSave" :readonly="readonly || work.statusSave"
@ -251,7 +251,7 @@ const workplaceFilter = selectFilterOptionRefMod(
type="textarea" type="textarea"
/> />
<DatePicker <DatePicker
:label="$t('formDialogInputWorkUntil')" :label="$t('customerEmployee.formWorkHistory.workUntil')"
v-model="work.workEndDate" v-model="work.workEndDate"
class="col-3" class="col-3"
:id="`${prefixId}-input-work-until-date`" :id="`${prefixId}-input-work-until-date`"
@ -267,11 +267,11 @@ const workplaceFilter = selectFilterOptionRefMod(
:readonly="readonly || work.statusSave" :readonly="readonly || work.statusSave"
hide-bottom-space hide-bottom-space
class="col-6" class="col-6"
:label="$t('formDialogInputWorkPermitNo')" :label="$t('customerEmployee.formWorkHistory.permitNo')"
v-model="work.workPermitNo" v-model="work.workPermitNo"
/> />
<DatePicker <DatePicker
:label="$t('formDialogInputWorkPermitIssueDate')" :label="$t('customerEmployee.formWorkHistory.permitIssueDate')"
v-model="work.workPermitIssuDate" v-model="work.workPermitIssuDate"
class="col-3" class="col-3"
:id="`${prefixId}-date-picker-work-permit-issue-date`" :id="`${prefixId}-date-picker-work-permit-issue-date`"
@ -279,7 +279,7 @@ const workplaceFilter = selectFilterOptionRefMod(
clearable clearable
/> />
<DatePicker <DatePicker
:label="$t('formDialogInputWorkPermitExpireDate')" :label="$t('customerEmployee.formWorkHistory.permitExpireDate')"
v-model="work.workPermitExpireDate" v-model="work.workPermitExpireDate"
class="col-3" class="col-3"
:id="`${prefixId}-date-picker-work-permit-expire-date`" :id="`${prefixId}-date-picker-work-permit-expire-date`"
@ -295,7 +295,7 @@ const workplaceFilter = selectFilterOptionRefMod(
:readonly="readonly || work.statusSave" :readonly="readonly || work.statusSave"
hide-bottom-space hide-bottom-space
class="col-5" class="col-5"
:label="$t('formDialogInputOwnerName')" :label="$t('customerEmployee.formWorkHistory.employerName')"
v-model="work.ownerName" v-model="work.ownerName"
/> />
<q-select <q-select
@ -318,13 +318,13 @@ const workplaceFilter = selectFilterOptionRefMod(
:options="positionNameOptions" :options="positionNameOptions"
:hide-dropdown-icon="readonly || work.statusSave" :hide-dropdown-icon="readonly || work.statusSave"
:for="`${prefixId}-select-position-name`" :for="`${prefixId}-select-position-name`"
:label="$t('formDialogInputJobPosition')" :label="$t('customerEmployee.formWorkHistory.jobPosition')"
@filter="positionNameFilter" @filter="positionNameFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>

View file

@ -67,35 +67,35 @@ const fieldName = [
{ {
name: 'nrcNo', name: 'nrcNo',
title: 'formDialogTitleInformation', title: 'formDialogTitleInformation',
i18n: 'formDialogEmployeeNRCNo', i18n: 'customerEmployee.form.nrcNo',
}, },
{ {
name: 'firstName', name: 'firstName',
title: 'personalInfo', title: 'personalInfo',
i18n: 'formDialogInputFirstName', i18n: 'form.firstName',
}, },
{ {
name: 'firstNameEN', name: 'firstNameEN',
title: 'personalInfo', title: 'personalInfo',
i18n: 'formDialogInputFirstNameEN', i18n: 'form.firstNameEN',
}, },
{ name: 'lastName', title: 'personalInfo', i18n: 'formDialogInputLastName' }, { name: 'lastName', title: 'personalInfo', i18n: 'formDialogInputLastName' },
{ {
name: 'lastNameEN', name: 'lastNameEN',
title: 'personalInfo', title: 'personalInfo',
i18n: 'formDialogInputLastNameEN', i18n: 'form.lastNameEN',
}, },
{ {
name: 'dateOfBirth', name: 'dateOfBirth',
title: 'personalInfo', title: 'personalInfo',
i18n: 'formDialogInputBirthDate', i18n: 'form.birthDate',
}, },
{ name: 'gender', title: 'personalInfo', i18n: 'formDialogInputGender' }, { name: 'gender', title: 'personalInfo', i18n: 'formDialogInputGender' },
{ {
name: 'nationality', name: 'nationality',
title: 'personalInfo', title: 'personalInfo',
i18n: 'formDialogInputNationality', i18n: 'general.nationality',
}, },
{ {
@ -339,14 +339,14 @@ watch(
autoApply autoApply
:teleport="true" :teleport="true"
v-model="currentDate" v-model="currentDate"
:locale="$i18n.locale === 'th-th' ? 'th' : 'en'" :locale="$i18n.locale === 'tha' ? 'th' : 'en'"
:enableTimePicker="false" :enableTimePicker="false"
> >
<template #year="{ value }"> <template #year="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'tha' ? value + 543 : value }}
</template> </template>
<template #year-overlay-value="{ value }"> <template #year-overlay-value="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'tha' ? value + 543 : value }}
</template> </template>
<template #trigger> <template #trigger>
<span class="text-weight-medium q-px-xl"> <span class="text-weight-medium q-px-xl">
@ -394,7 +394,7 @@ watch(
<div class="column q-pl-md items-start"> <div class="column q-pl-md items-start">
<span class="text-weight-bold"> <span class="text-weight-bold">
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.updatedBy.firstNameEN} ${props.row.updatedBy.lastNameEN}` ? `${props.row.updatedBy.firstNameEN} ${props.row.updatedBy.lastNameEN}`
: (`${props.row.updatedBy.firstName} ${props.row.updatedBy.lastName}` ?? : (`${props.row.updatedBy.firstName} ${props.row.updatedBy.lastName}` ??
'-') '-')

View file

@ -20,7 +20,7 @@ const prop = withDefaults(
fieldSelected: () => [ fieldSelected: () => [
'orderNumber', 'orderNumber',
'firstName', 'firstName',
'formDialogInputAge', 'general.age',
'formDialogInputNationality', 'formDialogInputNationality',
'formDialogInputPassportNo', 'formDialogInputPassportNo',
'passportExpiryDate', 'passportExpiryDate',
@ -167,7 +167,7 @@ const prop = withDefaults(
</div> </div>
</q-td> </q-td>
<q-td v-if="fieldSelected.includes('formDialogInputAge')"> <q-td v-if="fieldSelected.includes('general.age')">
{{ calculateAge(props.row.dateOfBirth) || '-' }} {{ calculateAge(props.row.dateOfBirth) || '-' }}
</q-td> </q-td>
@ -195,9 +195,9 @@ const prop = withDefaults(
</div> </div>
<div class="col app-text-muted"> <div class="col app-text-muted">
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.customerBranch.nameEN}` ? `${props.row.customerBranch.registerNameEN}`
: `${props.row.customerBranch.name}` : `${props.row.customerBranch.registerName}`
}} }}
</div> </div>
</div> </div>
@ -242,7 +242,7 @@ const prop = withDefaults(
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -261,7 +261,7 @@ const prop = withDefaults(
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -285,7 +285,7 @@ const prop = withDefaults(
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
@ -325,7 +325,7 @@ const prop = withDefaults(
:data="{ :data="{
code: props.row.code, code: props.row.code,
name: name:
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim() ? `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim()
: `${props.row.firstName} ${props.row.lastName} `.trim(), : `${props.row.firstName} ${props.row.lastName} `.trim(),
img: props.row.profileImageUrl || '/images/employee-avatar.png', img: props.row.profileImageUrl || '/images/employee-avatar.png',
@ -348,7 +348,7 @@ const prop = withDefaults(
:tag="[ :tag="[
{ {
color: 'pink', color: 'pink',
value: $t('EMPLOYEE'), value: $t('customer.employee'),
}, },
]" ]"
:disabled="props.row.status === 'INACTIVE'" :disabled="props.row.status === 'INACTIVE'"

View file

@ -135,7 +135,7 @@ onMounted(() => {
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-12" class="col-12"
:label="$t('formDialogEmployerBranchCode')" :label="$t('customer.form.branchCode')"
v-model="customerBranch" v-model="customerBranch"
:option-value=" :option-value="
(v) => ({ (v) => ({
@ -154,7 +154,10 @@ onMounted(() => {
@filter="(val, update) => $emit('filterOwnerBranch', val, update)" @filter="(val, update) => $emit('filterOwnerBranch', val, update)"
:rules="[ :rules="[
(val: string) => (val: string) =>
!!val || $t('selectValidate') + $t('formDialogEmployerBranchCode'), !!val ||
$t('form.error.selectField', {
field: $t('customer.form.employerBranch'),
}),
]" ]"
> >
<template v-slot:option="scope"> <template v-slot:option="scope">
@ -168,58 +171,57 @@ onMounted(() => {
</div> </div>
<div class="q-mt-sm"> <div class="q-mt-sm">
<div> <div>
{{ scope.opt.code }} {{ $t('branchName') }}: {{ scope.opt.code }} {{ $t('general.name') }}:
{{
$i18n.locale === 'en-US' ? scope.opt.nameEN : scope.opt.name <template v-if="scope.opt.customer.customerType === 'CORP'">
}} {{
$i18n.locale === 'eng'
? scope.opt.registerName
: scope.opt.registerNameEN
}}
</template>
<template v-else>
{{
$i18n.locale === 'eng'
? scope.opt.customer.firstNameEN ||
'-' + ' ' + scope.opt.customer.lastNameEN ||
''
: scope.opt.customer.firstName ||
'-' + ' ' + scope.opt.customer.lastName ||
''
}}
</template>
</div> </div>
<div class="text-caption app-text-muted-2 q-mb-xs"> <div class="text-caption app-text-muted-2 q-mb-xs">
<div v-if="scope.opt.customer" class="col column"> <div v-if="scope.opt.customer" class="col column">
<span> <span>
{{ $t('customerBranchName') }}: {{ $t('customerEmployee.form.employerSelect.branchName') }}:
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? scope.opt.customer.customerNameEN ? scope.opt.registerNameEN
: scope.opt.customer.customerName : scope.opt.registerName
}} }}
</span> </span>
<span> <span>
{{ $t('customerEmployee.form.employerSelect.branchName') }}:
{{ {{
scope.opt.customer.customerType === 'PERS' $i18n.locale === 'eng'
? $t('formDialogCustomerName') ? scope.opt.customer.firstNameEN ||
: $t('companyOwnerName') '-' + ' ' + scope.opt.customer.lastNameEN
}}: : scope.opt.customer.firstName ||
{{ '-' + ' ' + scope.opt.customer.lastName
$i18n.locale === 'en-US'
? scope.opt.customer.personName
: scope.opt.customer.personName
}} }}
</span> </span>
</div> </div>
<div v-if="scope.opt.province" class="col"> <div v-if="scope.opt.province" class="col">
{{ $t('address') }} {{ $t('general.address') }}
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? scope.opt.addressEN ? `${scope.opt.addressEN || ''} ${scope.opt.subDistrict.nameEN || ''} ${scope.opt.district.nameEN || ''} ${scope.opt.province.nameEN || ''}`
: scope.opt.address : `${scope.opt.address || ''} ${scope.opt.subDistrict.name || ''} ${scope.opt.district.name || ''} ${scope.opt.province.name || ''}`
}} }}
{{ {{ scope.opt.subDistrict?.zipCode || '' }}
$i18n.locale === 'en-US'
? scope.opt.subDistrict.nameEN
: scope.opt.subDistrict.name
}}
{{
$i18n.locale === 'en-US'
? scope.opt.district.nameEN
: scope.opt.district.name
}}
{{
$i18n.locale === 'en-US'
? scope.opt.province.nameEN
: scope.opt.province.name
}}
{{ scope.opt.zipCode }}
</div> </div>
</div> </div>
</div> </div>
@ -235,90 +237,50 @@ onMounted(() => {
> >
<div class="q-mr-sm"> <div class="q-mr-sm">
{{ scope.opt.code }} {{ scope.opt.code }}
{{ $t('branchName') }}: {{ $t('customerEmployee.form.employerSelect.branchName') }}:
{{ $i18n.locale === 'en-US' ? scope.opt.nameEN : scope.opt.name }} {{
$i18n.locale === 'eng'
? scope.opt.registerNameEN
: scope.opt.registerName
}}
</div> </div>
<div <div
class="text-caption app-text-muted-2" class="text-caption app-text-muted-2"
v-if="scope.opt.customer && scope.opt.province" v-if="scope.opt.customer && scope.opt.province"
> >
{{ $t('customerBranchName') }}: {{ $t('customerEmployee.form.employerSelect.branchName') }}:
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? scope.opt.customer.customerNameEN ? scope.opt.customer.firstNameEN ||
: scope.opt.customer.customerName '-' + ' ' + scope.opt.customer.lastNameEN
: scope.opt.customer.firstName ||
'-' + ' ' + scope.opt.customer.lastName
}} }}
{{ $t('general.address') }}
{{ {{
scope.opt.customer.customerType === 'PERS' $i18n.locale === 'eng'
? $t('formDialogCustomerName') ? `${scope.opt.addressEN || ''} ${scope.opt.subDistrict.nameEN || ''} ${scope.opt.district.nameEN || ''} ${scope.opt.province.nameEN || ''}`
: $t('companyOwnerName') : `${scope.opt.address || ''} ${scope.opt.subDistrict.name || ''} ${scope.opt.district.name || ''} ${scope.opt.province.name || ''}`
}}:
{{
$i18n.locale === 'en-US'
? scope.opt.customer.personName
: scope.opt.customer.personName
}} }}
{{ $t('address') }} {{ scope.opt.subDistrict?.zipCode || '' }}
{{
$i18n.locale === 'en-US'
? scope.opt.addressEN
: scope.opt.address
}}
{{
$i18n.locale === 'en-US'
? scope.opt.subDistrict.nameEN
: scope.opt.subDistrict.name
}}
{{
$i18n.locale === 'en-US'
? scope.opt.district.nameEN
: scope.opt.district.name
}}
{{
$i18n.locale === 'en-US'
? scope.opt.province.nameEN
: scope.opt.province.name
}}
{{ scope.opt.zipCode }}
<q-tooltip v-if="scope.opt.customer && scope.opt.province"> <q-tooltip v-if="scope.opt.customer && scope.opt.province">
{{ $t('customerBranchName') }}: {{ $t('customerEmployee.form.employerSelect.branchName') }}:
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? scope.opt.customer.customerNameEN ? scope.opt.customer.firstNameEN ||
: scope.opt.customer.customerName '-' + ' ' + scope.opt.customer.lastNameEN
}} : scope.opt.customer.firstName ||
{{ '-' + ' ' + scope.opt.customer.lastName
scope.opt.customer.customerType === 'PERS'
? $t('formDialogCustomerName')
: $t('companyOwnerName')
}}:
{{
$i18n.locale === 'en-US'
? scope.opt.customer.personName
: scope.opt.customer.personName
}} }}
{{ $t('address') }} {{ $t('address') }}
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? scope.opt.addressEN ? `${scope.opt.addressEN || ''} ${scope.opt.subDistrict.nameEN || ''} ${scope.opt.district.nameEN || ''} ${scope.opt.province.nameEN || ''}`
: scope.opt.address : `${scope.opt.address || ''} ${scope.opt.subDistrict.name || ''} ${scope.opt.district.name || ''} ${scope.opt.province.name || ''}`
}} }}
{{ {{ scope.opt.zipCode || '' }}
$i18n.locale === 'en-US'
? scope.opt.subDistrict.nameEN
: scope.opt.subDistrict.name
}}
{{
$i18n.locale === 'en-US'
? scope.opt.district.nameEN
: scope.opt.district.name
}}
{{
$i18n.locale === 'en-US'
? scope.opt.province.nameEN
: scope.opt.province.name
}}
{{ scope.opt.zipCode }}
</q-tooltip> </q-tooltip>
</div> </div>
</div> </div>
@ -343,7 +305,7 @@ onMounted(() => {
:readonly="readonly" :readonly="readonly"
:disable="!readonly" :disable="!readonly"
class="col-3" class="col-3"
:label="$t('formDialogEmployeeID')" :label="$t('customerEmployee.form.employeeCode')"
v-model="code" v-model="code"
/> />
@ -356,7 +318,7 @@ onMounted(() => {
hide-bottom-space hide-bottom-space
:readonly="readonly" :readonly="readonly"
class="col-6" class="col-6"
:label="$t('formDialogEmployeeNRCNo')" :label="$t('customerEmployee.form.nrcNo')"
:model-value="readonly ? nrcNo || '-' : nrcNo" :model-value="readonly ? nrcNo || '-' : nrcNo"
@update:model-value="(v) => (typeof v === 'string' ? (nrcNo = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (nrcNo = v) : '')"
/> />

View file

@ -31,10 +31,10 @@ onMounted(async () => {
const resultOption = await fetch('/option/option.json'); const resultOption = await fetch('/option/option.json');
const option = await resultOption.json(); const option = await resultOption.json();
if (locale.value === 'en-US') { if (locale.value === 'eng') {
codeOption.value = option.eng.typeProduct; codeOption.value = option.eng.typeProduct;
} }
if (locale.value === 'th-th') { if (locale.value === 'tha') {
codeOption.value = option.tha.typeProduct; codeOption.value = option.tha.typeProduct;
} }
}); });
@ -61,7 +61,7 @@ const branchFilter = selectFilterOptionRefMod(
name="mdi-office-building-outline" name="mdi-office-building-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t(`formDialogTitleInformation`) }} {{ $t(`form.field.basicInformation`) }}
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
@ -76,7 +76,7 @@ const branchFilter = selectFilterOptionRefMod(
hide-bottom-space hide-bottom-space
input-debounce="0" input-debounce="0"
:disable="!readonly && disableCode" :disable="!readonly && disableCode"
class="col-3" class="col-md-3 col-6"
v-model="code" v-model="code"
id="select-br-id" id="select-br-id"
option-label="label" option-label="label"
@ -85,15 +85,15 @@ const branchFilter = selectFilterOptionRefMod(
:dense="dense" :dense="dense"
:readonly="readonly" :readonly="readonly"
:options="codeOptions" :options="codeOptions"
:label="$t('productCode')" :label="$t('productService.product.code')"
:hide-dropdown-icon="readonly || disableCode" :hide-dropdown-icon="readonly || disableCode"
:rules="[(val: string) => !!val]" :rules="[(val: string) => !!val || $t('form.error.required')]"
@filter="codeFilter" @filter="codeFilter"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -108,7 +108,7 @@ const branchFilter = selectFilterOptionRefMod(
hide-selected hide-selected
hide-bottom-space hide-bottom-space
input-debounce="0" input-debounce="0"
class="col-3" class="col-md-3 col-6"
option-value="id" option-value="id"
option-label="name" option-label="name"
lazy-rules="ondemand" lazy-rules="ondemand"
@ -118,14 +118,20 @@ const branchFilter = selectFilterOptionRefMod(
:readonly="readonly" :readonly="readonly"
:options="branchOptions" :options="branchOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('registeredBranch')" :label="$t('productService.product.registeredBranch')"
:rules="[ :rules="[
(val) => { (val) => {
const roles = getRole() || []; const roles = getRole() || [];
const isSpecialRole = ['admin', 'system', 'head_of_admin'].some( const isSpecialRole = ['admin', 'system', 'head_of_admin'].some(
(role) => roles.includes(role), (role) => roles.includes(role),
); );
return isSpecialRole || !!val || 'กรุณากรอกข้อมูล'; return (
isSpecialRole ||
!!val ||
$t('form.error.selectField', {
field: $t('productService.product.registeredBranch'),
})
);
}, },
]" ]"
@filter="branchFilter" @filter="branchFilter"
@ -133,7 +139,7 @@ const branchFilter = selectFilterOptionRefMod(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -148,9 +154,9 @@ const branchFilter = selectFilterOptionRefMod(
:borderless="readonly" :borderless="readonly"
hide-bottom-space hide-bottom-space
class="col-6" class="col-6"
:label="$t('productName')" :label="$t('productService.product.name')"
v-model="name" v-model="name"
:rules="[(val: string) => !!val]" :rules="[(val: string) => !!val || $t('form.error.required')]"
/> />
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
@ -160,8 +166,8 @@ const branchFilter = selectFilterOptionRefMod(
:readonly="readonly" :readonly="readonly"
:borderless="readonly" :borderless="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-6"
:label="$t('productProcessingTime')" :label="$t('productService.product.processingTime')"
v-model="process" v-model="process"
type="number" type="number"
/> />
@ -185,7 +191,7 @@ const branchFilter = selectFilterOptionRefMod(
outlined outlined
:readonly="readonly" :readonly="readonly"
:borderless="readonly" :borderless="readonly"
:label="$t('detail')" :label="$t('general.detail')"
stack-label stack-label
dense dense
> >
@ -196,7 +202,7 @@ const branchFilter = selectFilterOptionRefMod(
(v) => (typeof v === 'string' ? (detail = v) : '') (v) => (typeof v === 'string' ? (detail = v) : '')
" "
min-height="5rem" min-height="5rem"
class="full-width q-mt-sm q-mb-xs" class="q-mt-sm q-mb-xs"
:flat="!readonly" :flat="!readonly"
:readonly="readonly" :readonly="readonly"
:toolbar-color=" :toolbar-color="
@ -208,6 +214,7 @@ const branchFilter = selectFilterOptionRefMod(
color: var(--foreground); color: var(--foreground);
border-color: var(--surface-3); border-color: var(--surface-3);
" "
:style="`width: ${$q.screen.gt.xs ? '100%' : '63vw'}`"
/> />
</q-field> </q-field>
</div> </div>
@ -221,7 +228,7 @@ const branchFilter = selectFilterOptionRefMod(
hide-bottom-space hide-bottom-space
type="textarea" type="textarea"
class="col-12" class="col-12"
:label="$t('formDialogInputRemark')" :label="$t('general.remark')"
:model-value="readonly ? remark || '-' : remark" :model-value="readonly ? remark || '-' : remark"
@update:model-value="(v) => (typeof v === 'string' ? (remark = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (remark = v) : '')"
/> />

View file

@ -57,7 +57,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
name="mdi-office-building-outline" name="mdi-office-building-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t(`formDialogTitleInformation`) }} {{ $t(`form.field.basicInformation`) }}
</div> </div>
<div v-if="!service" class="col-12 row q-col-gutter-sm"> <div v-if="!service" class="col-12 row q-col-gutter-sm">
<q-input <q-input
@ -69,9 +69,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
hide-bottom-space hide-bottom-space
class="col-6" class="col-6"
:label=" :label="
$t( $t(isType ? 'productService.type.code' : 'productService.group.code')
isType ? 'productAndServiceTypeCode' : 'productAndServiceGroupCode',
)
" "
v-model="code" v-model="code"
/> />
@ -83,12 +81,10 @@ const serviceCodeFilter = selectFilterOptionRefMod(
hide-bottom-space hide-bottom-space
class="col-6" class="col-6"
:label=" :label="
$t( $t(isType ? 'productService.type.name' : 'productService.group.name')
isType ? 'productAndServiceTypeName' : 'productAndServiceGroupName',
)
" "
v-model="name" v-model="name"
:rules="[(val: string) => !!val || $t('pleaseInformation')]" :rules="[(val: string) => !!val || $t('form.error.required')]"
/> />
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
@ -98,7 +94,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
hide-bottom-space hide-bottom-space
type="textarea" type="textarea"
class="col-12" class="col-12"
:label="$t('detail')" :label="$t('general.detail')"
:model-value="readonly ? detail || '-' : detail" :model-value="readonly ? detail || '-' : detail"
@update:model-value="(v) => (typeof v === 'string' ? (detail = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (detail = v) : '')"
:for="`input-detail`" :for="`input-detail`"
@ -111,7 +107,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
hide-bottom-space hide-bottom-space
type="textarea" type="textarea"
class="col-12" class="col-12"
:label="$t('formDialogInputRemark')" :label="$t('general.remark')"
:model-value="readonly ? remark || '-' : remark" :model-value="readonly ? remark || '-' : remark"
@update:model-value="(v) => (typeof v === 'string' ? (remark = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (remark = v) : '')"
:for="`input-remark`" :for="`input-remark`"
@ -147,7 +143,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -161,10 +157,10 @@ const serviceCodeFilter = selectFilterOptionRefMod(
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-4"
:label="$t('serviceCode')" :label="$t('productService.service.code')"
v-model="serviceCode" v-model="serviceCode"
:rules="[(val: string) => !!val || $t('pleaseInformation')]" :rules="[(val: string) => !!val || $t('form.error.required')]"
/> />
<q-select <q-select
@ -176,7 +172,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
map-options map-options
hide-selected hide-selected
hide-bottom-space hide-bottom-space
class="col-3" class="col-md-3 col-8"
option-value="id" option-value="id"
option-label="name" option-label="name"
lazy-rules="ondemand" lazy-rules="ondemand"
@ -187,14 +183,20 @@ const serviceCodeFilter = selectFilterOptionRefMod(
:readonly="readonly" :readonly="readonly"
:options="branchOptions" :options="branchOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('registeredBranch')" :label="$t('productService.service.registeredBranch')"
:rules="[ :rules="[
(val) => { (val) => {
const roles = getRole() || []; const roles = getRole() || [];
const isSpecialRole = ['admin', 'system', 'head_of_admin'].some( const isSpecialRole = ['admin', 'system', 'head_of_admin'].some(
(role) => roles.includes(role), (role) => roles.includes(role),
); );
return isSpecialRole || !!val || 'กรุณากรอกข้อมูล'; return (
isSpecialRole ||
!!val ||
$t('form.error.selectField', {
field: $t('productService.service.registeredBranch'),
})
);
}, },
]" ]"
@filter="branchFilter" @filter="branchFilter"
@ -202,7 +204,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -216,10 +218,10 @@ const serviceCodeFilter = selectFilterOptionRefMod(
outlined outlined
:readonly="readonly" :readonly="readonly"
hide-bottom-space hide-bottom-space
class="col-6" class="col-md-6 col"
:label="$t('serviceName')" :label="$t('productService.service.name')"
v-model="serviceName" v-model="serviceName"
:rules="[(val: string) => !!val || $t('pleaseInformation')]" :rules="[(val: string) => !!val || $t('form.error.required')]"
/> />
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
@ -231,7 +233,7 @@ const serviceCodeFilter = selectFilterOptionRefMod(
hide-bottom-space hide-bottom-space
type="textarea" type="textarea"
class="col-12" class="col-12"
:label="$t('detail')" :label="$t('general.detail')"
:model-value="readonly ? serviceDescription || '-' : serviceDescription" :model-value="readonly ? serviceDescription || '-' : serviceDescription"
@update:model-value=" @update:model-value="
(v) => (typeof v === 'string' ? (serviceDescription = v) : '') (v) => (typeof v === 'string' ? (serviceDescription = v) : '')

View file

@ -23,7 +23,7 @@ defineEmits<{
class="text-weight-bold text-body1 flex items-center justify-between q-px-md q-py-sm" class="text-weight-bold text-body1 flex items-center justify-between q-px-md q-py-sm"
style="background: hsla(var(--info-bg) / 0.1); min-height: 50px" style="background: hsla(var(--info-bg) / 0.1); min-height: 50px"
> >
{{ $t(`serviceProperties`) }} {{ $t(`productService.service.serviceProperties`) }}
<q-btn <q-btn
v-if="!readonly" v-if="!readonly"
@ -31,7 +31,7 @@ defineEmits<{
dense dense
flat flat
unelevated unelevated
class="q-px-sm" class="q-px-sm text-capitalize"
color="info" color="info"
@click="$emit('serviceProperties')" @click="$emit('serviceProperties')"
> >
@ -41,7 +41,9 @@ defineEmits<{
class="q-mr-sm" class="q-mr-sm"
style="color: hsl(var(--info-bg))" style="color: hsl(var(--info-bg))"
/> />
{{ $t('serviceProperties') }} <span v-if="$q.screen.gt.xs">
{{ $t('productService.service.serviceProperties') }}
</span>
</q-btn> </q-btn>
</div> </div>
@ -61,7 +63,7 @@ defineEmits<{
</div> </div>
<div v-else class="col flex items-center app-text-muted"> <div v-else class="col flex items-center app-text-muted">
{{ $t('noProperties') }} {{ $t('productService.service.noProperties') }}
</div> </div>
</div> </div>
</div> </div>

View file

@ -43,9 +43,9 @@ function confirmDelete(items: unknown[], index: number) {
dialog({ dialog({
color: 'negative', color: 'negative',
icon: 'mdi-alert', icon: 'mdi-alert',
title: t('deleteConfirmTitle'), title: t('dialog.title.confirmDelete'),
actionText: t('delete'), actionText: t('general.delete'),
message: t('deleteConfirmMessage'), message: t('dialog.message.confirmDelete'),
action: async () => { action: async () => {
deleteItem(items, index); deleteItem(items, index);
}, },
@ -65,7 +65,7 @@ function confirmDelete(items: unknown[], index: number) {
name="mdi-briefcase-outline" name="mdi-briefcase-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t(`workInformation`) }} {{ $t(`productService.service.workInformation`) }}
<AddButton <AddButton
v-if="!readonly" v-if="!readonly"
id="btn-add-work" id="btn-add-work"

View file

@ -37,7 +37,7 @@ withDefaults(
name="mdi-cash" name="mdi-cash"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ $t('priceInformation') }} {{ $t('productService.product.priceInformation') }}
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<q-input <q-input
@ -50,7 +50,7 @@ withDefaults(
hide-bottom-space hide-bottom-space
class="col-4" class="col-4"
type="number" type="number"
:label="$t('salePrice')" :label="$t('productService.product.salePrice')"
v-model="price" v-model="price"
/> />
@ -64,7 +64,7 @@ withDefaults(
hide-bottom-space hide-bottom-space
class="col-4" class="col-4"
type="number" type="number"
:label="$t('agentPrice')" :label="$t('productService.product.agentPrice')"
v-model="agentPrice" v-model="agentPrice"
/> />
@ -78,7 +78,7 @@ withDefaults(
hide-bottom-space hide-bottom-space
class="col-4" class="col-4"
type="number" type="number"
:label="$t('processingPrice')" :label="$t('productService.product.processingPrice')"
v-model="serviceCharge" v-model="serviceCharge"
/> />
</div> </div>

View file

@ -83,7 +83,7 @@ withDefaults(
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -106,7 +106,7 @@ withDefaults(
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -126,7 +126,7 @@ withDefaults(
class="col-3 app-text-negative" class="col-3 app-text-negative"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
<q-item dense> <q-item dense>
@ -139,7 +139,7 @@ withDefaults(
/> />
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
!isDisabled ? $t('switchOnLabel') : $t('switchOffLabel') !isDisabled ? $t('general.open') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -199,8 +199,8 @@ withDefaults(
} }
" "
unelevated unelevated
class="q-px-sm" class="q-px-sm text-capitalize"
:label="$t('detail')" :label="$t('general.detail')"
style=" style="
background-color: hsla(var(--blue-5-hsl) / 0.1); background-color: hsla(var(--blue-5-hsl) / 0.1);
color: var(--blue-5); color: var(--blue-5);

View file

@ -209,9 +209,9 @@ function confirmDelete(items: unknown[], index: number) {
dialog({ dialog({
color: 'negative', color: 'negative',
icon: 'mdi-alert', icon: 'mdi-alert',
title: t('deleteConfirmTitle'), title: t('dialog.title.confirmDelete'),
actionText: t('delete'), actionText: t('general.delete'),
message: t('deleteConfirmMessage'), message: t('dialog.message.confirmDelete'),
action: async () => { action: async () => {
deleteItem(items, index); deleteItem(items, index);
}, },
@ -227,8 +227,8 @@ function confirmDelete(items: unknown[], index: number) {
dense dense
unelevated unelevated
color="primary" color="primary"
:label="$t('properties')" :label="$t('productService.service.properties')"
class="q-px-sm q-mb-lg" class="q-px-sm q-mb-lg text-capitalize"
menu-anchor="bottom end" menu-anchor="bottom end"
> >
<q-list dense v-if="formServiceProperties && propertiesOption"> <q-list dense v-if="formServiceProperties && propertiesOption">
@ -251,7 +251,7 @@ function confirmDelete(items: unknown[], index: number) {
class="q-mr-sm" class="q-mr-sm"
style="color: hsl(var(--text-mute))" style="color: hsl(var(--text-mute))"
/> />
{{ $t('selectAll') }} {{ $t('general.selectAll') }}
</div> </div>
</q-item> </q-item>
<q-separator /> <q-separator />
@ -310,7 +310,7 @@ function confirmDelete(items: unknown[], index: number) {
index === formServiceProperties.additional.length - 1 && 'q-mb-lg' index === formServiceProperties.additional.length - 1 && 'q-mb-lg'
" "
> >
<div class="col row items-center"> <div class="col-md col-12 row items-center">
<q-btn <q-btn
id="btn-move-up-product" id="btn-move-up-product"
icon="mdi-arrow-up" icon="mdi-arrow-up"
@ -318,6 +318,7 @@ function confirmDelete(items: unknown[], index: number) {
flat flat
round round
:disable="index === 0" :disable="index === 0"
:size="$q.screen.xs ? 'xs' : ''"
style="color: hsl(var(--text-mute-2))" style="color: hsl(var(--text-mute-2))"
@click="moveItemUp(formServiceProperties.additional, index)" @click="moveItemUp(formServiceProperties.additional, index)"
/> />
@ -327,13 +328,14 @@ function confirmDelete(items: unknown[], index: number) {
dense dense
flat flat
round round
:size="$q.screen.xs ? 'xs' : ''"
:disable="index === formServiceProperties.additional.length - 1" :disable="index === formServiceProperties.additional.length - 1"
style="color: hsl(var(--text-mute-2))" style="color: hsl(var(--text-mute-2))"
@click="moveItemDown(formServiceProperties.additional, index)" @click="moveItemDown(formServiceProperties.additional, index)"
/> />
<q-avatar <q-avatar
size="md" :size="$q.screen.xs ? 'sm' : 'md'"
class="q-mx-lg" class="q-mx-lg"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
> >
@ -348,8 +350,9 @@ function confirmDelete(items: unknown[], index: number) {
emit-value emit-value
map-options map-options
hide-bottom-space hide-bottom-space
class="col q-mr-md" class="col-md col-12 q-mr-md"
:label="$t('propertiesName')" :class="{ 'q-my-sm': $q.screen.lt.md }"
:label="$t('productService.service.propertiesName')"
option-label="label" option-label="label"
option-value="value" option-value="value"
:options="propertiesOption" :options="propertiesOption"
@ -369,7 +372,7 @@ function confirmDelete(items: unknown[], index: number) {
</div> </div>
<!-- type --> <!-- type -->
<div class="col"> <div class="col-md col-12">
<q-select <q-select
lazy-rules="ondemand" lazy-rules="ondemand"
dense dense
@ -377,7 +380,7 @@ function confirmDelete(items: unknown[], index: number) {
emit-value emit-value
map-options map-options
hide-bottom-space hide-bottom-space
:label="$t('type')" :label="$t('general.type')"
option-value="value" option-value="value"
@update:model-value=" @update:model-value="
(t: 'string' | 'number' | 'date' | 'array') => { (t: 'string' | 'number' | 'date' | 'array') => {
@ -461,8 +464,13 @@ function confirmDelete(items: unknown[], index: number) {
<div v-if="p.type !== 'date' && p.type"> <div v-if="p.type !== 'date' && p.type">
<q-item class="no-padding" style="font-size: 11px"> <q-item class="no-padding" style="font-size: 11px">
<q-item-section class="column q-py-sm" style="padding-left: 12px"> <q-item-section
<span class="app-text-muted-2">{{ $t('additional') }}</span> class="column q-py-sm"
:style="{ 'padding-left: 12px': $q.screen.gt.xs }"
>
<span class="app-text-muted-2">
{{ $t('general.additional') }}
</span>
<div v-if="p.type === 'string'" class="q-gutter-y-sm"> <div v-if="p.type === 'string'" class="q-gutter-y-sm">
<div class="row items-center"> <div class="row items-center">
@ -472,7 +480,7 @@ function confirmDelete(items: unknown[], index: number) {
v-model="p.isPhoneNumber" v-model="p.isPhoneNumber"
size="xs" size="xs"
/> />
{{ $t('telephone') }} {{ $t('general.telephone') }}
</div> </div>
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
@ -482,7 +490,7 @@ function confirmDelete(items: unknown[], index: number) {
class="col additional-label" class="col additional-label"
dense dense
outlined outlined
:label="$t('telMaxLength')" :label="$t('form.maxLength')"
/> />
</div> </div>
</div> </div>
@ -491,7 +499,7 @@ function confirmDelete(items: unknown[], index: number) {
<div class="row items-center"> <div class="row items-center">
<div class="col-md-4 col-12 surface-3 rounded"> <div class="col-md-4 col-12 surface-3 rounded">
<q-checkbox v-model="p.comma" size="xs" class="q-py-xs" /> <q-checkbox v-model="p.comma" size="xs" class="q-py-xs" />
{{ $t('useComma') }} {{ $t('form.useComma') }}
</div> </div>
<div <div
class="col-md-4 col-7 surface-3 rounded" class="col-md-4 col-7 surface-3 rounded"
@ -505,7 +513,7 @@ function confirmDelete(items: unknown[], index: number) {
size="xs" size="xs"
class="q-py-xs" class="q-py-xs"
/> />
{{ $t('decimal') }} {{ $t('form.decimal') }}
</div> </div>
<q-input <q-input
lazy-rules="ondemand" lazy-rules="ondemand"
@ -515,7 +523,7 @@ function confirmDelete(items: unknown[], index: number) {
input-class="text-caption" input-class="text-caption"
dense dense
outlined outlined
:label="$t('decimalPlace')" :label="$t('form.decimalPlace')"
/> />
</div> </div>
</div> </div>
@ -534,8 +542,8 @@ function confirmDelete(items: unknown[], index: number) {
dense dense
outlined outlined
input-class="text-caption" input-class="text-caption"
:label="$t('selection')" :label="$t('form.selection')"
:rules="[(val) => !!val || $t('pleaseInformation')]" :rules="[(val) => !!val || $t('form.error.required')]"
hide-bottom-space hide-bottom-space
/> />
</div> </div>

View file

@ -92,7 +92,7 @@ withDefaults(
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -112,7 +112,7 @@ withDefaults(
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
@ -126,7 +126,7 @@ withDefaults(
/> />
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
!isDisabled ? $t('switchOnLabel') : $t('switchOffLabel') !isDisabled ? $t('general.open') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -155,7 +155,9 @@ withDefaults(
class="bordered q-pa-xs row surface-0" class="bordered q-pa-xs row surface-0"
style="font-size: 12px; border-radius: 5px; width: 80px" style="font-size: 12px; border-radius: 5px; width: 80px"
> >
<div class="col ellipsis-2-lines">งาน</div> <div class="col ellipsis-2-lines">
{{ $t('productService.service.work') }}
</div>
<q-space /> <q-space />
<div class="col text-center">{{ data?.work.length }}</div> <div class="col text-center">{{ data?.work.length }}</div>
</div> </div>
@ -166,10 +168,14 @@ withDefaults(
class="row full-width text-right" class="row full-width text-right"
style="font-size: 10px; color: hsl(var(--stone-4-hsl))" style="font-size: 10px; color: hsl(var(--stone-4-hsl))"
> >
<div class="col" v-if="priceDisplay?.price">ราคาขาย</div> <div class="col" v-if="priceDisplay?.price">
<div class="col" v-if="priceDisplay?.agentPrice">ราคาตัวแทน</div> {{ $t('productService.product.salePrice') }}
</div>
<div class="col" v-if="priceDisplay?.agentPrice">
{{ $t('productService.product.agentPrice') }}
</div>
<div class="col" v-if="priceDisplay?.serviceCharge"> <div class="col" v-if="priceDisplay?.serviceCharge">
ราคาดำเนนการ {{ $t('productService.product.processingPrice') }}
</div> </div>
</div> </div>
@ -249,7 +255,7 @@ withDefaults(
class="surface-0 rounded q-pa-xs app-text-muted" class="surface-0 rounded q-pa-xs app-text-muted"
size="20px" size="20px"
/> />
{{ data?.process }} {{ data?.process }} {{ $t('general.day') }}
</div> </div>
</div> </div>
</div> </div>

View file

@ -102,20 +102,22 @@ defineEmits<{
@click="() => (readonly ? '' : fetchListOfWork())" @click="() => (readonly ? '' : fetchListOfWork())"
> >
<span class="text-body2" style="color: var(--foreground)"> <span class="text-body2" style="color: var(--foreground)">
{{ $t('workNo') }} {{ index + 1 }} : {{ $t('productService.service.work') }} {{ index + 1 }} :
<span class="app-text-muted-2"> <span class="app-text-muted-2">
{{ workName ? workName : $t('workName') }} {{
workName ? workName : $t('productService.service.workName')
}}
</span> </span>
</span> </span>
<q-menu v-if="!readonly" fit anchor="bottom left" self="top left"> <q-menu v-if="!readonly" fit anchor="bottom left" self="top left">
<q-item> <q-item>
<div class="full-width flex items-center justify-between"> <div class="full-width flex items-center justify-between">
{{ $t('workName') }} {{ $t('productService.service.workName') }}
<q-btn <q-btn
dense dense
unelevated unelevated
class="bordered q-px-sm" class="bordered q-px-sm text-capitalize"
style=" style="
border-radius: var(--radius-2); border-radius: var(--radius-2);
color: hsl(var(--info-bg)); color: hsl(var(--info-bg));
@ -165,7 +167,7 @@ defineEmits<{
color="negative" color="negative"
@click.stop="$emit('deleteWork')" @click.stop="$emit('deleteWork')"
> >
<q-tooltip>{{ $t('delete') }}</q-tooltip> <q-tooltip>{{ $t('general.delete') }}</q-tooltip>
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -178,10 +180,14 @@ defineEmits<{
class="q-py-xs text-weight-medium row justify-between items-center q-px-md" class="q-py-xs text-weight-medium row justify-between items-center q-px-md"
style="background-color: hsla(var(--info-bg) / 0.1)" style="background-color: hsla(var(--info-bg) / 0.1)"
> >
<span>{{ $t('propertiesInWork') }} {{ workIndex + 1 }}</span> <span>
{{ $t('productService.service.propertiesInWork') }}
{{ workIndex + 1 }}
</span>
<q-btn <q-btn
v-if="!readonly" v-if="!readonly"
id="btn-add-work-product" id="btn-add-work-product"
class="text-capitalize"
flat flat
dense dense
padding="0" padding="0"
@ -194,14 +200,17 @@ defineEmits<{
class="q-mr-sm" class="q-mr-sm"
style="color: hsl(var(--info-bg))" style="color: hsl(var(--info-bg))"
/> />
{{ $t('properties') }} <span v-if="$q.screen.gt.xs">
{{ $t('productService.service.properties') }}
</span>
</q-btn> </q-btn>
</div> </div>
<div class="q-py-md q-px-md full-width"> <div class="q-py-md q-px-md full-width">
<div <div
v-if="attributes.additional.length > 0" v-if="attributes.additional.length > 0"
class="row items-center full-width surface-1 q-pb-md q-pt-sm q-px-sm q-gutter-sm" class="row items-center full-width surface-1 q-pb-md q-pt-sm q-px-sm q-gutter-sm scroll"
:style="$q.screen.xs ? 'max-height: 100px' : ''"
> >
<div <div
v-for="(p, index) in attributes.additional" v-for="(p, index) in attributes.additional"
@ -213,7 +222,7 @@ defineEmits<{
</div> </div>
</div> </div>
<div v-else class="app-text-muted"> <div v-else class="app-text-muted">
{{ $t('noProperties') }} {{ $t('productService.service.noProperties') }}
</div> </div>
</div> </div>
</div> </div>
@ -225,11 +234,12 @@ defineEmits<{
style="background-color: hsla(var(--info-bg) / 0.1)" style="background-color: hsla(var(--info-bg) / 0.1)"
> >
<span> <span>
{{ $t('productInWork') }} {{ workIndex + 1 }} {{ $t('productService.service.productInWork') }}
{{ workIndex + 1 }}
<q-checkbox <q-checkbox
size="xs" size="xs"
class="q-pl-lg" :class="$q.screen.gt.xs ? 'q-pl-lg' : 'q-pl-sm'"
v-model="attributes.showTotalPrice" v-model="attributes.showTotalPrice"
:label="$t('productService.service.showTotalPrice')" :label="$t('productService.service.showTotalPrice')"
style="color: hsl(var(--text-mute-2))" style="color: hsl(var(--text-mute-2))"
@ -242,7 +252,10 @@ defineEmits<{
flat flat
dense dense
icon="mdi-plus" icon="mdi-plus"
:label="$t('serviceAddProduct')" class="text-capitalize"
:label="
$q.screen.gt.xs ? $t('productService.product.addTitle') : ''
"
padding="0" padding="0"
style="color: hsl(var(--info-bg))" style="color: hsl(var(--info-bg))"
@click.stop="$emit('addProduct')" @click.stop="$emit('addProduct')"
@ -261,9 +274,12 @@ defineEmits<{
<div <div
class="row col items-center justify-between full-width surface-1 q-py-md q-px-sm" class="row col items-center justify-between full-width surface-1 q-py-md q-px-sm"
> >
<div class="row items-center col no-wrap" v-if="productItems"> <div
class="row items-center col-md col-12 no-wrap"
v-if="productItems"
>
<q-btn <q-btn
v-if="!readonly" v-if="!readonly && $q.screen.gt.xs"
id="btn-product-up" id="btn-product-up"
icon="mdi-arrow-up" icon="mdi-arrow-up"
dense dense
@ -274,7 +290,7 @@ defineEmits<{
@click.stop="$emit('moveProductUp', productItems, index)" @click.stop="$emit('moveProductUp', productItems, index)"
/> />
<q-btn <q-btn
v-if="!readonly" v-if="!readonly && $q.screen.gt.xs"
id="btn-product-down" id="btn-product-down"
icon="mdi-arrow-down" icon="mdi-arrow-down"
dense dense
@ -295,7 +311,10 @@ defineEmits<{
</q-avatar> </q-avatar>
<div class="row no-wrap"> <div class="row no-wrap">
<div class="bordered q-mx-md col-3 image-box"> <div
v-if="$q.screen.gt.xs"
class="bordered q-mx-md col-3 image-box"
>
<q-img <q-img
:src="`${baseUrl}/product/${product?.id}/image`" :src="`${baseUrl}/product/${product?.id}/image`"
style="object-fit: cover; width: 100%; height: 100%" style="object-fit: cover; width: 100%; height: 100%"
@ -314,17 +333,9 @@ defineEmits<{
class="text-weight-bold ellipsis-2-lines" class="text-weight-bold ellipsis-2-lines"
:style="`max-width: ${$q.screen.gt.sm ? '25vw' : '20vw'}`" :style="`max-width: ${$q.screen.gt.sm ? '25vw' : '20vw'}`"
> >
{{ {{ product.name }}
$i18n.locale === 'en-US'
? product.nameEn
: product.name
}}
<q-tooltip> <q-tooltip>
{{ {{ product.name }}
$i18n.locale === 'en-US'
? product.nameEn
: product.name
}}
</q-tooltip> </q-tooltip>
</span> </span>
<div <div
@ -337,7 +348,7 @@ defineEmits<{
</div> </div>
</div> </div>
<div class="row justify-end text-right col-5 q-pr-sm"> <div class="row justify-end text-right col-md-6 col-12 q-pr-sm">
<span <span
class="col-12 q-col-gutter-md row" class="col-12 q-col-gutter-md row"
style="color: var(--teal-9)" style="color: var(--teal-9)"
@ -347,7 +358,7 @@ defineEmits<{
class="col ellipsis price-orange text-weight-bold" class="col ellipsis price-orange text-weight-bold"
> >
<div class="text-caption app-text-muted-2"> <div class="text-caption app-text-muted-2">
{{ $t('salePrice') }} {{ $t('productService.product.salePrice') }}
</div> </div>
฿{{ formatNumberDecimal(product.price, 2) }} ฿{{ formatNumberDecimal(product.price, 2) }}
<q-tooltip <q-tooltip
@ -363,7 +374,7 @@ defineEmits<{
class="col ellipsis price-purple text-weight-bold" class="col ellipsis price-purple text-weight-bold"
> >
<div class="text-caption app-text-muted-2"> <div class="text-caption app-text-muted-2">
{{ $t('agentPrice') }} {{ $t('productService.product.agentPrice') }}
</div> </div>
฿{{ formatNumberDecimal(product.agentPrice, 2) }} ฿{{ formatNumberDecimal(product.agentPrice, 2) }}
<q-tooltip <q-tooltip
@ -379,7 +390,7 @@ defineEmits<{
class="col ellipsis price-pink column" class="col ellipsis price-pink column"
> >
<div class="text-caption app-text-muted-2"> <div class="text-caption app-text-muted-2">
{{ $t('processingPrice') }} {{ $t('productService.product.processingPrice') }}
</div> </div>
฿{{ formatNumberDecimal(product.serviceCharge, 2) }} ฿{{ formatNumberDecimal(product.serviceCharge, 2) }}
<q-tooltip <q-tooltip
@ -393,10 +404,10 @@ defineEmits<{
</span> </span>
<span class="col-9 q-mt-sm text-caption app-text-muted-2"> <span class="col-9 q-mt-sm text-caption app-text-muted-2">
{{ $t('processTime') }} {{ $t('productService.product.processingTime') }}
</span> </span>
<span class="col-3 q-mt-sm text-caption app-text-muted-2"> <span class="col-3 q-mt-sm text-caption app-text-muted-2">
{{ product.process }} {{ $t('day') }} {{ product.process }} {{ $t('general.day') }}
</span> </span>
</div> </div>
</div> </div>
@ -413,24 +424,26 @@ defineEmits<{
color="negative" color="negative"
@click.stop="$emit('deleteProduct', productItems, index)" @click.stop="$emit('deleteProduct', productItems, index)"
> >
<q-tooltip>{{ $t('delete') }}</q-tooltip> <q-tooltip>{{ $t('general.delete') }}</q-tooltip>
</q-btn> </q-btn>
</div> </div>
</div> </div>
<div v-else class="app-text-muted q-py-md q-px-lg"> <div v-else class="app-text-muted q-py-md q-px-lg">
{{ $t('noProduct') }} {{ $t('productService.product.noProduct') }}
</div> </div>
</div> </div>
</div> </div>
</q-expansion-item> </q-expansion-item>
<div class="q-py-sm q-px-md bordered-t row items-center justify-between"> <div class="q-py-sm q-px-md bordered-t row items-center justify-between">
<div> <div>
{{ $t('totalProductWork') }} {{ $t('productService.service.totalProductWork') }}
<span class="app-text-muted-2"> <span class="app-text-muted-2">
{{ workName }} {{ workName }}
</span> </span>
</div> </div>
<div>{{ productItems?.length ?? 0 }} {{ $t('list') }}</div> <div>
{{ productItems?.length ?? 0 }} {{ $t('productService.service.list') }}
</div>
</div> </div>
</div> </div>
</template> </template>

View file

@ -1,5 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref, watch } from 'vue'; import { onMounted, ref, watch } from 'vue';
import { DeleteButton, EditButton, SaveButton, UndoButton } from '../button';
// import { useI18n } from 'vue-i18n'; // import { useI18n } from 'vue-i18n';
// import { storeToRefs } from 'pinia'; // import { storeToRefs } from 'pinia';
@ -72,63 +73,37 @@ watch(
:readonly="!item.isEdit" :readonly="!item.isEdit"
:outlined="item.isEdit" :outlined="item.isEdit"
></q-input> ></q-input>
<q-btn <EditButton
v-if="!item.isEdit" v-if="!item.isEdit"
icon-only
id="btn-edit-work-name" id="btn-edit-work-name"
icon="mdi-pencil-outline" :disabled="isWorkNameEdit()"
:disable="isWorkNameEdit()"
dense
flat
round
color="primary"
@click="item.isEdit = true" @click="item.isEdit = true"
> />
<q-tooltip>{{ $t('edit') }}</q-tooltip> <SaveButton
</q-btn>
<q-btn
v-else v-else
id="btn-edit-work-name" icon-only
icon="mdi-check" id="btn-save-work-name"
dense
flat
round
color="primary"
@click=" @click="
() => { () => {
$emit('edit', item.id, { name: item.name }), $emit('edit', item.id, { name: item.name }),
(item.isEdit = false); (item.isEdit = false);
} }
" "
> />
<q-tooltip>{{ $t('save') }}</q-tooltip> <DeleteButton
</q-btn>
<q-btn
v-if="!item.isEdit" v-if="!item.isEdit"
icon-only
id="btn-delete-work-name" id="btn-delete-work-name"
:disable="isWorkNameEdit()" :disabled="isWorkNameEdit()"
icon="mdi-trash-can-outline"
dense
flat
round
class="q-ml-md"
color="negative"
@click="$emit('delete', item.id)" @click="$emit('delete', item.id)"
> />
<q-tooltip>{{ $t('delete') }}</q-tooltip> <UndoButton
</q-btn>
<q-btn
v-else v-else
id="btn-edit-work-name" icon-only
icon="mdi-undo" id="btn-undo-work-name"
dense
flat
round
class="q-ml-md"
color="negative"
@click="assignClone" @click="assignClone"
> />
<q-tooltip>{{ $t('cancel') }}</q-tooltip>
</q-btn>
</q-item> </q-item>
</q-list> </q-list>
<div v-else class="flex col justify-center items-center"> <div v-else class="flex col justify-center items-center">
@ -148,7 +123,7 @@ watch(
> >
<span class="q-px-lg flex items-center app-text-muted-2"> <span class="q-px-lg flex items-center app-text-muted-2">
<q-icon name="mdi-plus" class="q-mr-md" /> <q-icon name="mdi-plus" class="q-mr-md" />
{{ $t('addWork') }} {{ $t('productService.service.addWork') }}
</span> </span>
</q-item> </q-item>
</div> </div>

View file

@ -1,6 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
defineProps<{ defineProps<{
label?: string; label?: string;
i18nArgs?: Record<string, unknown>;
}>(); }>();
</script> </script>
@ -17,7 +18,9 @@ defineProps<{
round round
/> />
</div> </div>
<div class="row q-mt-sm color-text" v-if="label">{{ $t(label) }}</div> <div class="row q-mt-sm color-text" v-if="label">
{{ $t(label, { ...i18nArgs }) }}
</div>
</div> </div>
</template> </template>

View file

@ -21,6 +21,7 @@ defineProps<{
edit?: boolean; edit?: boolean;
saveAmount?: number; saveAmount?: number;
submitLabel?: string;
isEdit?: boolean; isEdit?: boolean;
tabsList?: { name: string; label: string }[]; tabsList?: { name: string; label: string }[];
@ -216,6 +217,7 @@ const currentTab = defineModel<string>('currentTab');
id="btn-form-submit" id="btn-form-submit"
type="submit" type="submit"
solid solid
:label="submitLabel"
:amount="saveAmount" :amount="saveAmount"
/> />
</div> </div>

View file

@ -109,8 +109,8 @@ function reset() {
> >
{{ {{
statusBranch === 'INACTIVE' statusBranch === 'INACTIVE'
? $t('statusINACTIVE') ? $t('status.INACTIVE')
: $t('statusACTIVE') : $t('status.ACTIVE')
}} }}
</text> </text>
</div> </div>

View file

@ -72,7 +72,7 @@ defineProps<{
" "
:class="{ 'full-width': !action }" :class="{ 'full-width': !action }"
@click="cancel" @click="cancel"
:label="cancelText || $t('cancel')" :label="cancelText || $t('general.cancel')"
v-close-popup v-close-popup
/> />
@ -83,7 +83,7 @@ defineProps<{
:class="{ 'full-width': !cancel }" :class="{ 'full-width': !cancel }"
v-if="action" v-if="action"
@click="action" @click="action"
:label="actionText || $t('agree')" :label="actionText || $t('general.ok')"
:color="color || 'primary'" :color="color || 'primary'"
v-close-popup v-close-popup
/> />

View file

@ -8,7 +8,7 @@ defineProps<{
<q-inner-loading :showing="visibility" class="loader q-gutter-y-xl"> <q-inner-loading :showing="visibility" class="loader q-gutter-y-xl">
<q-spinner size="80px" color="primary" /> <q-spinner size="80px" color="primary" />
<span class="text-h5 text-weight-bold text-primary"> <span class="text-h5 text-weight-bold text-primary">
{{ $t('loading') }} {{ $t('general.loading') }}
</span> </span>
</q-inner-loading> </q-inner-loading>
</template> </template>

View file

@ -20,10 +20,10 @@ defineProps<{
text text
? text ? text
: notFound : notFound
? $t('notFound') ? $t('general.notFound')
: useField : useField
? $t('noField') ? $t('general.noField')
: $t('noData') : $t('general.noData')
}} }}
</div> </div>
</div> </div>

View file

@ -21,7 +21,7 @@ defineProps<{
useToggle?: boolean; useToggle?: boolean;
menu?: { icon: string; color: string; bgColor: string }[]; menu?: { icon: string; color: string; bgColor: string }[];
tabsList?: { name: string; label: string }[]; tabsList?: { name: string | number; label: string }[];
}>(); }>();
defineEmits<{ defineEmits<{
@ -40,7 +40,7 @@ const toggleStatus = defineModel<string>('toggleStatus', {
default: 'CREATED', default: 'CREATED',
}); });
const currentTab = defineModel<string>('currentTab'); const currentTab = defineModel<string | number>('currentTab');
const showOverlay = ref(false); const showOverlay = ref(false);
</script> </script>
@ -161,7 +161,7 @@ const showOverlay = ref(false);
class="upload-overlay absolute-bottom flex items-center justify-center" class="upload-overlay absolute-bottom flex items-center justify-center"
@click.stop="$emit('edit')" @click.stop="$emit('edit')"
> >
{{ $t('editImage') }} {{ $t('general.editImage') }}
</div> </div>
</div> </div>
</Transition> </Transition>
@ -192,7 +192,11 @@ const showOverlay = ref(false);
</div> </div>
<!-- icon --> <!-- icon -->
<div class="row items-center q-pr-lg" style="z-index: 1"> <div
v-if="$q.screen.gt.xs"
class="row items-center q-pr-lg"
style="z-index: 1"
>
<span <span
v-if="useToggle && toggleTitle" v-if="useToggle && toggleTitle"
class="q-mr-md app-text-muted-2" class="q-mr-md app-text-muted-2"

View file

@ -152,7 +152,7 @@ defineEmits<{
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -173,7 +173,7 @@ defineEmits<{
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -198,7 +198,7 @@ defineEmits<{
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
@ -214,8 +214,8 @@ defineEmits<{
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
node.status !== 'INACTIVE' node.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</span> </span>
</div> </div>

View file

@ -19,8 +19,8 @@ defineProps<{
v-bind="{ ...$props, ...$attrs }" v-bind="{ ...$props, ...$attrs }"
icon="mdi-plus" icon="mdi-plus"
color="var(--info-bg)" color="var(--info-bg)"
:title="iconOnly ? $t('add') : undefined" :title="iconOnly ? $t('general.add') : undefined"
> >
{{ $t('add') }} {{ $t('general.add') }}
</MainButton> </MainButton>
</template> </template>

View file

@ -19,8 +19,8 @@ defineProps<{
v-bind="{ ...$props, ...$attrs }" v-bind="{ ...$props, ...$attrs }"
icon="mdi-arrow-left" icon="mdi-arrow-left"
color="var(--info-bg)" color="var(--info-bg)"
:title="iconOnly ? $t('back') : undefined" :title="iconOnly ? $t('general.back') : undefined"
> >
{{ $t('back') }} {{ $t('general.back') }}
</MainButton> </MainButton>
</template> </template>

View file

@ -19,8 +19,8 @@ defineProps<{
v-bind="{ ...$props, ...$attrs }" v-bind="{ ...$props, ...$attrs }"
icon="mdi-close" icon="mdi-close"
color="var(--negative-bg)" color="var(--negative-bg)"
:title="iconOnly ? $t('cancel') : undefined" :title="iconOnly ? $t('general.cancel') : undefined"
> >
{{ $t('cancel') }} {{ $t('general.cancel') }}
</MainButton> </MainButton>
</template> </template>

View file

@ -19,8 +19,8 @@ defineProps<{
v-bind="{ ...$props, ...$attrs }" v-bind="{ ...$props, ...$attrs }"
icon="mdi-trash-can-outline" icon="mdi-trash-can-outline"
color="var(--negative-bg)" color="var(--negative-bg)"
:title="iconOnly ? $t('delete') : undefined" :title="iconOnly ? $t('general.delete') : undefined"
> >
{{ $t('delete') }} {{ $t('general.delete') }}
</MainButton> </MainButton>
</template> </template>

View file

@ -19,8 +19,8 @@ defineProps<{
v-bind="{ ...$props, ...$attrs }" v-bind="{ ...$props, ...$attrs }"
icon="mdi-pencil-outline" icon="mdi-pencil-outline"
color="var(--cyan-6-hsl)" color="var(--cyan-6-hsl)"
:title="iconOnly ? $t('edit') : undefined" :title="iconOnly ? $t('general.edit') : undefined"
> >
{{ $t('edit') }} {{ $t('general.edit') }}
</MainButton> </MainButton>
</template> </template>

View file

@ -11,6 +11,8 @@ defineProps<{
disabled?: boolean; disabled?: boolean;
dark?: boolean; dark?: boolean;
label?: string;
amount?: number; amount?: number;
}>(); }>();
</script> </script>
@ -21,8 +23,9 @@ defineProps<{
v-bind="{ ...$props, ...$attrs }" v-bind="{ ...$props, ...$attrs }"
icon="mdi-content-save-outline" icon="mdi-content-save-outline"
color="207 96% 32%" color="207 96% 32%"
:title="iconOnly ? $t('save') : undefined" :title="iconOnly ? $t('general.save') : undefined"
> >
{{ $t('save') }} {{ amount && amount > 0 ? `(${amount})` : '' }} {{ label || $t('general.save') }}
{{ amount && amount > 0 ? `(${amount})` : '' }}
</MainButton> </MainButton>
</template> </template>

View file

@ -19,8 +19,8 @@ defineProps<{
v-bind="{ ...$props, ...$attrs }" v-bind="{ ...$props, ...$attrs }"
icon="mdi-arrow-left" icon="mdi-arrow-left"
color="var(--gray-8-hsl)" color="var(--gray-8-hsl)"
:title="iconOnly ? $t('undo') : undefined" :title="iconOnly ? $t('general.undo') : undefined"
> >
{{ $t('undo') }} {{ $t('general.undo') }}
</MainButton> </MainButton>
</template> </template>

View file

@ -164,7 +164,7 @@ watch(districtId, fetchSubDistrict);
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
{{ title || $t('formDialogTitlePersonnelAddress') }} {{ (title && $t(title)) || $t('form.field.address') }}
<div <div
v-if="employee" v-if="employee"
@ -181,7 +181,7 @@ watch(districtId, fetchSubDistrict);
}" }"
@click="readonly ? '' : (sameWithEmployer = true)" @click="readonly ? '' : (sameWithEmployer = true)"
> >
{{ $t('formDialogToggleSameAddress') }} {{ $t('customerEmployee.form.addressSame') }}
</span> </span>
<span <span
:id="`${prefixId}-custom`" :id="`${prefixId}-custom`"
@ -193,7 +193,7 @@ watch(districtId, fetchSubDistrict);
}" }"
@click="readonly ? '' : (sameWithEmployer = false)" @click="readonly ? '' : (sameWithEmployer = false)"
> >
{{ $t('formDialogToggleCustomAddress') }} {{ $t('customerEmployee.form.addressCustom') }}
</span> </span>
</div> </div>
</div> </div>
@ -201,7 +201,7 @@ watch(districtId, fetchSubDistrict);
<div class="col-12 row q-col-gutter-y-md"> <div class="col-12 row q-col-gutter-y-md">
<div class="col-12 app-text-muted-2"> <div class="col-12 app-text-muted-2">
<q-icon size="xs" class="q-mr-xs" name="mdi-map-marker-outline" /> <q-icon size="xs" class="q-mr-xs" name="mdi-map-marker-outline" />
{{ addressTitle || $t('formDialogTitleAddressPure') }} {{ addressTitle || $t('form.address') }}
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<div class="row col-12" v-if="useWorkPlace"> <div class="row col-12" v-if="useWorkPlace">
@ -220,8 +220,7 @@ watch(districtId, fetchSubDistrict);
? [] ? []
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) || $t('form.error.required'),
$t('formDialogInputAddressValidate'),
] ]
" "
/> />
@ -234,17 +233,13 @@ watch(districtId, fetchSubDistrict);
v-model="address" v-model="address"
lazy-rules="ondemand" lazy-rules="ondemand"
:dense="dense" :dense="dense"
:label="$t('address')" :label="$t('form.address')"
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
:for="`${prefixId}-${indexId !== undefined ? `input-address-${indexId}` : 'input-address'}`" :for="`${prefixId}-${indexId !== undefined ? `input-address-${indexId}` : 'input-address'}`"
:rules=" :rules="
disabledRule disabledRule
? [] ? []
: [ : [(val) => (val && val.length > 0) || $t('form.error.required')]
(val) =>
(val && val.length > 0) ||
$t('formDialogInputAddressValidate'),
]
" "
/> />
<q-select <q-select
@ -264,7 +259,7 @@ watch(districtId, fetchSubDistrict);
lazy-rules="ondemand" lazy-rules="ondemand"
class="col-md-3 col-6" class="col-md-3 col-6"
:dense="dense" :dense="dense"
:label="$t('province')" :label="$t('form.province')"
:options="provinceOptions" :options="provinceOptions"
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
:hide-dropdown-icon="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer"
@ -275,7 +270,9 @@ watch(districtId, fetchSubDistrict);
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) ||
$t('formDialogInputProvinceValidate'), $t('form.error.selectField', {
field: $t('form.province'),
}),
] ]
" "
@filter="provinceFilter" @filter="provinceFilter"
@ -284,7 +281,7 @@ watch(districtId, fetchSubDistrict);
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -307,7 +304,7 @@ watch(districtId, fetchSubDistrict);
lazy-rules="ondemand" lazy-rules="ondemand"
class="col-md-3 col-6" class="col-md-3 col-6"
:dense="dense" :dense="dense"
:label="$t('district')" :label="$t('form.district')"
:options="districtOptions" :options="districtOptions"
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
:hide-dropdown-icon="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer"
@ -318,7 +315,9 @@ watch(districtId, fetchSubDistrict);
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) ||
$t('formDialogInputDistrictValidate'), $t('form.error.selectField', {
field: $t('form.district'),
}),
] ]
" "
@filter="districtFilter" @filter="districtFilter"
@ -327,7 +326,7 @@ watch(districtId, fetchSubDistrict);
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -349,7 +348,7 @@ watch(districtId, fetchSubDistrict);
class="col-md-3 col-6" class="col-md-3 col-6"
v-model="subDistrictId" v-model="subDistrictId"
:dense="dense" :dense="dense"
:label="$t('subDistrict')" :label="$t('form.subDistrict')"
:options="subDistrictOptions" :options="subDistrictOptions"
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
:hide-dropdown-icon="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer"
@ -360,7 +359,9 @@ watch(districtId, fetchSubDistrict);
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) ||
$t('formDialogInputSubDistrictValidate'), $t('form.error.selectField', {
field: $t('form.subDistrict'),
}),
] ]
" "
@update:model-value="(v: string) => selectSubDistrict(v)" @update:model-value="(v: string) => selectSubDistrict(v)"
@ -369,7 +370,7 @@ watch(districtId, fetchSubDistrict);
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -381,7 +382,7 @@ watch(districtId, fetchSubDistrict);
outlined outlined
:disable="!readonly" :disable="!readonly"
readonly readonly
:label="$t('zipCode')" :label="$t('form.zipCode')"
class="col-md-2 col-6" class="col-md-2 col-6"
:model-value=" :model-value="
addrOptions.subDistrictOps addrOptions.subDistrictOps
@ -393,7 +394,7 @@ watch(districtId, fetchSubDistrict);
<div class="col-12 app-text-muted-2"> <div class="col-12 app-text-muted-2">
<q-icon size="xs" class="q-mr-xs" name="mdi-map-marker-outline" /> <q-icon size="xs" class="q-mr-xs" name="mdi-map-marker-outline" />
{{ addressTitleEN || $t('formDialogTitleAddressPureEN') }} {{ addressTitleEN || $t('form.address', { suffix: '(EN)' }) }}
</div> </div>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<div class="row col-12" v-if="useWorkPlace"> <div class="row col-12" v-if="useWorkPlace">
@ -412,8 +413,7 @@ watch(districtId, fetchSubDistrict);
? [] ? []
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) || $t('form.error.required'),
$t('formDialogInputAddressValidate'),
] ]
" "
/> />
@ -426,17 +426,13 @@ watch(districtId, fetchSubDistrict);
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
outlined outlined
hide-bottom-space hide-bottom-space
:label="$t('address')" :label="$t('form.address', { suffix: '(EN)' })"
class="col-12" class="col-12"
v-model="addressEN" v-model="addressEN"
:rules=" :rules="
disabledRule disabledRule
? [] ? []
: [ : [(val) => (val && val.length > 0) || $t('form.error.required')]
(val) =>
(val && val.length > 0) ||
$t('formDialogInputAddressValidate'),
]
" "
/> />
<q-select <q-select
@ -456,7 +452,7 @@ watch(districtId, fetchSubDistrict);
option-label="nameEN" option-label="nameEN"
class="col-md-3 col-6" class="col-md-3 col-6"
:dense="dense" :dense="dense"
:label="$t('province')" :label="$t('form.province')"
:options="provinceOptions" :options="provinceOptions"
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
:hide-dropdown-icon="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer"
@ -467,7 +463,9 @@ watch(districtId, fetchSubDistrict);
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) ||
$t('formDialogInputProvinceValidate'), $t('form.error.selectField', {
field: $t('form.province'),
}),
] ]
" "
@update:model-value="districtId = subDistrictId = zipCode = null" @update:model-value="districtId = subDistrictId = zipCode = null"
@ -476,7 +474,7 @@ watch(districtId, fetchSubDistrict);
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -498,7 +496,7 @@ watch(districtId, fetchSubDistrict);
option-label="nameEN" option-label="nameEN"
class="col-md-3 col-6" class="col-md-3 col-6"
:dense="dense" :dense="dense"
:label="$t('district')" :label="$t('form.district')"
:options="districtOptions" :options="districtOptions"
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
:hide-dropdown-icon="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer"
@ -509,7 +507,9 @@ watch(districtId, fetchSubDistrict);
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) ||
$t('formDialogInputDistrictValidate'), $t('form.error.selectField', {
field: $t('form.district'),
}),
] ]
" "
@update:model-value="subDistrictId = zipCode = null" @update:model-value="subDistrictId = zipCode = null"
@ -518,7 +518,7 @@ watch(districtId, fetchSubDistrict);
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -540,7 +540,7 @@ watch(districtId, fetchSubDistrict);
class="col-md-3 col-6" class="col-md-3 col-6"
v-model="subDistrictId" v-model="subDistrictId"
:dense="dense" :dense="dense"
:label="$t('subDistrict')" :label="$t('form.subDistrict')"
:options="subDistrictOptions" :options="subDistrictOptions"
:readonly="readonly || sameWithEmployer" :readonly="readonly || sameWithEmployer"
:hide-dropdown-icon="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer"
@ -551,7 +551,9 @@ watch(districtId, fetchSubDistrict);
: [ : [
(val) => (val) =>
(val && val.length > 0) || (val && val.length > 0) ||
$t('formDialogInputSubDistrictValidate'), $t('form.error.selectField', {
field: $t('form.subDistrict'),
}),
] ]
" "
@update:model-value="(v: string) => selectSubDistrict(v)" @update:model-value="(v: string) => selectSubDistrict(v)"
@ -560,7 +562,7 @@ watch(districtId, fetchSubDistrict);
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -574,7 +576,7 @@ watch(districtId, fetchSubDistrict);
readonly readonly
:disable="!readonly" :disable="!readonly"
zip="zip-en" zip="zip-en"
:label="$t('zipCode')" :label="$t('form.zipCode')"
class="col-md-2 col-6" class="col-md-2 col-6"
:model-value=" :model-value="
addrOptions.subDistrictOps addrOptions.subDistrictOps

View file

@ -62,16 +62,16 @@ function valueUpdate(value: string) {
:disabled-dates="disabledDates" :disabled-dates="disabledDates"
:teleport="true" :teleport="true"
:dark="$q.dark.isActive" :dark="$q.dark.isActive"
:locale="$i18n.locale === 'th-th' ? 'th' : 'en'" :locale="$i18n.locale === 'tha' ? 'th' : 'en'"
:enableTimePicker="false" :enableTimePicker="false"
v-model="model" v-model="model"
class="col-2" class="col-2"
> >
<template #year="{ value }"> <template #year="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'tha' ? value + 543 : value }}
</template> </template>
<template #year-overlay-value="{ value }"> <template #year-overlay-value="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'tha' ? value + 543 : value }}
</template> </template>
<template #trigger> <template #trigger>
<q-input <q-input

View file

@ -106,7 +106,7 @@ defineEmits<{
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -124,7 +124,7 @@ defineEmits<{
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -139,7 +139,7 @@ defineEmits<{
class="col-3 app-text-negative" class="col-3 app-text-negative"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
<q-item dense> <q-item dense>
@ -151,9 +151,7 @@ defineEmits<{
@click="$emit('toggleStatus', disabled === false)" @click="$emit('toggleStatus', disabled === false)"
/> />
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{ !disabled ? $t('general.open') : $t('general.close') }}
!disabled ? $t('switchOnLabel') : $t('switchOffLabel')
}}
</span> </span>
</div> </div>
</q-item-section> </q-item-section>

View file

@ -1,7 +0,0 @@
export default {
address: 'Address',
province: 'Province',
district: 'District',
subDistrict: 'Sub-district',
zipCode: 'Zip Code',
};

View file

@ -1,89 +0,0 @@
export default {
warning: 'Warning',
warningForgetInput: 'You have incomplete information.',
warningClose:
"You haven't saved your data. Do you want to close this window?",
errorOccurred: 'An error occurred.',
confirmLogoutTitle: 'Confirm Logout',
confirmLogoutMessage: 'Do you want to log out?',
confirmChangeStatusTitle: 'Confirm Status Change',
confirmChangeStatusOnMessage: 'Do you want to open?',
confirmChangeStatusOffMessage: 'Do you want to close?',
// Backend
productGroupNotFound: 'Product group cannot be found.',
productGroupInUsed: 'Product group is in used.',
productNotFound: 'Product cannot be found.',
productInUsed: 'Product is in used.',
productTypeNotFound: 'Product type cannot be found.',
productGroupAssociatedBadReq: 'Product group associated cannot be found.',
productTypeInUsed: 'Product type is in used.',
productGroupBadReq: 'Product group cannot be found.',
serviceNotFound: 'Service cannot be found.',
someProductBadReq: 'Some product not found.',
serviceInUsed: 'Service is in used.',
workNotFound: 'Work cannot be found.',
workInUsed: 'Work is in used.',
branchContactNotFound: 'Branch contact cannot be found.',
branchBadReq: 'Branch cannot be found.',
branchNotFound: 'Branch cannot be found.',
cantMakeHQAndBranchSameTime:
'Cannot make this as headquaters and branch at the same time.',
branchInUsed: 'Branch is in used.',
oneOrMoreUserBadReq: 'One or more user cannot be found.',
oneOrMoreBranchBadReq: 'One or more branch cannot be found.',
customerBranchNotFound: 'Customer branch cannot be found.',
customerBranchInUsed: 'Customer branch is in used.',
customerNotFound: 'Customer cannot be found.',
customerInUsed: 'Customer is in used.',
oneOrMoreBranchMissing: 'One or more branch cannot be delete and is missing.',
employeeCheckupNotFound: 'Employee checkup cannot be found.',
provinceNotFound: 'Province cannot be found.',
employeeNotFound: 'Employee cannot be found.',
employeeBadReq: 'Employee cannot be found.',
employeeInUsed: 'Employee is in used.',
someProvinceNotFound: 'Some province cannot be found.',
employeeOtherNotFound: 'Employee other info cannot be found.',
employeeWorkNotFound: 'Employee work cannot be found.',
parentMenuBadReq: 'Parent menu not found.',
menuNotFound: 'Menu cannot be found.',
menuBadReq: 'Menu cannot be found.',
menuComponentNotFound: 'Menu component cannot be found.',
roleMenuNotFound: 'Role menu cannot be found.',
userNotFound: 'User cannot be found.',
userInUsed: 'User is in used.',
unknowHowToVerify: 'Unknown how to verify identity.',
noPermission:
'You do not have permission to access or perform with this resource.',
noPermissionToAccess:
'You do not have permission to access or perform with this resource.',
relationProvinceNotFound: 'Province cannot be found.',
relationDistrictNotFound: 'District cannot be found.',
relationSubDistrictNotFound: 'Sub-district cannot be found.',
relationHQNotFound: 'Headquarters cannot be found.',
relationCustomerNotFound: 'Customer cannot be found.',
relationCustomerBranchNotFound: 'Customer Branch cannot be found.',
sameBranchCodeExists: 'This Head Office Abbreviation is already in use.',
};

View file

@ -1,8 +0,0 @@
export default {
accountNumber: 'Account Number',
bankBranch: 'Bank Branch',
accountName: 'Account Name',
bankType: 'Bank Type',
accountStatus: 'Account Status ',
bankBookNo: 'Bank Book',
};

View file

@ -1,29 +0,0 @@
export default {
branchManagementCaption: 'Manage All Branch',
branchInHQ: 'Branch within the main office',
office: 'Office',
branchLabel: 'Branch',
branchHQLabel: 'Headquarters',
branchName: 'Branch Name',
branchAdd: 'Add Branch / Head Office',
branchManagement: 'Branch Management',
branchNoMainOfficeYet: 'No head office yet?',
branchClickToCreateMainOffice: 'Click "+" to create head office.',
totalEmployee: 'Total Employee',
branchLabelCode: 'Branch Code',
branchLabelName: 'Branch Name',
branchLabelTel: 'Branch Telephone No',
branchLabelAddress: 'Branch Address',
branchLabelType: 'Branch Type',
branchLabelStatus: 'Branch Status',
registeredBranch: 'Registered Branch',
branchStatTitle: 'Summary data of branch',
branchAdminTitle: 'Branch Admin',
branchAdminNone: 'No admin found',
};

View file

@ -1,62 +0,0 @@
export default {
customerManagement: 'Customers Management',
customerManagementCaption: 'Manage All Customer',
customerEmployerTooltipTitle: 'No employer data yet',
customerEmployeeTooltipTitle: 'No employee data yet',
customerEmployerTooltipCaption: 'Click + to add an employer',
customerEmployeeTooltipCaption: 'Click + to add an employee',
customerEmployerAdd: 'Add employer',
customerEmployeeAdd: 'Add employee',
nameEmployee: 'Employee',
EMPLOYER: 'Employer',
EMPLOYEE: 'Employee',
customerEmployerStatTitle: 'Employer data summary',
customerEmployeeStatTitle: 'Employee data summary',
customerCardUserType: 'Employer type',
customerLegalEntity: 'Legal entity',
customerNaturalPerson: 'Natural person',
businessInformation: 'Business information',
inputCustomerAddress: 'Employment office location (within the area)',
businessType: 'Business type in Thai',
businessTypeEN: 'Business type in English',
businessTypePure: 'Business Type',
jobPosition: 'Job position in Thai',
jobPositionEN: 'Job position in English',
jobDescription: 'Job description',
payDay: 'Payday',
payRate: 'Daily wage rate',
salesPerson: 'Salesperson',
// เกี่ยวกับ About
about: 'About',
branchCode: 'Branch Code',
legalEntityCode: 'Legal Entity Code',
taxNo: 'Tax Identification Number',
customerName: 'Customer Thai Name',
customerEnglishName: 'Customer English Name',
registerDate: 'Register Date',
authorizedCapital: 'Registered Capital',
registerName: 'RegisterName',
customerBranchFormTab: 'Branch ',
customerNameTh: 'Company/Legal Entity Name in Thai',
customerNameEn: 'Company/Legal Entity Name in English',
customerBranchName: 'Company/Legal Entity Name',
allEmployee: 'All Employee',
editHistory: 'Edit History',
time: 'Time',
editBy: 'Edit by',
valueBefore: 'Before',
valueAfter: 'After',
serviceWorkTotal: 'Service Work Total',
priceInformation: 'Price Information',
};

View file

@ -1,13 +0,0 @@
export default {
drawerDashboard: 'Dashboard',
drawerBranchManagement: 'Branch Management',
drawerPersonnelManagement: 'Personnel Management',
drawerCustomerManagement: 'Customer Management',
drawerProductsAndServices: 'Products and Services',
drawerQuotation: 'Quotation',
drawerRequestList: 'Request List',
drawerWorkOrder: 'Work Order',
drawerInvoice: 'Invoice',
drawerAccountingLedger: 'Accounting Ledger',
drawerReport: 'Report',
};

View file

@ -1,11 +0,0 @@
export default {
corporationThaiName: 'Corporation ThaiName',
corporationEnglishName: 'Corporation EnglishName',
corporationThai: 'Company name in Thai',
corporationEnglish: 'English company name',
companyOwnerName: 'Company Owner Name',
corporation: 'Corporation',
};

View file

@ -1,203 +0,0 @@
export default {
inputValidate: 'Please enter ',
selectValidate: 'Please select ',
// Branch & HQ
formDialogHqAbbreviation: 'Head Office Abbreviation',
formDialogInputHqAbbreviation: 'Please enter Head Office Abbreviation',
formDialogTitleImg: 'Office Image',
formDialogBtnImg: 'Add Office Image',
formDialogTitleViewHeadOffice: 'Head Office',
formDialogTitleViewSubBranch: 'Branch',
formDialogTitleCreateHeadOffice: 'Add Headquarters',
formDialogTitleEditHeadOffice: 'Edit Headquarters',
formDialogTitleCreateSubBranch: ' Add Sub-branch',
formDialogTitleEditSubBranch: 'Edit Sub-branch',
formDialogTitleAddress: ' Head office address information',
formDialogTitleLocation: 'Head Office Location',
formDialogTitleInformation: 'Basic Information',
formDialogTitleContact: 'Contact Information',
formDialogTitlePersonal: 'Personal Information',
formDialogTitleProductStatus: 'Product Status',
formDialogInputCode: 'Head Office Code',
formDialogInputTaxNo: 'Tax Identification Number',
formDialogInputTaxNoValidate: 'Please enter the Tax Identification Number',
formDialogInputNameHq: 'Head Office Name',
formDialogInputNameSubBranch: 'Branch Name',
formDialogInputNameHqValidate: 'Please enter the Head Office Name',
formDialogInputNameSubBranchValidate: 'Please enter the Branch Name',
formDialogInputNameHqEn: 'Head Office Name (English)',
formDialogInputNameSubBranchEn: 'Branch Name (English)',
formDialogInputNameHqEnValidate:
'Please enter the Head Office Name (English)',
formDialogInputNameSubBranchEnValidate:
'Please enter the Branch Name (English)',
formDialogInputTelephoneContact: 'Contact Telephone Number',
formDialogUploadQrCode: 'Upload QR Code',
formDialogInputTelephoneHq: 'Head Office Telephone Number',
formDialogInputTelephoneSubBranch: 'Branch Telephone Number',
formDialogInputEmailHq: 'Head Office Contact Email',
formDialogInputEmailSubBranch: 'Branch Contact Email',
formDialogInputContactName: 'Contact',
formDialogInputOperatingHours: 'Operating Hours',
formDialogInputAddressValidate: 'Please enter the address',
formDialogInputProvinceValidate: 'Please enter the province',
formDialogInputDistrictValidate: 'Please enter the district',
formDialogInputSubDistrictValidate: 'Please enter the sub-district',
formDialogBtnLocation: 'Start sharing location',
// Personnel
formDialogTitleAddressPersonnel: 'Personnel Address',
formDialogBtnEditProfile: 'Edit Profile',
formDialogBtnUploadProfile: 'Upload Image',
formDialogTitleUserStatus: 'User Status',
formDialogInputHqIdValidate: 'Please select head office',
formDialogInputBrId: 'Branch Code',
formDialogInputUserType: 'User Type',
formDialogInputUserTypeValidate: 'Please select user type',
formDialogInputUserRole: 'User Role',
formDialogInputUserRoleValidate: 'Please select user role',
formDialogInputUsername: 'Username',
formDialogInputUsernameValidate: 'Please enter username',
formDialogInputUserCode: 'Personnel Code',
formDialogInputPrefixName: 'Prefix',
formDialogInputPrefixNameValidate: 'Please select prefix',
formDialogPrefixName: 'prefix',
formDialogTitlePersonnel: 'Personnel Information',
formDialogInputFirstName: 'First Name',
formDialogInputMidName: 'Middle Name',
formDialogInputFirstNameValidate: 'Please enter first name',
formDialogInputLastName: 'Last Name',
formDialogInputLastNameValidate: 'Please enter last name',
formDialogInputFirstNameEN: 'First Name (EN)',
formDialogInputMidNameEN: 'Middle Name (EN)',
formDialogInputFirstNameENValidate: 'Please enter first name',
formDialogInputLastNameEN: 'Last Name (EN)',
formDialogInputLastNameENValidate: 'Please enter last name',
formDialogInputTelephone: 'Telephone Number',
formDialogInputEmail: 'Email',
formDialogInputGender: 'Gender',
formDialogInputBirthDate: 'Birth Date',
formDialogInputAge: 'Age',
formDialogInputNationality: 'Nationality',
formDialogTitlePersonnelAddress: 'Personnel Address',
formDialogTitleEmployerAddress: 'Employer Address',
formDialogTitleAddressPure: 'Address',
formDialogTitleAddressPureEN: 'Address in English',
formDialogTitleByType: 'Job Information',
formDialogInputRegisNo: 'Registration Number',
formDialogInputStartDate: 'Start Date',
formDialogInputRetireDate: 'Retire Date',
formDialogInputResponsibleArea: 'Responsible Area',
formDialogInputDiscount: 'Discount Condition',
formDialogInputSourceNationality: 'Source Nationality',
formDialogInputImportNationality: 'Import Nationality',
formDialogInputTrainingPlace: 'Training Place',
formDialogInputCheckpoint: 'Checkpoint',
formDialogAttachment: 'Attachment Document',
formDialogCustomerBranch: 'Branch Information',
formDialogAddress: 'Address in Thai',
formDialogAddressEN: 'Address in English',
// Customer
formDialogCustomerName: 'Customer Name',
formDialogEmployerID: 'Employer ID',
formDialogEmployerBranchCode: 'Employer code',
formDialogEmployeeID: 'Employee ID',
formDialogEmployeeNRCNo: 'Non-Thai Identification Number (N.R.C. No.)',
formDialogToggleSameAddress: "Employer's Address",
formDialogToggleCustomAddress: 'Custom',
formDialogTitleHealthCheck: 'Health Checkup Results',
formDialogInputCheckupRes: 'Health Checkup Results',
formDialogInputCheckupType: 'Type of Checkup Results',
formDialogInputHospital: 'Hospital',
formDialogInputRemark: 'Remark',
formDialogInputMedicalBenefit: 'Type of Medical Benefits',
formDialogInputInsuranceCompany: 'Insurance Company',
formDialogInputCoverageStartDate: 'Insurance Purchase Date',
formDialogInputCoverageExpiretDate: 'Expiration Date',
personalInfo: 'Personal Information',
healthCheck: 'Health Checkup Results and Health Insurance',
workHistory: 'Work History',
other: 'Other',
formDialogInputCheckupResValidate: 'Please Enter Health Checkup Results',
formDialogInputOwnerName: 'Employer Name',
formDialogInputJobPosition: 'Job Position',
formDialogInputJobType: 'Job Type',
formDialogInputWorkPlace: 'Work Place',
formDialogInputWorkUntil: 'Permission to work until',
formDialogInputWorkPermitNo: 'Work Permit Number',
formDialogInputWorkPermitIssueDate: 'Work Permit Issuance Date',
formDialogInputWorkPermitExpireDate: 'Work Permit Expiration Date',
formDialogTitleFamilyHistory: 'Family History',
formDialogTitleFamilyHistoryDad: 'Father',
formDialogTitleFamilyHistoryMom: 'Mother',
formDialogInputCitizenId:
"Worker's National Identification Number (National ID Number from Country of Origin)",
formDialogInputFamilyBirthPlace: 'Place of Birth',
formDialogTitlePassport: 'Passport Information OCR',
formDialogInputPassportType: 'Passport Type',
formDialogInputPassportNo: 'Passport Number',
formDialogInputPassportRef:
'Previous Passport Reference Number (in case of passport change)',
formDialogInputWPassportPlace: 'Passport Issuance Place',
formDialogInputPassportCountry: 'Issuing Country',
formDialogInputPassportIssuance: 'Passport Issuance Date',
formDialogInputPassportExpire: 'Passport Expiration Date',
formDialogTitleVisa: 'Visa Information OCR',
formDialogInputVisaType: 'Visa Type',
formDialogInputVisaNo: 'Visa Number',
formDialogInputVisaIssuance: 'Issuance Date',
formDialogInputVisaExpire: 'Valid Until',
formDialogInputVisaPlace: 'Visa Issuance Place',
formDialogInputVisaStayUntil: 'Permitted to Stay Until',
formDialogInputVisaTM6: 'TM.6 Number (Arrival)',
formDialogInputVisaEnter: 'Date of Entry into the Country',
formDialogTabCheckup: 'Checkup ',
formDialogTabWork: 'Work ',
formDialogEmployerRanchCode: 'Branch Code',
formTitleCustomer: 'Company {msg}',
formTitleCustomerNaturalPerson: 'Name {msg}',
formTitleBranch: 'Branch {msg}',
passportExpire: 'Passport Expiration Date',
pleaseInformation: 'Please enter information',
// product
formDialogTitleUseStatus: 'Status',
};

View file

@ -1,247 +0,0 @@
import main from './main';
import drawerComponent from './drawer-component';
import personnelMainPage from './personnel-main-page';
import address from './address';
import branch from './branch';
import user from './user';
import formDialog from './form-dialog';
import status from './status';
import customerMainPage from './customer-main-page';
import employerDialog from './employer-dialog';
import otherDocument from './other-document';
import productService from './product-service';
import alertDialog from './alert-dialog';
import bank from './bank';
export default {
ok: 'Confirm',
agree: 'Ok',
cancel: 'Cancel',
failed: 'Failed',
close: 'close',
success: 'Success',
search: 'Search',
back: 'Back',
undo: 'Undo',
loading: 'Loading',
download: 'Download',
save: 'Save',
edit: 'Edit',
delete: 'Delete',
telephone: 'Telephone',
viewDetail: 'View Detail',
noData: 'No Data',
notFound: 'Data Not Found',
code: 'Code',
status: 'Status',
type: 'Type',
switchOnLabel: 'Open',
switchOffLabel: 'Close',
language: 'Language',
languageName: 'English',
select: 'Select',
all: 'All',
displayField: 'Display Fields',
deleteConfirmTitle: 'Comfirm Deletion',
deleteConfirmMessage: 'Do you want to delete this item?',
headquartersNotEstablished:
'You have not yet established the headquarters. You need to establish the headquarters before you can create personnel.',
changePassword: 'Change Password',
signature: 'Signature',
addSignature: 'Add Signature',
clear: 'Clear',
detail: 'Detail',
add: 'Add',
name: 'Name',
editPersonalInfo: 'Edit personal infomation',
logout: 'Logout',
list: 'Item',
manage: 'Manage',
mode: 'Mode',
theme: 'Theme',
light: 'Light',
dark: 'Dark',
uploadFile: 'Upload File',
newUpload: 'New Upload',
baseOnDevice: 'Base on Device',
person: 'Person',
recordsPage: 'Showing {resultcurrentPage} out of {total} records',
showing: 'Showing',
dataSum: 'Data Summaries',
createdAt: 'Created At',
noResults: 'No Data',
notRecorded: 'You have not yet saved.',
editImage: 'Edit Image',
bankBook: 'Bank Book',
use: 'In Use',
notUse: 'Not Use',
orderNumber: 'Order Number',
saveSuccessful: 'Save Successful',
...status,
...main,
...address,
...branch,
...user,
...drawerComponent,
...personnelMainPage,
...formDialog,
...customerMainPage,
...employerDialog,
...otherDocument,
...productService,
...alertDialog,
...bank,
menu: {
dms: 'Document Management',
},
form: {
title: {
info: '{name}',
create: 'Create {name}',
edit: 'Edit {name}',
},
address: 'Address {suffix}',
error: {
required: 'This field is required.',
please: 'Please enter {msg} correct information.',
invalid: 'Invalid value.',
invalidCustomeMessage: 'Invalid value. {msg}',
},
warning: {
title: 'Warning {msg}',
unsave:
'You have unsaved changes. Are you sure you want to close this window?',
},
info: {
cantChange:
'The {field} cannot be changed later. Do you want to use "{name}"',
},
},
customer: {
employer: 'Employer',
employee: 'Employee',
form: {
selectType: 'Select Customer Type',
group: {
basicInfo: 'Basic Information',
branch: 'Branch',
},
instance: '{index} instance',
prefix: {
mr: 'Mr.',
mrs: 'Mrs.',
miss: 'Miss.',
},
firstName: 'First Name in Thai',
lastName: 'Last Name in Thai',
firstNameEN: 'First Name in English',
lastNameEN: 'Last Name in English',
cardNumber: 'ID Card Number',
prefixName: 'Prefix',
legalPersonNo: 'Legal Entity Registration Number',
registerName: 'Company Name',
registerNameEN: 'Company Name (EN)',
registerDate: 'Registered On',
registerCompanyName: 'Registered Name',
authorizedCapital: 'Authorized Capital',
workplace: 'Workplace',
workplaceEN: 'Workplace (EN)',
address: 'Address',
addressEN: 'Address (EN)',
branchCode: 'Branch Code',
customerCode: 'Employer Code',
legalPersonCode: 'Legal Entity Code',
codeAbbrev: 'Company Abbreviation',
codeNumber: 'Company Number',
registeredBranch: 'Registered Branch',
customerName: 'Company Name',
customerNameEN: 'Company Name (EN)',
personName: 'Customer Name',
taxIdentificationNumber: 'Tax Identification Number',
branch: {
title: 'Branch {name}',
},
headQuarters: {
title: 'สำนักงานใหญ่',
},
},
table: {
orderNumber: 'No.',
fullname: 'Full Name',
businessTypePure: 'Business Type',
address: 'Address',
workPlace: 'Workplace',
contactName: 'Contact Name',
contactPhone: 'Contact Phone',
},
},
customerBranch: {
tab: {
main: 'About',
address: 'Address',
business: 'Business',
contact: 'Contact',
attachment: 'Attachment',
},
form: {
title: 'Branch',
no: 'Branch No.',
code: 'Branch Code',
taxNo: 'Tax Identification Number',
name: 'Branch Name',
nameEN: 'Branch Name (EN)',
authorizedCapital: 'Authorized Capital',
registerName: 'Registered Name',
registerDate: 'Registered Date',
telephone: 'Telephone No.',
attachment: 'Attachment',
},
},
productService: {
group: {
addTitle: 'Add Product and Service Group',
},
type: {
addTitle: 'Add Product and Service Type',
},
service: {
title: 'Service',
showTotalPrice: 'Show Total Price',
},
product: {
noProduct: 'No Product',
allProduct: 'All Product',
},
},
backend: {
sameBranchCodeExists: 'This Head Office Abbreviation is already in use.',
},
dialog: {
title: {
incompleteDataEntry: 'Incomplete Data Entry',
},
message: {
incompleteDataEntry: 'Incomplete data entry on {tap} page',
},
action: {
ok: 'OK',
save: 'Save',
saveAndClose: 'Save and Close',
close: 'Close',
delete: 'Delete',
cancel: 'Cancel',
},
},
};

View file

@ -1,34 +0,0 @@
export default {
mainBranchTitle: 'Branch Management',
mainBranchCaption: 'Manage branches within the organization.',
mainPersonnelTitle: 'Personnel Management',
mainPersonnelCaption: 'Manage personnel within the organization.',
mainCustomerTitle: 'Customer Management',
mainCustomerCaption: 'Manage customer within the organization.',
mainProductTitle: 'Products & Services',
mainProductCaption: 'List of products and services.',
mainQuotationTitle: 'Quotation',
mainQuotationCaption: 'List of quotations.',
mainRequestTitle: 'Purchase Order',
mainRequestCaption: 'List of purchase order.',
mainOrderTitle: 'Request',
mainOrderCaption: 'List of requests.',
mainReceiptTitle: 'Bill of Lading',
mainReceiptCaption: 'Bill of lading list.',
mainFinanceTitle: 'Financial Management',
mainFinanceCaption: 'List of all accounts.',
mainDashboardTitle: 'Dashboard',
mainDashboardCaption: 'Statistical information.',
mainReportTitle: 'Report',
mainReportCaption: 'List of report.',
};

View file

@ -1,75 +0,0 @@
export default {
branchManagement: {
label: {
branchManagementCaption: 'Manage All Branch',
branchLabel: 'Branch',
branchHQLabel: 'Headquarters',
},
table: {
title: {
office: 'Office',
ddress: 'Address',
// formDialogInputTelephone: 'Telephone Number',
telephone: 'Telephone Number',
type: 'Type',
},
},
input: {
label: {
search: 'Search',
},
},
manu: {
branchName: 'Branch Name',
branchLabelTel: 'Branch Telephone No',
branchLabelAddress: 'Branch Address',
branchLabelType: 'Branch Type',
viewDetail: 'View Detail',
edit: 'Edit',
delete: 'Delete',
switchOnLabel: 'Open',
switchOffLabel: 'Close',
},
},
formDialog: {
section: {
formDialogTitleInformation: 'Basic Information',
formDialogTitleContact: 'Contact Information',
formDialogTitleAddress: ' Head office address information',
formDialogTitleLocation: 'Head Office Location',
formDialogTitleImg: 'Office Image',
subtopic: {
formDialogAddress: 'Address in Thai',
formDialogAddressEN: 'Address in English',
},
},
input: {
formDialogInputCode: 'Head Office Code',
formDialogInputBrId: 'Branch Code',
formDialogInputTaxNo: 'Tax Identification Number',
formDialogInputNameSubBranch: 'Branch Name',
formDialogInputNameSubBranchEn: 'Branch Name (English)',
formDialogInputEmailSubBranch: 'Branch Contact Email',
formDialogInputTelephoneSubBranch: 'Branch Telephone Number',
formDialogInputContactName: 'Contact',
formDialogInputTelephoneContact: 'Contact Telephone Number',
address: 'Address',
province: 'Province',
district: 'District',
subDistrict: 'Sub-district',
zipCode: 'Zip Code',
},
button: {
formDialogUploadQrCode: 'Upload QR Code',
formDialogBtnLocation: 'Start sharing location',
formDialogBtnImg: 'Add Office Image',
agree: 'Ok',
cancel: 'Cancel',
},
},
};

View file

@ -1,4 +0,0 @@
export default {
otherDocument: 'Other Document',
additionalEmployerDocument: 'Additional Employer Documents',
};

View file

@ -1,21 +0,0 @@
export default {
personnelTitle: 'Personnel',
personnelManagement: 'Personnel Management',
personnelManagementCaption: 'Manage All Personnel',
personnelTooltipTitle: 'No personnel yet?',
personnelTooltipCaption: 'Click + to add a personnel',
personnelAdd: 'Add personnel',
USER: 'Employee',
MESSENGER: 'Courier',
DELEGATE: 'Delegate',
AGENCY: 'Agency',
personnelStatTitle: 'Summary data',
personnelCardUserType: 'Type',
personnelCardTelephone: 'Telephone',
personnelCardAge: 'Age',
personnelCardNationality: 'Nationality',
};

View file

@ -1,73 +0,0 @@
export default {
productAndService: 'Product and Service Groups',
productAndServiceAll: 'All Product and Service Groups',
productAndServiceType: 'Product and Service Type',
productAndServiceGroupCode: 'Product and Service Group Code',
productAndServiceGroupName: 'Product and Service Group Name',
productAndServiceTypeCode: 'Product and Service Type Code',
productAndServiceTypeName: 'Product and Service Type Name',
service: 'Service',
product: 'Product',
productGroup: 'Product Group: {name}',
productType: 'Product Type: {name}',
messageTooltipNoProduct: 'No Product and Service Groups',
messageTooltipProductCreate: 'Click + for product and service groups.',
productCreate: 'Create Product and Service Group',
addProduct: 'Add Product and Service Group',
productCode: 'Product Code',
productName: 'Product Name',
productDetail: 'Product Detail',
productProcessingTime: 'Processing Time (Day)',
priceInformation: 'Price Information',
salePrice: 'Sale Price',
agentPrice: 'Agent Price',
processingPrice: 'Processing Price',
editService: 'Edit Service',
addService: 'Add Service',
buttonAddProduct: 'Add Product',
editProduct: 'Edit Product',
serviceInformation: 'Service Information',
workInformation: 'Work Information',
workName: 'Work Name',
serviceCode: 'Work Code',
serviceName: 'Service Name',
serviceDetail: 'Service Detail',
productInWork: 'Products in work',
serviceAddProduct: 'Add Product',
processTime: 'Processing Time',
day: 'Days',
noField: 'No Field',
totalProductWork: 'Total product of work',
workNo: 'Work',
addWork: 'Add work',
properties: 'Properties',
noProperties: 'No Properties',
serviceProperties: 'Service Properties',
workProperties: 'Work Properties',
propertiesInWork: 'Properties in work',
text: 'Text',
number: 'Number',
date: 'Date',
selection: 'Selection',
propertiesName: 'Properties Name',
decimal: 'Decimal',
decimalPlace: 'Decimal Place',
useComma: 'use comma',
additional: 'Additional',
telMaxLength: 'Max Length',
addSelection: 'Add Selection',
selectAll: 'Select All',
noProduct: 'No Product',
};

View file

@ -1,20 +0,0 @@
export default {
quotation: {
form: {
createTitle: 'Create New Quotation',
customerBranchSelect: 'Select Customer Branch',
customerSelect: 'Customer Select',
listWorker: 'List Worker',
listProduct: 'List Product',
labelNo: 'No',
labelDate: 'Date',
labelTime: 'Time',
labelProcesser: 'Processer',
buttonSave: 'Save Quotation',
},
},
};

View file

@ -1,5 +0,0 @@
export default {
statusCREATED: 'Active',
statusACTIVE: 'Active',
statusINACTIVE: 'Inactive',
};

View file

@ -1,8 +0,0 @@
export default {
firstname: 'First Name',
lastname: 'Last Name',
fullname: 'Full Name',
userType: 'User Type',
userRole: 'User Role',
userCode: 'User Id',
};

483
src/i18n/eng/index.ts Normal file
View file

@ -0,0 +1,483 @@
export default {
general: {
ok: 'OK',
save: 'Save',
open: 'Open',
close: 'Close',
edit: 'Edit',
cancel: 'Cancel',
back: 'Back',
undo: 'Undo',
search: 'Search',
download: 'Download',
delete: 'Delete',
clear: 'Clear',
all: 'All',
address: 'Address',
add: 'Add {text}',
telephone: 'Telephone',
loading: 'Loading',
confirm: 'Confirm',
login: 'Login',
logout: 'Logout',
manage: 'Manage',
theme: 'Theme',
light: 'Light',
dark: 'Dark',
mode: 'Mode',
dataSum: 'Data Summaries',
active: 'Active',
inactive: 'Inactive',
displayField: 'Display Fields',
order: 'Order',
name: 'Name',
fullName: 'Full Name',
detail: 'Detail',
remark: 'Remark',
createdAt: 'Created at',
noData: 'No Data',
noField: 'No Field',
notFound: 'Not Found',
viewDetail: 'View Detail',
type: 'Type',
orderNumber: 'No.',
recordPerPage: 'Records per page',
recordsPage: 'Showing {resultcurrentPage} out of {total} records',
day: 'Days',
select: 'Select',
selectAll: 'Select All',
additional: 'Additional',
editImage: 'Edit Image',
upload: 'Upload',
baseOnDevice: 'Base on Device',
clickToCreate: 'Click to create',
age: 'Age',
nationality: 'Nationalality',
times: 'No. {number}',
},
menu: {
dashboard: 'Dashboard',
dashboardCaption: 'Statistical information.',
branch: 'Branch Management',
branchCaption: 'Manage Branches within the organization.',
user: 'Personnel Management',
userCaption: 'Manage personnel within the organization.',
customer: 'Customer Management',
customerCaption: 'Manage customer within the organization.',
product: 'Product & Service',
productCaption: 'List of products and services.',
dms: 'Document Management',
quotation: 'Quotation',
quotationCaption: 'List of quotations.',
requestList: 'Request List',
requestListCaption: 'List of purchase request.',
workOrder: 'Work Order',
workOrderCaption: 'List of purchase order.',
invoice: 'Invoice',
invoiceCaption: 'Invoice.',
accountingLedger: 'Accounting Ledger',
accountingLedgerCaption: 'Accounting Ledger.',
report: 'Report',
reportCaption: 'List of report.',
profile: {
editPersonalInfo: 'Edit Personal Information',
signature: 'Signature',
mode: 'Mode',
addSignature: 'Add Signature',
},
},
form: {
title: {
info: '{name}',
create: 'Create {name}',
edit: 'Edit {name}',
},
field: {
basicInformation: 'Basic Information',
address: 'Address',
},
birthDate: 'Birth Date',
email: 'Email',
telephone: 'Telephone',
gender: 'Gender',
address: 'Address {suffix}',
province: 'Province',
district: 'District',
subDistrict: 'Sub-district',
zipCode: 'Zip Code',
prefixName: 'Prefix',
firstName: 'First Name',
firstNameEN: 'First Name (EN)',
lastName: 'Last Name',
lastNameEN: 'Last Name (EN)',
middleName: 'Middle Name',
middleNameEN: 'Middle Name (EN)',
error: {
required: 'This field is required.',
select: 'Please select.',
selectField: 'Please select {field}.',
please: 'Please enter {msg} correct information.',
invalid: 'Invalid value.',
invalidCustomeMessage: 'Invalid value. {msg}',
},
warning: {
title: 'Warning {msg}',
unsave:
'You have unsaved changes. Are you sure you want to close this window?',
},
info: {
cantChange:
'The {field} cannot be changed later. Do you want to use "{name}"',
},
maxLength: 'Max Length',
useComma: 'Use Comma',
decimal: 'Decimal',
decimalPlace: 'Decimal Place',
selection: 'Selection',
},
status: {
title: 'Status',
CREATED: 'Active', // NOTE: Treated as active
ACTIVE: 'Active',
INACTIVE: 'Inactive',
},
branch: {
office: 'Office',
card: {
orderNumber: 'No.',
branchLabelName: 'Name',
branchLabelAddress: 'Address',
branchLabelTel: 'Telephone',
branchLabelType: 'Type',
branchLabel: 'Branch',
branchHQLabel: 'Headoffice',
},
page: {
captionManage: 'Manage',
},
form: {
title: {
branchLabel: 'Branch',
branchHQLabel: 'Headoffice',
},
group: {
contact: 'Contact',
location: 'Location',
bankAccount: 'Bank Account',
admin: 'Branch Admin',
},
shareLocation: 'Share location',
abbrev: 'Abbreviation Name',
code: 'Headoffice Code',
codeBranch: 'Branch Code',
taxNo: 'Tax Identification Number',
contactName: 'Contact Name',
contactTelephone: 'Contact Telephone',
branchName: 'Branch Name',
branchNameEN: 'Branch Name (EN)',
headofficeName: 'Headoffice Name',
headofficeNameEN: 'Headoffice Name (EN)',
bankAccountNo: 'Bank Account {no}',
bankAccountStatus: 'Bank Account Status',
bank: 'Bank',
bankBranch: 'Bank Branch',
bankAccountNumber: 'Bank Account Number',
bankAccountName: 'Bank Account Name',
bankAccountType: 'Bank Account Type',
},
},
personnel: {
title: 'Personnel Management',
caption: 'Manage All Personnel',
personnel: 'Personnel',
age: 'Age',
USER: 'Employee',
MESSENGER: 'Courier',
DELEGATE: 'Delegate',
AGENCY: 'Agency',
addTitle: 'Add Personnel',
tooltipTitle: 'No personnel yet?',
tooltipCaption: 'Click + to add a personnel',
form: {
personalInformation: 'Personal Information',
addressInformation: 'Personnel Address',
workInformation: 'Job Information',
username: 'Username',
userType: 'User Type',
userRole: 'User Role',
prefixName: 'Prefix',
firstName: 'First Name',
lastName: 'Last Name',
firstNameEN: 'First Name (EN)',
lastNameEN: 'Last Name (EN)',
middleName: 'Middle Name',
middleNameEN: 'Middle Name (EN)',
regisNo: 'Registration Number',
startDate: 'Start Date',
retireDate: 'Retire Date',
responsibleArea: 'Responsibel Area',
discount: 'Discount Condition',
sourceNationality: 'Source Nationality',
importNationality: 'import Nationality',
trainingPlace: 'Training Place',
checkpoint: 'Checkpoint',
checkpointEN: 'Checkpoint (EN)',
attachment: 'Attachment Document',
},
},
customer: {
employer: 'Employer',
employerLegalEntity: 'Legal Entity',
employerNaturalPerson: 'Natrual Person',
employerType: 'Employer Type',
employee: 'Employee',
form: {
selectType: 'Select Customer Type',
group: {
branch: 'Branch',
},
prefix: {
mr: 'Mr.',
mrs: 'Mrs.',
miss: 'Miss.',
},
firstName: 'First Name in Thai',
lastName: 'Last Name in Thai',
firstNameEN: 'First Name in English',
lastNameEN: 'Last Name in English',
cardNumber: 'ID Card Number',
prefixName: 'Prefix',
legalPersonNo: 'Legal Entity Registration Number',
registerName: 'Company Name',
registerNameEN: 'Company Name (EN)',
registerDate: 'Registered On',
registerCompanyName: 'Registered Name',
authorizedCapital: 'Authorized Capital',
workplace: 'Workplace',
workplaceEN: 'Workplace (EN)',
address: 'Address',
addressEN: 'Address (EN)',
branchCode: 'Branch Code',
customerCode: 'Employer Code',
legalPersonCode: 'Legal Entity Code',
codeAbbrev: 'Company Abbreviation',
codeNumber: 'Company Number',
registeredBranch: 'Registered Branch',
customerName: 'Company Name',
customerNameEN: 'Company Name (EN)',
personName: 'Customer Name',
taxIdentificationNumber: 'Tax Identification Number',
branch: {
title: 'Branch {name}',
},
headQuarters: {
title: 'Headoffice',
},
},
table: {
orderNumber: 'No.',
fullname: 'Full Name',
businessTypePure: 'Business Type',
address: 'Address',
workPlace: 'Workplace',
contactName: 'Contact Name',
contactPhone: 'Contact Phone',
},
},
customerEmployee: {
branch: 'Branch',
form: {
group: {
personalInfo: 'Personal Information',
passport: 'Passport',
visa: 'VISA',
healthCheck: 'Health Check',
workHistory: 'Work History',
other: 'Other',
family: 'Family',
},
employerBranch: 'Employer Branch',
employeeCode: 'Employee Code',
nrcNo: 'Non-Thai Identification Number (N.R.C No.)',
passportNo: 'Passport No.',
passportRef:
'Previous Passport Reference Number (In case of passport changed)',
passportType: 'Passport Type',
passportPlace: 'Passport Issuance Place',
passportIssuer: 'Passport Issuing Country',
passportIssueDate: 'Passport Issuance Date',
passportExpireDate: 'Passport Expiry Date',
addressSame: 'Use Employer Address',
addressCustom: 'Custom Address',
visaType: 'Visa Type',
visaNo: 'Visa Number',
visaIssuance: 'Issuance Date',
visaExpire: 'Valid Until',
visaPlace: 'Visa Issuance Place',
visaStayUntil: 'Permitted to Stay Until',
visaTM6: 'TM.6 Number (Arrival)',
visaEnter: 'Date of Entry into the Country',
employerSelect: {
branchName: 'Branch Name',
customerName: 'Employer Name',
},
},
formHealthCheck: {
title: 'Health Check',
result: 'Result',
checkupType: 'Type',
hospital: 'Hospital',
medicalBenefit: 'Type of Medical Benefits',
coverageStartDate: 'Insurance Purchase Date',
coverageExpireDate: 'Insurance Expiration Date',
insuranceCompany: 'Insurance Company',
},
formWorkHistory: {
title: 'Work History',
employerName: 'Employer Name',
jobType: 'Job Type',
jobPosition: 'Job Position',
workplace: 'Work Place',
workUntil: 'Permission to work until',
permitNo: 'Work Permit Number',
permitIssueDate: 'Work Permit Issuance Date',
permitExpireDate: 'Work Permit Expiration Date',
},
formFamily: {
citizenId:
"Worker's National Identification Number (National ID Number from Country of Origin)",
father: 'Father',
fatherBirthPlace: 'Father Birth Place',
mother: 'Mother',
motherBirthPlace: 'Mother Birth Place',
},
},
customerBranch: {
tab: {
main: 'About',
address: 'Address',
business: 'Business',
contact: 'Contact',
attachment: 'Attachment',
},
form: {
title: 'Branch',
no: 'Branch No.',
code: 'Branch Code',
taxNo: 'Tax Identification Number',
name: 'Branch Name',
nameEN: 'Branch Name (EN)',
authorizedCapital: 'Authorized Capital',
registerName: 'Registered Name',
registerDate: 'Registered Date',
telephone: 'Telephone No.',
attachment: 'Attachment',
},
},
productService: {
title: 'Products and Services',
caption: 'Manage All Products and Services',
group: {
title: 'Products and Services Group',
withName: 'Group of {name}',
addTitle: 'Add Products and Services Group',
code: 'Products and Services Group Code',
name: 'Products and Services Group Name',
},
type: {
title: 'Products and Services Types',
withName: 'Types of {name}',
addTitle: 'Add Products and Services Types',
code: 'Products and Services Types Code',
name: 'Products and Services Types Name',
},
service: {
title: 'Services',
totalWork: 'Total Work',
code: 'Services Code',
name: 'Services Name',
work: 'Work',
workName: 'Work Name',
showTotalPrice: 'Show Total Price',
addTitle: 'Add Services',
registeredBranch: 'Registered Branch',
information: 'Services Information',
workInformation: 'Work Information',
serviceProperties: 'Services Properties',
propertiesName: 'Properties Name',
properties: 'Properties',
noProperties: 'No Properties',
propertiesInWork: 'Properties in work',
productInWork: 'Products in work',
totalProductWork: 'Total products of work',
list: 'Item',
addWork: 'Add Work',
},
product: {
title: 'Products',
code: 'Products Code',
name: 'Products Name',
registeredBranch: 'Registered Branch',
noProduct: 'No Products',
allProduct: 'All Products',
addTitle: 'Add Products',
processingTime: 'Processing Time',
processingTimeDay: 'Processing Time (Days)',
priceInformation: 'Price Information',
salePrice: 'Sale Price',
agentPrice: 'Agent Price',
processingPrice: 'Processing Price',
},
},
backend: {
sameBranchCodeExists: 'This Head Office Abbreviation is already in use.',
},
dialog: {
title: {
incompleteDataEntry: 'Incomplete Data Entry',
confirmChangeStatus: 'Confirm Status Change',
confirmDelete: 'Confirm Deletion',
},
message: {
incompleteDataEntry: 'Incomplete data entry on {tap} page',
confirmChangeStatusOn: 'Do you want to open?',
confirmChangeStatusOff: 'Do you want to close?',
confirmDelete: 'Do you want to delete this item?',
},
action: {
ok: 'OK',
save: 'Save',
saveAndClose: 'Save and Close',
close: 'Close',
delete: 'Delete',
cancel: 'Cancel',
},
},
};

View file

@ -1,7 +1,7 @@
import enUS from './en-US'; import eng from './eng';
import th from './th-th'; import tha from './tha';
export default { export default {
'en-US': enUS, eng,
'th-th': th, tha,
}; };

View file

@ -1,7 +0,0 @@
export default {
address: 'ที่อยู่',
province: 'จังหวัด',
district: 'อำเภอ',
subDistrict: 'ตำบล',
zipCode: 'รหัสไปรษณีย์',
};

View file

@ -1,86 +0,0 @@
export default {
warning: 'เตือน',
warningForgetInput: 'คุณกรอกข้อมูลไม่ครบ',
warningClose: 'คุณยังไม่ได้บันทึกการแก้ไข ยืนยันที่จะปิดใช่หรือไม่',
errorOccurred: 'เกิดข้อผิดพลาด.',
confirmLogoutTitle: 'ยืนยันการออกจากระบบ',
confirmLogoutMessage: 'คุณต้องการออกจากระบบ ใช่หรือไม่',
confirmChangeStatusTitle: 'ยืนยันการเปลี่ยนสถานะ',
confirmChangeStatusOnMessage: 'คุณต้องการเปิดใช่หรือไม่',
confirmChangeStatusOffMessage: 'คุณต้องการปิดใช่หรือไม่',
// Backend
productGroupNotFound: 'ไม่พบกลุ่มสินค้า',
productGroupInUsed: 'กลุ่มสินค้าที่ใช้งานอยู่',
productNotFound: 'ไม่พบสินค้า',
productInUsed: 'สินค้าใช้งานอยู่',
productTypeNotFound: 'ไม่พบประเภทสินค้า',
productGroupAssociatedBadReq: 'ไม่พบกลุ่มสินค้าที่เกี่ยวข้อง',
productTypeInUsed: 'ประเภทสินค้าใช้งานอยู่',
productGroupBadReq: 'ไม่พบกลุ่มสินค้า',
serviceNotFound: 'ไม่พบบริการ',
someProductBadReq: 'ไม่พบสินค้าบางส่วน',
serviceInUsed: 'บริการใช้งานอยู่',
workNotFound: 'ไม่พบงาน',
workInUsed: 'งานที่ใช้งานอยู่',
branchContactNotFound: 'ไม่พบผู้ติดต่อสาขา',
branchBadReq: 'ไม่พบสาขา',
branchNotFound: 'ไม่พบสาขา',
cantMakeHQAndBranchSameTime:
'ไม่สามารถทำให้เป็นสำนักงานใหญ่และสาขาพร้อมกันได้',
branchInUsed: 'สาขาใช้งานอยู่',
oneOrMoreUserBadReq: 'ไม่พบผู้ใช้หนึ่งคนหรือมากกว่า',
oneOrMoreBranchBadReq: 'ไม่พบสาขาหนึ่งสาขาหรือมากกว่า',
customerBranchNotFound: 'ไม่พบสาขาลูกค้า',
customerBranchInUsed: 'สาขาลูกค้าที่ใช้งานอยู่',
customerNotFound: 'ไม่พบลูกค้า',
customerInUsed: 'ลูกค้าใช้งานอยู่',
oneOrMoreBranchMissing: 'ไม่สามารถลบสาขาหนึ่งหรือมากกว่าได้และสูญหาย',
employeeCheckupNotFound: 'ไม่พบการตรวจสอบพนักงาน',
provinceNotFound: 'ไม่พบจังหวัด',
employeeNotFound: 'ไม่พบพนักงาน',
employeeBadReq: 'ไม่พบพนักงาน',
employeeInUsed: 'พนักงานใช้งานอยู่',
someProvinceNotFound: 'ไม่พบจังหวัดบางส่วน',
employeeOtherNotFound: 'ไม่พบข้อมูลอื่นของพนักงาน',
employeeWorkNotFound: 'ไม่พบงานของพนักงาน',
parentMenuBadReq: 'ไม่พบเมนูหลัก',
menuNotFound: 'ไม่พบเมนู',
menuBadReq: 'ไม่พบเมนู',
menuComponentNotFound: 'ไม่พบส่วนประกอบเมนู',
roleMenuNotFound: 'ไม่พบเมนูบทบาท',
userNotFound: 'ไม่พบผู้ใช้',
userInUsed: 'ผู้ใช้ใช้งานอยู่',
unknowHowToVerify: 'ไม่ทราบวิธียืนยันตัวตน',
noPermission: 'คุณไม่มีสิทธิในการเข้าถึงหรือดำเนินการใดๆ กับข้อมูลนี้',
noPermissionToAccess: 'คุณไม่มีสิทธิในการเข้าถึงข้อมูลนี้',
relationProvinceNotFound: 'ไม่พบจังหวัด',
relationDistrictNotFound: 'ไม่พบอำเภอ',
relationSubDistrictNotFound: 'ไม่พบตำบล',
relationHQNotFound: 'ไม่พบสำนักงานใหญ่',
relationCustomerNotFound: 'ไม่พบลูกค้า',
relationCustomerBranchNotFound: 'ไม่พบสาขาลูกค้า',
sameBranchCodeExists: 'ตัวย่อสำนักงานใหญ่นี้ถูกใช้แล้ว',
};

View file

@ -1,8 +0,0 @@
export default {
accountNumber: 'เลขที่บัญชี',
bankBranch: 'สาขาธนาคาร',
accountName: 'ชื่อบัญชี',
bankType: 'ประเภทของธนาคาร',
accountStatus: 'สถานะการใช้งาน ',
bankBookNo: 'ช่องทางที่',
};

View file

@ -1,8 +0,0 @@
export default {
branchManagement: 'จัดการสาขา',
branchNoMainOfficeYet: 'ยังไม่มีสำนักงานใหญ่',
branchClickToCreateMainOffice: 'คลิก + เพื่อสร้างสำนักงานใหญ่', // Click to create a main office.
closedStatus: 'ปิด',
btnCreate: 'สร้างสาขาใหญ่',
headQuarters: 'สำนักงานใหญ่ ',
};

View file

@ -1,29 +0,0 @@
export default {
branchManagementCaption: 'จัดการสาขาทั้งหมด',
branchInHQ: 'สาขาภายในสำนักงานใหญ่',
office: 'สำนักงาน',
branchLabel: 'สาขา',
branchHQLabel: 'สำนักงานใหญ่',
branchName: 'ชื่อสาขา',
branchAdd: 'สร้างสำนักงานใหญ่',
branchManagement: 'จัดการสาขา',
branchNoMainOfficeYet: 'ยังไม่มีสำนักงานใหญ่?',
branchClickToCreateMainOffice: 'คลิก + เพื่อสร้างสำนักงานใหญ่',
totalEmployee: 'ลูกจ้างทั้งหมด',
branchLabelCode: 'รหัสสาขา',
branchLabelName: 'ชื่อสาขา',
branchLabelTel: 'เบอร์โทรศัพท์สาขา',
branchLabelAddress: 'ที่อยู่สาขา',
branchLabelType: 'ประเภทสาขา',
branchLabelStatus: 'สถานะสาขา',
registeredBranch: 'สาขาที่ลงทะเบียน',
branchStatTitle: 'สรุปจัดการสาขา',
branchAdminTitle: 'ผู้จัดการสาขา',
branchAdminNone: 'ไม่พบผู้จัดการสาขา',
};

View file

@ -1,70 +0,0 @@
export default {
customerManagement: 'จัดการลูกค้า',
customerManagementCaption: 'จัดการลูกค้าทั้งหมด',
customerEmployerTooltipTitle: 'ยังไม่มีข้อมูลนายจ้าง',
customerEmployeeTooltipTitle: 'ยังไม่มีข้อมูลลูกจ้าง',
customerEmployerTooltipCaption: 'คลิก + เพื่อเพิ่มนายจ้าง',
customerEmployeeTooltipCaption: 'คลิก + เพื่อเพิ่มลูกจ้าง',
customerEmployerAdd: 'เพิ่มนายจ้าง',
customerEmployeeAdd: 'เพิ่มลูกจ้าง',
nameEmployee: 'คนงาน',
EMPLOYER: 'นายจ้าง',
EMPLOYEE: 'ลูกจ้าง',
customerEmployerStatTitle: 'สรุปจำนวนข้อมูลนายจ้าง',
customerEmployeeStatTitle: 'สรุปจำนวนข้อมูลลูกจ้าง',
customerCardUserType: 'ประเภทนายจ้าง',
customerLegalEntity: 'นิติบุคคล',
customerNaturalPerson: 'บุคคลธรรมดา',
businessInformation: 'ข้อมูลกิจการ',
inputCustomerAddress: 'สำนักงานจัดหางาน (อยู่ในเขต พื้นที่)',
businessType: 'ประเภทกิจการ ภาษาไทย',
businessTypeEN: 'ประเภทกิจการ ภาษาอังกฤษ',
businessTypePure: 'ประเภทกิจการ',
jobPosition: 'ตําแหน่งงาน ภาษาไทย',
jobPositionEN: 'ตําแหน่งงาน ภาษาอังกฤษ',
jobDescription: 'ลักษณะงาน',
payDay: 'วันที่จ่ายค่าแรง',
payRate: 'อัตราค่าจ้าง/วัน',
salesPerson: 'พนักงานขาย',
// เกี่ยวกับ
about: 'เกี่ยวกับ',
branchCode: 'รหัสสาขา',
legalEntityCode: 'รหัสนิติบุคคล',
taxNo: 'เลขทะเบียนนิติบุคคล',
customerName: 'ชื่อสาขา ภาษาไทย',
customerEnglishName: 'ชื่อสาขา ภาษาอังกฤษ',
registerDate: 'จดทะเบียนเมื่อ',
authorizedCapital: 'ทุนจดทะเบียน',
registerName: 'จดทะเบียนชื่อ',
customerBranchFormTab: 'สาขาที่',
customerNameTh: 'ชื่อบริษัท/นิติบุคคล (ไทย)',
customerNameEn: 'ชื่อบริษัท/นิติบุคคล (อังกฤษ)',
customerBranchName: 'ชื่อบริษัท/นิติบุคคล',
officeType: '',
allEmployee: 'ลูกจ้างทั้งหมด',
editHistory: 'ประวัติการแก้ไข',
time: 'เวลา',
editBy: 'แก้ไขโดย',
valueBefore: 'แก้ไขใหม่',
valueAfter: 'ค่าเดิม',
serviceWorkTotal: 'จำนวนงานทั้งหมด',
priceInformation: 'ข้อมูลราคา',
};

View file

@ -1,13 +0,0 @@
export default {
drawerDashboard: 'Dashboard',
drawerBranchManagement: 'จัดการสาขา',
drawerPersonnelManagement: 'จัดการบุคลากร',
drawerCustomerManagement: 'จัดการลูกค้า',
drawerProductsAndServices: 'สินค้าและบริการ',
drawerQuotation: 'ใบเสนอราคา',
drawerRequestList: 'รายการคําขอ',
drawerWorkOrder: 'ใบสั่งงาน',
drawerInvoice: 'ใบรับสินค้า',
drawerAccountingLedger: 'รายการทางบัญชี',
drawerReport: 'รายงาน',
};

View file

@ -1,11 +0,0 @@
export default {
corporationThaiName: 'ชื่อ บริษัท/นิติบุคคล ภาษาไทย',
corporationEnglishName: 'ชื่อ บริษัท/นิติบุคคล ภาษาอังกฤษ',
corporationThai: 'ชื่อ บริษัท ภาษาไทย',
corporationEnglish: 'ชื่อ บริษัท ภาษาอังกฤษ',
companyOwnerName: 'ชื่อเจ้าของบริษัท',
corporation: 'ชื่อ บริษัท/นิติบุคคล',
};

View file

@ -1,202 +0,0 @@
export default {
inputValidate: 'กรุณากรอก',
selectValidate: 'กรุณาเลือก',
// Branch & HQ
formDialogHqAbbreviation: 'ตัวย่อสำนักงานใหญ่',
formDialogInputHqAbbreviation: 'โปรดระบุตัวย่อสำนักงานใหญ่',
formDialogTitleImg: 'ภาพสำนักงาน',
formDialogBtnImg: 'เพิ่มรูปสำนักงาน',
formDialogTitleViewHeadOffice: 'สำนักงานใหญ่',
formDialogTitleViewSubBranch: 'สาขา',
formDialogTitleCreateHeadOffice: 'เพิ่มสำนักงานใหญ่',
formDialogTitleEditHeadOffice: 'แก้ไขสำนักงานใหญ่',
formDialogTitleCreateSubBranch: 'เพิ่มสาขา',
formDialogTitleEditSubBranch: 'แก้ไขสาขา',
formDialogTitleAddress: 'ข้อมูลที่อยู่สำนักงานใหญ่',
formDialogTitleLocation: 'สถานที่ตั้งสำนักงานใหญ่',
formDialogTitleInformation: 'ข้อมูลพื้นฐาน',
formDialogTitleContact: 'ข้อมูลติดต่อ',
formDialogTitlePersonal: 'ข้อมูลบุคคล',
formDialogInputCode: 'รหัสสำนักงานใหญ่',
formDialogInputTaxNo: 'เลขทะเบียนนิติบุคคล',
formDialogInputTaxNoValidate: 'โปรดระบุเลขทะเบียนนิติบุคคล',
formDialogInputNameHq: 'ชื่อสำนักงานใหญ่',
formDialogInputNameSubBranch: 'ชื่อสาขา',
formDialogInputNameHqValidate: 'โปรดระบุชื่อสำนักงานใหญ่',
formDialogInputNameSubBranchValidate: 'โปรดระบุชื่อสาขา',
formDialogInputNameHqEn: 'ชื่อสำนักงานใหญ่ (ภาษาอังกฤษ)',
formDialogInputNameSubBranchEn: 'ชื่อสาขา (ภาษาอังกฤษ)',
formDialogInputNameHqEnValidate: 'โปรดระบุชื่อสำนักงานใหญ่ (ภาษาอังกฤษ)',
formDialogInputNameSubBranchEnValidate: 'โปรดระบุชื่อสาขา (ภาษาอังกฤษ)',
formDialogInputTelephoneContact: 'เบอร์โทรศัพท์ติดต่อ',
formDialogUploadQrCode: 'อัปโหลด QR Code',
formDialogInputTelephoneHq: 'เบอร์โทรศัพท์สำนักงานใหญ่',
formDialogInputTelephoneSubBranch: 'เบอร์โทรศัพท์สาขา',
formDialogInputEmailHq: 'อีเมลติดต่อสำนักงานใหญ่',
formDialogInputEmailSubBranch: 'อีเมลติดต่อสาขา',
formDialogInputContactName: 'ติดต่อ',
formDialogInputOperatingHours: 'เวลาทําการ',
formDialogInputAddressValidate: 'โปรดระบุที่อยู่',
formDialogInputProvinceValidate: 'โปรดระบุจังหวัด',
formDialogInputDistrictValidate: 'โปรดระบุอำเภอ',
formDialogInputSubDistrictValidate: 'โปรดระบุตำบล',
formDialogBtnLocation: 'เริ่มแชร์โลเคชั่น',
// Personnel
formDialogTitleAddressPersonnel: 'ที่อยู่พนักงาน',
formDialogBtnEditProfile: 'แก้ไขโปรไฟล์',
formDialogBtnUploadProfile: 'อัปโหลดรูปภาพ',
formDialogTitleUserStatus: 'สถานะผู้ใช้งาน',
formDialogTitleProductStatus: 'สถานะสินค้า',
formDialogInputHqIdValidate: 'กรุณาเลือกสำนักงานใหญ่',
formDialogInputBrId: 'รหัสสาขา',
formDialogInputUserType: 'ประเภทผู้ใช้งาน',
formDialogInputUserTypeValidate: 'กรุณาเลือกประเภทผู้ใช้งาน',
formDialogInputUserRole: 'สิทธิ์ผู้ใช้งาน',
formDialogInputUserRoleValidate: 'กรุณาเลือกสิทธิ์ผู้ใช้งาน',
formDialogInputPrefixNameValidate: 'กรุณาเลือกคำนำหน้า',
formDialogInputUsername: 'ชื่อผู้ใช้งาน (Username)',
formDialogInputUsernameValidate: 'กรุณากรอกชื่อผู้ใช้งาน',
formDialogInputUserCode: 'รหัสพนักงาน',
formDialogInputPrefixName: 'คำนำหน้า',
formDialogTitlePersonnel: 'ข้อมูลบุคลากร',
formDialogInputFirstName: 'ชื่อ',
formDialogInputMidName: 'ชื่อกลาง',
formDialogInputFirstNameValidate: 'กรุณากรอกชื่อ',
formDialogInputLastName: 'นามสกุล',
formDialogInputLastNameValidate: 'กรุณากรอกนามสกุล',
formDialogInputFirstNameEN: 'ชื่อ ภาษาอังกฤษ',
formDialogInputMidNameEN: 'ชื่อกลาง ภาษาอังกฤษ',
formDialogInputFirstNameENValidate: 'กรุณากรอกชื่อ ภาษาอังกฤษ',
formDialogInputLastNameEN: 'นามสกุล ภาษาอังกฤษ',
formDialogInputLastNameENValidate: 'กรุณากรอกนามสกุล ภาษาอังกฤษ',
formDialogInputTelephone: 'เบอร์โทร',
formDialogInputEmail: 'อีเมล',
formDialogInputGender: 'เพศ',
formDialogInputBirthDate: 'วันเดือนปีเกิด',
formDialogInputAge: 'อายุ',
formDialogInputNationality: 'สัญชาติ',
formDialogTitlePersonnelAddress: 'ข้อมูลที่อยู่พนักงาน',
formDialogTitleEmployerAddress: 'ข้อมูลที่อยู่นายจ้าง',
formDialogTitleAddressPure: 'ที่อยู่',
formDialogTitleAddressPureEN: 'ที่อยู่ภาษาอังกฤษ',
formDialogTitleByType: 'ข้อมูลการทำงาน',
formDialogInputRegisNo: 'เลขประจำตัว นจ. 16 (เลขที่ขึ้นทะเบียน)',
formDialogInputStartDate: 'วันที่เริ่มงาน',
formDialogInputRetireDate: 'วันที่พ้นสภาพพนักงาน',
formDialogInputResponsibleArea: 'พื้นที่ ที่รับผิดชอบในการส่งเอกสาร',
formDialogInputDiscount: 'เงื่อนไขส่วนลดบริการต่างๆ ของตัวแทน',
formDialogInputSourceNationality: 'สัญชาติต้นทาง',
formDialogInputImportNationality: 'นำเข้าสัญชาติ',
formDialogInputTrainingPlace: 'สถานที่อบรม',
formDialogInputCheckpoint: 'ด่าน',
formDialogAttachment: 'แบบเอกสารประจำตัว',
formDialogPrefixName: 'คํานําหน้า',
formDialogCustomerBranch: 'ข้อมูลสาขา',
formDialogAddress: 'ที่อยู่ ภาษาไทย',
formDialogAddressEN: 'ที่อยู่ ภาษาอังกฤษ',
// Customer
formDialogCustomerName: 'ชื่อนายจ้าง',
formDialogEmployerID: 'รหัสนายจ้าง',
formDialogEmployerBranchCode: 'รหัสนายจ้าง',
formDialogEmployeeID: 'รหัสลูกจ้าง',
formDialogEmployeeNRCNo: 'เลขบัตรประจำตัวคนซึ่งไม่มีสัญชาติไทย (N.R.C. No.)',
formDialogToggleSameAddress: 'เลือกที่อยู่ตามนายจ้าง',
formDialogToggleCustomAddress: 'กำหนดเอง',
formDialogTitleHealthCheck: 'ข้อมูลผลตรวจสุขภาพ',
formDialogInputCheckupRes: 'ผลการตรวจสุขภาพ',
formDialogInputCheckupType: 'ประเภทผลการตรวจ',
formDialogInputHospital: 'โรงพยาบาล',
formDialogInputRemark: 'หมายเหตุ',
formDialogInputMedicalBenefit: 'ประเภทสิทธิการรักษา',
formDialogInputInsuranceCompany: 'บริษัทประกัน',
formDialogInputCoverageStartDate: 'วันที่ซื้อประกัน',
formDialogInputCoverageExpiretDate: 'วันที่หมดอายุ',
personalInfo: 'ข้อมูลส่วนตัว',
healthCheck: 'ผลการตรวจสุขภาพและประกันสุขภาพ',
workHistory: 'ประวัติการทำงาน',
other: 'อื่นๆ',
formDialogInputCheckupResValidate: 'กรุณากรอกผลการตรวจสุขภาพ',
formDialogInputOwnerName: 'ชื่อนายจ้าง',
formDialogInputJobPosition: 'ตำแหน่งงาน',
formDialogInputJobType: 'ลักษณะงาน',
formDialogInputWorkPlace: 'สถานที่ทำงาน',
formDialogInputWorkUntil: 'ได้รับอนุญาตให้ทำงานถึงวันที่',
formDialogInputWorkPermitNo: 'เลขที่ใบอนุญาตทำงาน',
formDialogInputWorkPermitIssueDate: 'วันออกใบอนุญาตทำงาน',
formDialogInputWorkPermitExpireDate: 'วันหมดอายุใบอนุญาตทำงาน',
formDialogTitleFamilyHistory: 'ประวัติครอบครัว',
formDialogTitleFamilyHistoryDad: 'บิดา',
formDialogTitleFamilyHistoryMom: 'มารดา',
formDialogInputCitizenId:
'เลขประจำตัวประชาชนของคนงาน (เลขประจำตัวจากประเทศต้นทาง)',
formDialogInputFamilyBirthPlace: 'สถานที่เกิด',
formDialogTitlePassport: 'ข้อมูลหนังสือเดินทาง OCR',
formDialogInputPassportType: 'ประเภทหนังสือเดินทาง',
formDialogInputPassportNo: 'เลขที่หนังสือเดินทาง',
formDialogInputPassportRef:
'เลขอ้างอิงเลขที่หนังสือเดินทางเดิม (กรณีเปลี่ยนหนังสือเดินทาง)',
formDialogInputWPassportPlace: 'สถานที่ออกหนังสือเดินทาง',
formDialogInputPassportCountry: 'ประเทศที่ออก',
formDialogInputPassportIssuance: 'วันที่ออกหนังสือเดินทาง',
formDialogInputPassportExpire: 'วันหมดอายุหนังสือเดินทาง',
formDialogTitleVisa: 'ข้อมูลการตรวจลงตรา (VISA) OCR',
formDialogInputVisaType: 'ประเภทการตรวจลงตรา',
formDialogInputVisaNo: 'เลขที่ตรวจลงตรา',
formDialogInputVisaIssuance: 'ออกให้วันที่',
formDialogInputVisaExpire: 'ใช้ได้ถึงวันที่',
formDialogInputVisaPlace: 'ออกให้ที่',
formDialogInputVisaStayUntil: 'ให้อยู่ในราชอาณาจักรถึงวันที่',
formDialogInputVisaTM6: 'เลขที่ใบ ตม.6 (ใบขาเข้า)',
formDialogInputVisaEnter: 'วันที่เดินทางเข้ามาในประเทศ',
formDialogTabCheckup: 'ครั้งที่ ',
formDialogTabWork: 'ครั้งที่ ',
formDialogEmployerRanchCode: 'รหัสสาขา',
formTitleCustomer: 'บริษัท {msg}',
formTitleCustomerNaturalPerson: 'ชื่อ {msg}',
formTitleBranch: 'สาขา {msg}',
passportExpire: 'วันหมดอายุของเอกสาร(visa ,passport)',
pleaseInformation: 'โปรดกรอกข้อมูล',
// product
formDialogTitleUseStatus: 'สถานะการใช้งาน',
};

View file

@ -1,244 +0,0 @@
import main from './main';
import drawerComponent from './drawer-component';
import personnelMainPage from './personnel-main-page';
import customerMainPage from './customer-main-page';
import address from './address';
import branch from './branch';
import user from './user';
import formDialog from './form-dialog';
import status from './status';
import employerDialog from './employer-dialog';
import otherDocument from './other-document';
import productService from './product-service';
import alertDialog from './alert-dialog';
import bank from './bank';
export default {
ok: 'ยืนยัน',
agree: 'ตกลง',
cancel: 'ยกเลิก',
failed: 'เกิดข้อผิดพลาด',
success: 'สำเร็จ',
close: 'ปิด',
search: 'ค้นหา',
loading: 'กำลังโหลด',
download: 'ดาวน์โหลด',
back: 'กลับ',
undo: 'เลิกทำ',
save: 'บันทึก',
edit: 'แก้ไข',
delete: 'ลบ',
telephone: 'เบอร์โทรศัพท์',
viewDetail: 'ดูรายละเอียด',
noData: 'ยังไม่มีข้อมูล',
notFound: 'ไม่พบข้อมูล',
code: 'รหัส',
type: 'ประเภท',
status: 'สถานะ',
language: 'ภาษา',
languageName: 'ไทย',
select: 'เลือก',
all: 'ทั้งหมด',
switchOnLabel: 'เปิด',
switchOffLabel: 'ปิด',
displayField: 'ข้อมูลที่แสดง',
deleteConfirmTitle: 'ยืนยันการลบข้อมูล',
deleteConfirmMessage: 'คุณต้องการลบข้อมูลใช่หรือไม่',
saveConfirmTitle: 'ยืนยันการบันทึกข้อมูล',
saveConfirmMessage: 'คุณต้องการบันทึกข้อมูลใช่หรือไม่',
headquartersNotEstablished:
'ท่านยังไม่ได้สร้างสำนักงานใหญ่ ต้องสร้างสำนักงานใหญ่ก่อนจึงจะสร้าง บุคลากรได้',
changePassword: 'เปลี่ยนรหัสผ่าน',
signature: 'ลายเซ็น',
addSignature: 'เพิ่มลายเซ็น',
clear: 'ล้าง',
detail: 'รายละเอียด',
add: 'เพิ่ม',
name: 'ชื่อ',
editPersonalInfo: 'แก้ไขข้อมูลส่วนตัว',
logout: 'ออกจากระบบ',
list: 'รายการ',
manage: 'จัดการ',
mode: 'โหมด',
theme: 'ธีม',
light: 'สว่าง',
dark: 'มืด',
uploadFile: 'อัปโหลดไฟล์',
newUpload: 'อัปโหลดใหม่',
baseOnDevice: 'สีตามอุปกรณ์',
person: 'คน',
recordsPage: 'แสดง {resultcurrentPage} รายการจาก {total} รายการ',
showing: 'แสดงทีละ',
dataSum: 'สรุปจำนวนข้อมูล',
createdAt: 'สร้างเมื่อ',
noResults: 'ไม่มีข้อมูล',
notRecorded: 'คุณยังไม่ได้บันทึก',
editImage: 'แก้ไขรูป',
bankBook: 'บัญชีธนาคาร',
use: 'ใช้งาน',
notUse: 'ไม่ใช้งาน',
orderNumber: 'ลําดับ',
saveSuccessful: 'บันทึกข้อมูลสำเร็จ',
...status,
...main,
...address,
...branch,
...user,
...drawerComponent,
...personnelMainPage,
...formDialog,
...customerMainPage,
...employerDialog,
...otherDocument,
...productService,
...alertDialog,
...bank,
menu: {
dms: 'จัดการเอกสาร',
},
form: {
title: {
info: '{name}',
create: 'สร้าง {name}',
edit: 'แก้ไข {name}',
},
address: 'ที่อยู่ {suffix}',
error: {
required: 'จำเป็นต้องกรอกข้อมูลนี้',
please: 'โปรดใส่ข้อมูล{msg}ให้ถูกต้อง',
invalid: 'ค่าที่ไม่ถูกต้อง',
invalidCustomeMessage: 'ค่าที่ไม่ถูกต้อง {msg}',
},
warning: {
title: 'แจ้งเตือน {msg}',
unsave:
'คุณมีการเปลี่ยนแปลงที่ยังไม่ได้บันทึก คุณต้องการปิดหน้าต่างนี้หรือไม่',
},
info: {
cantChange:
'{field} ไม่สามารถแก้ไขภายหลังได้ คุณต้องการใช้ "{name}" ใช่หรือไม่',
},
},
customer: {
employer: 'นายจ้าง',
employee: 'ลูกจ้าง',
form: {
selectType: 'เลือกประเภท',
group: {
basicInfo: 'ข้อมูลพื้นฐาน',
branch: 'ข้อมูลสาขา',
},
prefix: {
mr: 'Mr.',
mrs: 'Mrs.',
miss: 'Miss.',
},
firstName: 'ชื่อ ภาษาไทย',
lastName: 'นามสกุล ภาษาไทย',
firstNameEN: 'ชื่อ ภาษาอังกฤษ',
lastNameEN: 'นามสกุล ภาษาอังกฤษ',
cardNumber: 'บัตรประชาชนเลขที่',
prefixName: 'คํานําหน้า',
instance: 'ครั้งที่ {index}',
legalPersonNo: 'ทะเบียนนิติบุคคลเลขที่',
registerName: 'ชื่อบริษัท',
registerNameEN: 'ชื่อบริษัท (EN)',
registerDate: 'จดทะเบียนเมื่อ',
registerCompanyName: 'จดทะเบียนชื่อ',
authorizedCapital: 'ทุนที่จดทะเบียน',
workplace: 'สถานที่ทํางาน',
workplaceEN: 'สถานที่ทํางาน (EN)',
address: 'ที่อยู่',
addressEN: 'ที่อยู่ (EN)',
branchCode: 'รหัสสาขา',
customerCode: 'รหัสนายจ้าง',
legalPersonCode: 'รหัสนิติบุคคล',
codeAbbrev: 'ชื่อย่อบริษัท',
codeNumber: 'เลขประจำตัวบริษัท',
registeredBranch: 'สาขาที่ลงทะเบียน',
customerName: 'ชื่อบริษัท',
customerNameEN: 'ชื่อบริษัท (EN)',
personName: 'ชื่อลูกค้า',
taxIdentificationNumber: 'หมายเลขทะเบียนนิติบุคคล',
branch: {
title: 'สาขาที่ {name}',
},
headQuarters: {
title: 'สำนักงานใหญ่',
},
},
table: {
orderNumber: 'ลําดับ',
fullname: 'ชื่อ-นามสกุล',
businessTypePure: 'ประเภทกิจการ',
address: 'ที่อยู่',
workPlace: 'สถานที่ทํางาน',
contactName: 'ชื่อผู้ติดต่อ',
contactPhone: 'โทรศัพท์ผู้ติดต่อ',
},
},
customerBranch: {
tab: {
main: 'เกี่ยวกับ',
address: 'ที่อยู่',
business: 'ธุรกิจ',
contact: 'ติดต่อ',
attachment: 'เอกสารเพิ่มเติม',
},
form: {
title: 'สาขา',
no: 'เลขที่สาขา',
code: 'รหัสสาขา',
taxNo: 'เลขทะเบียนนิติบุคคล',
name: 'ชื่อสาขา',
nameEN: 'ชื่อสาขา (ภาษาอังกฤษ)',
authorizedCapital: 'ทุนจดทะเบียน',
registerName: 'ชื่อที่จดทะเบียน',
registerDate: 'วันที่จดทะเบียน',
attachment: 'เอกสารเพิ่มเติม',
},
},
productService: {
group: {
addTitle: 'เพิ่มกลุ่มสินค้าและบริการ',
},
type: {
addTitle: 'เพิ่มประเภทสินค้าและบริการ',
},
service: {
title: 'บริการ',
showTotalPrice: 'แสดงราคารวม',
},
product: {
noProduct: 'ยังไม่มีสินค้า',
allProduct: 'สินค้าทั้งหมด',
},
},
backend: {
sameBranchCodeExists: 'ตัวย่อสำนักงานใหญ่นี้ถูกใช้แล้ว',
},
dialog: {
title: {
incompleteDataEntry: 'กรอกข้อมูลไม่ครบ',
},
message: {
incompleteDataEntry: 'กรอกข้อมูลไม่ครบในหน้า {tap}',
},
action: {
ok: 'ยืนยัน',
save: 'บันทึก',
saveAndClose: 'บันทึกและปิดหน้าต่าง',
close: 'ปิดหน้าต่าง',
delete: 'ลบ',
cancel: 'ยกเลิก',
},
},
};

View file

@ -1,34 +0,0 @@
export default {
mainBranchTitle: 'จัดการสาขา',
mainBranchCaption: 'จัดการสาขาภายในองค์กร',
mainPersonnelTitle: 'จัดการบุคลากร',
mainPersonnelCaption: 'จัดการคนภายในองค์กร',
mainCustomerTitle: 'จัดการลูกค้า',
mainCustomerCaption: 'จัดการคนภายในองค์กร',
mainProductTitle: 'สินค้าและบริการ',
mainProductCaption: 'ประเภทสินค้าและบริการ',
mainQuotationTitle: 'ใบเสนอราคา',
mainQuotationCaption: 'รายการใบเสนอราคา',
mainRequestTitle: 'รายการคำขอ',
mainRequestCaption: 'แสดงรายการคำขอ',
mainOrderTitle: 'ใบสั่งซื้อ',
mainOrderCaption: 'รายการใบสั่งซื้อ',
mainReceiptTitle: 'ใบรับสินค้า',
mainReceiptCaption: 'รายการใบรับสินค้า',
mainFinanceTitle: 'การจัดการการเงิน',
mainFinanceCaption: 'รายการบัญชีทั้งหมด',
mainDashboardTitle: 'Dashboard',
mainDashboardCaption: 'แสดงข้อมูลสถิติ',
mainReportTitle: 'รายงาน',
mainReportCaption: 'แสดงรายงาน',
};

View file

@ -1,75 +0,0 @@
export default {
branchManagement: {
label: {
branchManagementCaption: 'จัดการทุกสาขา',
branchLabel: 'สาขา',
branchHQLabel: 'สำนักงานใหญ่',
},
table: {
title: {
office: 'สำนักงาน',
address: 'ที่อยู่',
// formDialogInputTelephone: 'เบอร์โทรศัพท์',
telephone: 'เบอร์โทรศัพท์',
type: 'ประเภท',
},
},
input: {
label: {
search: 'ค้นหา',
},
},
manu: {
branchName: 'ชื่อสาขา',
branchLabelTel: 'เบอร์โทรศัพท์สาขา',
branchLabelAddress: 'ที่อยู่สาขา',
branchLabelType: 'ประเภทสาขา',
viewDetail: 'ดูรายละเอียด',
edit: 'แก้ไข',
delete: 'ลบ',
switchOnLabel: 'เปิด',
switchOffLabel: 'ปิด',
},
},
formDialog: {
section: {
formDialogTitleInformation: 'ข้อมูลพื้นฐาน',
formDialogTitleContact: 'ข้อมูลติดต่อ',
formDialogTitleAddress: 'ข้อมูลที่อยู่สำนักงานใหญ่',
formDialogTitleLocation: 'ตำแหน่งที่ตั้งสำนักงานใหญ่',
formDialogTitleImg: 'ภาพสำนักงาน',
subtopic: {
formDialogAddress: 'ที่อยู่ภาษาไทย',
formDialogAddressEN: 'ที่อยู่ภาษาอังกฤษ',
},
},
input: {
formDialogInputCode: 'รหัสสำนักงานใหญ่',
formDialogInputBrId: 'รหัสสาขา',
formDialogInputTaxNo: 'เลขทะเบียนนิติบุคคล',
formDialogInputNameSubBranch: 'ชื่อสาขา',
formDialogInputNameSubBranchEn: 'ชื่อสาขา (ภาษาอังกฤษ)',
formDialogInputEmailSubBranch: 'อีเมลติดต่อสาขา',
formDialogInputTelephoneSubBranch: 'เบอร์โทรศัพท์สาขา',
formDialogInputContactName: 'ชื่อผู้ติดต่อ',
formDialogInputTelephoneContact: 'เบอร์โทรศัพท์ผู้ติดต่อ',
address: 'ที่อยู่',
province: 'จังหวัด',
district: 'อำเภอ',
subDistrict: 'ตำบล',
zipCode: 'รหัสไปรษณีย์',
},
button: {
formDialogUploadQrCode: 'อัปโหลด QR Code',
formDialogBtnLocation: 'เริ่มแชร์ตำแหน่งที่ตั้ง',
formDialogBtnImg: 'เพิ่มภาพสำนักงาน',
agree: 'ตกลง',
cancel: 'ยกเลิก',
},
},
};

View file

@ -1,4 +0,0 @@
export default {
otherDocument: 'เอกสารอื่นๆ',
additionalEmployerDocument: 'เอกสารนายจ้างเพิ่มเติม',
};

View file

@ -1,21 +0,0 @@
export default {
personnelTitle: 'บุคลากร',
personnelManagement: 'จัดการบุคลากร',
personnelManagementCaption: 'จัดการบุคลากรทั้งหมด',
personnelTooltipTitle: 'ยังไม่มีข้อมูลบุคลากร',
personnelTooltipCaption: 'คลิก + เพื่อเพิ่มบุคลากร',
personnelAdd: 'เพิ่มบุคลากร',
USER: 'พนักงาน',
MESSENGER: 'พนักงานส่งเอกสาร',
DELEGATE: 'ตัวแทน',
AGENCY: 'เอเจนซี่',
personnelStatTitle: 'สรุปจำนวนข้อมูล',
personnelCardUserType: 'ประเภท',
personnelCardTelephone: 'โทรศัพท์',
personnelCardAge: 'อายุ',
personnelCardNationality: 'สัญชาติ',
};

View file

@ -1,73 +0,0 @@
export default {
productAndService: 'กลุ่มสินค้าและบริการ',
productAndServiceAll: 'กลุ่มสินค้าและบริการทั้งหมด',
productAndServiceType: 'ประเภทสินค้าและบริการ',
productAndServiceGroupCode: 'รหัสกลุ่มสินค้าและบริการ',
productAndServiceGroupName: 'ชื่อกลุ่มสินค้าและบริการ',
productAndServiceTypeCode: 'รหัสประเภทสินค้าและบริการ',
productAndServiceTypeName: 'ชื่อประเภทสินค้าและบริการ',
service: 'บริการ {msg}',
product: 'สินค้า',
productGroup: 'กลุ่มสินค้า {name}',
productType: 'ประเภทสินค้า {name}',
messageTooltipNoProduct: 'ยังไม่มีกลุ่มสินค้าและบริการ',
messageTooltipProductCreate: 'คลิก + เพื่อกลุ่มสินค้าและบริการ',
addProduct: 'เพิ่มกลุ่มสินค้าและบริการ',
productCreate: 'สร้างกลุ่มสินค้าและบริการ',
productCode: 'รหัสสินค้า',
productName: 'ชื่อสินค้า',
productDetail: 'รายละเอียดสินค้า',
productProcessingTime: 'ระยะเวลาดำเนินการ (วัน)',
priceeInformation: 'ข้อมูลราคา',
salePrice: 'ราคาขาย',
agentPrice: 'ราคาตัวแทน',
processingPrice: 'ราคาดำเนินการ',
editService: 'แก้ไขบริการ',
addService: 'เพิ่มบริการ',
buttonAddProduct: 'เพิ่มสินค้า',
editProduct: 'แก้ไขสินค้า',
serviceInformation: 'ข้อมูลบริการ',
workInformation: 'ข้อมูลงาน',
workName: 'ชื่องาน',
serviceCode: 'รหัสบริการ',
serviceName: 'ชื่อบริการ',
serviceDetail: 'รายละเอียดบริการ',
productInWork: 'สินค้าภายในงาน',
serviceAddProduct: 'เพิ่มสินค้า',
processTime: 'ระยะเวลาดำเนินการ',
day: 'วัน',
noField: 'ยังไมมีฟิลด์',
totalProductWork: 'รวมสินค้างาน',
workNo: 'งานที่',
addWork: 'เพิ่มงานใหม่',
properties: 'คุณสมบัติ',
noProperties: 'ยังไม่มีคุณสมบัติ',
serviceProperties: 'คุณสมบัติของบริการ',
workProperties: 'คุณสมบัติของงาน',
propertiesInWork: 'คุณสมบัติภายในงาน',
text: 'ข้อความ',
number: 'ตัวเลข',
date: 'วันที่',
selection: 'ตัวเลือก',
propertiesName: 'ชื่อคุณสมบัติ',
decimal: 'ทศนิยม',
decimalPlace: 'ตำแหน่ง',
useComma: 'ใส่ comma',
additional: 'เพิ่มเติม',
telMaxLength: 'จำนวนหลัก',
addSelection: 'เพิ่มตัวเลือก',
selectAll: 'เลือกทั้งหมด',
noProduct: 'ยังไม่มีสินค้า',
};

View file

@ -1,5 +0,0 @@
export default {
statusCREATED: 'ดำเนินการอยู่',
statusACTIVE: 'ดำเนินการอยู่',
statusINACTIVE: 'ปิดดำเนินการ',
};

View file

@ -1,8 +0,0 @@
export default {
firstname: 'ชื่อ',
lastname: 'นามสกุล',
fullname: 'ชื่อ-นามสกุล {msg}',
userType: 'ประเภทผู้ใช้งาน',
userRole: 'สิทธิ์ผู้ใช้งาน',
userCode: 'รหัสพนักงาน',
};

483
src/i18n/tha/index.ts Normal file
View file

@ -0,0 +1,483 @@
export default {
general: {
ok: 'ตกลง',
save: 'บันทึก',
open: 'เปิด',
close: 'ปิด',
edit: 'แก้ไข',
cancel: 'ยกเลิก',
back: 'ย้อนกลับ',
undo: 'ย้อนกลับ',
search: 'ค้นหา',
download: 'ดาวน์โหลด',
delete: 'ลบ',
clear: 'ล้าง',
all: 'ทั้งหมด',
address: 'ที่อยู่',
add: 'เพิ่ม{text}',
telephone: 'เบอร์โทรศัพท์',
loading: 'กำลังโหลด',
confirm: 'ยืนยัน',
login: 'เข้าสู่ระบบ',
logout: 'ออกจากระบบ',
manage: 'จัดการ',
theme: 'ธีม',
light: 'สว่าง',
dark: 'มืด',
mode: 'โหมด',
dataSum: 'สรุปข้อมูล',
active: 'ใช้งาน',
inactive: 'ไม่ใช้งาน',
displayField: 'ฟิลด์แสดงผล',
order: 'ลำดับ',
name: 'ชื่อ',
fullName: 'ชื่อ-สกุล',
detail: 'รายละเอียด',
remark: 'หมายเหตุ',
createdAt: 'สร้างเมื่อ',
noData: 'ไม่มีข้อมูล',
noField: 'ไม่มีฟิลด์',
notFound: 'ไม่พบ',
viewDetail: 'ดูรายละเอียด',
type: 'ประเภท',
orderNumber: 'ลำดับที่',
recordPerPage: 'แสดงทีละ',
recordsPage: 'แสดง {resultcurrentPage} รายการจาก {total} รายการ',
day: 'วัน',
select: 'เลือก',
selectAll: 'เลือกทั้งหมด',
additional: 'เพิ่มเติม',
editImage: 'แก้ไขรูป',
upload: 'อัปโหลด',
baseOnDevice: 'สีตามอุปกรณ์',
clickToCreate: 'กดเพื่อสร้าง',
age: 'อายุ',
nationality: 'สัญชาติ',
times: 'ครั้งที่ {number}',
},
menu: {
dashboard: 'แดชบอร์ด',
dashboardCaption: 'แสดงข้อมูลสถิติ',
branch: 'จัดการสาขา',
branchCaption: 'จัดการสาขาภายในองค์กร',
user: 'จัดการบุคลากร',
userCaption: 'จัดการบุคลากรภายในองค์กร',
customer: 'จัดการลูกค้า',
customerCaption: 'จัดารลูกค้าภายในองค์กร',
product: 'สินค้าและบริการ',
productCaption: 'สินค้าและบริการ',
dms: 'จัดการเอกสาร',
quotation: 'ใบเสนอราคา',
quotationCaption: 'รายการใบเสนอราคา',
requestList: 'รายการคำขอ',
requestListCaption: 'แสดงรายการคำขอ',
workOrder: 'ใบสั่งงาน',
workOrderCaption: 'รายการใบสั่งงาน',
invoice: 'ใบรับสินค้า',
invoiceCaption: 'รายการใบรับสินค้า',
accountingLedger: 'รายการทางบัญชี',
accountingLedgerCaption: 'รายการบัญชีทั้งหมด',
report: 'รายงาน',
reportCaption: 'แสดงรายงาน',
profile: {
editPersonalInfo: 'แก้ไขข้อมูลส่วนตัว',
signature: 'ลายเซ็น',
mode: 'โหมด',
addSignature: 'เพิ่มลายเซ็น',
},
},
form: {
title: {
info: '{name}',
create: 'สร้าง {name}',
edit: 'แก้ไข {name}',
},
field: {
basicInformation: 'ข้อมูลพื้นฐาน',
address: 'ข้อมูลที่อยู่',
},
birthDate: 'วันเดือนปีเกิด',
email: 'อีเมล',
gender: 'เพศ',
telephone: 'เบอร์โทรศัพท์',
address: 'ที่อยู่ {suffix}',
province: 'จังหวัด',
district: 'อำเภอ',
subDistrict: 'ตำบล',
zipCode: 'รหัสไปรษณีย์',
prefixName: 'คํานําหน้า',
firstName: 'ชื่อ ภาษาไทย',
firstNameEN: 'ชื่อ ภาษาอังกฤษ',
lastName: 'นามสกุล ภาษาไทย',
lastNameEN: 'นามสกุล ภาษาอังกฤษ',
middleName: 'ชื่อกลาง',
middleNameEN: 'ชื่อกลาง ภาษาอังกฤษ',
error: {
required: 'จำเป็นต้องกรอกข้อมูลนี้',
select: 'โปรดเลือก',
selectField: 'โปรดเลือก{field}',
please: 'โปรดใส่ข้อมูล{msg}ให้ถูกต้อง',
invalid: 'ข้อมูลไม่ถูกต้อง',
invalidCustomeMessage: 'ข้อมูลไม่ถูกต้อง {msg}',
},
warning: {
title: 'แจ้งเตือน {msg}',
unsave:
'คุณมีการเปลี่ยนแปลงที่ยังไม่ได้บันทึก คุณต้องการปิดหน้าต่างนี้หรือไม่',
},
info: {
cantChange:
'{field} ไม่สามารถแก้ไขภายหลังได้ คุณต้องการใช้ "{name}" ใช่หรือไม่',
},
maxLength: 'จำนวนหลัก',
useComma: 'ใส่ Comma',
decimal: 'ทศนิยม',
decimalPlace: 'ตำแหน่ง',
selection: 'ตัวเลือก',
},
status: {
title: 'สถานะการใช้งาน',
CREATED: 'ใช้งานอยู่', // NOTE: Treated as active
ACTIVE: 'ใช้งานอยู่',
INACTIVE: 'ไม่ใช้งาน',
},
branch: {
office: 'สำนักงาน',
card: {
orderNumber: 'เลขที่',
branchLabelName: 'ชื่อ',
branchLabelAddress: 'ที่อยู่',
branchLabelTel: 'เบอร์โทรศัพท์',
branchLabelType: 'ประเภท',
branchLabel: 'สาขา',
branchHQLabel: 'สำนักงานใหญ่',
},
page: {
captionManage: 'จัดการ',
},
form: {
title: {
branchLabel: 'สาขา',
branchHQLabel: 'สำนักงานใหญ่',
},
group: {
contact: 'ติดต่อ',
location: 'ที่ตั้ง',
bankAccount: 'บัญชีธนาคาร',
admin: 'ผู้ดูแล',
},
shareLocation: 'แชร์ตำแหน่ง',
abbrev: 'ชื่อย่อ',
code: 'รหัสสำนักงานใหญ่',
codeBranch: 'รหัสสาขา',
taxNo: 'เลขประจำตัวผู้เสียภาษี',
contactName: 'ชื่อผู้ติดต่อ',
contactTelephone: 'เบอร์ผู้ติดต่อ',
branchName: 'ชื่อสาขา',
branchNameEN: 'ชื่อสาขา (EN)',
headofficeName: 'ชื่อสำนักงานใหญ่',
headofficeNameEN: 'ชื่อสำนักงานใหญ่ (EN)',
bankAccountNo: 'บัญชีที่ {no}',
bankAccountStatus: 'สถานะบัญชี',
bank: 'ธนาคาร',
bankBranch: 'สาขาธนาคาร',
bankAccountNumber: 'เลขบัญชี',
bankAccountName: 'ชื่อบัญชี',
bankAccountType: 'ประเภทบัญชี',
},
},
personnel: {
title: 'จัดการบุคลากร',
caption: 'จัดการบุคลากรทั้งหมด',
personnel: 'บุคลากร',
age: 'อายุ',
USER: 'พนักงาน',
MESSENGER: 'พนักงานส่งเอกสาร',
DELEGATE: 'ตัวแทน',
AGENCY: 'เอเจนซี่',
addTitle: 'เพิ่มบุคลากร',
tooltipTitle: 'ยังไม่มีข้อมูลบุคลากร',
tooltipCaption: 'คลิก + เพื่อเพิ่มบุคลากร',
form: {
personalInformation: 'ข้อมูลบุคคล',
addressInformation: 'ข้อมูลที่อยู่พนักงาน',
workInformation: 'ข้อมูลการทำงาน',
username: 'ชื่อผู้ใช้งาน',
userType: 'ประเภทผู้ใช้งาน',
userRole: 'สิทธิ์ผู้ใช้งาน',
prefixName: 'คํานําหน้า',
firstName: 'ชื่อ ภาษาไทย',
lastName: 'นามสกุล ภาษาไทย',
firstNameEN: 'ชื่อ ภาษาอังกฤษ',
lastNameEN: 'นามสกุล ภาษาอังกฤษ',
middleName: 'ชื่อกลาง',
middleNameEN: 'ชื่อกลาง ภาษาอังกฤษ',
regisNo: 'เลขประจำตัว นจ. 16 (เลขที่ขึ้นทะเบียน)',
startDate: 'วันที่เริ่มงาน',
retireDate: 'วันที่พ้นสภาพพนักงาน',
responsibleArea: 'พื้นที่ ที่รับผิดชอบในการส่งเอกสาร',
discount: 'เงื่อนไขส่วนลดบริการต่างๆ ของตัวแทน',
sourceNationality: 'สัญชาติต้นทาง',
importNationality: 'นำเข้าสัญชาติ',
trainingPlace: 'สถานที่อบรม',
checkpoint: 'ด่าน',
checkpointEN: 'ด่าน ภาษาอังกฤษ',
attachment: 'แบบเอกสารประจำตัว',
},
},
customer: {
employer: 'นายจ้าง',
employee: 'ลูกจ้าง',
employerLegalEntity: 'นิติบุคคล',
employerNaturalPerson: 'บุคคลธรรมดา',
employerType: 'ประเภทนายจ้าง',
form: {
selectType: 'เลือกประเภท',
group: {
branch: 'ข้อมูลสาขา',
},
prefix: {
mr: 'Mr.',
mrs: 'Mrs.',
miss: 'Miss.',
},
firstName: 'ชื่อ ภาษาไทย',
lastName: 'นามสกุล ภาษาไทย',
firstNameEN: 'ชื่อ ภาษาอังกฤษ',
lastNameEN: 'นามสกุล ภาษาอังกฤษ',
cardNumber: 'บัตรประชาชนเลขที่',
prefixName: 'คํานําหน้า',
legalPersonNo: 'ทะเบียนนิติบุคคลเลขที่',
registerName: 'ชื่อบริษัท',
registerNameEN: 'ชื่อบริษัท (EN)',
registerDate: 'จดทะเบียนเมื่อ',
registerCompanyName: 'จดทะเบียนชื่อ',
authorizedCapital: 'ทุนที่จดทะเบียน',
workplace: 'สถานที่ทํางาน',
workplaceEN: 'สถานที่ทํางาน (EN)',
address: 'ที่อยู่',
addressEN: 'ที่อยู่ (EN)',
branchCode: 'รหัสสาขา',
customerCode: 'รหัสนายจ้าง',
legalPersonCode: 'รหัสนิติบุคคล',
codeAbbrev: 'ชื่อย่อบริษัท',
codeNumber: 'เลขประจำตัวบริษัท',
registeredBranch: 'สาขาที่ลงทะเบียน',
customerName: 'ชื่อบริษัท',
customerNameEN: 'ชื่อบริษัท (EN)',
personName: 'ชื่อลูกค้า',
taxIdentificationNumber: 'หมายเลขทะเบียนนิติบุคคล',
branch: {
title: 'สาขาที่ {name}',
},
headQuarters: {
title: 'สำนักงานใหญ่',
},
},
table: {
orderNumber: 'ลําดับ',
fullname: 'ชื่อ-นามสกุล',
businessTypePure: 'ประเภทกิจการ',
address: 'ที่อยู่',
workPlace: 'สถานที่ทํางาน',
contactName: 'ชื่อผู้ติดต่อ',
contactPhone: 'โทรศัพท์ผู้ติดต่อ',
},
},
customerEmployee: {
branch: 'สาขา',
form: {
group: {
personalInfo: 'ข้อมูลส่วนตัว',
passport: 'หนังสือเดินทาง',
visa: 'วีซ่า',
healthCheck: 'ตรวจสุขภาพ',
workHistory: 'ประวัติการทำง่าน',
other: 'อื่นๆ',
family: 'ครอบครัว',
},
employerBranch: 'สาขานายจ้าง',
employeeCode: 'รหัสลูกจ้าง',
nrcNo: 'เลขบัตรประจำตัวคนซึ่งไม่มีสัญชาติไทย (N.R.C No.)',
passportNo: 'หมายเลขหนังสือเดินทาง',
passportRef:
'เลขอ้างอิงเลขที่หนังสือเดินทางเดิม (กรณีเปลี่ยนหนังสือเดินทาง)',
passportType: 'ประเภทหนังสือเดินทาง',
passportPlace: 'สถานที่ออกหนังสือเดินทาง',
passportIssuer: 'ประเทศที่ออกหนังสือเดินทาง',
passportIssueDate: 'วันออกอายุหนังสือเดินทาง',
passportExpireDate: 'วันหมดอายุหนังสือเดินทาง',
addressSame: 'ใช้ที่อยู่เดียวกับนายจ้าง',
addressCustom: 'กำหนดที่อยู่เอง',
visaType: 'ประเภทการตรวจลงตรา',
visaNo: 'เลขที่ตรวจลงตรา',
visaIssuance: 'ออกให้วันที่',
visaExpire: 'ใช้ได้ถึงวันที่',
visaPlace: 'ออกให้ที่',
visaStayUntil: 'ให้อยู่ในราชอาณาจักรถึงวันที่',
visaTM6: 'เลขที่ใบ ตม.6 (ใบขาเข้า)',
visaEnter: 'วันที่เดินทางเข้ามาในประเทศ',
employerSelect: {
branchName: 'ชื่อสาขา',
customerName: 'ชื่อนายจ้าง',
},
},
formHealthCheck: {
title: 'ตรวจสุขภาพ',
result: 'ผลการตรวจ',
checkupType: 'ประเภทการตรวจ',
hospital: 'โรงพยาบาล',
medicalBenefit: 'ประเภทสิทธิประโยชน์ทางการแพทย์',
coverageStartDate: 'วันที่เริ่มคุ้มครอง',
coverageExpireDate: 'วันที่สิ้นสุดการคุ้มครอง',
insuranceCompany: 'บริษัทประกัน',
},
formWorkHistory: {
title: 'ประวัติการทำงาน',
employerName: 'ชื่อนายจ้าง',
jobType: 'ประเภทงาน',
jobPosition: 'ตำแหน่งงาน',
workplace: 'สถานที่ทำงาน',
workUntil: 'อนุญาตทำงานจนถึง',
permitNo: 'เลขที่ใบอนุญาตทำงาน',
permitIssueDate: 'วันที่ออกใบอนุญาตทำงาน',
permitExpireDate: 'วันที่หมดอายุใบอนุญาตทำงาน',
},
formFamily: {
citizenId:
'เลขประจำตัวประชาชนของผู้ทำงาน (เลขประจำตัวประชาชนจากประเทศต้นกำเนิด)',
father: 'บิดา',
fatherBirthPlace: 'สถานที่เกิดของบิดา',
mother: 'มารดา',
motherBirthPlace: 'สถานที่เกิดของมารดา',
},
},
customerBranch: {
tab: {
main: 'เกี่ยวกับ',
address: 'ที่อยู่',
business: 'ธุรกิจ',
contact: 'ติดต่อ',
attachment: 'เอกสารเพิ่มเติม',
},
form: {
title: 'สาขา',
no: 'เลขที่สาขา',
code: 'รหัสสาขา',
taxNo: 'เลขทะเบียนนิติบุคคล',
name: 'ชื่อสาขา',
nameEN: 'ชื่อสาขา (ภาษาอังกฤษ)',
authorizedCapital: 'ทุนจดทะเบียน',
registerName: 'ชื่อที่จดทะเบียน',
registerDate: 'วันที่จดทะเบียน',
telephone: 'โทรศัพท์',
attachment: 'เอกสารเพิ่มเติม',
},
},
productService: {
title: 'สินค้าและบริการ',
caption: 'จัดการสินค้าและบริการทั้งหมด',
group: {
title: 'กลุ่มสินค้าและบริการ',
withName: 'กลุ่ม {name}',
addTitle: 'เพิ่มกลุ่มสินค้าและบริการ',
code: 'รหัสสินค้าและบริการ',
name: 'ชื่อสินค้าและบริการ',
},
type: {
title: 'ปรเภทสินค้าและบริการ',
withName: 'ประเภท {name}',
addTitle: 'เพิ่มประเภทสินค้าและบริการ',
code: 'รหัสสินค้าและบริการ',
name: 'ชื่อสินค้าและบริการ',
},
service: {
title: 'บริการ',
totalWork: 'งานทั้งหมด',
code: 'รหัสบริการ',
name: 'ชื่อบริการ',
work: 'งาน',
workName: 'ชื่องาน',
showTotalPrice: 'แสดงราคารวม',
addTitle: 'เพิ่มบริการ',
registeredBranch: 'สาขาที่ลงทะเบียน',
information: 'ข้อมูลบริการ',
workInformation: 'ข้อมูลงาน',
serviceProperties: 'คุณสมบัติของบริการ',
propertiesName: 'ชื่อคุณสมบัติ',
properties: 'คุณสมบัติ',
noProperties: 'ยังไม่มีคุณสมบัติ',
propertiesInWork: 'คุณสมบัติภายในงาน',
productInWork: 'สินค้าภายในงาน',
totalProductWork: 'รวมสินค้างาน',
list: 'รายการ',
addWork: 'เพิ่มงาน',
},
product: {
title: 'สินค้า',
code: 'รหัสสินค้า',
name: 'ชื่อสินค้า',
registeredBranch: 'สาขาที่ลงทะเบียน',
noProduct: 'ยังไม่มีสินค้า',
allProduct: 'สินค้าทั้งหมด',
addTitle: 'เพิ่มสินค้า',
processingTime: 'ระยะเวลาดำเนินการ',
processingTimeDay: 'ระยะเวลาดำเนินการ (วัน)',
priceInformation: 'ข้อมูลราคา',
salePrice: 'ราคาขาย',
agentPrice: 'ราคาตัวแทน',
processingPrice: 'ราคาดำเนินการ',
},
},
backend: {
sameBranchCodeExists: 'ตัวย่อสำนักงานใหญ่นี้ถูกใช้แล้ว',
},
dialog: {
title: {
incompleteDataEntry: 'กรอกข้อมูลไม่ครบ',
confirmChangeStatus: 'ยืนยันการเปลี่ยนสถานะ',
confirmDelete: 'ยืนยันการลบ',
},
message: {
incompleteDataEntry: 'กรอกข้อมูลไม่ครบในหน้า {tap}',
confirmChangeStatusOn: 'คุณต้องการเปิดใช่หรือไม่',
confirmChangeStatusOff: 'คุณต้องการปิดใช่หรือไม่',
confirmDelete: 'คุณต้องการลบรายการนี้ใช่หรือไม่',
},
action: {
ok: 'ยืนยัน',
save: 'บันทึก',
saveAndClose: 'บันทึกและปิดหน้าต่าง',
close: 'ปิดหน้าต่าง',
delete: 'ลบ',
cancel: 'ยกเลิก',
},
},
};

View file

@ -27,14 +27,14 @@ onMounted(async () => {
labelMenu.value = [ labelMenu.value = [
{ {
label: 'drawerDashboard', label: 'menu.dashboard',
icon: 'isax-element-35', icon: 'isax-element-35',
route: '', route: '',
isax: true, isax: true,
disabled: true, disabled: true,
}, },
{ {
label: 'drawerBranchManagement', label: 'menu.branch',
icon: 'mdi-chart-donut', icon: 'mdi-chart-donut',
route: '/branch-management', route: '/branch-management',
hidden: hidden:
@ -47,7 +47,7 @@ onMounted(async () => {
: true, : true,
}, },
{ {
label: 'drawerPersonnelManagement', label: 'menu.user',
icon: 'fa6-solid:building-user', icon: 'fa6-solid:building-user',
route: '/personnel-management', route: '/personnel-management',
hidden: hidden:
@ -60,13 +60,13 @@ onMounted(async () => {
: true, : true,
}, },
{ {
label: 'drawerCustomerManagement', label: 'menu.customer',
icon: 'isax-frame5', icon: 'isax-frame5',
route: '/customer-management', route: '/customer-management',
isax: true, isax: true,
}, },
{ {
label: 'drawerProductsAndServices', label: 'menu.product',
icon: 'heroicons-truck-solid', icon: 'heroicons-truck-solid',
route: '/product-service', route: '/product-service',
}, },
@ -76,40 +76,40 @@ onMounted(async () => {
route: '/document-management', route: '/document-management',
}, },
{ {
label: 'drawerQuotation', label: 'menu.quotation',
icon: 'mdi-file-document', icon: 'mdi-file-document',
route: '', route: '',
disabled: true, disabled: true,
}, },
{ {
label: 'drawerRequestList', label: 'menu.requestList',
icon: 'isax-device-message5', icon: 'isax-device-message5',
route: '', route: '',
disabled: true, disabled: true,
isax: true, isax: true,
}, },
{ {
label: 'drawerWorkOrder', label: 'menu.workOrder',
icon: 'isax-receipt-2-15', icon: 'isax-receipt-2-15',
route: '', route: '',
disabled: true, disabled: true,
isax: true, isax: true,
}, },
{ {
label: 'drawerInvoice', label: 'menu.invoice',
icon: 'material-symbols:box', icon: 'material-symbols:box',
route: '', route: '',
disabled: true, disabled: true,
}, },
{ {
label: 'drawerAccountingLedger', label: 'menu.accountingLedger',
icon: 'isax-dollar-circle4', icon: 'isax-dollar-circle4',
route: '', route: '',
isax: true, isax: true,
disabled: true, disabled: true,
}, },
{ {
label: 'drawerReport', label: 'menu.report',
icon: 'mdi-file-document', icon: 'mdi-file-document',
route: '', route: '',
disabled: true, disabled: true,
@ -237,13 +237,13 @@ function branchSetting() {}
> >
<span class="text-weight-bold ellipsis full-width"> <span class="text-weight-bold ellipsis full-width">
{{ {{
($i18n.locale === 'en-US' ($i18n.locale === 'eng'
? currentMyBranch?.nameEN ? currentMyBranch?.nameEN
: currentMyBranch?.name) ?? '-' : currentMyBranch?.name) ?? '-'
}} }}
<q-tooltip> <q-tooltip>
{{ {{
($i18n.locale === 'en-US' ($i18n.locale === 'eng'
? currentMyBranch?.nameEN ? currentMyBranch?.nameEN
: currentMyBranch?.name) ?? '-' : currentMyBranch?.name) ?? '-'
}} }}

View file

@ -62,8 +62,8 @@ const language: {
icon: string; icon: string;
date: string; date: string;
}[] = [ }[] = [
{ value: 'th-th', label: 'ไทย', icon: 'th', date: 'th' }, { value: 'tha', label: 'ไทย', icon: 'th', date: 'th' },
{ value: 'en-US', label: 'English', icon: 'us', date: 'en-gb' }, { value: 'eng', label: 'English', icon: 'us', date: 'en-gb' },
]; ];
const notiOpen = ref(false); const notiOpen = ref(false);
@ -134,9 +134,9 @@ watch(
() => { () => {
localStorage.setItem('currentLanguage', currentLanguage.value); localStorage.setItem('currentLanguage', currentLanguage.value);
if (rawOption.value) { if (rawOption.value) {
if (locale.value === 'en-US') if (locale.value === 'eng')
optionStore.globalOption = rawOption.value.eng; optionStore.globalOption = rawOption.value.eng;
if (locale.value === 'th-th') if (locale.value === 'tha')
optionStore.globalOption = rawOption.value.tha; optionStore.globalOption = rawOption.value.tha;
} }
}, },
@ -149,18 +149,18 @@ onMounted(async () => {
const getCurLang = localStorage.getItem('currentLanguage'); const getCurLang = localStorage.getItem('currentLanguage');
if (getCurLang) currentLanguage.value = getCurLang; if (getCurLang) currentLanguage.value = getCurLang;
if (currentLanguage.value === 'English') { if (currentLanguage.value === 'English') {
locale.value = 'en-US'; locale.value = 'eng';
setLocale('en-gb'); setLocale('en-gb');
} }
if (currentLanguage.value === 'ไทย') { if (currentLanguage.value === 'ไทย') {
locale.value = 'th-th'; locale.value = 'tha';
setLocale('th'); setLocale('th');
} }
const resultOption = await fetch('/option/option.json'); const resultOption = await fetch('/option/option.json');
rawOption.value = await resultOption.json(); rawOption.value = await resultOption.json();
if (locale.value === 'en-US') optionStore.globalOption = rawOption.value.eng; if (locale.value === 'eng') optionStore.globalOption = rawOption.value.eng;
if (locale.value === 'th-th') optionStore.globalOption = rawOption.value.tha; if (locale.value === 'tha') optionStore.globalOption = rawOption.value.tha;
const user = getUsername(); const user = getUsername();
const uid = getUserId(); const uid = getUserId();
@ -254,7 +254,7 @@ onMounted(async () => {
} }
" "
/> />
<div class="column"> <div class="column col">
<span <span
class="title-gradient text-weight-bold" class="title-gradient text-weight-bold"
:class="{ 'text-h6': $q.screen.gt.xs }" :class="{ 'text-h6': $q.screen.gt.xs }"
@ -478,7 +478,7 @@ onMounted(async () => {
height="550px" height="550px"
v-model:modal="canvasModal" v-model:modal="canvasModal"
no-app-box no-app-box
:title="$t('addSignature')" :title="$t('menu.profile.addSignature')"
:close="() => (canvasModal = false)" :close="() => (canvasModal = false)"
> >
<CanvasComponent ref="canvasRef" v-model:modal="canvasModal" /> <CanvasComponent ref="canvasRef" v-model:modal="canvasModal" />

View file

@ -24,19 +24,19 @@ const currentTheme = ref();
const options = ref([ const options = ref([
{ {
icon: 'mdi-account', icon: 'mdi-account',
label: 'editPersonalInfo', label: 'menu.profile.editPersonalInfo',
value: 'op1', value: 'op1',
color: 'grey', color: 'grey',
}, },
{ {
icon: 'mdi-signature-freehand', icon: 'mdi-signature-freehand',
label: 'signature', label: 'menu.profile.signature',
value: 'op2', value: 'op2',
color: 'grey', color: 'grey',
}, },
{ {
icon: 'mdi-brightness-6', icon: 'mdi-brightness-6',
label: 'mode', label: 'menu.profile.mode',
value: 'op3', value: 'op3',
color: 'grey', color: 'grey',
}, },
@ -334,7 +334,7 @@ onMounted(async () => {
<div class="column justify-center"> <div class="column justify-center">
<q-list :dense="true" v-for="op in options" :key="op.label"> <q-list :dense="true" v-for="op in options" :key="op.label">
<q-item <q-item
v-if="op.label !== 'mode'" v-if="op.label !== 'menu.profile.mode'"
clickable clickable
:id="`btn-${op.label}`" :id="`btn-${op.label}`"
@click="$emit(op.label)" @click="$emit(op.label)"
@ -347,9 +347,9 @@ onMounted(async () => {
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-separator v-if="op.label === 'mode'" /> <q-separator v-if="op.label === 'menu.profile.mode'" />
<q-item <q-item
v-if="op.label === 'mode'" v-if="op.label === 'menu.profile.mode'"
clickable clickable
:id="`btn-${op.label}`" :id="`btn-${op.label}`"
@click="$emit(op.label)" @click="$emit(op.label)"
@ -363,7 +363,7 @@ onMounted(async () => {
{{ $t(op.label) }} {{ $t(op.label) }}
</span> </span>
<span class="app-text-muted-2"> <span class="app-text-muted-2">
{{ $t(currentTheme) }} {{ $t(`general.${currentTheme}`) }}
<q-icon name="mdi-chevron-right" /> <q-icon name="mdi-chevron-right" />
</span> </span>
</div> </div>
@ -389,7 +389,7 @@ onMounted(async () => {
<q-item-section> <q-item-section>
<div class="row justify-between"> <div class="row justify-between">
<span> <span>
{{ $t(mode.label) }} {{ $t(`general.${mode.label}`) }}
</span> </span>
<q-icon v-if="mode.isActive" name="mdi-check" /> <q-icon v-if="mode.isActive" name="mdi-check" />
</div> </div>
@ -408,7 +408,7 @@ onMounted(async () => {
unelevated unelevated
class="q-ma-md app-text-negative" class="q-ma-md app-text-negative"
:class="{ dark: $q.dark.isActive }" :class="{ dark: $q.dark.isActive }"
:label="$t('logout')" :label="$t('general.logout')"
@click="$emit('logout')" @click="$emit('logout')"
id="btn-logout" id="btn-logout"
style="background-color: hsla(var(--negative-bg) / 0.1)" style="background-color: hsla(var(--negative-bg) / 0.1)"
@ -421,7 +421,7 @@ onMounted(async () => {
color="primary" color="primary"
unelevated unelevated
class="q-ma-md app-text-negative" class="q-ma-md app-text-negative"
:label="$t('login')" :label="$t('general.login')"
@click="$emit('login')" @click="$emit('login')"
id="btn-login" id="btn-login"
v-close-popup v-close-popup

View file

@ -54,34 +54,34 @@ const columns = [
{ {
name: 'orderNumber', name: 'orderNumber',
align: 'center', align: 'center',
label: 'orderNumber', label: 'general.orderNumber',
field: 'branchNo', field: 'branchNo',
}, },
{ {
name: 'branchLabelName', name: 'branchLabelName',
align: 'left', align: 'left',
label: 'office', label: 'branch.office',
field: 'name', field: 'name',
sortable: true, sortable: true,
}, },
{ {
name: 'branchLabelAddress', name: 'branchLabelAddress',
align: 'left', align: 'left',
label: 'address', label: 'general.address',
field: 'address', field: 'address',
sortable: true, sortable: true,
}, },
{ {
name: 'branchLabelTel', name: 'branchLabelTel',
align: 'left', align: 'left',
label: 'formDialogInputTelephone', label: 'general.telephone',
field: 'telephoneNo', field: 'telephoneNo',
}, },
{ {
name: 'branchLabelType', name: 'branchLabelType',
align: 'left', align: 'left',
label: 'type', label: 'general.type',
field: 'isHeadOffice', field: 'isHeadOffice',
}, },
] satisfies QTableProps['columns']; ] satisfies QTableProps['columns'];
@ -182,13 +182,13 @@ async function calculateStats() {
{ {
icon: 'mdi-office-building-outline', icon: 'mdi-office-building-outline',
count: _stats.hq, count: _stats.hq,
label: 'branchHQLabel', label: 'branch.card.branchHQLabel',
color: 'pink', color: 'pink',
}, },
{ {
icon: 'mdi-home-group', icon: 'mdi-home-group',
count: _stats.br, count: _stats.br,
label: 'branchLabel', label: 'branch.card.branchLabel',
color: 'purple', color: 'purple',
}, },
]; ];
@ -196,10 +196,10 @@ async function calculateStats() {
} }
onMounted(async () => { onMounted(async () => {
utilsStore.currentTitle.title = 'branchManagement'; utilsStore.currentTitle.title = 'menu.branch';
utilsStore.currentTitle.path = [ utilsStore.currentTitle.path = [
{ {
text: 'branchManagementCaption', text: 'branch.page.captionManage',
i18n: true, i18n: true,
handler: () => { handler: () => {
fieldSelectedBranch.value.value = 'branchHQLabel'; fieldSelectedBranch.value.value = 'branchHQLabel';
@ -257,7 +257,7 @@ const fieldSelectedBranch = ref<{
label: string; label: string;
value: string; value: string;
}>({ }>({
label: t('branchHQLabel'), label: t('branch.form.title.branchHQLabel'),
value: 'branchHQLabel', value: 'branchHQLabel',
}); });
@ -516,13 +516,13 @@ async function triggerChangeStatus(
color: status !== 'INACTIVE' ? 'warning' : 'info', color: status !== 'INACTIVE' ? 'warning' : 'info',
icon: icon:
status !== 'INACTIVE' ? 'mdi-alert' : 'mdi-message-processing-outline', status !== 'INACTIVE' ? 'mdi-alert' : 'mdi-message-processing-outline',
title: t('confirmChangeStatusTitle'), title: t('dialog.title.confirmChangeStatus'),
actionText: actionText:
status !== 'INACTIVE' ? t('switchOffLabel') : t('switchOnLabel'), status !== 'INACTIVE' ? t('general.close') : t('general.open'),
message: message:
status !== 'INACTIVE' status !== 'INACTIVE'
? t('confirmChangeStatusOffMessage') ? t('dialog.message.confirmChangeStatusOff')
: t('confirmChangeStatusOnMessage'), : t('dialog.message.confirmChangeStatusOn'),
action: async () => { action: async () => {
const res = await branchStore.editById(id, { const res = await branchStore.editById(id, {
status: status !== 'INACTIVE' ? 'INACTIVE' : 'ACTIVE', status: status !== 'INACTIVE' ? 'INACTIVE' : 'ACTIVE',
@ -623,21 +623,16 @@ function changeTitle(
formType: 'edit' | 'create' | 'delete' | 'view', formType: 'edit' | 'create' | 'delete' | 'view',
typeBranch: 'headOffice' | 'subBranch', typeBranch: 'headOffice' | 'subBranch',
) { ) {
if (typeBranch === 'headOffice') { const _type =
return formType === 'create' typeBranch === 'headOffice'
? t('formDialogTitleCreateHeadOffice') ? 'branch.card.branchHQLabel'
: formType === 'view' : 'branch.card.branchHQLabel';
? t('formDialogTitleViewHeadOffice')
: t('formDialogTitleEditHeadOffice'); return formType === 'create'
} ? t('form.title.create', { name: t(_type) })
if (typeBranch === 'subBranch') { : formType === 'view'
return formType === 'create' ? t(_type)
? t('formDialogTitleCreateSubBranch') : t('general.edit');
: formType === 'view'
? t('formDialogTitleViewSubBranch')
: t('formDialogTitleEditSubBranch');
}
return '';
} }
function handleHold(node: BranchWithChildren) { function handleHold(node: BranchWithChildren) {
@ -672,7 +667,7 @@ watch(
watch(currentHq, () => { watch(currentHq, () => {
const tmp: typeof utilsStore.currentTitle.path = [ const tmp: typeof utilsStore.currentTitle.path = [
{ {
text: 'branchManagementCaption', text: 'branch.page.captionManage',
i18n: true, i18n: true,
handler: () => { handler: () => {
expandedTree.value = expandedTree.value.filter( expandedTree.value = expandedTree.value.filter(
@ -701,7 +696,7 @@ watch(currentHq, () => {
<template> <template>
<div class="column full-height no-wrap"> <div class="column full-height no-wrap">
<div class="text-body-2 q-mb-xs flex items-center"> <div class="text-body-2 q-mb-xs flex items-center">
{{ $t('branchStatTitle') }} {{ $t('general.dataSum') }}
<q-btn <q-btn
class="q-ml-xs" class="q-ml-xs"
icon="mdi-pin-outline" icon="mdi-pin-outline"
@ -745,15 +740,16 @@ watch(currentHq, () => {
<div class="self-end q-ma-md"> <div class="self-end q-ma-md">
<TooltipComponent <TooltipComponent
class="self-end" class="self-end"
title="branchNoMainOfficeYet" title="general.noData"
caption="branchClickToCreateMainOffice" caption="general.clickToCreate"
imgSrc="personnel-table-" imgSrc="personnel-table-"
/> />
</div> </div>
<div class="col flex items-center justify-center"> <div class="col flex items-center justify-center">
<EmptyAddButton <EmptyAddButton
label="branchAdd" label="general.add"
:i18nArgs="{ text: $t('branch.form.title.branchLabel') }"
@trigger="() => triggerCreate('headOffice')" @trigger="() => triggerCreate('headOffice')"
/> />
</div> </div>
@ -901,7 +897,7 @@ watch(currentHq, () => {
for="input-search" for="input-search"
outlined outlined
dense dense
:label="$t('search')" :label="$t('general.search')"
class="q-mr-md col-12 col-md-4" class="q-mr-md col-12 col-md-4"
:bg-color="$q.dark.isActive ? 'dark' : 'white'" :bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearch" v-model="inputSearch"
@ -929,10 +925,10 @@ watch(currentHq, () => {
:for="'field-select-status'" :for="'field-select-status'"
emit-value emit-value
:options="[ :options="[
{ label: $t('all'), value: 'all' }, { label: $t('general.all'), value: 'all' },
{ label: $t('statusACTIVE'), value: 'statusACTIVE' }, { label: $t('status.ACTIVE'), value: 'statusACTIVE' },
{ {
label: $t('statusINACTIVE'), label: $t('status.INACTIVE'),
value: 'statusINACTIVE', value: 'statusINACTIVE',
}, },
]" ]"
@ -943,9 +939,12 @@ watch(currentHq, () => {
id="select-field" id="select-field"
for="select-field" for="select-field"
:options=" :options="
fieldDisplay.map((v) => ({ label: $t(v), value: v })) fieldDisplay.map((v) => ({
label: $t(`branch.card.${v}`),
value: v,
}))
" "
:display-value="$t('displayField')" :display-value="$t('general.displayField')"
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
class="col q-mx-sm" class="col q-mx-sm"
v-model="fieldSelected" v-model="fieldSelected"
@ -1018,7 +1017,7 @@ watch(currentHq, () => {
.filter((v) => { .filter((v) => {
if ( if (
statusFilter === 'statusACTIVE' && statusFilter === 'statusACTIVE' &&
v.status === 'INACTIVE' v.status !== 'ACTIVE'
) { ) {
return false; return false;
} }
@ -1029,7 +1028,7 @@ watch(currentHq, () => {
return false; return false;
} }
const terms = `${v.code} ${$i18n.locale === 'en-US' ? v.nameEN : v.name} ${v.telephoneNo}`; const terms = `${v.code} ${$i18n.locale === 'eng' ? v.nameEN : v.name} ${v.telephoneNo}`;
if (inputSearch && !terms.includes(inputSearch)) { if (inputSearch && !terms.includes(inputSearch)) {
return false; return false;
} }
@ -1185,8 +1184,8 @@ watch(currentHq, () => {
<q-td v-if="fieldSelected.includes('branchLabelType')"> <q-td v-if="fieldSelected.includes('branchLabelType')">
{{ {{
props.row.isHeadOffice props.row.isHeadOffice
? $t('branchHQLabel') ? $t('branch.card.branchHQLabel')
: $t('branchLabel') : $t('branch.card.branchLabel')
}} }}
</q-td> </q-td>
<q-td> <q-td>
@ -1232,7 +1231,7 @@ watch(currentHq, () => {
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -1270,7 +1269,7 @@ watch(currentHq, () => {
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -1297,7 +1296,7 @@ watch(currentHq, () => {
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
@ -1329,8 +1328,8 @@ watch(currentHq, () => {
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
props.row.status !== 'INACTIVE' props.row.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -1378,20 +1377,20 @@ watch(currentHq, () => {
:data="{ :data="{
branchLabelCode: props.row.code, branchLabelCode: props.row.code,
branchLabelName: branchLabelName:
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? props.row.nameEN ? props.row.nameEN
: props.row.name, : props.row.name,
branchLabelTel: props.row.contact branchLabelTel: props.row.contact
.map((c: BranchContact) => c.telephoneNo) .map((c: BranchContact) => c.telephoneNo)
.join(','), .join(','),
branchLabelAddress: branchLabelAddress:
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.addressEN || ''} ${props.row.subDistrict?.nameEN || ''} ${props.row.district?.nameEN || ''} ${props.row.province?.nameEN || ''}` ? `${props.row.addressEN || ''} ${props.row.subDistrict?.nameEN || ''} ${props.row.district?.nameEN || ''} ${props.row.province?.nameEN || ''}`
: `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}`, : `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}`,
branchLabelType: $t( branchLabelType: $t(
props.row.isHeadOffice props.row.isHeadOffice
? 'branchHQLabel' ? 'branch.branchHQLabel'
: 'branchLabel', : 'branch.branchLabel',
), ),
branchImgUrl: `/branch/${props.row.id}/branch-image`, branchImgUrl: `/branch/${props.row.id}/branch-image`,
}" }"
@ -1443,7 +1442,7 @@ watch(currentHq, () => {
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -1481,7 +1480,7 @@ watch(currentHq, () => {
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -1508,7 +1507,7 @@ watch(currentHq, () => {
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('generaldelete') }}
</span> </span>
</q-item> </q-item>
@ -1540,8 +1539,8 @@ watch(currentHq, () => {
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
props.row.status !== 'INACTIVE' props.row.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -1628,19 +1627,19 @@ watch(currentHq, () => {
<SideMenu <SideMenu
:menu="[ :menu="[
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'form-information', anchor: 'form-information',
}, },
{ {
name: $t('formDialogTitleContact'), name: $t('branch.form.group.contact'),
anchor: 'form-contact', anchor: 'form-contact',
}, },
{ {
name: $t('formDialogTitleAddress'), name: $t('form.address'),
anchor: 'form-address', anchor: 'form-address',
}, },
{ {
name: $t('formDialogTitleLocation'), name: $t('branch.form.group.location'),
anchor: 'form-location', anchor: 'form-location',
}, },
{ {
@ -1648,7 +1647,7 @@ watch(currentHq, () => {
anchor: 'form-qr', anchor: 'form-qr',
}, },
{ {
name: $t('bankBook'), name: $t('branch.form.group.bankAccount'),
anchor: 'form-bank', anchor: 'form-bank',
}, },
]" ]"
@ -1676,7 +1675,7 @@ watch(currentHq, () => {
:outlined="true" :outlined="true"
:readonly="formType === 'view'" :readonly="formType === 'view'"
:view="isSubCreate" :view="isSubCreate"
title="formDialogTitleInformation" title="form.field.basicInformation"
/> />
<FormBranchContact <FormBranchContact
id="form-contact" id="form-contact"
@ -1687,7 +1686,7 @@ watch(currentHq, () => {
v-model:contact-name="formData.contactName" v-model:contact-name="formData.contactName"
v-model:line-id="formData.lineId" v-model:line-id="formData.lineId"
:separator="true" :separator="true"
title="formDialogTitleContact" title="branch.form.group.contact"
:dense="true" :dense="true"
:outlined="true" :outlined="true"
/> />
@ -1698,11 +1697,7 @@ watch(currentHq, () => {
outlined outlined
separator separator
prefix-id="default" prefix-id="default"
:title=" :title="$t('form.address')"
$t(
`${!formData.codeHeadOffice ? 'formDialogTitleAddress' : 'branchLabelAddress'}`,
)
"
v-model:address="formData.address" v-model:address="formData.address"
v-model:addressEN="formData.addressEN" v-model:addressEN="formData.addressEN"
v-model:province-id="formData.provinceId" v-model:province-id="formData.provinceId"
@ -1716,7 +1711,7 @@ watch(currentHq, () => {
:separator="true" :separator="true"
v-model:latitude="formData.latitude" v-model:latitude="formData.latitude"
v-model:longitude="formData.longitude" v-model:longitude="formData.longitude"
title="formDialogTitleLocation" title="branch.form.group.location"
/> />
<FormQr <FormQr
id="form-qr" id="form-qr"
@ -1732,7 +1727,7 @@ watch(currentHq, () => {
/> />
<FormBank <FormBank
id="form-bank" id="form-bank"
title="bankBook" title="branch.form.group.bankAccount"
dense dense
v-model:bank-book-list="formBankBook" v-model:bank-book-list="formBankBook"
/> />
@ -1754,8 +1749,7 @@ watch(currentHq, () => {
ref="formDialogRef" ref="formDialogRef"
v-model:drawerOpen="modalDrawer" v-model:drawerOpen="modalDrawer"
:category="changeTitle(formType, formTypeBranch)" :category="changeTitle(formType, formTypeBranch)"
:title="$i18n.locale === 'en-US' ? formData.nameEN : formData.name" :title="$i18n.locale === 'eng' ? formData.nameEN : formData.name"
:titleFormAddress="$t('formDialogTitleAddress')"
:addressSeparator="true" :addressSeparator="true"
:undo="() => undo()" :undo="() => undo()"
:isEdit="formType === 'edit'" :isEdit="formType === 'edit'"
@ -1853,19 +1847,19 @@ watch(currentHq, () => {
<SideMenu <SideMenu
:menu="[ :menu="[
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'info-information', anchor: 'info-information',
}, },
{ {
name: $t('formDialogTitleContact'), name: $t('branch.form.group.contact'),
anchor: 'info-contact', anchor: 'info-contact',
}, },
{ {
name: $t('formDialogTitleAddress'), name: $t('form.address'),
anchor: 'info-address', anchor: 'info-address',
}, },
{ {
name: $t('formDialogTitleLocation'), name: $t('branch.form.group.location'),
anchor: 'info-location', anchor: 'info-location',
}, },
{ {
@ -1873,7 +1867,7 @@ watch(currentHq, () => {
anchor: 'info-qr', anchor: 'info-qr',
}, },
{ {
name: $t('bankBook'), name: $t('branch.form.group.bankAccount'),
anchor: 'info-bank', anchor: 'info-bank',
}, },
]" ]"
@ -1904,12 +1898,12 @@ watch(currentHq, () => {
:outlined="true" :outlined="true"
:readonly="formType === 'view'" :readonly="formType === 'view'"
view view
title="formDialogTitleInformation" title="form.field.basicInformation"
class="q-mb-xl" class="q-mb-xl"
/> />
<FormBranchContact <FormBranchContact
id="info-contact" id="info-contact"
title="formDialogTitleContact" title="branch.form.group.contact"
v-model:telephone-no="formData.telephoneNo" v-model:telephone-no="formData.telephoneNo"
v-model:contact="formData.contact" v-model:contact="formData.contact"
v-model:email="formData.email" v-model:email="formData.email"
@ -1928,11 +1922,7 @@ watch(currentHq, () => {
outlined outlined
separator separator
prefix-id="default" prefix-id="default"
:title=" :title="$t('form.address')"
$t(
`${!formData.headOfficeId ? 'formDialogTitleAddress' : 'branchLabelAddress'}`,
)
"
:readonly="formType === 'view'" :readonly="formType === 'view'"
v-model:address="formData.address" v-model:address="formData.address"
v-model:addressEN="formData.addressEN" v-model:addressEN="formData.addressEN"
@ -1944,7 +1934,7 @@ watch(currentHq, () => {
/> />
<FormLocation <FormLocation
id="info-location" id="info-location"
title="formDialogTitleLocation" title="branch.form.group.location"
v-model:latitude="formData.latitude" v-model:latitude="formData.latitude"
v-model:longitude="formData.longitude" v-model:longitude="formData.longitude"
:readonly="formType === 'view'" :readonly="formType === 'view'"
@ -1966,7 +1956,7 @@ watch(currentHq, () => {
<FormBank <FormBank
id="info-bank" id="info-bank"
:readonly="formType === 'view'" :readonly="formType === 'view'"
title="bankBook" title="branch.form.group.bankAccount"
dense dense
v-model:bank-book-list="formBankBook" v-model:bank-book-list="formBankBook"
class="q-mb-xl" class="q-mb-xl"
@ -2103,8 +2093,8 @@ watch(currentHq, () => {
<q-item-section> <q-item-section>
{{ {{
currentNode.status !== 'INACTIVE' currentNode.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</q-item-section> </q-item-section>
</q-item> </q-item>

View file

@ -96,32 +96,32 @@ const modeView = ref(false);
const fieldSelectedOption = ref<{ label: string; value: string }[]>([ const fieldSelectedOption = ref<{ label: string; value: string }[]>([
{ {
label: 'orderNumber', label: 'general.order',
value: 'orderNumber', value: 'orderNumber',
}, },
{ {
label: 'fullname', label: 'general.fullName',
value: 'name', value: 'name',
}, },
{ {
label: 'type', label: 'general.type',
value: 'type', value: 'type',
}, },
{ {
label: 'telephone', label: 'general.telephone',
value: 'telephoneNo', value: 'telephoneNo',
}, },
{ {
label: 'personnelCardAge', label: 'personnel.age',
value: 'birthDate', value: 'birthDate',
}, },
{ {
label: 'formDialogInputEmail', label: 'form.email',
value: 'email', value: 'email',
}, },
{ {
label: 'userRole', label: 'personnel.form.userRole',
value: 'userRole', value: 'userRole',
}, },
]); ]);
@ -247,45 +247,45 @@ const columns = [
{ {
name: 'orderNumber', name: 'orderNumber',
align: 'center', align: 'center',
label: 'orderNumber', label: 'general.order',
field: 'branchNo', field: 'branchNo',
}, },
{ {
name: 'name', name: 'name',
align: 'left', align: 'left',
label: 'fullname', label: 'general.fullName',
field: 'firstName', field: 'firstName',
}, },
{ {
name: 'type', name: 'type',
align: 'left', align: 'left',
label: 'type', label: 'general.type',
field: 'type', field: 'type',
}, },
{ {
name: 'telephoneNo', name: 'telephoneNo',
align: 'left', align: 'left',
label: 'telephone', label: 'general.telephone',
field: 'telephoneNo', field: 'telephoneNo',
}, },
{ {
name: 'birthDate', name: 'birthDate',
align: 'left', align: 'left',
label: 'personnelCardAge', label: 'personnel.age',
field: 'birthDate', field: 'birthDate',
}, },
{ {
name: 'email', name: 'email',
align: 'left', align: 'left',
label: 'formDialogInputEmail', label: 'form.email',
field: 'email', field: 'email',
}, },
{ {
name: 'userRole', name: 'userRole',
align: 'left', align: 'left',
label: 'userRole', label: 'personnel.form.userRole',
field: 'userRole', field: 'userRole',
}, },
] satisfies QTableProps['columns']; ] satisfies QTableProps['columns'];
@ -367,7 +367,7 @@ async function openDialog(
id: user.id, id: user.id,
img: `${user.profileImageUrl}`, img: `${user.profileImageUrl}`,
name: name:
locale.value === 'en-US' locale.value === 'eng'
? `${user.firstNameEN} ${user.lastNameEN}` ? `${user.firstNameEN} ${user.lastNameEN}`
: `${user.firstName} ${user.lastName}`, : `${user.firstName} ${user.lastName}`,
male: user.gender === 'male', male: user.gender === 'male',
@ -542,13 +542,13 @@ async function triggerChangeStatus(id: string, status: string) {
color: status !== 'INACTIVE' ? 'warning' : 'info', color: status !== 'INACTIVE' ? 'warning' : 'info',
icon: icon:
status !== 'INACTIVE' ? 'mdi-alert' : 'mdi-message-processing-outline', status !== 'INACTIVE' ? 'mdi-alert' : 'mdi-message-processing-outline',
title: t('confirmChangeStatusTitle'), title: t('dialog.title.confirmChangeStatus'),
actionText: actionText:
status !== 'INACTIVE' ? t('switchOffLabel') : t('switchOnLabel'), status !== 'INACTIVE' ? t('general.close') : t('general.open'),
message: message:
status !== 'INACTIVE' status !== 'INACTIVE'
? t('confirmChangeStatusOffMessage') ? t('dialog.message.confirmChangeStatusOff')
: t('confirmChangeStatusOnMessage'), : t('dialog.message.confirmChangeStatusOn'),
action: async () => { action: async () => {
await toggleStatus(id).then(resolve).catch(reject); await toggleStatus(id).then(resolve).catch(reject);
}, },
@ -563,8 +563,10 @@ async function assignFormData(idEdit: string) {
if (foundUser) { if (foundUser) {
currentUser.value = foundUser; currentUser.value = foundUser;
infoPersonId.value = currentUser.value.id; if (currentUser.value) {
imageUrl.value = currentUser.value.profileImageUrl; infoPersonId.value = currentUser.value.id;
imageUrl.value = currentUser.value.profileImageUrl;
}
formData.value = { formData.value = {
branchId: foundUser.branch[0]?.id, branchId: foundUser.branch[0]?.id,
provinceId: foundUser.provinceId, provinceId: foundUser.provinceId,
@ -645,10 +647,8 @@ function openImageDialog() {
} }
onMounted(async () => { onMounted(async () => {
utilsStore.currentTitle.title = 'personnelManagement'; utilsStore.currentTitle.title = 'personnel.title';
utilsStore.currentTitle.path = [ utilsStore.currentTitle.path = [{ text: 'personnel.caption', i18n: true }];
{ text: 'personnelManagementCaption', i18n: true },
];
modeView.value = $q.screen.lt.md ? true : false; modeView.value = $q.screen.lt.md ? true : false;
await fetchUserList(); await fetchUserList();
@ -747,7 +747,7 @@ watch(
<ButtonAddComponent style="z-index: 999"> <ButtonAddComponent style="z-index: 999">
<q-fab-action <q-fab-action
id="btn-add-personne" id="btn-add-personne"
:label="$t('personnelAdd')" :label="$t('personnel.addTitle')"
external-label external-label
label-position="left" label-position="left"
@click="openDialog('FORM')" @click="openDialog('FORM')"
@ -760,7 +760,7 @@ watch(
<!-- stat --> <!-- stat -->
<div class="column full-height no-wrap"> <div class="column full-height no-wrap">
<div class="text-body-2 q-mb-xs flex items-center"> <div class="text-body-2 q-mb-xs flex items-center">
{{ $t('personnelStatTitle') }} {{ $t('general.dataSum') }}
<q-badge <q-badge
v-if="typeStats" v-if="typeStats"
rounded rounded
@ -800,7 +800,7 @@ watch(
selectorLabel === 'ALL' selectorLabel === 'ALL'
? Object.entries(typeStats).map(([key, val]) => ({ ? Object.entries(typeStats).map(([key, val]) => ({
count: val, count: val,
label: key, label: `personnel.${key}`,
icon: 'mdi-account-outline', icon: 'mdi-account-outline',
color: color:
( (
@ -814,7 +814,7 @@ watch(
})) }))
: [ : [
{ {
label: selectorLabel, label: `personnel.${selectorLabel}`,
count: typeStats[selectorLabel], count: typeStats[selectorLabel],
icon: 'mdi-account-outline', icon: 'mdi-account-outline',
color: color:
@ -850,7 +850,7 @@ watch(
for="input-search" for="input-search"
outlined outlined
dense dense
:label="$t('search')" :label="$t('general.search')"
class="q-mr-md col-12 col-md-3" class="q-mr-md col-12 col-md-3"
:bg-color="$q.dark.isActive ? 'dark' : 'white'" :bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearch" v-model="inputSearch"
@ -880,9 +880,9 @@ watch(
:for="'field-select-status'" :for="'field-select-status'"
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
:options="[ :options="[
{ label: $t('all'), value: 'all' }, { label: $t('general.all'), value: 'all' },
{ label: $t('statusACTIVE'), value: 'statusACTIVE' }, { label: $t('general.active'), value: 'statusACTIVE' },
{ label: $t('statusINACTIVE'), value: 'statusINACTIVE' }, { label: $t('general.inactive'), value: 'statusINACTIVE' },
]" ]"
></q-select> ></q-select>
@ -898,7 +898,7 @@ watch(
label: $t(v.label), label: $t(v.label),
})) }))
" "
:display-value="$t('displayField')" :display-value="$t('general.displayField')"
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
v-model="fieldSelected" v-model="fieldSelected"
option-label="label" option-label="label"
@ -982,12 +982,12 @@ watch(
" "
> >
<div <div
class="row" class="row text-capitalize"
:class=" :class="
selectorLabel === 'ALL' ? 'text-bold' : 'app-text-muted' selectorLabel === 'ALL' ? 'text-bold' : 'app-text-muted'
" "
> >
{{ $t('all') }} {{ $t('general.all') }}
</div> </div>
</q-tab> </q-tab>
<q-tab <q-tab
@ -1003,12 +1003,12 @@ watch(
" "
> >
<div <div
class="row" class="row text-capitalize"
:class=" :class="
selectorLabel === 'USER' ? 'text-bold' : 'app-text-muted' selectorLabel === 'USER' ? 'text-bold' : 'app-text-muted'
" "
> >
{{ $t('USER') }} {{ $t('personnel.USER') }}
</div> </div>
</q-tab> </q-tab>
<q-tab <q-tab
@ -1024,12 +1024,12 @@ watch(
" "
> >
<div <div
class="row" class="row text-capitalize"
:class=" :class="
selectorLabel === 'MESSENGER' ? 'text-bold' : 'app-text-muted' selectorLabel === 'MESSENGER' ? 'text-bold' : 'app-text-muted'
" "
> >
{{ $t('MESSENGER') }} {{ $t('personnel.MESSENGER') }}
</div> </div>
</q-tab> </q-tab>
<q-tab <q-tab
@ -1045,12 +1045,12 @@ watch(
" "
> >
<div <div
class="row" class="row text-capitalize"
:class=" :class="
selectorLabel === 'DELEGATE' ? 'text-bold' : 'app-text-muted' selectorLabel === 'DELEGATE' ? 'text-bold' : 'app-text-muted'
" "
> >
{{ $t('DELEGATE') }} {{ $t('personnel.DELEGATE') }}
</div> </div>
</q-tab> </q-tab>
<q-tab <q-tab
@ -1066,12 +1066,12 @@ watch(
" "
> >
<div <div
class="row" class="row text-capitalize"
:class=" :class="
selectorLabel === 'AGENCY' ? 'text-bold' : 'app-text-muted' selectorLabel === 'AGENCY' ? 'text-bold' : 'app-text-muted'
" "
> >
{{ $t('AGENCY') }} {{ $t('personnel.AGENCY') }}
</div> </div>
</q-tab> </q-tab>
</q-tabs> </q-tabs>
@ -1180,7 +1180,7 @@ watch(
<div class="column"> <div class="column">
<div class="col ellipsis" style="max-width: 20vw"> <div class="col ellipsis" style="max-width: 20vw">
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim() ? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim()
: `${props.row.firstName} ${props.row.lastName}`.trim() : `${props.row.firstName} ${props.row.lastName}`.trim()
}} }}
@ -1190,7 +1190,7 @@ watch(
:delay="300" :delay="300"
> >
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim() ? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim()
: `${props.row.firstName} ${props.row.lastName}`.trim() : `${props.row.firstName} ${props.row.lastName}`.trim()
}} }}
@ -1231,12 +1231,14 @@ watch(
> >
{{ {{
$t( $t(
{ `personnel.${
USER: 'USER', {
MESSENGER: 'MESSENGER', USER: 'USER',
DELEGATE: 'DELEGATE', MESSENGER: 'MESSENGER',
AGENCY: 'AGENCY', DELEGATE: 'DELEGATE',
}[props.row.userType as string] || 'USER', AGENCY: 'AGENCY',
}[props.row.userType as string] || 'USER'
}`,
) )
}} }}
</span> </span>
@ -1307,7 +1309,7 @@ watch(
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -1331,7 +1333,7 @@ watch(
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -1357,7 +1359,7 @@ watch(
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
@ -1382,8 +1384,8 @@ watch(
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
props.row.status !== 'INACTIVE' props.row.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -1404,7 +1406,7 @@ watch(
code: props.row.code, code: props.row.code,
name: name:
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim() ? `${props.row.firstNameEN} ${props.row.lastNameEN}`.trim()
: `${props.row.firstName} ${props.row.lastName}`.trim(), : `${props.row.firstName} ${props.row.lastName}`.trim(),
img: props.row.profileImageUrl img: props.row.profileImageUrl
@ -1439,7 +1441,7 @@ watch(
DELEGATE: 'red', DELEGATE: 'red',
AGENCY: 'magenta', AGENCY: 'magenta',
}[props.row.userType as string] || 'pink', }[props.row.userType as string] || 'pink',
value: $t(props.row.userType), value: $t(`personnel.${props.row.userType}`),
}, },
]" ]"
:disabled="props.row.status === 'INACTIVE'" :disabled="props.row.status === 'INACTIVE'"
@ -1503,15 +1505,15 @@ watch(
> >
<div class="flex justify-end"> <div class="flex justify-end">
<TooltipComponent <TooltipComponent
title="personnelTooltipTitle" title="personnel.tooltipTitle"
caption="personnelTooltipCaption" caption="personnel.tooltipCaption"
imgSrc="personnel-table-" imgSrc="personnel-table-"
/> />
</div> </div>
<div class="col items-center flex justify-center"> <div class="col items-center flex justify-center">
<AddButton <AddButton
:label="'personnelAdd'" :label="'personnel.addTitle'"
:cyanOn="true" :cyanOn="true"
@trigger="openDialog('FORM')" @trigger="openDialog('FORM')"
/> />
@ -1533,12 +1535,8 @@ watch(
> >
<div class="col-4"> <div class="col-4">
<div class="row items-center no-wrap"> <div class="row items-center no-wrap">
<div <div class="app-text-muted q-mr-sm" v-if="$q.screen.gt.sm">
class="app-text-muted" {{ $t('general.recordPerPage') }}
style="width: 80px"
v-if="$q.screen.gt.sm"
>
{{ $t('showing') }}
</div> </div>
<div> <div>
<q-btn-dropdown <q-btn-dropdown
@ -1572,7 +1570,7 @@ watch(
<div class="col-4 row justify-center app-text-muted"> <div class="col-4 row justify-center app-text-muted">
{{ {{
$t('recordsPage', { $t('general.recordsPage', {
resultcurrentPage: userData?.result.length, resultcurrentPage: userData?.result.length,
total: userData?.total, total: userData?.total,
}) })
@ -1591,12 +1589,12 @@ watch(
<DrawerInfo <DrawerInfo
v-if="currentUser" v-if="currentUser"
:category="$t('personnelTitle')" :category="$t('personnel.personnel')"
bg-on bg-on
hide-action hide-action
:isEdit="infoDrawerEdit" :isEdit="infoDrawerEdit"
:title=" :title="
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${currentUser.firstNameEN} ${currentUser.lastNameEN}` ? `${currentUser.firstNameEN} ${currentUser.lastNameEN}`
: `${currentUser.firstName} ${currentUser.lastName}` : `${currentUser.firstName} ${currentUser.lastName}`
" "
@ -1620,8 +1618,8 @@ watch(
hideFade hideFade
:menu="formMenuIcon" :menu="formMenuIcon"
:readonly="!infoDrawerEdit" :readonly="!infoDrawerEdit"
:toggleTitle="$t('formDialogTitleUserStatus')" :toggleTitle="$t('status.title')"
:title="`${$i18n.locale === 'en-US' ? `${formData.firstNameEN} ${formData.lastNameEN}` : `${formData.firstName} ${formData.lastName}`}`" :title="`${$i18n.locale === 'eng' ? `${formData.firstNameEN} ${formData.lastNameEN}` : `${formData.firstName} ${formData.lastName}`}`"
:caption="userCode" :caption="userCode"
:img=" :img="
urlProfile || urlProfile ||
@ -1706,22 +1704,22 @@ watch(
:menu=" :menu="
[ [
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'info-information', anchor: 'info-information',
}, },
{ {
name: $t('formDialogTitlePersonal'), name: $t('personnel.form.personalInformation'),
anchor: 'info-personal', anchor: 'info-personal',
}, },
{ {
name: $t('formDialogTitleAddressPersonnel'), name: $t('personnel.form.addressInformation'),
anchor: 'info-address', anchor: 'info-address',
}, },
].concat( ].concat(
!!formData.userType !!formData.userType
? [ ? [
{ {
name: $t('formDialogTitleByType'), name: $t('personnel.form.workInformation'),
anchor: 'info-work', anchor: 'info-work',
}, },
] ]
@ -1754,7 +1752,7 @@ watch(
dense dense
outlined outlined
separator separator
:title="'formDialogTitleInformation'" :title="'form.field.basicInformation'"
:readonly="!infoDrawerEdit" :readonly="!infoDrawerEdit"
:usernameReadonly="isEdit" :usernameReadonly="isEdit"
class="q-mb-xl" class="q-mb-xl"
@ -1774,7 +1772,7 @@ watch(
v-model:email="formData.email" v-model:email="formData.email"
v-model:gender="formData.gender" v-model:gender="formData.gender"
v-model:birth-date="formData.birthDate" v-model:birth-date="formData.birthDate"
:title="'formDialogTitlePersonal'" :title="'personnel.form.personalInformation'"
prefix-id="drawer-info-personnel" prefix-id="drawer-info-personnel"
dense dense
outlined outlined
@ -1793,6 +1791,7 @@ watch(
v-model:zipCode="formData.zipCode" v-model:zipCode="formData.zipCode"
:readonly="!infoDrawerEdit" :readonly="!infoDrawerEdit"
prefix-id="drawer-info-personnel" prefix-id="drawer-info-personnel"
:title="'personnel.form.addressInformation'"
dense dense
class="q-mb-xl" class="q-mb-xl"
/> />
@ -1831,7 +1830,7 @@ watch(
ref="formDialogRef" ref="formDialogRef"
:badgeClass="formData.gender === 'male' ? 'app-bg-male' : 'app-bg-female'" :badgeClass="formData.gender === 'male' ? 'app-bg-male' : 'app-bg-female'"
:badgeLabel="userCode" :badgeLabel="userCode"
:title="$t('personnelAdd')" :title="$t('personnel.addTitle')"
v-model:modal="modal" v-model:modal="modal"
:addressSeparator="formData.userType !== ''" :addressSeparator="formData.userType !== ''"
:submit="() => onSubmit()" :submit="() => onSubmit()"
@ -1855,8 +1854,8 @@ watch(
female: '/no-img-female.png', female: '/no-img-female.png',
}[formData.gender] }[formData.gender]
" "
:toggleTitle="$t('formDialogTitleUserStatus')" :toggleTitle="$t('status.title')"
:title="`${$i18n.locale === 'en-US' ? `${formData.firstNameEN} ${formData.lastNameEN}` : `${formData.firstName} ${formData.lastName}`}`" :title="`${$i18n.locale === 'eng' ? `${formData.firstNameEN} ${formData.lastNameEN}` : `${formData.firstName} ${formData.lastName}`}`"
:fallbackImg=" :fallbackImg="
{ {
male: '/no-img-man.png', male: '/no-img-man.png',
@ -1885,28 +1884,28 @@ watch(
> >
<SaveButton id="btn-info-basic-save" icon-only type="submit" /> <SaveButton id="btn-info-basic-save" icon-only type="submit" />
</div> </div>
<div class="col full-height scroll"> <div class="col full-height scroll" v-if="$q.screen.gt.sm">
<div style="position: sticky; top: 0" class="q-pa-sm"> <div style="position: sticky; top: 0" class="q-pa-sm">
<SideMenu <SideMenu
:menu=" :menu="
[ [
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'dialog-form-information', anchor: 'dialog-form-information',
}, },
{ {
name: $t('formDialogTitlePersonal'), name: $t('personnel.form.personalInformation'),
anchor: 'dialog-form-personal', anchor: 'dialog-form-personal',
}, },
{ {
name: $t('formDialogTitleAddressPersonnel'), name: $t('personnel.form.addressInformation'),
anchor: 'dialog-form-address', anchor: 'dialog-form-address',
}, },
].concat( ].concat(
!!formData.userType !!formData.userType
? [ ? [
{ {
name: $t('formDialogTitleByType'), name: $t('personnel.form.workInformation'),
anchor: 'dialog-info-work', anchor: 'dialog-info-work',
}, },
] ]
@ -1922,13 +1921,13 @@ watch(
/> />
</div> </div>
</div> </div>
<div class="col-10 q-pa-md full-height scroll"> <div class="col-md-10 col-12 q-pa-md full-height scroll">
<FormInformation <FormInformation
id="dialog-form-information" id="dialog-form-information"
dense dense
outlined outlined
separator separator
:title="'formDialogTitleInformation'" :title="'form.field.basicInformation'"
:usernameReadonly="isEdit" :usernameReadonly="isEdit"
v-model:hqId="hqId" v-model:hqId="hqId"
v-model:brId="brId" v-model:brId="brId"
@ -1944,7 +1943,7 @@ watch(
dense dense
outlined outlined
separator separator
:title="'formDialogTitlePersonal'" :title="'personnel.form.personalInformation'"
v-model:first-name="formData.firstName" v-model:first-name="formData.firstName"
v-model:last-name="formData.lastName" v-model:last-name="formData.lastName"
v-model:mid-name="formData.middleName" v-model:mid-name="formData.middleName"

View file

@ -275,7 +275,7 @@ watch([customerId, inputSearch, currentStatus], async () => {
outlined outlined
dense dense
class="col-6" class="col-6"
:label="$t('search')" :label="$t('general.search')"
:bg-color="$q.dark.isActive ? 'dark' : 'white'" :bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearch" v-model="inputSearch"
debounce="500" debounce="500"
@ -299,9 +299,9 @@ watch([customerId, inputSearch, currentStatus], async () => {
emit-value emit-value
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
:options="[ :options="[
{ label: $t('all'), value: 'All' }, { label: $t('general.all'), value: 'All' },
{ label: $t('statusACTIVE'), value: 'ACTIVE' }, { label: $t('status.ACTIVE'), value: 'ACTIVE' },
{ label: $t('statusINACTIVE'), value: 'INACTIVE' }, { label: $t('status.INACTIVE'), value: 'INACTIVE' },
]" ]"
></q-select> ></q-select>
@ -423,9 +423,7 @@ watch([customerId, inputSearch, currentStatus], async () => {
<div class="col" style="min-width: fit-content"> <div class="col" style="min-width: fit-content">
<div class="col"> <div class="col">
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng' ? props.row.nameEN : props.row.name
? props.row.nameEN
: props.row.name
}} }}
</div> </div>
<div class="col app-text-muted"> <div class="col app-text-muted">
@ -445,7 +443,7 @@ watch([customerId, inputSearch, currentStatus], async () => {
class="text-center" class="text-center"
> >
{{ {{
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.addressEN || ''} ${props.row.subDistrict?.nameEN || ''} ${props.row.district?.nameEN || ''} ${props.row.province?.nameEN || ''}` ? `${props.row.addressEN || ''} ${props.row.subDistrict?.nameEN || ''} ${props.row.district?.nameEN || ''} ${props.row.province?.nameEN || ''}`
: `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}` : `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}`
}} }}
@ -531,7 +529,7 @@ watch([customerId, inputSearch, currentStatus], async () => {
:field-selected="[ :field-selected="[
'orderNumber', 'orderNumber',
'firstName', 'firstName',
'formDialogInputAge', 'general.age',
'formDialogInputNationality', 'formDialogInputNationality',
'formDialogInputPassportNo', 'formDialogInputPassportNo',
'passportExpiryDate', 'passportExpiryDate',
@ -562,7 +560,7 @@ watch([customerId, inputSearch, currentStatus], async () => {
customerBranchFormTab: props.row.branchNo, customerBranchFormTab: props.row.branchNo,
branchName: props.row.name, branchName: props.row.name,
address: address:
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.addressEN || ''} ${props.row.subDistrict?.nameEN || ''} ${props.row.district?.nameEN || ''} ${props.row.province?.nameEN || ''}` ? `${props.row.addressEN || ''} ${props.row.subDistrict?.nameEN || ''} ${props.row.district?.nameEN || ''} ${props.row.province?.nameEN || ''}`
: `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}`, : `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}`,
telephone: props.row.telephoneNo, telephone: props.row.telephoneNo,
@ -584,7 +582,7 @@ watch([customerId, inputSearch, currentStatus], async () => {
<div class="col"></div> <div class="col"></div>
<div class="app-text-muted col text-center"> <div class="app-text-muted col text-center">
{{ {{
$t('recordsPage', { $t('general.recordsPage', {
resultcurrentPage: branch?.length, resultcurrentPage: branch?.length,
total: totalBranch, total: totalBranch,
}) })

View file

@ -89,10 +89,10 @@ const { state: employeeFormState, currentFromDataEmployee } =
storeToRefs(employeeFormStore); storeToRefs(employeeFormStore);
async function init() { async function init() {
utilsStore.currentTitle.title = 'customerManagement'; utilsStore.currentTitle.title = 'menu.customer';
utilsStore.currentTitle.path = [ utilsStore.currentTitle.path = [
{ {
text: 'customerManagementCaption', text: 'menu.customerCaption',
i18n: true, i18n: true,
handler: () => router.push('/customer-management'), handler: () => router.push('/customer-management'),
}, },
@ -111,7 +111,7 @@ async function init() {
if (_data) { if (_data) {
currentCustomer.value = _data; currentCustomer.value = _data;
utilsStore.currentTitle.path.push({ utilsStore.currentTitle.path.push({
text: `${currentCustomer.value.firstName} ${currentCustomer.value.lastName}`, text: `${currentCustomer.value.firstName || '-'} ${currentCustomer.value.lastName || ''}`,
i18n: false, i18n: false,
}); });
} else { } else {
@ -141,7 +141,7 @@ const customerTypeSelected = ref<{
label: string; label: string;
value: 'all' | 'customerLegalEntity' | 'customerNaturalPerson'; value: 'all' | 'customerLegalEntity' | 'customerNaturalPerson';
}>({ }>({
label: t('all'), label: t('general.all'),
value: 'all', value: 'all',
}); });
@ -602,14 +602,14 @@ const emptyCreateDialog = ref(false);
@click="createCustomerForm('CORP')" @click="createCustomerForm('CORP')"
padding="xs" padding="xs"
icon="mdi-office-building-outline" icon="mdi-office-building-outline"
:label="$t('add') + ' ' + $t('customerLegalEntity')" :label="$t('general.add') + ' ' + $t('customer.employerLegalEntity')"
external-label external-label
label-position="left" label-position="left"
/> />
<q-fab-action <q-fab-action
v-if="currentTab === 'employer'" v-if="currentTab === 'employer'"
id="add-customer-natural-person" id="add-customer-natural-person"
:label="$t('add') + ' ' + $t('customerNaturalPerson')" :label="$t('general.add') + ' ' + $t('customer.employerNaturalPerson')"
external-label external-label
label-position="left" label-position="left"
@click="createCustomerForm('PERS')" @click="createCustomerForm('PERS')"
@ -619,7 +619,7 @@ const emptyCreateDialog = ref(false);
/> />
<q-fab-action <q-fab-action
v-if="currentTab === 'employee'" v-if="currentTab === 'employee'"
:label="$t('add') + ' ' + $t('EMPLOYEE')" :label="$t('general.add') + ' ' + $t('customer.employee')"
external-label external-label
id="add-employee" id="add-employee"
label-position="left" label-position="left"
@ -633,7 +633,7 @@ const emptyCreateDialog = ref(false);
<div class="column full-height no-wrap"> <div class="column full-height no-wrap">
<div v-if="$route.name === 'CustomerManagement'" class="column full-height"> <div v-if="$route.name === 'CustomerManagement'" class="column full-height">
<div class="text-body-2 text-weight-medium q-mb-xs flex items-center"> <div class="text-body-2 text-weight-medium q-mb-xs flex items-center">
{{ $t('dataSum') }} {{ $t('general.dataSum') }}
<q-badge <q-badge
v-if="listCustomer" v-if="listCustomer"
rounded rounded
@ -681,8 +681,8 @@ const emptyCreateDialog = ref(false);
: (statsCustomerType?.PERS ?? 0), : (statsCustomerType?.PERS ?? 0),
label: label:
v.name === 'CORP' v.name === 'CORP'
? 'customerLegalEntity' ? 'customer.employerLegalEntity'
: 'customerNaturalPerson', : 'customer.employerNaturalPerson',
icon: icon:
v.name === 'CORP' v.name === 'CORP'
? 'mdi-office-building-outline' ? 'mdi-office-building-outline'
@ -691,7 +691,7 @@ const emptyCreateDialog = ref(false);
})) }))
: [ : [
{ {
label: 'EMPLOYEE', label: 'customer.employee',
count: employeeStats, count: employeeStats,
icon: 'mdi-account-outline', icon: 'mdi-account-outline',
color: 'pink', color: 'pink',
@ -720,7 +720,7 @@ const emptyCreateDialog = ref(false);
for="input-search" for="input-search"
outlined outlined
dense dense
:label="$t('search')" :label="$t('general.search')"
class="col-12 col-md-3" class="col-12 col-md-3"
:bg-color="$q.dark.isActive ? 'dark' : 'white'" :bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearch" v-model="inputSearch"
@ -751,9 +751,9 @@ const emptyCreateDialog = ref(false);
emit-value emit-value
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
:options="[ :options="[
{ label: $t('all'), value: 'All' }, { label: $t('general.all'), value: 'All' },
{ label: $t('statusACTIVE'), value: 'ACTIVE' }, { label: $t('status.ACTIVE'), value: 'ACTIVE' },
{ label: $t('statusINACTIVE'), value: 'INACTIVE' }, { label: $t('status.INACTIVE'), value: 'INACTIVE' },
]" ]"
></q-select> ></q-select>
<q-select <q-select
@ -767,7 +767,7 @@ const emptyCreateDialog = ref(false);
? fieldDisplayCustomer ? fieldDisplayCustomer
: fieldDisplayEmployee : fieldDisplayEmployee
" "
:display-value="$t('displayField')" :display-value="$t('general.displayField')"
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
v-model="fieldSelected" v-model="fieldSelected"
:option-label="(l) => $t(l.label)" :option-label="(l) => $t(l.label)"
@ -855,7 +855,7 @@ const emptyCreateDialog = ref(false);
currentTab === 'employer' ? 'text-bold' : 'app-text-muted' currentTab === 'employer' ? 'text-bold' : 'app-text-muted'
" "
> >
{{ $t('EMPLOYER') }} {{ $t('customer.employer') }}
</div> </div>
</q-tab> </q-tab>
<q-tab <q-tab
@ -876,7 +876,7 @@ const emptyCreateDialog = ref(false);
currentTab === 'employee' ? 'text-bold' : 'app-text-muted' currentTab === 'employee' ? 'text-bold' : 'app-text-muted'
" "
> >
{{ $t('EMPLOYEE') }} {{ $t('customer.employee') }}
</div> </div>
</q-tab> </q-tab>
</q-tabs> </q-tabs>
@ -910,7 +910,16 @@ const emptyCreateDialog = ref(false);
@click="customerTypeSelected = { label: v, value: v }" @click="customerTypeSelected = { label: v, value: v }"
> >
<span class="q-px-md ellipsis"> <span class="q-px-md ellipsis">
{{ $t(v) }} {{
$t(
{
all: 'general.all',
customerLegalEntity: 'customer.employerLegalEntity',
customerNaturalPerson:
'customer.employerNaturalPerson',
}[v],
)
}}
</span> </span>
</q-item> </q-item>
</template> </template>
@ -924,7 +933,7 @@ const emptyCreateDialog = ref(false);
clickable clickable
> >
<span class="q-px-md ellipsis"> <span class="q-px-md ellipsis">
{{ $t('totalEmployee') }} {{ $t('general.all') }}
</span> </span>
</q-item> </q-item>
</template> </template>
@ -1192,7 +1201,7 @@ const emptyCreateDialog = ref(false);
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -1218,7 +1227,7 @@ const emptyCreateDialog = ref(false);
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -1245,7 +1254,7 @@ const emptyCreateDialog = ref(false);
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
@ -1272,8 +1281,8 @@ const emptyCreateDialog = ref(false);
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
props.row.status !== 'INACTIVE' props.row.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -1321,12 +1330,12 @@ const emptyCreateDialog = ref(false);
separateEnter separateEnter
history history
:prefix-id=" :prefix-id="
props.row.customerNameEN ?? props.rowIndex props.row.customerNameEN ?? String(props.rowIndex)
" "
:data="{ :data="{
code: props.row.code, code: props.row.code,
name: name:
$i18n.locale === 'en-US' $i18n.locale === 'eng'
? `${props.row.firstName} ${props.row.lastName} `.trim() ? `${props.row.firstName} ${props.row.lastName} `.trim()
: `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim(), : `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim(),
img: img:
@ -1356,8 +1365,8 @@ const emptyCreateDialog = ref(false);
}[props.row.customerType as string] || 'CORP', }[props.row.customerType as string] || 'CORP',
value: $t( value: $t(
props.row.customerType === 'CORP' props.row.customerType === 'CORP'
? 'customerLegalEntity' ? 'customer.employerLegalEntity'
: 'customerNaturalPerson', : 'customer.employerNaturalPerson',
), ),
}, },
]" ]"
@ -1402,7 +1411,7 @@ const emptyCreateDialog = ref(false);
style="width: 80px" style="width: 80px"
v-if="$q.screen.gt.sm" v-if="$q.screen.gt.sm"
> >
{{ $t('showing') }} {{ $t('general.recordPerPage') }}
</div> </div>
<div> <div>
<q-btn-dropdown <q-btn-dropdown
@ -1436,7 +1445,7 @@ const emptyCreateDialog = ref(false);
<div class="col-4 flex justify-center app-text-muted"> <div class="col-4 flex justify-center app-text-muted">
{{ {{
$t('recordsPage', { $t('general.recordsPage', {
resultcurrentPage: listCustomer.length, resultcurrentPage: listCustomer.length,
total: statsCustomerType.PERS + statsCustomerType.CORP, total: statsCustomerType.PERS + statsCustomerType.CORP,
}) })
@ -1512,7 +1521,7 @@ const emptyCreateDialog = ref(false);
style="width: 80px" style="width: 80px"
v-if="$q.screen.gt.sm" v-if="$q.screen.gt.sm"
> >
{{ $t('showing') }} {{ $t('general.recordPerPage') }}
</div> </div>
<div> <div>
<q-btn-dropdown <q-btn-dropdown
@ -1546,7 +1555,7 @@ const emptyCreateDialog = ref(false);
<div class="col-4 flex justify-center app-text-muted"> <div class="col-4 flex justify-center app-text-muted">
{{ {{
$t('recordsPage', { $t('general.recordsPage', {
resultcurrentPage: listEmployee.length, resultcurrentPage: listEmployee.length,
total: employeeStats, total: employeeStats,
}) })
@ -1577,16 +1586,8 @@ const emptyCreateDialog = ref(false);
> >
<TooltipComponent <TooltipComponent
class="self-end q-ma-md" class="self-end q-ma-md"
:title=" :title="'general.noData'"
currentTab === 'employer' :caption="'general.clickToCreate'"
? 'customerEmployerTooltipTitle'
: 'customerEmployeeTooltipTitle'
"
:caption="
currentTab === 'employer'
? 'customerEmployerTooltipCaption'
: 'customerEmployeeTooltipCaption'
"
imgSrc="personnel-table-" imgSrc="personnel-table-"
/> />
@ -1595,11 +1596,10 @@ const emptyCreateDialog = ref(false);
style="flex-grow: 1" style="flex-grow: 1"
> >
<EmptyAddButton <EmptyAddButton
:label=" :label="'general.add'"
currentTab === 'employer' :i18n-args="{
? 'customerEmployerAdd' text: $t(`customer.${currentTab}`),
: 'customerEmployeeAdd' }"
"
@trigger=" @trigger="
() => { () => {
if (currentTab === 'employer') { if (currentTab === 'employer') {
@ -1638,7 +1638,7 @@ const emptyCreateDialog = ref(false);
<DialogForm <DialogForm
v-model:modal="emptyCreateDialog" v-model:modal="emptyCreateDialog"
:title="$t('customerCardUserType')" :title="$t('customer.employerType')"
hide-footer hide-footer
no-app-box no-app-box
width="60vw" width="60vw"
@ -1725,7 +1725,7 @@ const emptyCreateDialog = ref(false);
<SideMenu <SideMenu
:menu="[ :menu="[
{ {
name: $t('customer.form.group.basicInfo'), name: $t('form.field.basicInformation'),
anchor: 'form-basic-info-customer', anchor: 'form-basic-info-customer',
}, },
{ {
@ -1995,10 +1995,19 @@ const emptyCreateDialog = ref(false);
:img="employeeFormState.profileUrl || `/images/employee-avatar.png`" :img="employeeFormState.profileUrl || `/images/employee-avatar.png`"
:tabs-list=" :tabs-list="
[ [
{ name: 'personalInfo', label: 'personalInfo' }, {
{ name: 'healthCheck', label: 'healthCheck' }, name: 'personalInfo',
{ name: 'workHistory', label: 'workHistory' }, label: 'customerEmployee.form.group.personalInfo',
{ name: 'other', label: 'other' }, },
{
name: 'healthCheck',
label: 'customerEmployee.form.group.healthCheck',
},
{
name: 'workHistory',
label: 'customerEmployee.form.group.workHistory',
},
{ name: 'other', label: 'customerEmployee.form.group.other' },
].filter((v) => { ].filter((v) => {
if (!employeeFormState.statusSavePersonal) { if (!employeeFormState.statusSavePersonal) {
return v.name === 'personalInfo'; return v.name === 'personalInfo';
@ -2008,7 +2017,7 @@ const emptyCreateDialog = ref(false);
}) })
" "
:menu="formMenuIconEmployee" :menu="formMenuIconEmployee"
:toggleTitle="$t('formDialogTitleUserStatus')" :toggleTitle="$t('status.title')"
:hideFade=" :hideFade="
employeeFormState.profileUrl === '' || employeeFormState.profileUrl === '' ||
employeeFormState.profileUrl === undefined employeeFormState.profileUrl === undefined
@ -2042,44 +2051,44 @@ const emptyCreateDialog = ref(false);
:menu=" :menu="
[ [
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'form-information', anchor: 'form-information',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitlePersonal'), name: $t('customerEmployee.form.group.personalInfo'),
anchor: 'form-personal', anchor: 'form-personal',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitlePersonnelAddress'), name: $t('general.address'),
anchor: 'form-personal-address', anchor: 'form-personal-address',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitlePassport'), name: $t('customerEmployee.form.group.passport'),
anchor: 'form-passport', anchor: 'form-passport',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitleVisa'), name: $t('customerEmployee.form.group.visa'),
anchor: 'form-visa', anchor: 'form-visa',
tab: 'personalInfo', tab: 'personalInfo',
}, },
...(currentFromDataEmployee.employeeCheckup?.map((v, i) => ({ ...(currentFromDataEmployee.employeeCheckup?.map((v, i) => ({
name: $t('customer.form.instance', { index: i + 1 }), name: $t('general.times', { number: i + 1 }),
anchor: `form-employee-checkup-${i}`, anchor: `form-employee-checkup-${i}`,
tab: 'healthCheck', tab: 'healthCheck',
})) || []), })) || []),
...(currentFromDataEmployee.employeeWork?.map((v, i) => ({ ...(currentFromDataEmployee.employeeWork?.map((v, i) => ({
name: $t('customer.form.instance', { index: i + 1 }), name: $t('general.times', { number: i + 1 }),
anchor: `form-employee-work-history-${i}`, anchor: `form-employee-work-history-${i}`,
tab: 'workHistory', tab: 'workHistory',
})) || []), })) || []),
{ {
name: $t('formDialogTitleFamilyHistory'), name: $t('customerEmployee.form.group.family'),
anchor: 'form-employee-other', anchor: 'form-employee-other',
tab: 'other', tab: 'other',
}, },
@ -2159,7 +2168,7 @@ const emptyCreateDialog = ref(false);
dense dense
outlined outlined
separator separator
:title="$t('formDialogTitleInformation')" title="form.field.basicInformation"
:readonly="!employeeFormState.isEmployeeEdit" :readonly="!employeeFormState.isEmployeeEdit"
:employee-owner-option="employeeStore.ownerOption" :employee-owner-option="employeeStore.ownerOption"
v-model:customer-branch="employeeFormState.formDataEmployeeOwner" v-model:customer-branch="employeeFormState.formDataEmployeeOwner"
@ -2176,7 +2185,7 @@ const emptyCreateDialog = ref(false);
outlined outlined
employee employee
separator separator
:title="$t('personalInfo')" title="customerEmployee.form.group.personalInfo"
v-model:open="employeeFormState.dialogModal" v-model:open="employeeFormState.dialogModal"
v-model:firstName="currentFromDataEmployee.firstName" v-model:firstName="currentFromDataEmployee.firstName"
v-model:lastName="currentFromDataEmployee.lastName" v-model:lastName="currentFromDataEmployee.lastName"
@ -2210,7 +2219,7 @@ const emptyCreateDialog = ref(false);
dense dense
outlined outlined
separator separator
:title="$t('formDialogTitlePassport')" :title="$t('customerEmployee.form.group.passport')"
v-model:passport-type="currentFromDataEmployee.passportType" v-model:passport-type="currentFromDataEmployee.passportType"
v-model:passport-number="currentFromDataEmployee.passportNumber" v-model:passport-number="currentFromDataEmployee.passportNumber"
v-model:passport-issue-date=" v-model:passport-issue-date="
@ -2236,7 +2245,7 @@ const emptyCreateDialog = ref(false);
id="form-visa" id="form-visa"
dense dense
outlined outlined
:title="$t(`formDialogTitleVisa`)" title="customerEmployee.form.group.visa"
v-model:visa-type="currentFromDataEmployee.visaType" v-model:visa-type="currentFromDataEmployee.visaType"
v-model:visa-number="currentFromDataEmployee.visaNumber" v-model:visa-number="currentFromDataEmployee.visaNumber"
v-model:visa-issue-date="currentFromDataEmployee.visaIssueDate" v-model:visa-issue-date="currentFromDataEmployee.visaIssueDate"
@ -2520,7 +2529,7 @@ const emptyCreateDialog = ref(false);
<SideMenu <SideMenu
:menu="[ :menu="[
{ {
name: $t('customer.form.group.basicInfo'), name: $t('form.field.basicInformation'),
anchor: 'form-basic-info-customer', anchor: 'form-basic-info-customer',
}, },
{ {
@ -2727,7 +2736,7 @@ const emptyCreateDialog = ref(false);
v-model:drawer-open="employeeFormState.drawerModal" v-model:drawer-open="employeeFormState.drawerModal"
:title=" :title="
employeeFormState.currentEmployee employeeFormState.currentEmployee
? $i18n.locale === 'en-US' ? $i18n.locale === 'eng'
? `${employeeFormState.currentEmployee.firstNameEN} ${employeeFormState.currentEmployee.lastNameEN}` ? `${employeeFormState.currentEmployee.firstNameEN} ${employeeFormState.currentEmployee.lastNameEN}`
: `${employeeFormState.currentEmployee.firstName} ${employeeFormState.currentEmployee.lastName}` : `${employeeFormState.currentEmployee.firstName} ${employeeFormState.currentEmployee.lastName}`
: '-' : '-'
@ -2802,7 +2811,7 @@ const emptyCreateDialog = ref(false);
fallback-cover="/images/employee-banner.png" fallback-cover="/images/employee-banner.png"
:title=" :title="
employeeFormState.currentEmployee employeeFormState.currentEmployee
? $i18n.locale === 'en-US' ? $i18n.locale === 'eng'
? `${employeeFormState.currentEmployee.firstNameEN} ${employeeFormState.currentEmployee.lastNameEN}` ? `${employeeFormState.currentEmployee.firstNameEN} ${employeeFormState.currentEmployee.lastNameEN}`
: `${employeeFormState.currentEmployee.firstName} ${employeeFormState.currentEmployee.lastName}` : `${employeeFormState.currentEmployee.firstName} ${employeeFormState.currentEmployee.lastName}`
: '-' : '-'
@ -2810,13 +2819,22 @@ const emptyCreateDialog = ref(false);
:caption="currentFromDataEmployee.code" :caption="currentFromDataEmployee.code"
:img="employeeFormState.profileUrl || '/images/employee-avatar.png'" :img="employeeFormState.profileUrl || '/images/employee-avatar.png'"
:tabs-list="[ :tabs-list="[
{ name: 'personalInfo', label: 'personalInfo' }, {
{ name: 'healthCheck', label: 'healthCheck' }, name: 'personalInfo',
{ name: 'workHistory', label: 'workHistory' }, label: 'customerEmployee.form.group.personalInfo',
{ name: 'other', label: 'other' }, },
{
name: 'healthCheck',
label: 'customerEmployee.form.group.healthCheck',
},
{
name: 'workHistory',
label: 'customerEmployee.form.group.workHistory',
},
{ name: 'other', label: 'customerEmployee.form.group.other' },
]" ]"
:menu="formMenuIconEmployee" :menu="formMenuIconEmployee"
:toggle-title="$t('formDialogTitleUserStatus')" :toggle-title="$t('status.title')"
:hide-fade=" :hide-fade="
employeeFormState.profileUrl === '' || employeeFormState.profileUrl === '' ||
employeeFormState.profileUrl === undefined employeeFormState.profileUrl === undefined
@ -2835,44 +2853,44 @@ const emptyCreateDialog = ref(false);
:menu=" :menu="
[ [
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'drawer-form-information', anchor: 'drawer-form-information',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitlePersonal'), name: $t('customerEmployee.form.group.personalInfo'),
anchor: 'drawer-form-personal', anchor: 'drawer-form-personal',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitlePersonnelAddress'), name: $t('form.address'),
anchor: 'drawer-form-personal-address', anchor: 'drawer-form-personal-address',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitlePassport'), name: $t('customerEmployee.form.group.passport'),
anchor: 'drawer-form-passport', anchor: 'drawer-form-passport',
tab: 'personalInfo', tab: 'personalInfo',
}, },
{ {
name: $t('formDialogTitleVisa'), name: $t('customerEmployee.form.group.visa'),
anchor: 'drawer-form-visa', anchor: 'drawer-form-visa',
tab: 'personalInfo', tab: 'personalInfo',
}, },
...(currentFromDataEmployee.employeeCheckup?.map( ...(currentFromDataEmployee.employeeCheckup?.map(
(v, i) => ({ (v, i) => ({
name: $t('customer.form.instance', { index: i + 1 }), name: $t('general.times', { number: i + 1 }),
anchor: `drawer-employee-checkup-${i}`, anchor: `drawer-employee-checkup-${i}`,
tab: 'healthCheck', tab: 'healthCheck',
}), }),
) || []), ) || []),
...(currentFromDataEmployee.employeeWork?.map((v, i) => ({ ...(currentFromDataEmployee.employeeWork?.map((v, i) => ({
name: $t('customer.form.instance', { index: i + 1 }), name: $t('general.times', { number: i + 1 }),
anchor: `drawer-employee-work-history-${i}`, anchor: `drawer-employee-work-history-${i}`,
tab: 'workHistory', tab: 'workHistory',
})) || []), })) || []),
{ {
name: $t('formDialogTitleFamilyHistory'), name: $t('customerEmployee.form.group.family'),
anchor: 'drawer-other', anchor: 'drawer-other',
tab: 'other', tab: 'other',
}, },
@ -2944,7 +2962,7 @@ const emptyCreateDialog = ref(false);
prefix-id="drawer-info-employee" prefix-id="drawer-info-employee"
dense dense
outlined outlined
:title="'formDialogTitleInformation'" title="form.field.basicInformation"
:readonly="!employeeFormState.isEmployeeEdit" :readonly="!employeeFormState.isEmployeeEdit"
:employee-owner-option="employeeStore.ownerOption" :employee-owner-option="employeeStore.ownerOption"
v-model:customer-branch=" v-model:customer-branch="
@ -2965,7 +2983,7 @@ const emptyCreateDialog = ref(false);
outlined outlined
employee employee
separator separator
:title="'personalInfo'" title="customerEmployee.form.group.personalInfo"
:readonly="!employeeFormState.isEmployeeEdit" :readonly="!employeeFormState.isEmployeeEdit"
v-model:firstName="currentFromDataEmployee.firstName" v-model:firstName="currentFromDataEmployee.firstName"
v-model:lastName="currentFromDataEmployee.lastName" v-model:lastName="currentFromDataEmployee.lastName"
@ -2996,7 +3014,7 @@ const emptyCreateDialog = ref(false);
dense dense
outlined outlined
separator separator
:title="'formDialogTitlePassport'" :title="'customerEmployee.form.group.passport'"
:readonly="!employeeFormState.isEmployeeEdit" :readonly="!employeeFormState.isEmployeeEdit"
v-model:passport-type="currentFromDataEmployee.passportType" v-model:passport-type="currentFromDataEmployee.passportType"
v-model:passport-number="currentFromDataEmployee.passportNumber" v-model:passport-number="currentFromDataEmployee.passportNumber"
@ -3022,7 +3040,7 @@ const emptyCreateDialog = ref(false);
id="drawer-form-visa" id="drawer-form-visa"
dense dense
outlined outlined
:title="`formDialogTitleVisa`" title="customerEmployee.form.group.visa"
:readonly="!employeeFormState.isEmployeeEdit" :readonly="!employeeFormState.isEmployeeEdit"
v-model:visa-type="currentFromDataEmployee.visaType" v-model:visa-type="currentFromDataEmployee.visaType"
v-model:visa-number="currentFromDataEmployee.visaNumber" v-model:visa-number="currentFromDataEmployee.visaNumber"

View file

@ -145,7 +145,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
name="mdi-office-building-outline" name="mdi-office-building-outline"
style="background-color: var(--surface-3)" style="background-color: var(--surface-3)"
/> />
<span>{{ $t('customer.form.group.basicInfo') }}</span> <span>{{ $t('form.field.basicInformation') }}</span>
<EditButton <EditButton
icon-only icon-only
v-if="readonly && !create" v-if="readonly && !create"
@ -199,7 +199,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:readonly="readonly" :readonly="readonly"
:options="filteredBranchOptions" :options="filteredBranchOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:label="$t('registeredBranch')" :label="$t('customer.form.registeredBranch')"
:for="`${prefixId}-input-source-nationality`" :for="`${prefixId}-input-source-nationality`"
:rules="[ :rules="[
(val) => { (val) => {
@ -218,7 +218,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -244,7 +244,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:readonly="readonly" :readonly="readonly"
:options="prefixNameOptions" :options="prefixNameOptions"
:for="`${prefixId}-select-prefix-name`" :for="`${prefixId}-select-prefix-name`"
:label="$t('formDialogInputPrefixName')" :label="$t('form.prefixName')"
@filter="prefixNameFilter" @filter="prefixNameFilter"
:model-value="readonly ? namePrefix || '-' : namePrefix" :model-value="readonly ? namePrefix || '-' : namePrefix"
@update:model-value=" @update:model-value="
@ -263,7 +263,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -364,7 +364,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:options="genderOptions" :options="genderOptions"
:hide-dropdown-icon="readonly" :hide-dropdown-icon="readonly"
:for="`${prefixId}-select-gender`" :for="`${prefixId}-select-gender`"
:label="$t('formDialogInputGender')" :label="$t('form.gender')"
@filter="genderFilter" @filter="genderFilter"
:model-value="readonly ? gender || '-' : gender" :model-value="readonly ? gender || '-' : gender"
@update:model-value="(v) => (typeof v === 'string' ? (gender = v) : '')" @update:model-value="(v) => (typeof v === 'string' ? (gender = v) : '')"
@ -379,7 +379,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -394,16 +394,16 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:disabled-dates="disabledAfterToday" :disabled-dates="disabledAfterToday"
:teleport="true" :teleport="true"
:dark="$q.dark.isActive" :dark="$q.dark.isActive"
:locale="$i18n.locale === 'th-th' ? 'th' : 'en'" :locale="$i18n.locale === 'tha' ? 'th' : 'en'"
:enableTimePicker="false" :enableTimePicker="false"
:disabled="readonly" :disabled="readonly"
class="col-12 col-md-3" class="col-12 col-md-3"
> >
<template #year="{ value }"> <template #year="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'tha' ? value + 543 : value }}
</template> </template>
<template #year-overlay-value="{ value }"> <template #year-overlay-value="{ value }">
{{ $i18n.locale === 'th-th' ? value + 543 : value }} {{ $i18n.locale === 'tha' ? value + 543 : value }}
</template> </template>
<template #trigger> <template #trigger>
<q-input <q-input
@ -411,13 +411,13 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:for="`${prefixId}-input-birth-date`" :for="`${prefixId}-input-birth-date`"
hide-bottom-space hide-bottom-space
placeholder="DD/MM/YYYY" placeholder="DD/MM/YYYY"
:label="$t('formDialogInputBirthDate')" :label="$t('form.birthDate')"
dense dense
outlined outlined
:readonly="readonly" :readonly="readonly"
:rules="[ :rules="[
(val: string) => (val: string) =>
!!val || $t('selectValidate') + $t('formDialogInputBirthDate'), !!val || $t('selectValidate') + $t('form.birthDate'),
]" ]"
:mask="readonly ? '' : '##/##/####'" :mask="readonly ? '' : '##/##/####'"
:model-value=" :model-value="
@ -454,7 +454,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
dense dense
outlined outlined
:readonly="readonly" :readonly="readonly"
:label="$t('formDialogInputAge')" :label="$t('general.age')"
class="col-12 col-md-2" class="col-12 col-md-2"
:model-value=" :model-value="
birthDate?.toString() === 'Invalid Date' || birthDate?.toString() === 'Invalid Date' ||

View file

@ -39,11 +39,11 @@ onMounted(async () => {
const resultOption = await fetch('/option/option.json'); const resultOption = await fetch('/option/option.json');
rawOption.value = await resultOption.json(); rawOption.value = await resultOption.json();
if (locale.value === 'en-US') { if (locale.value === 'eng') {
typeBusinessOption.value = rawOption.value.eng.businessType; typeBusinessOption.value = rawOption.value.eng.businessType;
jobPositionOption.value = rawOption.value.eng.position; jobPositionOption.value = rawOption.value.eng.position;
} }
if (locale.value === 'th-th') { if (locale.value === 'tha') {
typeBusinessOption.value = rawOption.value.tha.businessType; typeBusinessOption.value = rawOption.value.tha.businessType;
jobPositionOption.value = rawOption.value.tha.position; jobPositionOption.value = rawOption.value.tha.position;
} }
@ -118,7 +118,7 @@ let jobPositionFilter = selectFilterOptionRefMod(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
@ -162,7 +162,7 @@ let jobPositionFilter = selectFilterOptionRefMod(
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
{{ $t('noResults') }} {{ $t('general.noData') }}
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>

View file

@ -17,56 +17,56 @@ export const columnsEmployee = [
{ {
name: 'orderNumber', name: 'orderNumber',
align: 'center', align: 'center',
label: 'orderNumber', label: 'general.orderNumber',
field: 'branchNo', field: 'branchNo',
}, },
{ {
name: 'firstName', name: 'firstName',
align: 'left', align: 'left',
label: 'nameEmployee', label: 'general.name',
field: 'firstName', field: 'firstName',
}, },
{ {
name: 'formDialogInputAge', name: 'general.age',
align: 'left', align: 'left',
label: 'formDialogInputAge', label: 'general.age',
field: 'dateOfBirth', field: 'dateOfBirth',
}, },
{ {
name: 'formDialogInputNationality', name: 'formDialogInputNationality',
align: 'left', align: 'left',
label: 'formDialogInputNationality', label: 'general.nationality',
field: 'nationality', field: 'nationality',
}, },
{ {
name: 'formDialogInputPassportNo', name: 'formDialogInputPassportNo',
align: 'left', align: 'left',
label: 'formDialogInputPassportNo', label: 'customerEmployee.form.passportNo',
field: 'passportNumber', field: 'passportNumber',
}, },
{ {
name: 'passportExpiryDate', name: 'passportExpiryDate',
align: 'left', align: 'left',
label: 'passportExpire', label: 'customerEmployee.form.passportExpireDate',
field: 'passportExpiryDate', field: 'passportExpiryDate',
}, },
{ {
name: 'formDialogEmployeeNRCNo', name: 'formDialogEmployeeNRCNo',
align: 'left', align: 'left',
label: 'formDialogEmployeeNRCNo', label: 'customerEmployee.form.nrcNo',
field: 'nrcNo', field: 'nrcNo',
}, },
{ {
name: 'branchLabel', name: 'branchLabel',
align: 'left', align: 'left',
label: 'branchLabel', label: 'customerEmployee.branch',
field: 'customerBranch', field: 'customerBranch',
}, },

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, reactive, handleError } from 'vue'; import { ref, watch, reactive } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { getUserId, getRole } from 'src/services/keycloak'; import { getUserId, getRole } from 'src/services/keycloak';
@ -114,14 +114,14 @@ const stat = ref<
{ {
icon: 'mdi-folder-outline', icon: 'mdi-folder-outline',
count: 0, count: 0,
label: 'productAndService', label: 'productService.group.title',
mode: 'group', mode: 'group',
color: 'pink', color: 'pink',
}, },
{ {
icon: 'mdi-folder-table-outline', icon: 'mdi-folder-table-outline',
count: 0, count: 0,
label: 'productAndServiceType', label: 'productService.type.title',
mode: 'type', mode: 'type',
color: 'purple', color: 'purple',
}, },
@ -135,7 +135,7 @@ const stat = ref<
{ {
icon: 'mdi-shopping-outline', icon: 'mdi-shopping-outline',
count: 0, count: 0,
label: 'product', label: 'productService.product.title',
mode: 'product', mode: 'product',
color: 'green', color: 'green',
}, },
@ -284,31 +284,31 @@ const tbColumn = {
{ {
name: 'branchLabelNo', name: 'branchLabelNo',
align: 'center', align: 'center',
label: 'orderNumber', label: 'general.order',
field: 'branchNo', field: 'branchNo',
}, },
{ {
name: 'name', name: 'name',
align: 'left', align: 'left',
label: 'name', label: 'general.name',
field: 'name', field: 'name',
}, },
{ {
name: 'detail', name: 'detail',
align: 'left', align: 'left',
label: 'detail', label: 'general.detail',
field: 'detail', field: 'detail',
}, },
{ {
name: 'formDialogInputRemark', name: 'formDialogInputRemark',
align: 'left', align: 'left',
label: 'formDialogInputRemark', label: 'general.remark',
field: 'remark', field: 'remark',
}, },
{ {
name: 'createdAt', name: 'createdAt',
align: 'left', align: 'left',
label: 'createdAt', label: 'general.createdAt',
field: 'createdAt', field: 'createdAt',
}, },
], ],
@ -317,26 +317,31 @@ const tbColumn = {
{ {
name: 'branchLabelNo', name: 'branchLabelNo',
align: 'center', align: 'center',
label: 'orderNumber', label: 'general.order',
field: 'branchNo', field: 'branchNo',
}, },
{ name: 'productName', align: 'left', label: 'productName', field: 'name' }, {
name: 'productName',
align: 'left',
label: 'general.name',
field: 'name',
},
{ {
name: 'productDetail', name: 'productDetail',
align: 'left', align: 'left',
label: 'productDetail', label: 'general.detail',
field: 'detail', field: 'detail',
}, },
{ {
name: 'productProcessingTime', name: 'productProcessingTime',
align: 'left', align: 'left',
label: 'productProcessingTime', label: 'productService.product.processingTimeDay',
field: 'process', field: 'process',
}, },
{ {
name: 'priceInformation', name: 'priceInformation',
align: 'center', align: 'center',
label: 'priceInformation', label: 'productService.product.priceInformation',
field: 'name', field: 'name',
}, },
], ],
@ -344,26 +349,31 @@ const tbColumn = {
{ {
name: 'branchLabelNo', name: 'branchLabelNo',
align: 'center', align: 'center',
label: 'orderNumber', label: 'general.order',
field: 'branchNo', field: 'branchNo',
}, },
{ name: 'serviceName', align: 'left', label: 'serviceName', field: 'name' }, {
name: 'serviceName',
align: 'left',
label: 'general.name',
field: 'name',
},
{ {
name: 'serviceDetail', name: 'serviceDetail',
align: 'left', align: 'left',
label: 'serviceDetail', label: 'general.detail',
field: 'detail', field: 'detail',
}, },
{ {
name: 'serviceWorkTotal', name: 'serviceWorkTotal',
align: 'left', align: 'left',
label: 'serviceWorkTotal', label: 'productService.service.totalWork',
field: (v) => v.work.length, field: (v) => v.work.length,
}, },
{ {
name: 'createdAt', name: 'createdAt',
align: 'left', align: 'left',
label: 'createdAt', label: 'general.createdAt',
field: 'createdAt', field: 'createdAt',
}, },
], ],
@ -376,11 +386,11 @@ const tbColumn = {
const tbControl = reactive({ const tbControl = reactive({
groupAndType: { groupAndType: {
fieldDisplay: [ fieldDisplay: [
{ value: 'branchLabelNo', label: 'orderNumber' }, { value: 'branchLabelNo', label: 'general.order' },
{ value: 'name', label: 'name' }, { value: 'name', label: 'general.name' },
{ value: 'detail', label: 'detail' }, { value: 'detail', label: 'general.detail' },
{ value: 'formDialogInputRemark', label: 'formDialogInputRemark' }, { value: 'formDialogInputRemark', label: 'general.remark' },
{ value: 'createdAt', label: 'createdAt' }, { value: 'createdAt', label: 'general.createdAt' },
], ],
fieldSelected: [ fieldSelected: [
'branchLabelNo', 'branchLabelNo',
@ -392,11 +402,17 @@ const tbControl = reactive({
}, },
product: { product: {
fieldDisplay: [ fieldDisplay: [
{ value: 'branchLabelNo', label: 'orderNumber' }, { value: 'branchLabelNo', label: 'general.order' },
{ value: 'productName', label: 'productName' }, { value: 'productName', label: 'general.name' },
{ value: 'productDetail', label: 'productDetail' }, { value: 'productDetail', label: 'general.detail' },
{ value: 'productProcessingTime', label: 'productProcessingTime' }, {
{ value: 'priceInformation', label: 'priceInformation' }, value: 'productProcessingTime',
label: 'productService.product.processingTimeDay',
},
{
value: 'priceInformation',
label: 'productService.product.priceInformation',
},
], ],
fieldSelected: [ fieldSelected: [
'branchLabelNo', 'branchLabelNo',
@ -408,11 +424,11 @@ const tbControl = reactive({
}, },
service: { service: {
fieldDisplay: [ fieldDisplay: [
{ value: 'branchLabelNo', label: 'orderNumber' }, { value: 'branchLabelNo', label: 'general.order' },
{ value: 'serviceName', label: 'serviceName' }, { value: 'serviceName', label: 'general.name' },
{ value: 'serviceDetail', label: 'serviceDetail' }, { value: 'serviceDetail', label: 'general.detail' },
{ value: 'serviceWorkTotal', label: 'serviceWorkTotal' }, { value: 'serviceWorkTotal', label: 'productService.service.totalWork' },
{ value: 'createdAt', label: 'createdAt' }, { value: 'createdAt', label: 'general.createdAt' },
], ],
fieldSelected: [ fieldSelected: [
'branchLabelNo', 'branchLabelNo',
@ -726,13 +742,13 @@ async function triggerChangeStatus(
color: status !== 'INACTIVE' ? 'warning' : 'info', color: status !== 'INACTIVE' ? 'warning' : 'info',
icon: icon:
status !== 'INACTIVE' ? 'mdi-alert' : 'mdi-message-processing-outline', status !== 'INACTIVE' ? 'mdi-alert' : 'mdi-message-processing-outline',
title: t('confirmChangeStatusTitle'), title: t('dialog.title.confirmChangeStatus'),
actionText: actionText:
status !== 'INACTIVE' ? t('switchOffLabel') : t('switchOnLabel'), status !== 'INACTIVE' ? t('general.close') : t('general.open'),
message: message:
status !== 'INACTIVE' status !== 'INACTIVE'
? t('confirmChangeStatusOffMessage') ? t('dialog.message.confirmChangeStatusOff')
: t('confirmChangeStatusOnMessage'), : t('dialog.message.confirmChangeStatusOn'),
action: async () => { action: async () => {
if (type === 'group' || productMode.value === 'group') { if (type === 'group' || productMode.value === 'group') {
const res = await toggleStatusGroup(id, status as Status) const res = await toggleStatusGroup(id, status as Status)
@ -763,10 +779,10 @@ async function deleteServiceConfirm(serviceId?: string) {
dialog({ dialog({
color: 'negative', color: 'negative',
icon: 'mdi-alert', icon: 'mdi-alert',
title: t('deleteConfirmTitle'), title: t('dialog.title.confirmDelete'),
actionText: t('ok'), actionText: t('general.delete'),
persistent: true, persistent: true,
message: t('deleteConfirmMessage'), message: t('dialog.message.confirmDelete'),
action: async () => { action: async () => {
const res = await deleteService(serviceId ?? currentIdService.value); const res = await deleteService(serviceId ?? currentIdService.value);
@ -790,10 +806,10 @@ async function deleteProductConfirm(id?: string) {
dialog({ dialog({
color: 'negative', color: 'negative',
icon: 'mdi-alert', icon: 'mdi-alert',
title: t('deleteConfirmTitle'), title: t('dialog.title.confirmDelete'),
actionText: t('ok'), actionText: t('general.delete'),
persistent: true, persistent: true,
message: t('deleteConfirmMessage'), message: t('dialog.message.confirmDelete'),
action: async () => { action: async () => {
const res = await deleteProduct(id ?? currentIdProduct.value); const res = await deleteProduct(id ?? currentIdProduct.value);
@ -823,10 +839,10 @@ async function deleteProductById(productId?: string) {
dialog({ dialog({
color: 'negative', color: 'negative',
icon: 'mdi-alert', icon: 'mdi-alert',
title: t('deleteConfirmTitle'), title: t('dialog.title.confirmDelete'),
actionText: t('ok'), actionText: t('general.delete'),
persistent: true, persistent: true,
message: t('deleteConfirmMessage'), message: t('dialog.message.confirmDelete'),
action: async () => { action: async () => {
if (editByTree.value !== undefined) { if (editByTree.value !== undefined) {
if (editByTree.value === 'type') { if (editByTree.value === 'type') {
@ -1180,9 +1196,9 @@ function confirmDeleteWork(id: string) {
dialog({ dialog({
color: 'negative', color: 'negative',
icon: 'mdi-alert', icon: 'mdi-alert',
title: t('deleteConfirmTitle'), title: t('dialog.title.confirmDelete'),
actionText: t('delete'), actionText: t('general.delete'),
message: t('deleteConfirmMessage'), message: t('dialog.message.confirmDelete'),
action: async () => { action: async () => {
deleteWork(id); deleteWork(id);
flowStore.rotate(); flowStore.rotate();
@ -1329,19 +1345,20 @@ function handleStatus() {
return tempValue; return tempValue;
} }
// function handleHold(node: ProductGroup & { type: string}) { function handleHold(node: ProductGroup & { type: string }) {
// if ($q.screen.gt.xs) return; if ($q.screen.gt.xs) return;
// return function (props: unknown) { console.log('asd');
// holdDialog.value = true; holdDialog.value = true;
// currentNode.value = node; currentNode.value = node;
// }; // return function (props: unknown) {
// } // };
}
onMounted(async () => { onMounted(async () => {
utilsStore.currentTitle.title = 'mainProductTitle'; utilsStore.currentTitle.title = 'productService.title';
utilsStore.currentTitle.path = [ utilsStore.currentTitle.path = [
{ {
text: 'manage', text: 'productService.caption',
i18n: true, i18n: true,
handler: () => { handler: () => {
expandedTree.value = []; expandedTree.value = [];
@ -1366,7 +1383,7 @@ watch(
let tmp: typeof utilsStore.currentTitle.path = [ let tmp: typeof utilsStore.currentTitle.path = [
{ {
text: 'manage', text: 'productService.caption',
i18n: true, i18n: true,
handler: () => { handler: () => {
productMode.value = 'group'; productMode.value = 'group';
@ -1385,7 +1402,7 @@ watch(
productMode.value === 'service' productMode.value === 'service'
) { ) {
tmp.push({ tmp.push({
text: 'productGroup', text: 'productService.group.withName',
i18n: true, i18n: true,
argsi18n: { name: pathGroupName.value }, argsi18n: { name: pathGroupName.value },
handler: () => { handler: () => {
@ -1404,13 +1421,15 @@ watch(
}, },
}); });
if (expandedTree.value.length === 0) { if (expandedTree.value.length === 0) {
utilsStore.currentTitle.path = [{ text: 'manage', i18n: true }]; utilsStore.currentTitle.path = [
{ text: 'productService.caption', i18n: true },
];
return; return;
} }
} }
if (productMode.value === 'service') { if (productMode.value === 'service') {
tmp.push({ tmp.push({
text: 'productType', text: 'productService.type.withName',
i18n: true, i18n: true,
argsi18n: { name: pathTypeName.value }, argsi18n: { name: pathTypeName.value },
}); });
@ -1469,7 +1488,7 @@ watch([currentStatusList, productMode], () => {
style="color: white; background-color: hsla(var(--pink-6-hsl))" style="color: white; background-color: hsla(var(--pink-6-hsl))"
padding="xs" padding="xs"
icon="mdi-folder-multiple-plus-outline" icon="mdi-folder-multiple-plus-outline"
:label="$t('productAndService')" :label="$t('productService.group.addTitle')"
external-label external-label
label-position="left" label-position="left"
@click=" @click="
@ -1482,7 +1501,7 @@ watch([currentStatusList, productMode], () => {
<q-fab-action <q-fab-action
v-if="productMode === 'type'" v-if="productMode === 'type'"
id="btn-add-product-type" id="btn-add-product-type"
:label="$t('productAndServiceType')" :label="$t('productService.type.addTitle')"
external-label external-label
label-position="left" label-position="left"
style="color: white; background-color: hsla(var(--purple-11-hsl))" style="color: white; background-color: hsla(var(--purple-11-hsl))"
@ -1497,7 +1516,7 @@ watch([currentStatusList, productMode], () => {
></q-fab-action> ></q-fab-action>
<q-fab-action <q-fab-action
v-if="productMode === 'service'" v-if="productMode === 'service'"
:label="$t('buttonAddProduct')" :label="$t('productService.product.addTitle')"
external-label external-label
label-position="left" label-position="left"
style="color: white; background-color: hsla(var(--green-11-hsl))" style="color: white; background-color: hsla(var(--green-11-hsl))"
@ -1514,7 +1533,7 @@ watch([currentStatusList, productMode], () => {
></q-fab-action> ></q-fab-action>
<q-fab-action <q-fab-action
v-if="productMode === 'service'" v-if="productMode === 'service'"
:label="$t('addService')" :label="$t('productService.service.addTitle')"
external-label external-label
label-position="left" label-position="left"
style="color: white; background-color: hsla(var(--orange-6-hsl))" style="color: white; background-color: hsla(var(--orange-6-hsl))"
@ -1535,7 +1554,7 @@ watch([currentStatusList, productMode], () => {
<div class="full-height column no-wrap"> <div class="full-height column no-wrap">
<div class="text-body-2 q-mb-xs flex items-center"> <div class="text-body-2 q-mb-xs flex items-center">
{{ $t('dataSum') }} {{ $t('general.dataSum') }}
<q-btn <q-btn
class="q-ml-xs" class="q-ml-xs"
icon="mdi-pin-outline" icon="mdi-pin-outline"
@ -1580,7 +1599,9 @@ watch([currentStatusList, productMode], () => {
class="row no-wrap full-width bordered-b text-weight-bold surface-3 items-center q-px-md q-py-sm" class="row no-wrap full-width bordered-b text-weight-bold surface-3 items-center q-px-md q-py-sm"
:style="`min-height: ${$q.screen.gt.sm ? '57px' : '100.8px'}`" :style="`min-height: ${$q.screen.gt.sm ? '57px' : '100.8px'}`"
> >
<div class="col ellipsis-2-lines">ดการสาขาทงหมด</div> <div class="col ellipsis-2-lines">
{{ $t('productService.caption') }}
</div>
</div> </div>
<div class="col full-width scroll"> <div class="col full-width scroll">
@ -1712,6 +1733,7 @@ watch([currentStatusList, productMode], () => {
} }
} }
" "
@handle-hold="handleHold"
/> />
</div> </div>
</div> </div>
@ -1735,7 +1757,7 @@ watch([currentStatusList, productMode], () => {
outlined outlined
:class="{ 'col-12': $q.screen.lt.md }" :class="{ 'col-12': $q.screen.lt.md }"
dense dense
:label="$t('search')" :label="$t('general.search')"
class="" class=""
:bg-color="$q.dark.isActive ? 'dark' : 'white'" :bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearch" v-model="inputSearch"
@ -1765,10 +1787,10 @@ watch([currentStatusList, productMode], () => {
emit-value emit-value
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
:options="[ :options="[
{ label: $t('all'), value: 'All' }, { label: $t('general.all'), value: 'All' },
{ label: $t('statusACTIVE'), value: 'ACTIVE' }, { label: $t('general.active'), value: 'ACTIVE' },
{ {
label: $t('statusINACTIVE'), label: $t('general.inactive'),
value: 'INACTIVE', value: 'INACTIVE',
}, },
]" ]"
@ -1786,7 +1808,7 @@ watch([currentStatusList, productMode], () => {
})) }))
" "
:hide-dropdown-icon="$q.screen.lt.sm" :hide-dropdown-icon="$q.screen.lt.sm"
:display-value="$t('displayField')" :display-value="$t('general.displayField')"
v-model="tbControl.groupAndType.fieldSelected" v-model="tbControl.groupAndType.fieldSelected"
class="col q-ml-sm" class="col q-ml-sm"
option-label="label" option-label="label"
@ -2105,7 +2127,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -2149,7 +2171,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
@ -2191,7 +2213,7 @@ watch([currentStatusList, productMode], () => {
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
@ -2218,8 +2240,8 @@ watch([currentStatusList, productMode], () => {
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
props.row.status !== 'INACTIVE' props.row.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -2344,11 +2366,10 @@ watch([currentStatusList, productMode], () => {
<div class="col-4"> <div class="col-4">
<div class="row items-center"> <div class="row items-center">
<div <div
class="app-text-muted" class="app-text-muted q-mr-sm"
style="width: 80px"
v-if="$q.screen.gt.sm" v-if="$q.screen.gt.sm"
> >
{{ $t('showing') }} {{ $t('general.recordPerPage') }}
</div> </div>
<div> <div>
<q-btn-dropdown <q-btn-dropdown
@ -2382,7 +2403,7 @@ watch([currentStatusList, productMode], () => {
<div class="col-4 row justify-center app-text-muted"> <div class="col-4 row justify-center app-text-muted">
{{ {{
$t('recordsPage', { $t('general.recordsPage', {
resultcurrentPage: productGroup?.length, resultcurrentPage: productGroup?.length,
total: totalGroup, total: totalGroup,
}) })
@ -2410,11 +2431,10 @@ watch([currentStatusList, productMode], () => {
<div class="col-4"> <div class="col-4">
<div class="row items-center"> <div class="row items-center">
<div <div
class="app-text-muted" class="app-text-muted q-mr-sm"
style="width: 80px"
v-if="$q.screen.gt.sm" v-if="$q.screen.gt.sm"
> >
{{ $t('showing') }} {{ $t('general.recordPerPage') }}
</div> </div>
<div> <div>
<q-btn-dropdown <q-btn-dropdown
@ -2448,7 +2468,7 @@ watch([currentStatusList, productMode], () => {
<div class="col-4 row justify-center app-text-muted"> <div class="col-4 row justify-center app-text-muted">
{{ {{
$t('recordsPage', { $t('general.recordsPage', {
resultcurrentPage: productType?.length, resultcurrentPage: productType?.length,
total: totalType, total: totalType,
}) })
@ -2485,7 +2505,7 @@ watch([currentStatusList, productMode], () => {
outlined outlined
dense dense
unelavated unelavated
:label="$t('search')" :label="$t('general.search')"
:bg-color="$q.dark.isActive ? 'dark' : 'white'" :bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearchProductAndService" v-model="inputSearchProductAndService"
debounce="250" debounce="250"
@ -2514,10 +2534,10 @@ watch([currentStatusList, productMode], () => {
map-options map-options
emit-value emit-value
:options="[ :options="[
{ label: $t('all'), value: 'All' }, { label: $t('general.all'), value: 'All' },
{ label: $t('statusACTIVE'), value: 'ACTIVE' }, { label: $t('general.active'), value: 'ACTIVE' },
{ {
label: $t('statusINACTIVE'), label: $t('general.inactive'),
value: 'INACTIVE', value: 'INACTIVE',
}, },
]" ]"
@ -2540,7 +2560,7 @@ watch([currentStatusList, productMode], () => {
value: x.value, value: x.value,
})) }))
" "
:display-value="$t('displayField')" :display-value="$t('general.displayField')"
:model-value=" :model-value="
{ {
product: tbControl.product.fieldSelected, product: tbControl.product.fieldSelected,
@ -2618,6 +2638,7 @@ watch([currentStatusList, productMode], () => {
<q-tab <q-tab
id="tab-service" id="tab-service"
name="service" name="service"
class="text-capitalize"
@click=" @click="
async () => { async () => {
currentPageServiceAndProduct = 1; currentPageServiceAndProduct = 1;
@ -2642,6 +2663,7 @@ watch([currentStatusList, productMode], () => {
<q-tab <q-tab
id="tab-product" id="tab-product"
name="product" name="product"
class="text-capitalize"
@click=" @click="
async () => { async () => {
currentPageServiceAndProduct = 1; currentPageServiceAndProduct = 1;
@ -2660,7 +2682,7 @@ watch([currentStatusList, productMode], () => {
: 'app-text-muted' : 'app-text-muted'
" "
> >
{{ $t('product') }} {{ $t('productService.product.title') }}
</div> </div>
</q-tab> </q-tab>
</q-tabs> </q-tabs>
@ -2889,7 +2911,7 @@ watch([currentStatusList, productMode], () => {
v-if="priceDisplay.price" v-if="priceDisplay.price"
> >
<div class="col app-text-muted-2 text-caption"> <div class="col app-text-muted-2 text-caption">
{{ $t('salePrice') }} {{ $t('productService.product.salePrice') }}
</div> </div>
<div class="col text-weight-bold"> <div class="col text-weight-bold">
฿{{ ฿{{
@ -2906,7 +2928,7 @@ watch([currentStatusList, productMode], () => {
v-if="priceDisplay.agentPrice" v-if="priceDisplay.agentPrice"
> >
<div class="col app-text-muted-2 text-caption"> <div class="col app-text-muted-2 text-caption">
{{ $t('agentPrice') }} {{ $t('productService.product.agentPrice') }}
</div> </div>
<div class="col text-weight-bold"> <div class="col text-weight-bold">
฿{{ ฿{{
@ -2926,7 +2948,9 @@ watch([currentStatusList, productMode], () => {
v-if="priceDisplay.serviceCharge" v-if="priceDisplay.serviceCharge"
> >
<div class="col app-text-muted-2 text-caption"> <div class="col app-text-muted-2 text-caption">
{{ $t('processingPrice') }} {{
$t('productService.product.processingPrice')
}}
</div> </div>
<div class="col"> <div class="col">
฿{{ ฿{{
@ -3021,7 +3045,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }} {{ $t('general.viewDetail') }}
</span> </span>
</q-item> </q-item>
@ -3059,7 +3083,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('edit') }} {{ $t('general.edit') }}
</span> </span>
</q-item> </q-item>
<q-item <q-item
@ -3095,7 +3119,7 @@ watch([currentStatusList, productMode], () => {
}" }"
/> />
<span class="col-9 q-px-md flex items-center"> <span class="col-9 q-px-md flex items-center">
{{ $t('delete') }} {{ $t('general.delete') }}
</span> </span>
</q-item> </q-item>
@ -3124,8 +3148,8 @@ watch([currentStatusList, productMode], () => {
<span class="q-pl-md"> <span class="q-pl-md">
{{ {{
props.row.status !== 'INACTIVE' props.row.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</span> </span>
</div> </div>
@ -3197,12 +3221,8 @@ watch([currentStatusList, productMode], () => {
> >
<div class="col-4"> <div class="col-4">
<div class="row items-center"> <div class="row items-center">
<div <div class="app-text-muted q-mr-sm" v-if="$q.screen.gt.sm">
class="app-text-muted" {{ $t('general.recordPerPage') }}
style="width: 80px"
v-if="$q.screen.gt.sm"
>
{{ $t('showing') }}
</div> </div>
<div> <div>
<q-btn-dropdown <q-btn-dropdown
@ -3242,7 +3262,7 @@ watch([currentStatusList, productMode], () => {
<div class="col-4 row justify-center app-text-muted"> <div class="col-4 row justify-center app-text-muted">
{{ {{
$t('recordsPage', { $t('general.recordsPage', {
resultcurrentPage: resultcurrentPage:
productAndServiceTab === 'product' productAndServiceTab === 'product'
? product?.length ? product?.length
@ -3288,7 +3308,7 @@ watch([currentStatusList, productMode], () => {
hideActive hideActive
useToggle useToggle
:img="`/images/product-service-${productMode}-avatar-add${productMode === 'type' ? ($q.dark.isActive ? '-d' : '-l') : ''}.png`" :img="`/images/product-service-${productMode}-avatar-add${productMode === 'type' ? ($q.dark.isActive ? '-d' : '-l') : ''}.png`"
:toggleTitle="$t('formDialogTitleUseStatus')" :toggleTitle="$t('status.title')"
:icon=" :icon="
productMode === 'group' productMode === 'group'
? 'mdi-folder-plus-outline' ? 'mdi-folder-plus-outline'
@ -3340,7 +3360,7 @@ watch([currentStatusList, productMode], () => {
<SideMenu <SideMenu
:menu="[ :menu="[
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'form-group', anchor: 'form-group',
}, },
]" ]"
@ -3377,12 +3397,12 @@ watch([currentStatusList, productMode], () => {
:title=" :title="
$t( $t(
editByTree === 'group' editByTree === 'group'
? 'productGroup' ? 'productService.group.withName'
: editByTree === 'type' : editByTree === 'type'
? 'productType' ? 'productService.type.withName'
: productMode === 'group' : productMode === 'group'
? 'productGroup' ? 'productService.group.withName'
: 'productType', : 'productService.type.withName',
{ {
name: formDataGroup.code, name: formDataGroup.code,
}, },
@ -3448,7 +3468,7 @@ watch([currentStatusList, productMode], () => {
}-hsl)/0.1)`" }-hsl)/0.1)`"
:title="formDataGroup.name" :title="formDataGroup.name"
:caption="formDataGroup.code" :caption="formDataGroup.code"
:toggleTitle="$t('formDialogTitleUserStatus')" :toggleTitle="$t('status.title')"
:menu="[ :menu="[
{ {
icon: 'mdi-office-building-outline', icon: 'mdi-office-building-outline',
@ -3507,12 +3527,13 @@ watch([currentStatusList, productMode], () => {
</div> </div>
</div> </div>
<div <div
v-if="$q.screen.gt.sm"
class="col full-height rounded scroll row q-py-md q-pl-md q-pr-sm" class="col full-height rounded scroll row q-py-md q-pl-md q-pr-sm"
> >
<SideMenu <SideMenu
:menu="[ :menu="[
{ {
name: $t('formDialogTitleInformation'), name: $t('form.field.basicInformation'),
anchor: 'info-group', anchor: 'info-group',
}, },
]" ]"
@ -3548,6 +3569,7 @@ watch([currentStatusList, productMode], () => {
<!-- work product, product work --> <!-- work product, product work -->
<DialogForm <DialogForm
v-model:modal="dialogTotalProduct" v-model:modal="dialogTotalProduct"
:submitLabel="$t('general.select')"
noAddress noAddress
noAppBox noAppBox
:title="$t('productService.product.allProduct')" :title="$t('productService.product.allProduct')"
@ -3596,7 +3618,7 @@ watch([currentStatusList, productMode], () => {
v-if="productIsAdd?.length !== 0" v-if="productIsAdd?.length !== 0"
> >
<q-checkbox <q-checkbox
:label="$t('selectAll')" :label="$t('general.selectAll')"
:model-value=" :model-value="
!!inputSearchProductAndService !!inputSearchProductAndService
? selectProduct.length === ? selectProduct.length ===
@ -3646,9 +3668,8 @@ watch([currentStatusList, productMode], () => {
lazy-rules="ondemand" lazy-rules="ondemand"
id="input-search-add-product" id="input-search-add-product"
outlined outlined
style="width: 250px"
dense dense
:label="$t('search')" :label="$t('general.search')"
:bg-color="$q.dark.isActive ? 'dark' : 'white'" :bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearchProductAndService" v-model="inputSearchProductAndService"
debounce="500" debounce="500"
@ -3673,7 +3694,7 @@ watch([currentStatusList, productMode], () => {
" "
/> />
</div> </div>
<div v-else class="row q-col-gutter-md"> <div v-else class="row q-col-gutter-md full-width">
<div <div
class="col-md-3 col-sm-6 col-12" class="col-md-3 col-sm-6 col-12"
v-for="i in (!!inputSearchProductAndService v-for="i in (!!inputSearchProductAndService
@ -3739,7 +3760,7 @@ watch([currentStatusList, productMode], () => {
<!-- Add Product --> <!-- Add Product -->
<DialogForm <DialogForm
v-model:modal="dialogProduct" v-model:modal="dialogProduct"
:title="$t('buttonAddProduct')" :title="$t('productService.product.addTitle')"
:submit=" :submit="
() => { () => {
submitProduct(); submitProduct();
@ -3757,7 +3778,7 @@ watch([currentStatusList, productMode], () => {
hideFade hideFade
useToggle useToggle
hideActive hideActive
:toggleTitle="$t('formDialogTitleUseStatus')" :toggleTitle="$t('status.title')"
:img="profileUrl || '/images/product-avatar-add.png'" :img="profileUrl || '/images/product-avatar-add.png'"
fallbackCover="/images/product-banner.png" fallbackCover="/images/product-banner.png"
:bgColor="`hsla(var(--teal-${$q.dark.isActive ? '8' : '10'}-hsl)/0.15)`" :bgColor="`hsla(var(--teal-${$q.dark.isActive ? '8' : '10'}-hsl)/0.15)`"
@ -3777,12 +3798,27 @@ watch([currentStatusList, productMode], () => {
formDataProduct.status === 'CREATED' ? 'INACTIVE' : 'CREATED'; formDataProduct.status === 'CREATED' ? 'INACTIVE' : 'CREATED';
} }
" "
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t(`form.field.basicInformation`),
},
{
name: 2,
label: $t('productService.product.priceInformation'),
},
]
"
v-model:currentTab="productTab"
/> />
</div> </div>
<div <div
class="col surface-1 q-ma-lg rounded bordered scroll row relative-position" class="col surface-1 q-ma-lg rounded bordered scroll row relative-position"
id="group-form" id="product-form"
> >
<div <div
class="col" class="col"
@ -3804,8 +3840,8 @@ watch([currentStatusList, productMode], () => {
<span class="full-width q-py-sm" style="padding-inline: 20px"> <span class="full-width q-py-sm" style="padding-inline: 20px">
{{ {{
v === 1 v === 1
? $t('formDialogTitleInformation') ? $t('form.field.basicInformation')
: $t('priceInformation') : $t('productService.product.priceInformation')
}} }}
</span> </span>
</q-item> </q-item>
@ -3844,7 +3880,7 @@ watch([currentStatusList, productMode], () => {
<DialogForm <DialogForm
v-model:modal="dialogProductEdit" v-model:modal="dialogProductEdit"
noAddress noAddress
:title="$t('editProduct')" :title="$t('productService.product.title')"
:editData="() => (infoProductEdit = true)" :editData="() => (infoProductEdit = true)"
:undo=" :undo="
() => { () => {
@ -3875,7 +3911,7 @@ watch([currentStatusList, productMode], () => {
fallbackImg="/images/product-avatar.png" fallbackImg="/images/product-avatar.png"
color="var(--teal-10)" color="var(--teal-10)"
:readonly="!infoProductEdit" :readonly="!infoProductEdit"
:toggleTitle="$t('formDialogTitleUseStatus')" :toggleTitle="$t('status.title')"
:img="profileUrl || '/images/product-avatar.png'" :img="profileUrl || '/images/product-avatar.png'"
fallbackCover="/images/product-banner.png" fallbackCover="/images/product-banner.png"
:bgColor="`hsla(var(--teal-${$q.dark.isActive ? '8' : '10'}-hsl)/0.15)`" :bgColor="`hsla(var(--teal-${$q.dark.isActive ? '8' : '10'}-hsl)/0.15)`"
@ -3899,6 +3935,21 @@ watch([currentStatusList, productMode], () => {
); );
} }
" "
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t(`form.field.basicInformation`),
},
{
name: 2,
label: $t('productService.product.priceInformation'),
},
]
"
v-model:currentTab="productTab"
/> />
</div> </div>
@ -3964,8 +4015,8 @@ watch([currentStatusList, productMode], () => {
<span class="full-width q-py-sm" style="padding-inline: 20px"> <span class="full-width q-py-sm" style="padding-inline: 20px">
{{ {{
v === 1 v === 1
? $t('formDialogTitleInformation') ? $t('form.field.basicInformation')
: $t('priceInformation') : $t('productService.product.priceInformation')
}} }}
</span> </span>
</q-item> </q-item>
@ -4008,7 +4059,7 @@ watch([currentStatusList, productMode], () => {
no-address no-address
no-app-box no-app-box
height="95vh" height="95vh"
:title="$t('addService')" :title="$t('productService.service.addTitle')"
v-model:modal="dialogService" v-model:modal="dialogService"
:submit=" :submit="
() => { () => {
@ -4028,7 +4079,7 @@ watch([currentStatusList, productMode], () => {
hideFade hideFade
useToggle useToggle
hideActive hideActive
:toggleTitle="$t('formDialogTitleUseStatus')" :toggleTitle="$t('status.title')"
:img="profileUrl || '/images/service-avatar-add.png'" :img="profileUrl || '/images/service-avatar-add.png'"
fallbackCover="/images/service-banner.png" fallbackCover="/images/service-banner.png"
:bgColor="`hsla(var(--orange-${$q.dark.isActive ? '6' : '5'}-hsl)/0.15)`" :bgColor="`hsla(var(--orange-${$q.dark.isActive ? '6' : '5'}-hsl)/0.15)`"
@ -4055,12 +4106,27 @@ watch([currentStatusList, productMode], () => {
: 'CREATED'; : 'CREATED';
} }
" "
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t('productService.service.information'),
},
{
name: 2,
label: $t('productService.service.workInformation'),
},
]
"
v-model:currentTab="serviceTab"
/> />
</div> </div>
<div <div
class="col surface-1 q-mx-lg q-mt-lg q-mb-md rounded bordered scroll row relative-position" class="col surface-1 q-mx-lg q-mt-lg q-mb-md rounded bordered scroll row relative-position"
id="group-form" id="service-form"
> >
<div <div
class="col" class="col"
@ -4080,7 +4146,11 @@ watch([currentStatusList, productMode], () => {
@click="serviceTab = v" @click="serviceTab = v"
> >
<span class="full-width q-py-sm" style="padding-inline: 20px"> <span class="full-width q-py-sm" style="padding-inline: 20px">
{{ v === 1 ? $t('serviceInformation') : $t('workInformation') }} {{
v === 1
? $t('productService.service.information')
: $t('productService.service.workInformation')
}}
</span> </span>
</q-item> </q-item>
</div> </div>
@ -4155,7 +4225,7 @@ watch([currentStatusList, productMode], () => {
no-app-box no-app-box
height="75vh" height="75vh"
width="75%" width="75%"
:title="$t('properties')" :title="$t('productService.service.properties')"
v-model:modal="propertiesDialog" v-model:modal="propertiesDialog"
:submit=" :submit="
() => { () => {
@ -4175,7 +4245,7 @@ watch([currentStatusList, productMode], () => {
} }
" "
> >
<div class="q-pa-lg full-height"> <div class="q-pa-lg full-width full-height">
<ServiceProperties <ServiceProperties
v-model:properties-option="propertiesOption" v-model:properties-option="propertiesOption"
v-model:form-service-properties="tempValueProperties" v-model:form-service-properties="tempValueProperties"
@ -4189,7 +4259,7 @@ watch([currentStatusList, productMode], () => {
height="65vh" height="65vh"
width="65%" width="65%"
v-model:modal="manageWorkNameDialog" v-model:modal="manageWorkNameDialog"
:title="$t('manage')" :title="$t('general.manage')"
:close="triggerConfirmCloseWork" :close="triggerConfirmCloseWork"
> >
<div class="q-pa-lg full-height"> <div class="q-pa-lg full-height">
@ -4246,7 +4316,7 @@ watch([currentStatusList, productMode], () => {
:caption="formDataProductService.code" :caption="formDataProductService.code"
:active="formDataProductService.status !== 'INACTIVE'" :active="formDataProductService.status !== 'INACTIVE'"
:readonly="!infoServiceEdit" :readonly="!infoServiceEdit"
:toggleTitle="$t('formDialogTitleUseStatus')" :toggleTitle="$t('status.title')"
:img="profileUrl || '/images/service-avatar.png'" :img="profileUrl || '/images/service-avatar.png'"
fallbackCover="/images/service-banner.png" fallbackCover="/images/service-banner.png"
:bgColor="`hsla(var(--orange-${$q.dark.isActive ? '6' : '5'}-hsl)/0.15)`" :bgColor="`hsla(var(--orange-${$q.dark.isActive ? '6' : '5'}-hsl)/0.15)`"
@ -4275,6 +4345,21 @@ watch([currentStatusList, productMode], () => {
); );
} }
" "
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t('productService.service.information'),
},
{
name: 2,
label: $t('productService.service.workInformation'),
},
]
"
v-model:currentTab="serviceTab"
/> />
</div> </div>
@ -4340,7 +4425,11 @@ watch([currentStatusList, productMode], () => {
@click="serviceTab = v" @click="serviceTab = v"
> >
<span class="full-width q-py-sm" style="padding-inline: 20px"> <span class="full-width q-py-sm" style="padding-inline: 20px">
{{ v === 1 ? $t('serviceInformation') : $t('workInformation') }} {{
v === 1
? $t('productService.service.information')
: $t('productService.service.workInformation')
}}
</span> </span>
</q-item> </q-item>
</div> </div>
@ -4464,7 +4553,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--green-6-hsl))" style="color: hsl(var(--green-6-hsl))"
/> />
</q-item-section> </q-item-section>
<q-item-section>{{ $t('viewDetail') }}</q-item-section> <q-item-section>{{ $t('general.viewDetail') }}</q-item-section>
</q-item> </q-item>
<q-item <q-item
@ -4499,7 +4588,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--cyan-6-hsl))" style="color: hsl(var(--cyan-6-hsl))"
/> />
</q-item-section> </q-item-section>
<q-item-section>{{ $t('edit') }}</q-item-section> <q-item-section>{{ $t('general.edit') }}</q-item-section>
</q-item> </q-item>
<q-item <q-item
@ -4523,7 +4612,7 @@ watch([currentStatusList, productMode], () => {
<q-item-section avatar> <q-item-section avatar>
<q-icon name="mdi-trash-can-outline" class="app-text-negative" /> <q-icon name="mdi-trash-can-outline" class="app-text-negative" />
</q-item-section> </q-item-section>
<q-item-section>{{ $t('delete') }}</q-item-section> <q-item-section>{{ $t('general.delete') }}</q-item-section>
</q-item> </q-item>
<q-item clickable v-ripple> <q-item clickable v-ripple>
@ -4562,8 +4651,8 @@ watch([currentStatusList, productMode], () => {
<q-item-section> <q-item-section>
{{ {{
currentNode.status !== 'INACTIVE' currentNode.status !== 'INACTIVE'
? $t('switchOnLabel') ? $t('general.open')
: $t('switchOffLabel') : $t('general.close')
}} }}
</q-item-section> </q-item-section>
</q-item> </q-item>

View file

@ -10,7 +10,7 @@ const at = ref(kc.token);
const rt = ref(kc.refreshToken); const rt = ref(kc.refreshToken);
onMounted(() => { onMounted(() => {
utilsStore.currentTitle.title = 'Document Management'; utilsStore.currentTitle.title = 'menu.dms';
utilsStore.currentTitle.path = [ utilsStore.currentTitle.path = [
{ {
text: '', text: '',

View file

@ -18,8 +18,8 @@ onMounted(() => {
value: 'branch-management', value: 'branch-management',
icon: 'mdi-chart-donut', icon: 'mdi-chart-donut',
color: 'green', color: 'green',
title: 'mainBranchTitle', title: 'menu.branch',
caption: 'mainBranchCaption', caption: 'menu.branchCaption',
hidden: hidden:
role.value.includes('admin') || role.value.includes('admin') ||
role.value.includes('branch_admin') || role.value.includes('branch_admin') ||
@ -33,8 +33,8 @@ onMounted(() => {
value: 'personnel-management', value: 'personnel-management',
icon: 'fa6-solid:building-user', icon: 'fa6-solid:building-user',
color: 'cyan', color: 'cyan',
title: 'mainPersonnelTitle', title: 'menu.user',
caption: 'mainPersonnelCaption', caption: 'menu.userCaption',
hidden: hidden:
role.value.includes('admin') || role.value.includes('admin') ||
role.value.includes('branch_admin') || role.value.includes('branch_admin') ||
@ -48,31 +48,31 @@ onMounted(() => {
value: 'customer-management', value: 'customer-management',
icon: 'isax-frame5', icon: 'isax-frame5',
color: 'cyan', color: 'cyan',
title: 'mainCustomerTitle', title: 'menu.customer',
caption: 'mainCustomerCaption', caption: 'menu.customerCaption',
isax: true, isax: true,
}, },
{ {
value: 'product-service', value: 'product-service',
icon: 'heroicons-truck-solid', icon: 'heroicons-truck-solid',
color: 'orange', color: 'orange',
title: 'mainProductTitle', title: 'menu.product',
caption: 'mainProductCaption', caption: 'menu.productCaption',
}, },
{ {
value: '', value: '',
icon: 'mdi-file-document', icon: 'mdi-file-document',
color: 'violet', color: 'violet',
title: 'mainQuotationTitle', title: 'menu.quotation',
caption: 'mainQuotationCaption', caption: 'menu.quotationCaption',
disabled: true, disabled: true,
}, },
{ {
value: '', value: '',
icon: 'isax-device-message5', icon: 'isax-device-message5',
color: 'purple', color: 'purple',
title: 'mainRequestTitle', title: 'menu.requestList',
caption: 'mainRequestCaption', caption: 'menu.requestListCaption',
isax: true, isax: true,
disabled: true, disabled: true,
}, },
@ -80,8 +80,8 @@ onMounted(() => {
value: '', value: '',
icon: 'isax-receipt-2-15', icon: 'isax-receipt-2-15',
color: 'red', color: 'red',
title: 'mainOrderTitle', title: 'menu.workOrder',
caption: 'mainOrderCaption', caption: 'menu.workOrderCaption',
isax: true, isax: true,
disabled: true, disabled: true,
}, },
@ -89,16 +89,16 @@ onMounted(() => {
value: '', value: '',
icon: 'material-symbols:box', icon: 'material-symbols:box',
color: 'camo', color: 'camo',
title: 'mainReceiptTitle', title: 'menu.invoice',
caption: 'mainReceiptCaption', caption: 'menu.invoiceCaption',
disabled: true, disabled: true,
}, },
{ {
value: '', value: '',
icon: 'isax-dollar-circle4', icon: 'isax-dollar-circle4',
color: 'lime', color: 'lime',
title: 'mainFinanceTitle', title: 'menu.accountingLedger',
caption: 'mainFinanceCaption', caption: 'menu.accountingLedgerCaption',
isax: true, isax: true,
disabled: true, disabled: true,
}, },
@ -106,8 +106,8 @@ onMounted(() => {
value: '', value: '',
icon: 'isax-element-35', icon: 'isax-element-35',
color: 'cyan', color: 'cyan',
title: 'mainDashboardTitle', title: 'menu.dashboard',
caption: 'mainDashboardCaption', caption: 'menu.dashboardCaption',
isax: true, isax: true,
disabled: true, disabled: true,
}, },
@ -115,8 +115,8 @@ onMounted(() => {
value: '', value: '',
icon: 'mdi-file-document', icon: 'mdi-file-document',
color: 'indigo', color: 'indigo',
title: 'mainReportTitle', title: 'menu.report',
caption: 'mainReportCaption', caption: 'menu.reportCaption',
disabled: true, disabled: true,
}, },
]; ];

View file

@ -101,7 +101,7 @@ export function deleteItem(items: unknown[], index: number) {
} }
export function formatNumberDecimal(num: number, point: number): string { export function formatNumberDecimal(num: number, point: number): string {
return num.toLocaleString('en-US', { return num.toLocaleString('eng', {
minimumFractionDigits: point, minimumFractionDigits: point,
maximumFractionDigits: point, maximumFractionDigits: point,
}); });

View file

@ -91,7 +91,7 @@ export function calculateAge(birthDate: Date | null | string) {
const months = ageDate.getUTCMonth(); const months = ageDate.getUTCMonth();
const days = ageDate.getUTCDate() - 1; const days = ageDate.getUTCDate() - 1;
if (locale.value === 'th-th') { if (locale.value === 'tha') {
return `${years} ปี ${months !== 0 ? months + ' เดือน' : ''} ${days !== 0 ? days + ' วัน' : ''} `; return `${years} ปี ${months !== 0 ? months + ' เดือน' : ''} ${days !== 0 ? days + ' วัน' : ''} `;
} else { } else {
return `${years} years ${months !== 0 ? months + ' months' : ''} ${days !== 0 ? days + ' days' : ''} `; return `${years} years ${months !== 0 ? months + ' months' : ''} ${days !== 0 ? days + ' days' : ''} `;
@ -113,7 +113,7 @@ export function parseAndFormatDate(
if (value && value.toString().length === 10) { if (value && value.toString().length === 10) {
const [date, month, year] = value.toString().split('/'); const [date, month, year] = value.toString().split('/');
if (locale === 'th-th') { if (locale === 'tha') {
const adjustedYear = Number(year) - 543; const adjustedYear = Number(year) - 543;
return new Date(`${month}/${date}/${adjustedYear}T00:00.000Z`); return new Date(`${month}/${date}/${adjustedYear}T00:00.000Z`);
} else { } else {