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