HUGE REFACTOR / CLEANUP

if there is a issue it's probably something in here that was changed
This commit is contained in:
2021-09-28 20:19:44 +00:00
parent 51eddfede9
commit d0afdd9855
238 changed files with 3127 additions and 8614 deletions

View File

@@ -1,25 +1,6 @@
<template>
<div v-if="value != null" class="mt-8">
<!-- {{
{
isRestrictedType: value.userIsRestrictedType,
isTechRestricted: value.userIsTechRestricted,
subfull: value.userIsSubContractorFull,
subRestricted: value.userIsSubContractorRestricted,
showLabors: showLabors,
showTravels: showTravels,
showExpenses: showExpenses,
showLoans: showLoans,
showOutsideServices: showOutsideServices,
showParts: showParts,
showPartRequests: showPartRequests,
showScheduledUsers: showScheduledUsers,
showTasks: showTasks,
showUnits: showUnits
}
}} -->
<v-row>
<!-- Title and menu -->
<v-col cols="12">
<v-menu offset-y max-width="600px">
<template v-slot:activator="{ on, attrs }">
@@ -708,10 +689,6 @@
</div>
</template>
<script>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* XXXeslint-disable */
////////////////////////////////////////////////////////////////////////////////////////////////////////////
import GzWoItemUnits from "../components/work-order-item-units.vue";
import GzWoItemScheduledUsers from "../components/work-order-item-scheduled-users.vue";
import GzWoItemLabors from "../components/work-order-item-labors.vue";
@@ -774,7 +751,7 @@ export default {
watch: {
goto(val, oldVal) {
if (val != oldVal) {
let navto = { woitemindex: null, childindex: null };
const navto = { woitemindex: null, childindex: null };
//find the item in question then trigger the nav
let keepgoing = true;
this.value.items.forEach((z, itemindex) => {
@@ -945,9 +922,9 @@ export default {
//Self copy to current workorder??
if (this.copyItemWoNumber == this.value.serial) {
let newIndex = this.value.items.length;
const newIndex = this.value.items.length;
let wi = JSON.parse(
const wi = JSON.parse(
JSON.stringify(this.value.items[this.activeItemIndex])
);
@@ -965,7 +942,7 @@ export default {
}
}
//get id from number then push open
let res = await window.$gz.api.get(
const res = await window.$gz.api.get(
"workorder/id-from-number/" + this.copyItemWoNumber
);
if (res.error) {
@@ -986,7 +963,7 @@ export default {
this.copyItemDialog = false;
},
newItem() {
let newIndex = this.value.items.length;
const newIndex = this.value.items.length;
this.value.items.push({
id: 0,
@@ -1027,7 +1004,7 @@ export default {
},
newSubItem(atype) {
//new Id value to use (by convention goto negative will trigger create and then goto instead of simple goto)
let newId = -Math.abs(Date.now());
const newId = -Math.abs(Date.now());
switch (atype) {
case window.$gz.type.WorkOrderItemOutsideService:
this.gotoOutsideServiceIndex = newId;
@@ -1134,32 +1111,7 @@ export default {
return this.value.items[this.activeItemIndex].deleted === true;
},
headerList: function() {
/*
public uint Concurrency { get; set; }
public string Notes { get; set; }//Was Summary
public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } = new List<string>();
[Required]
public long WorkOrderId { get; set; }
public string TechNotes { get; set; }
public long? WorkOrderItemStatusId { get; set; }
public long? WorkOrderItemPriorityId { get; set; }
public DateTime RequestDate { get; set; }
public bool WarrantyService { get; set; } = false;
IN ORDER: notes, status, date, priority, warranty, tags
except they will not prefill at server but will be set here since the wo differs from the po in that there is no instant update with new viz fields to populate from server
and it's probably not a big list to fill anyway
If the column is a text, left-align it
If the column is a number or number + unit, (or date) right-align it (like excel)
*/
let headers = [];
const headers = [];
if (this.form().showMe(this, "WorkOrderItemSequence")) {
headers.push({
@@ -1229,9 +1181,6 @@ and it's probably not a big list to fill anyway
value: "tags"
});
}
// headers.push({ text: "", value: "actions" });
return headers;
},
itemList: function() {
@@ -1365,7 +1314,6 @@ and it's probably not a big list to fill anyway
!this.value.userIsSubContractorRestricted
);
},
canAddLabor: function() {
return this.form().showMe(this, "WorkOrderItemLaborList");
},