Merge refactor/i18n into develop
This commit is contained in:
parent
3da5bf9079
commit
c681b19e39
99 changed files with 2192 additions and 2987 deletions
|
|
@ -27,14 +27,14 @@ onMounted(async () => {
|
|||
|
||||
labelMenu.value = [
|
||||
{
|
||||
label: 'drawerDashboard',
|
||||
label: 'menu.dashboard',
|
||||
icon: 'isax-element-35',
|
||||
route: '',
|
||||
isax: true,
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerBranchManagement',
|
||||
label: 'menu.branch',
|
||||
icon: 'mdi-chart-donut',
|
||||
route: '/branch-management',
|
||||
hidden:
|
||||
|
|
@ -47,7 +47,7 @@ onMounted(async () => {
|
|||
: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerPersonnelManagement',
|
||||
label: 'menu.user',
|
||||
icon: 'fa6-solid:building-user',
|
||||
route: '/personnel-management',
|
||||
hidden:
|
||||
|
|
@ -60,13 +60,13 @@ onMounted(async () => {
|
|||
: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerCustomerManagement',
|
||||
label: 'menu.customer',
|
||||
icon: 'isax-frame5',
|
||||
route: '/customer-management',
|
||||
isax: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerProductsAndServices',
|
||||
label: 'menu.product',
|
||||
icon: 'heroicons-truck-solid',
|
||||
route: '/product-service',
|
||||
},
|
||||
|
|
@ -76,40 +76,40 @@ onMounted(async () => {
|
|||
route: '/document-management',
|
||||
},
|
||||
{
|
||||
label: 'drawerQuotation',
|
||||
label: 'menu.quotation',
|
||||
icon: 'mdi-file-document',
|
||||
route: '',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerRequestList',
|
||||
label: 'menu.requestList',
|
||||
icon: 'isax-device-message5',
|
||||
route: '',
|
||||
disabled: true,
|
||||
isax: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerWorkOrder',
|
||||
label: 'menu.workOrder',
|
||||
icon: 'isax-receipt-2-15',
|
||||
route: '',
|
||||
disabled: true,
|
||||
isax: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerInvoice',
|
||||
label: 'menu.invoice',
|
||||
icon: 'material-symbols:box',
|
||||
route: '',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerAccountingLedger',
|
||||
label: 'menu.accountingLedger',
|
||||
icon: 'isax-dollar-circle4',
|
||||
route: '',
|
||||
isax: true,
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerReport',
|
||||
label: 'menu.report',
|
||||
icon: 'mdi-file-document',
|
||||
route: '',
|
||||
disabled: true,
|
||||
|
|
@ -237,13 +237,13 @@ function branchSetting() {}
|
|||
>
|
||||
<span class="text-weight-bold ellipsis full-width">
|
||||
{{
|
||||
($i18n.locale === 'en-US'
|
||||
($i18n.locale === 'eng'
|
||||
? currentMyBranch?.nameEN
|
||||
: currentMyBranch?.name) ?? '-'
|
||||
}}
|
||||
<q-tooltip>
|
||||
{{
|
||||
($i18n.locale === 'en-US'
|
||||
($i18n.locale === 'eng'
|
||||
? currentMyBranch?.nameEN
|
||||
: currentMyBranch?.name) ?? '-'
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ const language: {
|
|||
icon: string;
|
||||
date: string;
|
||||
}[] = [
|
||||
{ value: 'th-th', label: 'ไทย', icon: 'th', date: 'th' },
|
||||
{ value: 'en-US', label: 'English', icon: 'us', date: 'en-gb' },
|
||||
{ value: 'tha', label: 'ไทย', icon: 'th', date: 'th' },
|
||||
{ value: 'eng', label: 'English', icon: 'us', date: 'en-gb' },
|
||||
];
|
||||
|
||||
const notiOpen = ref(false);
|
||||
|
|
@ -134,9 +134,9 @@ watch(
|
|||
() => {
|
||||
localStorage.setItem('currentLanguage', currentLanguage.value);
|
||||
if (rawOption.value) {
|
||||
if (locale.value === 'en-US')
|
||||
if (locale.value === 'eng')
|
||||
optionStore.globalOption = rawOption.value.eng;
|
||||
if (locale.value === 'th-th')
|
||||
if (locale.value === 'tha')
|
||||
optionStore.globalOption = rawOption.value.tha;
|
||||
}
|
||||
},
|
||||
|
|
@ -149,18 +149,18 @@ onMounted(async () => {
|
|||
const getCurLang = localStorage.getItem('currentLanguage');
|
||||
if (getCurLang) currentLanguage.value = getCurLang;
|
||||
if (currentLanguage.value === 'English') {
|
||||
locale.value = 'en-US';
|
||||
locale.value = 'eng';
|
||||
setLocale('en-gb');
|
||||
}
|
||||
if (currentLanguage.value === 'ไทย') {
|
||||
locale.value = 'th-th';
|
||||
locale.value = 'tha';
|
||||
setLocale('th');
|
||||
}
|
||||
|
||||
const resultOption = await fetch('/option/option.json');
|
||||
rawOption.value = await resultOption.json();
|
||||
if (locale.value === 'en-US') optionStore.globalOption = rawOption.value.eng;
|
||||
if (locale.value === 'th-th') optionStore.globalOption = rawOption.value.tha;
|
||||
if (locale.value === 'eng') optionStore.globalOption = rawOption.value.eng;
|
||||
if (locale.value === 'tha') optionStore.globalOption = rawOption.value.tha;
|
||||
|
||||
const user = getUsername();
|
||||
const uid = getUserId();
|
||||
|
|
@ -254,7 +254,7 @@ onMounted(async () => {
|
|||
}
|
||||
"
|
||||
/>
|
||||
<div class="column">
|
||||
<div class="column col">
|
||||
<span
|
||||
class="title-gradient text-weight-bold"
|
||||
:class="{ 'text-h6': $q.screen.gt.xs }"
|
||||
|
|
@ -478,7 +478,7 @@ onMounted(async () => {
|
|||
height="550px"
|
||||
v-model:modal="canvasModal"
|
||||
no-app-box
|
||||
:title="$t('addSignature')"
|
||||
:title="$t('menu.profile.addSignature')"
|
||||
:close="() => (canvasModal = false)"
|
||||
>
|
||||
<CanvasComponent ref="canvasRef" v-model:modal="canvasModal" />
|
||||
|
|
|
|||
|
|
@ -24,19 +24,19 @@ const currentTheme = ref();
|
|||
const options = ref([
|
||||
{
|
||||
icon: 'mdi-account',
|
||||
label: 'editPersonalInfo',
|
||||
label: 'menu.profile.editPersonalInfo',
|
||||
value: 'op1',
|
||||
color: 'grey',
|
||||
},
|
||||
{
|
||||
icon: 'mdi-signature-freehand',
|
||||
label: 'signature',
|
||||
label: 'menu.profile.signature',
|
||||
value: 'op2',
|
||||
color: 'grey',
|
||||
},
|
||||
{
|
||||
icon: 'mdi-brightness-6',
|
||||
label: 'mode',
|
||||
label: 'menu.profile.mode',
|
||||
value: 'op3',
|
||||
color: 'grey',
|
||||
},
|
||||
|
|
@ -334,7 +334,7 @@ onMounted(async () => {
|
|||
<div class="column justify-center">
|
||||
<q-list :dense="true" v-for="op in options" :key="op.label">
|
||||
<q-item
|
||||
v-if="op.label !== 'mode'"
|
||||
v-if="op.label !== 'menu.profile.mode'"
|
||||
clickable
|
||||
:id="`btn-${op.label}`"
|
||||
@click="$emit(op.label)"
|
||||
|
|
@ -347,9 +347,9 @@ onMounted(async () => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-separator v-if="op.label === 'mode'" />
|
||||
<q-separator v-if="op.label === 'menu.profile.mode'" />
|
||||
<q-item
|
||||
v-if="op.label === 'mode'"
|
||||
v-if="op.label === 'menu.profile.mode'"
|
||||
clickable
|
||||
:id="`btn-${op.label}`"
|
||||
@click="$emit(op.label)"
|
||||
|
|
@ -363,7 +363,7 @@ onMounted(async () => {
|
|||
{{ $t(op.label) }}
|
||||
</span>
|
||||
<span class="app-text-muted-2">
|
||||
{{ $t(currentTheme) }}
|
||||
{{ $t(`general.${currentTheme}`) }}
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -389,7 +389,7 @@ onMounted(async () => {
|
|||
<q-item-section>
|
||||
<div class="row justify-between">
|
||||
<span>
|
||||
{{ $t(mode.label) }}
|
||||
{{ $t(`general.${mode.label}`) }}
|
||||
</span>
|
||||
<q-icon v-if="mode.isActive" name="mdi-check" />
|
||||
</div>
|
||||
|
|
@ -408,7 +408,7 @@ onMounted(async () => {
|
|||
unelevated
|
||||
class="q-ma-md app-text-negative"
|
||||
:class="{ dark: $q.dark.isActive }"
|
||||
:label="$t('logout')"
|
||||
:label="$t('general.logout')"
|
||||
@click="$emit('logout')"
|
||||
id="btn-logout"
|
||||
style="background-color: hsla(var(--negative-bg) / 0.1)"
|
||||
|
|
@ -421,7 +421,7 @@ onMounted(async () => {
|
|||
color="primary"
|
||||
unelevated
|
||||
class="q-ma-md app-text-negative"
|
||||
:label="$t('login')"
|
||||
:label="$t('general.login')"
|
||||
@click="$emit('login')"
|
||||
id="btn-login"
|
||||
v-close-popup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue