refactor: update customer and quotation permissions to include additional roles
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
e957672c91
commit
ca57f4790c
1 changed files with 7 additions and 3 deletions
|
|
@ -267,13 +267,17 @@ const permissions = {
|
|||
view: allRoles.filter((r) => r !== 'branch_accountant'),
|
||||
},
|
||||
customer: {
|
||||
edit: allRoles.slice(0, 6),
|
||||
view: allRoles.slice(0, 8),
|
||||
edit: allRoles.slice(0, 9).filter((r) => r !== 'branch_accountant'),
|
||||
view: allRoles.slice(0, 9),
|
||||
},
|
||||
agencies: {
|
||||
edit: allRoles.slice(0, 7),
|
||||
view: allRoles,
|
||||
},
|
||||
quotation: {
|
||||
edit: allRoles.slice(0, 9).filter((r) => r !== 'branch_accountant'),
|
||||
view: allRoles.slice(0, 9),
|
||||
},
|
||||
related: {
|
||||
// ใช้กับหลายเมนู
|
||||
edit: allRoles.slice(0, 6),
|
||||
|
|
@ -686,7 +690,7 @@ export function getEmployeeName(
|
|||
|
||||
return {
|
||||
['eng']: `${typeof employee.namePrefix === 'string' ? useOptionStore().mapOption(employee.namePrefix) : ''} ${employee.firstNameEN} ${employee.lastNameEN}`,
|
||||
['tha']: `${typeof employee.namePrefix === 'string' ? useOptionStore().mapOption(employee.namePrefix) : ''} ${employee.firstName} ${employee.lastName}`,
|
||||
['tha']: `${typeof employee.namePrefix === 'string' ? useOptionStore().mapOption(employee.namePrefix) : ''} ${employee.firstName || employee.firstNameEN} ${employee.lastName}`,
|
||||
}[opts?.locale || 'eng'];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue