diff --git a/src/boot/components.ts b/src/boot/components.ts index 9bd627c0..0e028326 100644 --- a/src/boot/components.ts +++ b/src/boot/components.ts @@ -1,6 +1,6 @@ import { boot } from 'quasar/wrappers'; import VueDatePicker from '@vuepic/vue-datepicker'; -import '@vuepic/vue-datepicker/dist/main.css' +import '@vuepic/vue-datepicker/dist/main.css'; import GlobalDialog from 'components/GlobalDialog.vue'; import GlobalLoading from 'components/GlobalLoading.vue'; diff --git a/src/components/01_branch-management/BranchCard.vue b/src/components/01_branch-management/BranchCard.vue index ace3c30e..945474d5 100644 --- a/src/components/01_branch-management/BranchCard.vue +++ b/src/components/01_branch-management/BranchCard.vue @@ -2,10 +2,21 @@ defineProps<{ inactive?: boolean; color?: 'none' | 'hq' | 'br'; - data: Record; + data: { + branchLabelCode: string; + branchLabelName: string; + branchLabelTel: string; + branchLabelAddress: string; + branchLabelType: string; + }; metadata?: unknown; badgeField?: string[]; - fieldSelected?: string[]; + fieldSelected?: ( + | 'branchLabelName' + | 'branchLabelAddress' + | 'branchLabelTel' + | 'branchLabelType' + )[]; footer?: boolean; }>(); @@ -21,112 +32,124 @@ defineProps<{ 'branch-card__hq': color === 'hq', 'branch-card__br': color === 'br', }" + @click="$emit('open')" > +
+
+
+ +
+
+
+ {{ data.branchLabelName }} + {{ data.branchLabelCode }} +
+ +
+ + + +
+
+
-
- {{ $t(k) }} -
-
- {{ v }} - -
+
{{ $t(key) }}
+
{{ data[key as keyof typeof data] }}
diff --git a/src/components/StatCardComponent.vue b/src/components/StatCardComponent.vue index 2eb2e7c0..b5ddd3ef 100644 --- a/src/components/StatCardComponent.vue +++ b/src/components/StatCardComponent.vue @@ -1,16 +1,22 @@ diff --git a/src/components/TabComponent.vue b/src/components/TabComponent.vue index ee9a4665..f4f74557 100644 --- a/src/components/TabComponent.vue +++ b/src/components/TabComponent.vue @@ -4,6 +4,7 @@ import { CustomerBranchCreate } from 'stores/customer/types'; defineProps<{ readonly?: boolean; + edit?: boolean; }>(); const customerBranch = defineModel('customerBranch', { @@ -17,6 +18,8 @@ const index = ref(0); function addData() { index.value++; customerBranch.value.push({ + code: '', + branchNo: undefined, address: '', addressEN: '', provinceId: '', @@ -91,7 +94,8 @@ function close(index: number) { v-for="(v, index) in customerBranch" :key="index" :name="index" - :label="`${$t('customerBranchFormTab')} ${index + 1}`" + :label="`${$t('customerBranchFormTab')} `" + :disable="tab !== index && edit" @click="tab = index" no-caps :class="tab === index ? '' : 'bordered-b bordered-r'" @@ -114,7 +118,9 @@ function close(index: number) { diff --git a/src/components/UsersDetailCardComponent.vue b/src/components/UsersDetailCardComponent.vue index 8f138b1a..6d72df2b 100644 --- a/src/components/UsersDetailCardComponent.vue +++ b/src/components/UsersDetailCardComponent.vue @@ -315,11 +315,11 @@ defineEmits<{ } } &.color__purple { - --_color: var(--purple-11-hsl); + --_color: var(--violet-11-hsl); } &.color__green { - --_color: var(--teal-9-hsl); + --_color: var(--teal-10-hsl); } } diff --git a/src/components/home/PersonCard.vue b/src/components/home/PersonCard.vue index df3e3813..d10cf369 100644 --- a/src/components/home/PersonCard.vue +++ b/src/components/home/PersonCard.vue @@ -5,275 +5,242 @@ import AppBox from 'components/app/AppBox.vue'; import AppCircle from 'components/app/AppCircle.vue'; defineProps<{ - list: { - id: string; + data: { name: string; - detail?: { label: string; value: string }[]; + code: string; male?: boolean; female?: boolean; - disabled?: boolean; - badge?: string; img?: string; - }[]; - gridColumns?: number; + detail?: { icon: string; value: string }[]; + }; + tag?: [{ color: string; value: string }]; + disabled?: boolean; noHover?: boolean; noAction?: boolean; - noDetail?: boolean; noBg?: boolean; - detailColumnCount?: number; - canEditProfile?: boolean; history?: boolean; }>(); defineEmits<{ (e: 'editProfile'): void; - (e: 'history', id: string): void; - (e: 'deleteCard', id: string): void; - ( - e: 'updateCard', - action: 'FORM' | 'INFO', - id: string, - isEdit?: boolean, - ): void; - (e: 'enterCard', action: 'FORM' | 'INFO', id: string): void; - (e: 'toggleStatus', id: string, status: boolean): void; + (e: 'history'): void; + (e: 'deleteCard'): void; + (e: 'updateCard', action: 'FORM' | 'INFO', isEdit?: boolean): void; + (e: 'enterCard', action: 'FORM' | 'INFO'): void; + (e: 'toggleStatus', status: boolean): void; }>(); diff --git a/src/css/app.scss b/src/css/app.scss index 8b9903dc..6b9f7e27 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -9,9 +9,9 @@ html { --brand-1: #035aa1; --brand-2: #f50000; - --border-color: var(--gray-4); + --border-color: var(--gray-2); --foreground: black; - --background: var(--gray-1); + --background: var(--gray-2); --surface-0: var(--background); --surface-1: white; --surface-2: var(--gray-0); @@ -46,15 +46,15 @@ html { } :where(.dark, .body--dark) { - --brand-1: var(--blue-5); + --brand-1: #035aa1; --brand-2: #f50000; --border-color: var(--gray-7); --foreground: white; - --background: var(--gray-10); + --background: var(--gray-11); --surface-0: var(--background); - --surface-1: var(--gray-11); - --surface-2: var(--gray-10); - --surface-3: var(--gray-9); + --surface-1: var(--gray-10); + --surface-2: var(--gray-9); + --surface-3: var(--gray-11); --surface-tab: var(--gray-9); diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss index 32801cd1..2ad828be 100644 --- a/src/css/quasar.variables.scss +++ b/src/css/quasar.variables.scss @@ -6,8 +6,8 @@ $primary: var(--brand-1); $secondary: var(--brand-2); $accent: #9c27b0; -$dark: var(--gray-11); -$dark-page: var(--gray-10); +$dark: var(--gray-10); +$dark-page: var(--gray-11); $positive: #00bd9d; $negative: var(--red-9); @@ -24,6 +24,7 @@ $separator-dark-color: var(--border-color); } .q-field__control { + background: var(--surface-1); color: $primary; } diff --git a/src/i18n/en-US/branch.ts b/src/i18n/en-US/branch.ts index 95902606..a20fd6e0 100644 --- a/src/i18n/en-US/branch.ts +++ b/src/i18n/en-US/branch.ts @@ -2,6 +2,7 @@ export default { branchManagementCaption: 'Manage All Branch', branchInHQ: 'Branch within the main office', + office: 'Office', branchLabel: 'Branch', branchHQLabel: 'Headquarters', branchName: 'Branch Name', @@ -20,4 +21,6 @@ export default { branchLabelStatus: 'Branch Status', registeredBranch: 'Registered Branch', + + branchStatTitle: 'Summary data of branch', }; diff --git a/src/i18n/en-US/customer-main-page.ts b/src/i18n/en-US/customer-main-page.ts index 8d4547cf..b9f19bbf 100644 --- a/src/i18n/en-US/customer-main-page.ts +++ b/src/i18n/en-US/customer-main-page.ts @@ -8,6 +8,9 @@ export default { customerEmployeeTooltipCaption: 'Click + to add an employee', customerEmployerAdd: 'Add employer', customerEmployeeAdd: 'Add employee', + + nameEmployee:'Name Employee', + EMPLOYER: 'Employer', EMPLOYEE: 'Employee', customerEmployerStatTitle: 'Employer data summary', @@ -53,4 +56,7 @@ export default { editBy: 'Edit by', valueBefore: 'Before', valueAfter: 'After', + + serviceWorkTotal: 'Service Work Total', + priceInformation: 'Price Information', }; diff --git a/src/i18n/en-US/employer-dialog.ts b/src/i18n/en-US/employer-dialog.ts index 0d84df27..3a618ea9 100644 --- a/src/i18n/en-US/employer-dialog.ts +++ b/src/i18n/en-US/employer-dialog.ts @@ -6,4 +6,6 @@ export default { corporationEnglish: 'English company name', companyOwnerName: 'Company Owner Name', + + corporation: 'Corporation', }; diff --git a/src/i18n/en-US/form-dialog.ts b/src/i18n/en-US/form-dialog.ts index ec2f242d..43b66694 100644 --- a/src/i18n/en-US/form-dialog.ts +++ b/src/i18n/en-US/form-dialog.ts @@ -92,6 +92,7 @@ export default { formDialogInputNationality: 'Nationality', formDialogTitlePersonnelAddress: 'Personnel Address', + formDialogTitleEmployerAddress: 'Employer Address', formDialogTitleAddressPure: 'Address', formDialogTitleAddressPureEN: 'Address in English', diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 7ab6d47e..35424c99 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -39,6 +39,8 @@ export default { 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', @@ -59,6 +61,9 @@ export default { baseOnDevice: 'Base on Device', person: 'Person', recordsPage: 'Showing {resultcurrentPage} out of {total} records', + showing: 'Showing', + dataSum: 'Data Summaries', + createdAt: 'Created At', ...status, ...main, ...address, diff --git a/src/i18n/en-US/object.ts b/src/i18n/en-US/object.ts new file mode 100644 index 00000000..b01a3a62 --- /dev/null +++ b/src/i18n/en-US/object.ts @@ -0,0 +1,75 @@ +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', + }, + }, +}; diff --git a/src/i18n/en-US/personnel-main-page.ts b/src/i18n/en-US/personnel-main-page.ts index 11362552..af903d4b 100644 --- a/src/i18n/en-US/personnel-main-page.ts +++ b/src/i18n/en-US/personnel-main-page.ts @@ -12,7 +12,7 @@ export default { DELEGATE: 'Delegate', AGENCY: 'Agency', - personnelStatTitle: 'Summary data of ', + personnelStatTitle: 'Summary data', personnelCardUserType: 'Type', personnelCardTelephone: 'Telephone', diff --git a/src/i18n/en-US/product-service.ts b/src/i18n/en-US/product-service.ts index c1e34332..ef3ebe5d 100644 --- a/src/i18n/en-US/product-service.ts +++ b/src/i18n/en-US/product-service.ts @@ -9,6 +9,8 @@ export default { 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.', @@ -19,8 +21,9 @@ export default { productCode: 'Product Code', productName: 'Product Name', - processingTime: 'Processing Time (Day)', - priceeInformation: 'Price Information', + productDetail: 'Product Detail', + productProcessingTime: 'Processing Time (Day)', + priceInformation: 'Price Information', salePrice: 'Sale Price', agentPrice: 'Agent Price', processingPrice: 'Processing Price', diff --git a/src/i18n/th-th/branch.ts b/src/i18n/th-th/branch.ts index 36782675..35a7737f 100644 --- a/src/i18n/th-th/branch.ts +++ b/src/i18n/th-th/branch.ts @@ -2,6 +2,7 @@ export default { branchManagementCaption: 'จัดการสาขาทั้งหมด', branchInHQ: 'สาขาภายในสำนักงานใหญ่', + office: 'สำนักงาน', branchLabel: 'สาขา', branchHQLabel: 'สำนักงานใหญ่', branchName: 'ชื่อสาขา', @@ -20,4 +21,6 @@ export default { branchLabelStatus: 'สถานะสาขา', registeredBranch: 'สาขาที่ลงทะเบียน', + + branchStatTitle: 'สรุปจัดการสาขา', }; diff --git a/src/i18n/th-th/customer-main-page.ts b/src/i18n/th-th/customer-main-page.ts index 150b9f14..f949852c 100644 --- a/src/i18n/th-th/customer-main-page.ts +++ b/src/i18n/th-th/customer-main-page.ts @@ -8,6 +8,9 @@ export default { customerEmployeeTooltipCaption: 'คลิก + เพื่อเพิ่มลูกจ้าง', customerEmployerAdd: 'เพิ่มนายจ้าง', customerEmployeeAdd: 'เพิ่มลูกจ้าง', + + nameEmployee:'ชื่อลูกจ้าง', + EMPLOYER: 'นายจ้าง', EMPLOYEE: 'ลูกจ้าง', customerEmployerStatTitle: 'สรุปจำนวนข้อมูลนายจ้าง', @@ -61,4 +64,7 @@ export default { editBy: 'แก้ไขโดย', valueBefore: 'แก้ไขใหม่', valueAfter: 'ค่าเดิม', + + serviceWorkTotal: 'จำนวนงานทั้งหมด', + priceInformation: 'ข้อมูลราคา', }; diff --git a/src/i18n/th-th/employer-dialog.ts b/src/i18n/th-th/employer-dialog.ts index 798aeede..927d9eaa 100644 --- a/src/i18n/th-th/employer-dialog.ts +++ b/src/i18n/th-th/employer-dialog.ts @@ -6,4 +6,6 @@ export default { corporationEnglish: 'ชื่อ บริษัท ภาษาอังกฤษ', companyOwnerName: 'ชื่อเจ้าของบริษัท', + + corporation: 'ชื่อ บริษัท/นิติบุคคล', }; diff --git a/src/i18n/th-th/form-dialog.ts b/src/i18n/th-th/form-dialog.ts index 6be4f21a..8688354a 100644 --- a/src/i18n/th-th/form-dialog.ts +++ b/src/i18n/th-th/form-dialog.ts @@ -90,6 +90,7 @@ export default { formDialogInputNationality: 'สัญชาติ', formDialogTitlePersonnelAddress: 'ข้อมูลที่อยู่พนักงาน', + formDialogTitleEmployerAddress: 'ข้อมูลที่อยู่นายจ้าง', formDialogTitleAddressPure: 'ที่อยู่', formDialogTitleAddressPureEN: 'ที่อยู่ภาษาอังกฤษ', diff --git a/src/i18n/th-th/index.ts b/src/i18n/th-th/index.ts index 6602952e..bf5d3cb4 100644 --- a/src/i18n/th-th/index.ts +++ b/src/i18n/th-th/index.ts @@ -39,6 +39,7 @@ export default { displayField: 'ข้อมูลที่แสดง', deleteConfirmTitle: 'ยืนยันการลบข้อมูล', deleteConfirmMessage: 'คุณต้องการลบข้อมูลใช่หรือไม่', + headquartersNotEstablished: 'ท่านยังไม่ได้สร้างสำนักงานใหญ่ ต้องสร้างสำนักงานใหญ่ก่อนจึงจะสร้าง บุคลากรได้', changePassword: 'เปลี่ยนรหัสผ่าน', signature: 'ลายเซ็น', addSignature: 'เพิ่มลายเซ็น', @@ -59,6 +60,9 @@ export default { baseOnDevice: 'สีตามอุปกรณ์', person: 'คน', recordsPage: 'แสดง {resultcurrentPage} รายการจาก {total} รายการ', + showing: 'แสดงทีละ', + dataSum: 'สรุปจำนวนข้อมูล', + createdAt: 'สร้างเมื่อ', ...status, ...main, ...address, diff --git a/src/i18n/th-th/main.ts b/src/i18n/th-th/main.ts index 2aa8851d..ea26c3f7 100644 --- a/src/i18n/th-th/main.ts +++ b/src/i18n/th-th/main.ts @@ -9,7 +9,7 @@ export default { mainCustomerCaption: 'จัดการคนภายในองค์กร', mainProductTitle: 'สินค้าและบริการ', - mainProductCaption: 'รายการสินค้าและบริการ', + mainProductCaption: 'ประเภทสินค้าและบริการ', mainQuotationTitle: 'ใบเสนอราคา', mainQuotationCaption: 'รายการใบเสนอราคา', diff --git a/src/i18n/th-th/object.ts b/src/i18n/th-th/object.ts new file mode 100644 index 00000000..68fbf820 --- /dev/null +++ b/src/i18n/th-th/object.ts @@ -0,0 +1,75 @@ +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: 'ยกเลิก', + }, + }, +}; diff --git a/src/i18n/th-th/product-service.ts b/src/i18n/th-th/product-service.ts index 583047de..f3e33d54 100644 --- a/src/i18n/th-th/product-service.ts +++ b/src/i18n/th-th/product-service.ts @@ -21,7 +21,8 @@ export default { productCode: 'รหัสสินค้า', productName: 'ชื่อสินค้า', - processingTime: 'ระยะเวลาดำเนินการ (วัน)', + productDetail: 'รายละเอียดสินค้า', + productProcessingTime: 'ระยะเวลาดำเนินการ (วัน)', priceeInformation: 'ข้อมูลราคา', salePrice: 'ราคาขาย', agentPrice: 'ราคาตัวแทน', diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 59098bc8..f4a6f5dc 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -16,6 +16,10 @@ import useOptionStore from 'src/stores/options'; import { dialog } from 'src/stores/utils'; import { setLocale } from 'src/utils/datetime'; import useUtilsStore from 'src/stores/utils'; +import useMyBranchStore from 'src/stores/my-branch'; + +const useMyBranch = useMyBranchStore(); +const { fetchListMyBranch } = useMyBranch; interface NotificationButton { item: string; @@ -41,7 +45,10 @@ const userStore = useUserStore(); const rawOption = ref(); const canvasModal = ref(false); + const leftDrawerOpen = ref(true); +const leftDrawerMini = ref(false); + const filterUnread = ref(false); const unread = ref(1); // const filterRole = ref(); @@ -135,6 +142,8 @@ watch( ); onMounted(async () => { + await fetchListMyBranch(getUserId() ?? ''); + const getCurLang = localStorage.getItem('currentLanguage'); if (getCurLang) currentLanguage.value = getCurLang; if (currentLanguage.value === 'English') { @@ -169,22 +178,25 @@ onMounted(async () => {