chore: format

This commit is contained in:
Methapon2001 2024-07-26 10:57:31 +07:00
parent e7852eb8aa
commit 10e0d638f5
6 changed files with 23 additions and 26 deletions

View file

@ -33,14 +33,9 @@ onMounted(async () => {
codeOption.value = option.tha.typeProduct; codeOption.value = option.tha.typeProduct;
} }
if(!!props.optionsBranch) { if (!!props.optionsBranch) {
registeredBranchId.value = props.optionsBranch[0].id;
registeredBranchId.value = props.optionsBranch[0].id ;
} }
}); });
</script> </script>
@ -81,19 +76,21 @@ onMounted(async () => {
map-options map-options
options-dense options-dense
:label="$t('registeredBranch')" :label="$t('registeredBranch')"
class="col-3 " class="col-3"
option-label="name" option-label="name"
option-value="id" option-value="id"
v-model="registeredBranchId" v-model="registeredBranchId"
:options="optionsBranch" :options="optionsBranch"
:rules="[ :rules="[
(val) => { (val) => {
const roles = getRole() || []; const roles = getRole() || [];
const isSpecialRole = ['admin', 'system', 'head_of_admin'].some(role => roles.includes(role)); const isSpecialRole = ['admin', 'system', 'head_of_admin'].some(
return isSpecialRole || !!val || 'กรุณากรอกข้อมูล'; (role) => roles.includes(role),
} );
]" return isSpecialRole || !!val || 'กรุณากรอกข้อมูล';
clearable },
]"
clearable
/> />
<q-input <q-input

View file

@ -9,7 +9,7 @@ export default {
customerEmployerAdd: 'Add employer', customerEmployerAdd: 'Add employer',
customerEmployeeAdd: 'Add employee', customerEmployeeAdd: 'Add employee',
nameEmployee:'Name Employee', nameEmployee: 'Name Employee',
EMPLOYER: 'Employer', EMPLOYER: 'Employer',
EMPLOYEE: 'Employee', EMPLOYEE: 'Employee',

View file

@ -39,7 +39,8 @@ export default {
displayField: 'Display Fields', displayField: 'Display Fields',
deleteConfirmTitle: 'Comfirm Deletion', deleteConfirmTitle: 'Comfirm Deletion',
deleteConfirmMessage: 'Do you want to delete this item?', 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.', headquartersNotEstablished:
'You have not yet established the headquarters. You need to establish the headquarters before you can create personnel.',
changePassword: 'Change Password', changePassword: 'Change Password',
signature: 'Signature', signature: 'Signature',
@ -63,7 +64,7 @@ export default {
recordsPage: 'Showing {resultcurrentPage} out of {total} records', recordsPage: 'Showing {resultcurrentPage} out of {total} records',
showing: 'Showing', showing: 'Showing',
dataSum: 'Data Summaries', dataSum: 'Data Summaries',
createdAt: 'Created At', createdAt: 'Created At',
...status, ...status,
...main, ...main,
...address, ...address,

View file

@ -39,7 +39,8 @@ export default {
displayField: 'ข้อมูลที่แสดง', displayField: 'ข้อมูลที่แสดง',
deleteConfirmTitle: 'ยืนยันการลบข้อมูล', deleteConfirmTitle: 'ยืนยันการลบข้อมูล',
deleteConfirmMessage: 'คุณต้องการลบข้อมูลใช่หรือไม่', deleteConfirmMessage: 'คุณต้องการลบข้อมูลใช่หรือไม่',
headquartersNotEstablished: 'ท่านยังไม่ได้สร้างสำนักงานใหญ่ ต้องสร้างสำนักงานใหญ่ก่อนจึงจะสร้าง บุคลากรได้', headquartersNotEstablished:
'ท่านยังไม่ได้สร้างสำนักงานใหญ่ ต้องสร้างสำนักงานใหญ่ก่อนจึงจะสร้าง บุคลากรได้',
changePassword: 'เปลี่ยนรหัสผ่าน', changePassword: 'เปลี่ยนรหัสผ่าน',
signature: 'ลายเซ็น', signature: 'ลายเซ็น',
addSignature: 'เพิ่มลายเซ็น', addSignature: 'เพิ่มลายเซ็น',

View file

@ -33,9 +33,9 @@ export type Branch = {
telephoneNo: string; telephoneNo: string;
lineId: string; lineId: string;
contact: BranchContact[]; contact: BranchContact[];
_count:{ _count: {
branch:number branch: number;
} };
}; };
export type BranchWithChildren = Branch & { branch: Branch[] }; export type BranchWithChildren = Branch & { branch: Branch[] };

View file

@ -2,7 +2,7 @@ import { District, Province, SubDistrict } from '../address';
import { Status } from '../types'; import { Status } from '../types';
import { User } from '../user/types'; import { User } from '../user/types';
import { Customer , CustomerBranch } from '../customer/types'; import { Customer, CustomerBranch } from '../customer/types';
export type Employee = { export type Employee = {
id: string; id: string;
@ -47,12 +47,10 @@ export type Employee = {
district: District | null; district: District | null;
province: Province | null; province: Province | null;
profileImageUrl: string | null; profileImageUrl: string | null;
customerBranch: CustomerBranch & { customer: Customer } ; customerBranch: CustomerBranch & { customer: Customer };
}; };
export type EmployeeCreate = { export type EmployeeCreate = {
code: string; code: string;
image: File | null; image: File | null;
customerBranchId: string; customerBranchId: string;