fix: service & properties i18n
This commit is contained in:
parent
3f050adac5
commit
ec83964b09
8 changed files with 71 additions and 54 deletions
|
|
@ -22,25 +22,25 @@ const selection = ref(false);
|
||||||
|
|
||||||
const typeOption = ref([
|
const typeOption = ref([
|
||||||
{
|
{
|
||||||
label: 'Text',
|
label: t('text'),
|
||||||
value: 'string',
|
value: 'string',
|
||||||
color: 'var(--pink-6-hsl)',
|
color: 'var(--pink-6-hsl)',
|
||||||
icon: 'mdi-alpha-t',
|
icon: 'mdi-alpha-t',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Number',
|
label: t('number'),
|
||||||
value: 'number',
|
value: 'number',
|
||||||
color: 'var(--purple-11-hsl)',
|
color: 'var(--purple-11-hsl)',
|
||||||
icon: 'mdi-numeric',
|
icon: 'mdi-numeric',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Date',
|
label: t('date'),
|
||||||
value: 'date',
|
value: 'date',
|
||||||
color: 'var(--green-9-hsl)',
|
color: 'var(--green-9-hsl)',
|
||||||
icon: 'mdi-calendar-blank-outline',
|
icon: 'mdi-calendar-blank-outline',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Selection',
|
label: t('selection'),
|
||||||
value: 'array',
|
value: 'array',
|
||||||
color: 'var(--indigo-7-hsl)',
|
color: 'var(--indigo-7-hsl)',
|
||||||
icon: 'mdi-code-array',
|
icon: 'mdi-code-array',
|
||||||
|
|
@ -117,7 +117,7 @@ function confirmDelete(items: unknown[], index: number) {
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
color="primary"
|
color="primary"
|
||||||
label="Properties"
|
:label="$t('properties')"
|
||||||
class="q-px-sm q-mb-lg"
|
class="q-px-sm q-mb-lg"
|
||||||
menu-anchor="bottom end"
|
menu-anchor="bottom end"
|
||||||
>
|
>
|
||||||
|
|
@ -141,8 +141,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') }}
|
||||||
เลือกทั้งหมด
|
|
||||||
</div>
|
</div>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -239,7 +238,7 @@ function confirmDelete(items: unknown[], index: number) {
|
||||||
map-options
|
map-options
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col q-mr-md"
|
class="col q-mr-md"
|
||||||
label="Properties Name"
|
:label="$t('propertiesName')"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
:options="propertiesOption"
|
:options="propertiesOption"
|
||||||
|
|
@ -264,7 +263,7 @@ function confirmDelete(items: unknown[], index: number) {
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
label="Type"
|
:label="$t('type')"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
:options="typeOption"
|
:options="typeOption"
|
||||||
v-model="p.type"
|
v-model="p.type"
|
||||||
|
|
@ -309,78 +308,59 @@ function confirmDelete(items: unknown[], index: number) {
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="p.type === 'string'"
|
v-if="p.type !== 'date' && p.type"
|
||||||
class="menu-border q-pt-md q-pb-sm"
|
class="menu-border q-pt-md q-pb-sm"
|
||||||
style="margin-top: -20px"
|
style="margin-top: -20px"
|
||||||
>
|
>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="column">
|
<q-item-section class="column">
|
||||||
<span class="app-text-muted-2">เพิ่มเติม</span>
|
<span class="app-text-muted-2">{{ $t('additional') }}</span>
|
||||||
<div 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">
|
||||||
<div class="col-7 surface-3 rounded q-mr-sm q-py-xs">
|
<div class="col-7 surface-3 rounded q-mr-sm q-py-xs">
|
||||||
<q-checkbox v-model="tel" size="xs" />
|
<q-checkbox v-model="tel" size="xs" />
|
||||||
เบอร์โทร
|
{{ $t('telephone') }}
|
||||||
</div>
|
</div>
|
||||||
<q-input
|
<q-input
|
||||||
v-model="telMax"
|
v-model="telMax"
|
||||||
class="col"
|
class="col"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="จำนวนหลัก"
|
:label="$t('telMaxLength')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div v-if="p.type === 'number'" class="q-gutter-y-sm">
|
||||||
v-if="p.type === 'number'"
|
|
||||||
class="menu-border q-pt-md q-pb-sm"
|
|
||||||
style="margin-top: -20px"
|
|
||||||
>
|
|
||||||
<q-item>
|
|
||||||
<q-item-section class="column">
|
|
||||||
<span class="app-text-muted-2">เพิ่มเติม</span>
|
|
||||||
<div class="q-gutter-y-sm">
|
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<div class="col surface-3 rounded q-py-xs">
|
<div class="col surface-3 rounded q-py-xs">
|
||||||
<q-checkbox v-model="comma" size="xs" />
|
<q-checkbox v-model="comma" size="xs" />
|
||||||
ใส่ comma
|
{{ $t('useComma') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<div class="col-7 surface-3 rounded q-mr-sm q-py-xs">
|
<div class="col-7 surface-3 rounded q-mr-sm q-py-xs">
|
||||||
<q-checkbox v-model="point" size="xs" />
|
<q-checkbox v-model="point" size="xs" />
|
||||||
ทศนิยม
|
{{ $t('decimal') }}
|
||||||
</div>
|
</div>
|
||||||
<q-input
|
<q-input
|
||||||
v-model="pointNum"
|
v-model="pointNum"
|
||||||
class="col"
|
class="col"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="ตำแหน่ง"
|
:label="$t('decimalPlace')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="p.type === 'array'"
|
v-if="p.type === 'array'"
|
||||||
class="menu-border q-pt-md q-pb-sm"
|
class="row items-center justify-between"
|
||||||
style="margin-top: -20px"
|
>
|
||||||
>
|
|
||||||
<q-item>
|
|
||||||
<q-item-section class="column">
|
|
||||||
<span class="app-text-muted-2">เพิ่มเติม</span>
|
|
||||||
<div class="row items-center justify-between">
|
|
||||||
<div class="col surface-3 rounded q-mr-sm q-py-xs">
|
<div class="col surface-3 rounded q-mr-sm q-py-xs">
|
||||||
<q-checkbox v-model="selection" size="xs" />
|
<q-checkbox v-model="selection" size="xs" />
|
||||||
เพิ่ม Selection
|
{{ $t('addSelection') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -389,6 +369,7 @@ function confirmDelete(items: unknown[], index: number) {
|
||||||
icon="mdi-plus"
|
icon="mdi-plus"
|
||||||
class="bordered"
|
class="bordered"
|
||||||
text-color="grey"
|
text-color="grey"
|
||||||
|
style="border-radius: 6px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ defineEmits<{
|
||||||
<q-menu fit anchor="bottom left" self="top left">
|
<q-menu 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') }}
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
|
|
@ -113,7 +113,7 @@ defineEmits<{
|
||||||
@click.stop="$emit('manageWorkName')"
|
@click.stop="$emit('manageWorkName')"
|
||||||
>
|
>
|
||||||
<q-icon name="mdi-cog" size="xs" class="q-mr-sm" />
|
<q-icon name="mdi-cog" size="xs" class="q-mr-sm" />
|
||||||
จัดการ
|
{{ $t('manage') }}
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -153,7 +153,9 @@ defineEmits<{
|
||||||
color="negative"
|
color="negative"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
@click.stop="$emit('deleteWork')"
|
@click.stop="$emit('deleteWork')"
|
||||||
/>
|
>
|
||||||
|
<q-tooltip>{{ $t('delete') }}</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="surface-2">
|
<div class="surface-2">
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { onMounted, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
||||||
import { deleteItem, dialog } from 'src/stores/utils';
|
|
||||||
import useProductServiceStore from 'src/stores/product-service';
|
import useProductServiceStore from 'src/stores/product-service';
|
||||||
|
|
||||||
import NoData from '../NoData.vue';
|
import NoData from '../NoData.vue';
|
||||||
|
|
@ -66,6 +65,7 @@ watch(
|
||||||
>
|
>
|
||||||
<q-input
|
<q-input
|
||||||
ref="inputName"
|
ref="inputName"
|
||||||
|
:for="`input-work-name-${index}`"
|
||||||
dense
|
dense
|
||||||
class="col q-mr-md"
|
class="col q-mr-md"
|
||||||
v-model="item.name"
|
v-model="item.name"
|
||||||
|
|
@ -85,7 +85,7 @@ watch(
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="item.isEdit = true"
|
@click="item.isEdit = true"
|
||||||
>
|
>
|
||||||
<q-tooltip>Edit</q-tooltip>
|
<q-tooltip>{{ $t('edit') }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-else
|
v-else
|
||||||
|
|
@ -102,7 +102,7 @@ watch(
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>Save</q-tooltip>
|
<q-tooltip>{{ $t('save') }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!item.isEdit"
|
v-if="!item.isEdit"
|
||||||
|
|
@ -116,7 +116,7 @@ watch(
|
||||||
color="negative"
|
color="negative"
|
||||||
@click="$emit('delete', item.id)"
|
@click="$emit('delete', item.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>Delete</q-tooltip>
|
<q-tooltip>{{ $t('delete') }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-else
|
v-else
|
||||||
|
|
@ -129,7 +129,7 @@ watch(
|
||||||
color="negative"
|
color="negative"
|
||||||
@click="assignClone"
|
@click="assignClone"
|
||||||
>
|
>
|
||||||
<q-tooltip>Cancel</q-tooltip>
|
<q-tooltip>{{ $t('cancel') }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|
@ -147,7 +147,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') }}
|
||||||
</span>
|
</span>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ export default {
|
||||||
editPersonalInfo: 'Edit personal infomation',
|
editPersonalInfo: 'Edit personal infomation',
|
||||||
logout: 'Logout',
|
logout: 'Logout',
|
||||||
list: 'Item',
|
list: 'Item',
|
||||||
|
manage: 'Manage',
|
||||||
...status,
|
...status,
|
||||||
...main,
|
...main,
|
||||||
...address,
|
...address,
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,20 @@ export default {
|
||||||
|
|
||||||
totalProductWork: 'Total product of work',
|
totalProductWork: 'Total product of work',
|
||||||
workNo: 'Work',
|
workNo: 'Work',
|
||||||
|
|
||||||
|
addWork: 'Add work',
|
||||||
|
|
||||||
|
properties: 'Properties',
|
||||||
|
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',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ export default {
|
||||||
editPersonalInfo: 'แก้ไขข้อมูลส่วนตัว',
|
editPersonalInfo: 'แก้ไขข้อมูลส่วนตัว',
|
||||||
logout: 'ออกจากระบบ',
|
logout: 'ออกจากระบบ',
|
||||||
list: 'รายการ',
|
list: 'รายการ',
|
||||||
|
manage: 'จัดการ',
|
||||||
...status,
|
...status,
|
||||||
...main,
|
...main,
|
||||||
...address,
|
...address,
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,20 @@ export default {
|
||||||
|
|
||||||
totalProductWork: 'รวมสินค้างาน',
|
totalProductWork: 'รวมสินค้างาน',
|
||||||
workNo: 'งานที่',
|
workNo: 'งานที่',
|
||||||
|
|
||||||
|
addWork: 'เพิ่มงานใหม่',
|
||||||
|
|
||||||
|
properties: 'คุณสมบัติ',
|
||||||
|
text: 'ข้อความ',
|
||||||
|
number: 'ตัวเลข',
|
||||||
|
date: 'วันที่',
|
||||||
|
selection: 'ตัวเลือก',
|
||||||
|
propertiesName: 'ชื่อคุณสมบัติ',
|
||||||
|
decimal: 'ทศนิยม',
|
||||||
|
decimalPlace: 'ตำแหน่ง',
|
||||||
|
useComma: 'ใส่ comma',
|
||||||
|
additional: 'เพิ่มเติม',
|
||||||
|
telMaxLength: 'จำนวนหลัก',
|
||||||
|
addSelection: 'เพิ่มตัวเลือก',
|
||||||
|
selectAll: 'เลือกทั้งหมด',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1620,7 +1620,7 @@ watch(currentStatus, async () => {
|
||||||
no-app-box
|
no-app-box
|
||||||
height="75vh"
|
height="75vh"
|
||||||
width="75%"
|
width="75%"
|
||||||
title="Properties"
|
:title="$t('properties')"
|
||||||
v-model:modal="propertiesDialog"
|
v-model:modal="propertiesDialog"
|
||||||
:submit="
|
:submit="
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -1653,7 +1653,7 @@ watch(currentStatus, async () => {
|
||||||
no-footer
|
no-footer
|
||||||
height="65vh"
|
height="65vh"
|
||||||
width="65%"
|
width="65%"
|
||||||
title="จัดการ"
|
:title="$t('manage')"
|
||||||
v-model:modal="manageWorkNameDialog"
|
v-model:modal="manageWorkNameDialog"
|
||||||
>
|
>
|
||||||
<WorkNameManagement
|
<WorkNameManagement
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue