feat: Main => i18n
This commit is contained in:
parent
08fef3ac09
commit
bae9e48afa
6 changed files with 100 additions and 29 deletions
|
|
@ -53,8 +53,8 @@ function navigateTo(destination: string) {
|
||||||
/>
|
/>
|
||||||
</AppCircle>
|
</AppCircle>
|
||||||
<div class="column items-center q-mt-md text-center">
|
<div class="column items-center q-mt-md text-center">
|
||||||
<span style="font-weight: var(--font-weight-8)">{{ v.title }}</span>
|
<span style="font-weight: var(--font-weight-8)">{{ $t(v.title) }}</span>
|
||||||
<span style="color: rgba(130 130 130 / 0.7)">{{ v.caption }}</span>
|
<span style="color: rgba(130 130 130 / 0.7)">{{ $t(v.caption) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</AppBox>
|
</AppBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// so you can safely delete all default props below
|
// so you can safely delete all default props below
|
||||||
import drawerComponent from './drawer-component';
|
import drawerComponent from './drawer-component';
|
||||||
import branchMainPage from './branch-main-page';
|
import branchMainPage from './branch-main-page';
|
||||||
|
import main from './main';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
ok: 'Confirm',
|
ok: 'Confirm',
|
||||||
|
|
@ -13,4 +14,5 @@ export default {
|
||||||
save: 'Save',
|
save: 'Save',
|
||||||
...drawerComponent,
|
...drawerComponent,
|
||||||
...branchMainPage,
|
...branchMainPage,
|
||||||
|
...main,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
34
src/i18n/en-US/main.ts
Normal file
34
src/i18n/en-US/main.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
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.',
|
||||||
|
};
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import drawerComponent from './drawer-component';
|
import drawerComponent from './drawer-component';
|
||||||
import branchMainPage from './branch-main-page';
|
import branchMainPage from './branch-main-page';
|
||||||
|
import main from './main';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
ok: 'ยืนยัน',
|
ok: 'ยืนยัน',
|
||||||
|
|
@ -11,4 +12,5 @@ export default {
|
||||||
save: 'บันทึก',
|
save: 'บันทึก',
|
||||||
...drawerComponent,
|
...drawerComponent,
|
||||||
...branchMainPage,
|
...branchMainPage,
|
||||||
|
...main,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
34
src/i18n/th-th/main.ts
Normal file
34
src/i18n/th-th/main.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
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: 'แสดงรายงาน',
|
||||||
|
};
|
||||||
|
|
@ -1,101 +1,100 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import MenuItem from 'components/home/MenuItem.vue';
|
import MenuItem from 'components/home/MenuItem.vue';
|
||||||
import PersonCard from 'src/components/home/PersonCard.vue';
|
|
||||||
import UsersDetailCardComponent from 'components/UsersDetailCardComponent.vue';
|
const { t, locale } = useI18n();
|
||||||
|
|
||||||
const menu = [
|
const menu = [
|
||||||
{
|
{
|
||||||
value: 'branch-management',
|
value: 'branch-management',
|
||||||
icon: 'mdi-chart-donut',
|
icon: 'mdi-chart-donut',
|
||||||
color: 'green',
|
color: 'green',
|
||||||
title: 'จัดการสาขา',
|
title: 'mainBranchTitle',
|
||||||
caption: 'จัดการสาขาภายในองค์กร',
|
caption: 'mainBranchCaption',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'personnel-management',
|
value: 'personnel-management',
|
||||||
icon: 'isax-frame5',
|
icon: 'isax-frame5',
|
||||||
color: 'cyan',
|
color: 'cyan',
|
||||||
title: 'จัดการบุคลากร',
|
title: 'mainPersonnelTitle',
|
||||||
caption: 'จัดการคนภายในองค์กร',
|
caption: 'mainPersonnelCaption',
|
||||||
isax: true,
|
isax: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'isax-frame5',
|
icon: 'isax-frame5',
|
||||||
color: 'cyan',
|
color: 'cyan',
|
||||||
title: 'จัดการลูกค้า',
|
title: 'mainCustomerTitle',
|
||||||
caption: 'จัดการคนภายในองค์กร',
|
caption: 'mainCustomerCaption',
|
||||||
isax: true,
|
isax: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'heroicons-truck-solid',
|
icon: 'heroicons-truck-solid',
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
title: 'สินค้าและบริการ',
|
title: 'mainProductTitle',
|
||||||
caption: 'รายการสินค้าและบริการ',
|
caption: 'mainProductCaption',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'mdi-file-document',
|
icon: 'mdi-file-document',
|
||||||
color: 'violet',
|
color: 'violet',
|
||||||
title: 'ใบเสนอราคา',
|
title: 'mainQuotationTitle',
|
||||||
caption: 'รายการใบเสนอราคา',
|
caption: 'mainQuotationCaption',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'isax-device-message5',
|
icon: 'isax-device-message5',
|
||||||
color: 'purple',
|
color: 'purple',
|
||||||
title: 'รายการคำขอ',
|
title: 'mainRequestTitle',
|
||||||
caption: 'แสดงรายการคำขอ',
|
caption: 'mainRequestCaption',
|
||||||
isax: true,
|
isax: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'isax-receipt-2-15',
|
icon: 'isax-receipt-2-15',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
title: 'ใบสั่งซื้อ',
|
title: 'mainOrderTitle',
|
||||||
caption: 'รายการใบสั่งซื้อ',
|
caption: 'mainOrderCaption',
|
||||||
isax: true,
|
isax: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'material-symbols:box',
|
icon: 'material-symbols:box',
|
||||||
color: 'camo',
|
color: 'camo',
|
||||||
title: 'ใบรับสินค้า',
|
title: 'mainReceiptTitle',
|
||||||
caption: 'รายการใบรับสินค้า',
|
caption: 'mainReceiptCaption',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'isax-dollar-circle4',
|
icon: 'isax-dollar-circle4',
|
||||||
color: 'lime',
|
color: 'lime',
|
||||||
title: 'การจัดการการเงิน',
|
title: 'mainFinanceTitle',
|
||||||
caption: 'รายการบัญชีทั้งหมด',
|
caption: 'mainFinanceCaption',
|
||||||
isax: true,
|
isax: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'isax-element-35',
|
icon: 'isax-element-35',
|
||||||
color: 'cyan',
|
color: 'cyan',
|
||||||
title: 'Dashboard',
|
title: 'mainDashboardTitle',
|
||||||
caption: 'แสดงข้อมูลสถิติ',
|
caption: 'mainDashboardCaption',
|
||||||
isax: true,
|
isax: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'mdi-file-document',
|
icon: 'mdi-file-document',
|
||||||
color: 'indigo',
|
color: 'indigo',
|
||||||
title: 'รายงาน',
|
title: 'mainReportTitle',
|
||||||
caption: 'แสดงรายงาน',
|
caption: 'mainReportCaption',
|
||||||
},
|
},
|
||||||
] satisfies InstanceType<typeof MenuItem>['$props']['list'];
|
] satisfies InstanceType<typeof MenuItem>['$props']['list'];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MenuItem :list="menu" />
|
<MenuItem :list="menu" />
|
||||||
<!-- <div class="row">
|
|
||||||
<users-detail-card-component class="q-pa-md" v-for="v in [1, 2]" :key="v" />
|
|
||||||
</div> -->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue