refactor: update access control checks for customer view permissions
This commit is contained in:
parent
436bfa41bb
commit
e957672c91
2 changed files with 6 additions and 6 deletions
|
|
@ -473,7 +473,7 @@ watch(
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<TableRequestList
|
<TableRequestList
|
||||||
:no-link="!canAccess('related', 'edit')"
|
:no-link="!canAccess('customer', 'view')"
|
||||||
:columns="column"
|
:columns="column"
|
||||||
:rows="data"
|
:rows="data"
|
||||||
:grid="pageState.gridView"
|
:grid="pageState.gridView"
|
||||||
|
|
@ -575,7 +575,7 @@ watch(
|
||||||
v-if="requestListActionData"
|
v-if="requestListActionData"
|
||||||
v-model="pageState.requestListActionDialog"
|
v-model="pageState.requestListActionDialog"
|
||||||
:request-list="requestListActionData"
|
:request-list="requestListActionData"
|
||||||
:no-link="!canAccess('related', 'edit')"
|
:no-link="!canAccess('customer', 'view')"
|
||||||
@submit="submitRequestListAction"
|
@submit="submitRequestListAction"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -460,7 +460,7 @@ async function submitRejectCancel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toCustomer(customer: RequestData['quotation']['customerBranch']) {
|
function toCustomer(customer: RequestData['quotation']['customerBranch']) {
|
||||||
if (!canAccess('related', 'edit')) return;
|
if (!canAccess('customer', 'view')) return;
|
||||||
const url = new URL(
|
const url = new URL(
|
||||||
`/customer-management?tab=customer&id=${customer.customerId}`,
|
`/customer-management?tab=customer&id=${customer.customerId}`,
|
||||||
window.location.origin,
|
window.location.origin,
|
||||||
|
|
@ -470,7 +470,7 @@ function toCustomer(customer: RequestData['quotation']['customerBranch']) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toEmployee(employee: RequestData['employee']) {
|
function toEmployee(employee: RequestData['employee']) {
|
||||||
if (!canAccess('related', 'edit')) return;
|
if (!canAccess('customer', 'view')) return;
|
||||||
const url = new URL(
|
const url = new URL(
|
||||||
`/customer-management?tab=employee&id=${employee.id}`,
|
`/customer-management?tab=employee&id=${employee.id}`,
|
||||||
window.location.origin,
|
window.location.origin,
|
||||||
|
|
@ -745,7 +745,7 @@ function toEmployee(employee: RequestData['employee']) {
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<DataDisplay
|
<DataDisplay
|
||||||
:clickable="canAccess('related', 'edit')"
|
:clickable="canAccess('customer', 'view')"
|
||||||
class="col"
|
class="col"
|
||||||
icon="mdi-account-settings-outline"
|
icon="mdi-account-settings-outline"
|
||||||
:label="$t('customer.employer')"
|
:label="$t('customer.employer')"
|
||||||
|
|
@ -758,7 +758,7 @@ function toEmployee(employee: RequestData['employee']) {
|
||||||
@label-click="toCustomer(data.quotation.customerBranch)"
|
@label-click="toCustomer(data.quotation.customerBranch)"
|
||||||
/>
|
/>
|
||||||
<DataDisplay
|
<DataDisplay
|
||||||
:clickable="canAccess('related', 'edit')"
|
:clickable="canAccess('customer', 'view')"
|
||||||
class="col"
|
class="col"
|
||||||
icon="mdi-account-settings-outline"
|
icon="mdi-account-settings-outline"
|
||||||
:label="$t('customer.employee')"
|
:label="$t('customer.employee')"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue