Merge refactor/i18n into develop
This commit is contained in:
parent
3da5bf9079
commit
c681b19e39
99 changed files with 2192 additions and 2987 deletions
|
|
@ -51,7 +51,7 @@ const userTypeOptions = ref<Record<string, unknown>[]>([]);
|
|||
const userTypeFilter = selectFilterOptionRefMod(
|
||||
ref(
|
||||
userStore.userOption.userTypeOpts.map((v) => ({
|
||||
label: t(v.label),
|
||||
label: t(`personnel.${v.label}`),
|
||||
value: v.value,
|
||||
})),
|
||||
),
|
||||
|
|
@ -101,20 +101,24 @@ onMounted(async () => {
|
|||
option-label="label"
|
||||
option-value="value"
|
||||
lazy-rules="ondemand"
|
||||
class="col-2"
|
||||
class="col-md-2 col-12"
|
||||
:dense="dense"
|
||||
:readonly="readonly"
|
||||
:hide-dropdown-icon="readonly"
|
||||
:label="$t('formDialogInputCode')"
|
||||
:label="$t('branch.form.code')"
|
||||
: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)"
|
||||
@filter="hqFilter"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
{{ $t('noResults') }}
|
||||
{{ $t('general.noData') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
|
@ -133,11 +137,11 @@ onMounted(async () => {
|
|||
option-label="label"
|
||||
option-value="value"
|
||||
lazy-rules="ondemand"
|
||||
class="col-2"
|
||||
class="col-md-2 col-12"
|
||||
:dense="dense"
|
||||
:readonly="readonly"
|
||||
:hide-dropdown-icon="readonly"
|
||||
:label="$t('formDialogInputBrId')"
|
||||
:label="$t('branch.form.codeBranch')"
|
||||
:options="brOptions"
|
||||
@filter="brFilter"
|
||||
:model-value="readonly ? brId || '-' : brId"
|
||||
|
|
@ -147,7 +151,7 @@ onMounted(async () => {
|
|||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
{{ $t('noResults') }}
|
||||
{{ $t('general.noData') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
|
@ -162,13 +166,10 @@ onMounted(async () => {
|
|||
map-options
|
||||
options-dense
|
||||
hide-bottom-space
|
||||
class="col"
|
||||
:label="$t('formDialogInputUsername')"
|
||||
class="col-md col-12"
|
||||
:label="$t('personnel.form.username')"
|
||||
v-model="username"
|
||||
:rules="[
|
||||
(val: string) =>
|
||||
val.length > 2 || $t('formDialogInputUsernameValidate'),
|
||||
]"
|
||||
:rules="[(val: string) => val.length > 2 || $t('form.error.required')]"
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
|
|
@ -189,17 +190,21 @@ onMounted(async () => {
|
|||
:dense="dense"
|
||||
:readonly="readonly"
|
||||
:hide-dropdown-icon="readonly"
|
||||
:label="$t('formDialogInputUserType')"
|
||||
:label="$t('personnel.form.userType')"
|
||||
:options="userTypeOptions"
|
||||
:rules="[
|
||||
(val: string) => !!val || $t('formDialogInputUserTypeValidate'),
|
||||
(val: string) =>
|
||||
!!val ||
|
||||
$t('form.error.selectField', {
|
||||
field: $t('personnel.form.userType'),
|
||||
}),
|
||||
]"
|
||||
@filter="userTypeFilter"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
{{ $t('noResults') }}
|
||||
{{ $t('general.noData') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
|
@ -223,17 +228,21 @@ onMounted(async () => {
|
|||
v-model="userRole"
|
||||
:readonly="readonly"
|
||||
:hide-dropdown-icon="readonly"
|
||||
:label="$t('userRole')"
|
||||
:label="$t('personnel.form.userRole')"
|
||||
:options="roleOptions"
|
||||
:rules="[
|
||||
(val: string) => !!val || $t('formDialogInputUserRoleValidate'),
|
||||
(val: string) =>
|
||||
!!val ||
|
||||
$t('form.error.selectField', {
|
||||
field: $t('personnel.form.userRole'),
|
||||
}),
|
||||
]"
|
||||
@filter="roleFilter"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
{{ $t('noResults') }}
|
||||
{{ $t('general.noData') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue