refactor: update access control checks for quotation edit permissions
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
d4cab27aaf
commit
436bfa41bb
2 changed files with 4 additions and 10 deletions
|
|
@ -413,7 +413,7 @@ async function storeDataLocal(id: string) {
|
|||
hide-icon
|
||||
style="z-index: 999"
|
||||
@click.stop="triggerAddQuotationDialog"
|
||||
v-if="canAccess('related', 'edit')"
|
||||
v-if="canAccess('quotation', 'edit')"
|
||||
/>
|
||||
|
||||
<div class="column full-height no-wrap">
|
||||
|
|
@ -650,7 +650,7 @@ async function storeDataLocal(id: string) {
|
|||
<NoData
|
||||
v-if="
|
||||
pageState.inputSearch ||
|
||||
!canAccess('related', 'edit') ||
|
||||
!canAccess('quotation', 'edit') ||
|
||||
pageState.currentTab !== 'Issued'
|
||||
"
|
||||
:not-found="!!pageState.inputSearch"
|
||||
|
|
@ -660,7 +660,7 @@ async function storeDataLocal(id: string) {
|
|||
v-if="
|
||||
!pageState.inputSearch &&
|
||||
pageState.currentTab === 'Issued' &&
|
||||
canAccess('related', 'edit')
|
||||
canAccess('quotation', 'edit')
|
||||
"
|
||||
@click="triggerAddQuotationDialog"
|
||||
label="general.add"
|
||||
|
|
@ -684,7 +684,6 @@ async function storeDataLocal(id: string) {
|
|||
"
|
||||
>
|
||||
<TableQuotation
|
||||
:hide-action="!canAccess('related', 'edit')"
|
||||
:page="quotationPage"
|
||||
:page-size="quotationPageSize"
|
||||
:columns="columnQuotation"
|
||||
|
|
@ -718,7 +717,6 @@ async function storeDataLocal(id: string) {
|
|||
<QuotationCard
|
||||
class="col"
|
||||
hide-kebab-delete
|
||||
:hide-action="!canAccess('related', 'edit')"
|
||||
:hide-kebab-edit="!(pageState.currentTab === 'Issued')"
|
||||
:hide-preview="pageState.currentTab === 'PaymentSuccess'"
|
||||
:urgent="item.row.urgent"
|
||||
|
|
|
|||
|
|
@ -1736,7 +1736,7 @@ function covertToNode() {
|
|||
:readonly="
|
||||
{
|
||||
quotation: quotationFormState.mode !== 'edit',
|
||||
invoice: !canAccess('related', 'edit'),
|
||||
invoice: false,
|
||||
accepted: true,
|
||||
}[view]
|
||||
"
|
||||
|
|
@ -1940,7 +1940,6 @@ function covertToNode() {
|
|||
view !== View.Receipt &&
|
||||
view !== View.Complete
|
||||
"
|
||||
:readonly="!canAccess('related', 'edit')"
|
||||
:data="quotationFormState.source"
|
||||
v-model:first-code-payment="firstCodePayment"
|
||||
@fetch-status="
|
||||
|
|
@ -2272,7 +2271,6 @@ function covertToNode() {
|
|||
class="q-ml-sm"
|
||||
v-if="
|
||||
view === View.Accepted &&
|
||||
canAccess('related', 'edit') &&
|
||||
quotationFormData.quotationStatus === 'Issued'
|
||||
"
|
||||
>
|
||||
|
|
@ -2312,7 +2310,6 @@ function covertToNode() {
|
|||
class="q-ml-sm"
|
||||
v-if="
|
||||
view === View.Invoice &&
|
||||
canAccess('related', 'edit') &&
|
||||
((quotationFormData.quotationStatus !== 'PaymentPending' &&
|
||||
quotationFormData.payCondition !== 'Full') ||
|
||||
quotationFormData.quotationStatus === 'Accepted') &&
|
||||
|
|
@ -2339,7 +2336,6 @@ function covertToNode() {
|
|||
style="gap: var(--size-2)"
|
||||
v-if="
|
||||
(view === View.Quotation &&
|
||||
canAccess('related', 'edit') &&
|
||||
(quotationFormData.quotationStatus === 'Issued' ||
|
||||
quotationFormData.quotationStatus === 'Expired')) ||
|
||||
!quotationFormData.quotationStatus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue