This commit is contained in:
@@ -341,10 +341,7 @@ todo: many biz objects are not using new PUT methodology
|
|||||||
|
|
||||||
CURRENTLY DOING: labors
|
CURRENTLY DOING: labors
|
||||||
|
|
||||||
todo: any change of contract should trigger a full refresh not just manually changing the contract
|
todo: Once this is in place, perhaps don't need the whole contract control stuff anymore since it should just handle it...right?
|
||||||
client requests new record when *it* detects a change of contract on the normal save of header (direct contract change route already handled, this is for customer change)
|
|
||||||
and in future Unit change may trigger this as well so make it re-usable
|
|
||||||
Once this is in place, perhaps don't need the whole contract control stuff anymore since it should just handle it...right?
|
|
||||||
|
|
||||||
todo: address setting - rather than setting it *at* the client automatically shouldn't it set at the server automatically?
|
todo: address setting - rather than setting it *at* the client automatically shouldn't it set at the server automatically?
|
||||||
this would remove some weight from the client and with a forcefullrefresh system in place that will help with this as well.
|
this would remove some weight from the client and with a forcefullrefresh system in place that will help with this as well.
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<!-- <v-col
|
||||||
v-if="form().showMe(this, 'Contract')"
|
v-if="form().showMe(this, 'Contract')"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
@@ -110,6 +110,26 @@
|
|||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
data-cy="woContract"
|
data-cy="woContract"
|
||||||
/>
|
/>
|
||||||
|
</v-col> -->
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
v-if="form().showMe(this, 'Contract')"
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
lg="4"
|
||||||
|
xl="3"
|
||||||
|
>
|
||||||
|
<gz-pick-list
|
||||||
|
:aya-type="$ay.ayt().Contract"
|
||||||
|
:show-edit-icon="true"
|
||||||
|
v-model="value.contractId"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:label="$ay.t('Contract')"
|
||||||
|
ref="contractId"
|
||||||
|
data-cy="contractId"
|
||||||
|
:error-messages="form().serverErrors(this, 'contractId')"
|
||||||
|
@input="fieldValueChanged('contractId')"
|
||||||
|
></gz-pick-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
@@ -292,12 +312,12 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
import GzWoState from "./work-order-state.vue";
|
import GzWoState from "./work-order-state.vue";
|
||||||
import GzWoAddress from "./work-order-address.vue";
|
import GzWoAddress from "./work-order-address.vue";
|
||||||
import GzWoContract from "./work-order-contract.vue";
|
//import GzWoContract from "./work-order-contract.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GzWoState,
|
GzWoState,
|
||||||
GzWoAddress,
|
GzWoAddress
|
||||||
GzWoContract
|
//, GzWoContract
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -260,7 +260,8 @@ export default {
|
|||||||
saveResult: {
|
saveResult: {
|
||||||
fatal: false, //fatal error, further save is pointless, bail early and report
|
fatal: false, //fatal error, further save is pointless, bail early and report
|
||||||
errors: null //contains error objects from save
|
errors: null //contains error objects from save
|
||||||
}
|
},
|
||||||
|
lastGetContractId: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//WATCHERS
|
//WATCHERS
|
||||||
@@ -369,6 +370,7 @@ export default {
|
|||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
} else {
|
} else {
|
||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
|
vm.lastGetContractId = vm.obj.contractId; //preserve for triggering full update if something changes it later
|
||||||
|
|
||||||
//assign opening UID's
|
//assign opening UID's
|
||||||
vm.obj.items.forEach((z, index) => {
|
vm.obj.items.forEach((z, index) => {
|
||||||
@@ -453,8 +455,6 @@ export default {
|
|||||||
|
|
||||||
//some ops require a full refresh like ones that trigger contract changes
|
//some ops require a full refresh like ones that trigger contract changes
|
||||||
let forceFullRefresh = false;
|
let forceFullRefresh = false;
|
||||||
let contractIdBeforeSave = vm.obj.contractId;
|
|
||||||
console.log("ContractIdBeforeSave=", contractIdBeforeSave);
|
|
||||||
|
|
||||||
//reset error object
|
//reset error object
|
||||||
this.saveResult.fatal = false;
|
this.saveResult.fatal = false;
|
||||||
@@ -525,8 +525,8 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//check if full refresh is necessary
|
//check if full refresh is necessary
|
||||||
console.log("ContractIdAfterSave=", vm.obj.contractId);
|
|
||||||
if (vm.obj.contractId != contractIdBeforeSave) {
|
if (vm.obj.contractId != vm.obj.lastGetContractId) {
|
||||||
//there may be others which is why I'm doing it this way with the extra variable
|
//there may be others which is why I'm doing it this way with the extra variable
|
||||||
forceFullRefresh = true;
|
forceFullRefresh = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user