This commit is contained in:
@@ -12,21 +12,12 @@
|
|||||||
|
|
||||||
Aug
|
Aug
|
||||||
|
|
||||||
change woitempart to allow negative values entered which will add to inventory but *only* if they have full inventory role
|
|
||||||
return understandable error if they don't
|
Meter reading
|
||||||
test it out first
|
|
||||||
do a full end to end rebuild for Joyce to test
|
|
||||||
going to need server and clients update
|
|
||||||
|
|
||||||
Meter reading
|
|
||||||
write only
|
|
||||||
enter via work order or via unit->meter reading button
|
|
||||||
Needs main data list and entry form like all other things
|
|
||||||
Unit form should have a viz field for last meter reading that shows only if it's metered
|
|
||||||
no delete, write once
|
|
||||||
must migrate as well
|
|
||||||
NOTE: need to make a switch during migration v7 has workorderitem id but v8 links to workorderitemunit id so need to fixup that as well
|
|
||||||
todo / outstanding
|
todo / outstanding
|
||||||
|
must migrate as well
|
||||||
|
NOTE: need to make a switch during migration v7 has workorderitem id but v8 links to workorderitemunit id so need to fixup that as well
|
||||||
|
|
||||||
enter via work order, bring over work orderitem unit id
|
enter via work order, bring over work orderitem unit id
|
||||||
notification of multiple however the fuck that works
|
notification of multiple however the fuck that works
|
||||||
test notification
|
test notification
|
||||||
@@ -865,17 +856,6 @@ MID CENTURY MODERN TUNES - https://www.allmusic.com/album/ultra-lounge-vol-14-bo
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BUILD CHANGES OF NOTE
|
BUILD 125 CHANGES OF NOTE
|
||||||
|
|
||||||
BUILD 124
|
-
|
||||||
|
|
||||||
- Customer form implemented menu links to quotes and pms
|
|
||||||
- Unit form implemented menu links to quotes and pms
|
|
||||||
- Loan unit form added links to quotes and pms and implemented all
|
|
||||||
- Part form implemented menu links to quotes and pms
|
|
||||||
- Project form implemented menu links to quotes and pms
|
|
||||||
- fixed incorrect icon for Project type when filtered by Project on workorder/quote/pm lists
|
|
||||||
- Unit meter reading implemented
|
|
||||||
Accessed from Unit form as well as work order item Unit area of work order form
|
|
||||||
Unit report data has last meter reading and last meter reading date and last meter reading notes viz fields added
|
|
||||||
TODO: v8 migrates
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
version: "8.0.0-alpha.124",
|
version: "8.0.0-alpha.125",
|
||||||
copyright: "© 1999-2021, Ground Zero Tech-Works Inc."
|
copyright: "© 1999-2021, Ground Zero Tech-Works Inc."
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -128,6 +128,11 @@
|
|||||||
"
|
"
|
||||||
@update:name="unitChange"
|
@update:name="unitChange"
|
||||||
></gz-pick-list>
|
></gz-pick-list>
|
||||||
|
<template v-slot:append v-if="canOpenMeter()">
|
||||||
|
<v-btn outlined small color="primary" @click="openMeter">
|
||||||
|
<v-icon>$ayiWeight</v-icon></v-btn
|
||||||
|
>
|
||||||
|
</template>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
@@ -355,7 +360,8 @@ export default {
|
|||||||
availableBulkUnits: [],
|
availableBulkUnits: [],
|
||||||
selectedBulkUnits: [],
|
selectedBulkUnits: [],
|
||||||
selectedBulkUnitTags: [],
|
selectedBulkUnitTags: [],
|
||||||
bulkUnitTableHeaders: []
|
bulkUnitTableHeaders: [],
|
||||||
|
isMetered: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -405,46 +411,81 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async updateContractIfApplicable() {
|
canOpenMeter: function() {
|
||||||
|
return (
|
||||||
|
this.isMetered == true &&
|
||||||
|
this.value.items[this.activeWoItemIndex].units[this.activeItemIndex]
|
||||||
|
.id != 0
|
||||||
|
);
|
||||||
|
},
|
||||||
|
openMeter: function() {
|
||||||
|
if (this.canOpenMeter()) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "meter-readings",
|
||||||
|
params: {
|
||||||
|
workorderitemunitid: this.value.items[this.activeWoItemIndex].units[
|
||||||
|
this.activeItemIndex
|
||||||
|
].id,
|
||||||
|
unitid: this.value.items[this.activeWoItemIndex].units[
|
||||||
|
this.activeItemIndex
|
||||||
|
].unitId,
|
||||||
|
unitname: this.value.items[this.activeWoItemIndex].units[
|
||||||
|
this.activeItemIndex
|
||||||
|
].unitViz
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// this.$router.push({
|
||||||
|
// name: "meter-readings",
|
||||||
|
// params: {
|
||||||
|
// aType: window.$gz.type.Unit,
|
||||||
|
// objectId: this.$route.params.recordid
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleUnitChange() {
|
||||||
const id = this.value.items[this.activeWoItemIndex].units[
|
const id = this.value.items[this.activeWoItemIndex].units[
|
||||||
this.activeItemIndex
|
this.activeItemIndex
|
||||||
].unitId;
|
].unitId;
|
||||||
if (!id || id == 0) {
|
if (!id || id == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let res = await window.$gz.api.get(`unit/active-contract/${id}`);
|
let res = await window.$gz.api.get(`unit/work-order-info/${id}`);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
"notify-warning",
|
||||||
window.$gz.errorHandler.errorToString(res, this)
|
window.$gz.errorHandler.errorToString(res, this)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if (res.data.id == 0) {
|
//METER READING
|
||||||
//no contract, just bail
|
this.isMetered = res.data.isMetered;
|
||||||
return;
|
|
||||||
}
|
|
||||||
//has contract, if it differs from main work order contract then offer to set it
|
|
||||||
if (res.data.id == this.value.contractId) {
|
|
||||||
//same contract, just bail
|
|
||||||
//yes the date could not be different but we're not going to pick that nit, they can just unset and set if it matters
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//Prompt user to use new contract
|
|
||||||
const prompt = this.$ay
|
|
||||||
.t("ApplyUnitContract")
|
|
||||||
.replace("{0}", res.data.name);
|
|
||||||
|
|
||||||
let dialogResult = await window.$gz.dialog.confirmGenericPreTranslated(
|
//CONTRACT
|
||||||
prompt,
|
if (res.data.contract.id != 0) {
|
||||||
"question"
|
//has contract, if it differs from main work order contract then offer to set it
|
||||||
);
|
if (res.data.id == this.value.contractId) {
|
||||||
if (dialogResult == false) {
|
//same contract, just bail
|
||||||
return;
|
//yes the date could not be different but we're not going to pick that nit, they can just unset and set if it matters
|
||||||
} else {
|
return;
|
||||||
this.value.contractId = res.data.id;
|
}
|
||||||
this.value.isDirty = true;
|
//Prompt user to use new contract
|
||||||
this.pvm.formState.dirty = true;
|
const prompt = this.$ay
|
||||||
this.$emit("change");
|
.t("ApplyUnitContract")
|
||||||
|
.replace("{0}", res.data.name);
|
||||||
|
|
||||||
|
let dialogResult = await window.$gz.dialog.confirmGenericPreTranslated(
|
||||||
|
prompt,
|
||||||
|
"question"
|
||||||
|
);
|
||||||
|
if (dialogResult == false) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.value.contractId = res.data.id;
|
||||||
|
this.value.isDirty = true;
|
||||||
|
this.pvm.formState.dirty = true;
|
||||||
|
this.$emit("change");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -607,7 +648,7 @@ export default {
|
|||||||
this.value.items[this.activeWoItemIndex].units[
|
this.value.items[this.activeWoItemIndex].units[
|
||||||
this.activeItemIndex
|
this.activeItemIndex
|
||||||
].warrantyViz = null;
|
].warrantyViz = null;
|
||||||
await this.updateContractIfApplicable();
|
await this.handleUnitChange();
|
||||||
},
|
},
|
||||||
newItem() {
|
newItem() {
|
||||||
let newIndex = this.value.items[this.activeWoItemIndex].units.length;
|
let newIndex = this.value.items[this.activeWoItemIndex].units.length;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ import chartBarHorizontalControl from "./components/chart-bar-horizontal-control
|
|||||||
//DEVELOPMENT MODE
|
//DEVELOPMENT MODE
|
||||||
//THIS SHOULD BE FALSE IN RELEASE
|
//THIS SHOULD BE FALSE IN RELEASE
|
||||||
//************************************************************
|
//************************************************************
|
||||||
const DEV_MODE = false;
|
const DEV_MODE = true;
|
||||||
//************************************************************
|
//************************************************************
|
||||||
//**************************************************************
|
//**************************************************************
|
||||||
//**************************************************************
|
//**************************************************************
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vm.obj.unitId = this.$route.params.unitid;
|
vm.obj.unitId = this.$route.params.unitid;
|
||||||
|
vm.obj.workOrderItemUnitId = this.$route.params.workorderitemunitid;
|
||||||
window.$gz.form.setFormState({
|
window.$gz.form.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
loading: false
|
loading: false
|
||||||
|
|||||||
Reference in New Issue
Block a user