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