feat: prevent any action when readonly
This commit is contained in:
parent
ebd6de9c29
commit
277d58d1f2
4 changed files with 16 additions and 3 deletions
|
|
@ -55,6 +55,7 @@ const requestListStore = useRequestList();
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
readonly?: boolean;
|
||||||
listDocument: string[];
|
listDocument: string[];
|
||||||
currentId: { customer: string; employee: string };
|
currentId: { customer: string; employee: string };
|
||||||
}>(),
|
}>(),
|
||||||
|
|
@ -237,7 +238,7 @@ function changeCustomerTab(opts: { tab: 'customer' | 'employee' }) {
|
||||||
<span>
|
<span>
|
||||||
{{ $t('menu.order.documentCheck') }}
|
{{ $t('menu.order.documentCheck') }}
|
||||||
</span>
|
</span>
|
||||||
<nav class="q-ml-auto row">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<CancelButton
|
<CancelButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
id="btn-info-basic-undo"
|
||||||
|
|
@ -427,6 +428,7 @@ function changeCustomerTab(opts: { tab: 'customer' | 'employee' }) {
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td class="text-left">
|
<q-td class="text-left">
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
|
:disabled="readonly"
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
:label="
|
:label="
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import { AttributesForm, Step } from 'src/stores/request-list/types';
|
||||||
import { useRequestList } from 'src/stores/request-list';
|
import { useRequestList } from 'src/stores/request-list';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
readonly?: boolean;
|
||||||
step: Step;
|
step: Step;
|
||||||
responsibleAreaDistrictId?: string;
|
responsibleAreaDistrictId?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
@ -89,7 +90,7 @@ function assignToForm() {
|
||||||
<span>
|
<span>
|
||||||
{{ $t('general.designForm') }}
|
{{ $t('general.designForm') }}
|
||||||
</span>
|
</span>
|
||||||
<nav class="q-ml-auto row">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
id="btn-info-basic-undo"
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ const requestListStore = useRequestList();
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
id: string;
|
id: string;
|
||||||
|
readonly?: boolean;
|
||||||
propertiesToShow: (PropString | PropNumber | PropDate | PropOptions)[];
|
propertiesToShow: (PropString | PropNumber | PropDate | PropOptions)[];
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
|
|
@ -100,7 +101,7 @@ defineEmits<{
|
||||||
<span>
|
<span>
|
||||||
{{ $t('general.properties') }}
|
{{ $t('general.properties') }}
|
||||||
</span>
|
</span>
|
||||||
<nav class="q-ml-auto row">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
id="btn-info-basic-undo"
|
||||||
|
|
|
||||||
|
|
@ -605,6 +605,9 @@ function isInstallmentPaySuccess(installmentNo: number) {
|
||||||
class="column surface-1 q-px-sm bordered-t q-pb-sm q-gutter-y-sm"
|
class="column surface-1 q-px-sm bordered-t q-pb-sm q-gutter-y-sm"
|
||||||
>
|
>
|
||||||
<DocumentExpansion
|
<DocumentExpansion
|
||||||
|
:readonly="
|
||||||
|
data.requestDataStatus === RequestDataStatus.Canceled
|
||||||
|
"
|
||||||
v-if="value._documentExpansion"
|
v-if="value._documentExpansion"
|
||||||
ref="refDocumentExpansion"
|
ref="refDocumentExpansion"
|
||||||
:attributes="value.attributes"
|
:attributes="value.attributes"
|
||||||
|
|
@ -653,6 +656,9 @@ function isInstallmentPaySuccess(installmentNo: number) {
|
||||||
:listDocument="product?.document"
|
:listDocument="product?.document"
|
||||||
/>
|
/>
|
||||||
<FormExpansion
|
<FormExpansion
|
||||||
|
:readonly="
|
||||||
|
data.requestDataStatus === RequestDataStatus.Canceled
|
||||||
|
"
|
||||||
v-if="value._formExpansion"
|
v-if="value._formExpansion"
|
||||||
:step="{
|
:step="{
|
||||||
step: pageState.currentStep,
|
step: pageState.currentStep,
|
||||||
|
|
@ -668,6 +674,9 @@ function isInstallmentPaySuccess(installmentNo: number) {
|
||||||
/>
|
/>
|
||||||
<PropertiesExpansion
|
<PropertiesExpansion
|
||||||
:id="value.id"
|
:id="value.id"
|
||||||
|
:readonly="
|
||||||
|
data.requestDataStatus === RequestDataStatus.Canceled
|
||||||
|
"
|
||||||
:properties-to-show="
|
:properties-to-show="
|
||||||
value.productService.work?.attributes.workflowStep[
|
value.productService.work?.attributes.workflowStep[
|
||||||
pageState.currentStep - 1
|
pageState.currentStep - 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue