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'),
|
view: allRoles.filter((r) => r !== 'branch_accountant'),
|
||||||
},
|
},
|
||||||
customer: {
|
customer: {
|
||||||
edit: allRoles.slice(0, 6),
|
edit: allRoles.slice(0, 9).filter((r) => r !== 'branch_accountant'),
|
||||||
view: allRoles.slice(0, 8),
|
view: allRoles.slice(0, 9),
|
||||||
},
|
},
|
||||||
agencies: {
|
agencies: {
|
||||||
edit: allRoles.slice(0, 7),
|
edit: allRoles.slice(0, 7),
|
||||||
view: allRoles,
|
view: allRoles,
|
||||||
},
|
},
|
||||||
|
quotation: {
|
||||||
|
edit: allRoles.slice(0, 9).filter((r) => r !== 'branch_accountant'),
|
||||||
|
view: allRoles.slice(0, 9),
|
||||||
|
},
|
||||||
related: {
|
related: {
|
||||||
// ใช้กับหลายเมนู
|
// ใช้กับหลายเมนู
|
||||||
edit: allRoles.slice(0, 6),
|
edit: allRoles.slice(0, 6),
|
||||||
|
|
@ -686,7 +690,7 @@ export function getEmployeeName(
|
||||||
|
|
||||||
return {
|
return {
|
||||||
['eng']: `${typeof employee.namePrefix === 'string' ? useOptionStore().mapOption(employee.namePrefix) : ''} ${employee.firstNameEN} ${employee.lastNameEN}`,
|
['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'];
|
}[opts?.locale || 'eng'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue