diff --git a/ayanova/src/components/work-order-header.vue b/ayanova/src/components/work-order-header.vue
index 9677b465..02e4d2af 100644
--- a/ayanova/src/components/work-order-header.vue
+++ b/ayanova/src/components/work-order-header.vue
@@ -1,6 +1,48 @@
WorkOrder header
+
+
+
+
+
+
+
+
+ {{ $ay.t("WorkOrderSerialNumber") }}
+
+
+ {{ value.serial }}
+
+
+
+
+
+
+
+
diff --git a/ayanova/src/components/work-order-items.vue b/ayanova/src/components/work-order-items.vue
index c2ac884b..c3b6fefe 100644
--- a/ayanova/src/components/work-order-items.vue
+++ b/ayanova/src/components/work-order-items.vue
@@ -1,6 +1,14 @@
WorkOrder items here
+
+ table of woitems here
+
+
+ woitem is selected
+
+
+ woitemfields
@@ -17,16 +25,12 @@ export default {
data() {
return {};
},
-
props: {
value: {
- default: "{}",
- type: String
+ default: null,
+ type: Object
},
- formKey: { type: String, default: "" }, //used to grab template from store
- readonly: Boolean,
- disabled: Boolean,
- parentVM: {
+ pvm: {
default: null,
type: Object
}
@@ -37,14 +41,18 @@ export default {
return window.$gz.form;
},
fieldValueChanged(ref) {
- if (
- !this.parentVM.formState.loading &&
- !this.parentVM.formState.readonly
- ) {
- window.$gz.form.fieldValueChanged(this.parentVM, ref);
+ if (!this.formState.loading && !this.formState.readonly) {
+ window.$gz.form.fieldValueChanged(this.pvm, ref);
}
}
},
- computed: {}
+ computed: {
+ formState: function() {
+ return this.pvm.formState;
+ },
+ formCustomTemplateKey: function() {
+ return this.pvm.formCustomTemplateKey;
+ }
+ }
};
diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue
index 4362ab0c..a62a2c5d 100644
--- a/ayanova/src/views/svc-workorder.vue
+++ b/ayanova/src/views/svc-workorder.vue
@@ -4,8 +4,20 @@
-
-
+
+
@@ -73,6 +85,9 @@ export default {
});
generateMenu(vm);
+ if (vm.obj.items.count > 0) {
+ selectedItemIndex = 0;
+ }
} catch (error) {
window.$gz.errorHandler.handleFormError(error, vm);
} finally {
@@ -100,19 +115,58 @@ export default {
//IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record
//I.E. Serial, usertype fields, ACTIVE
//Also, if it's a non-nullable Enum backed field then it should have a valid selection i.e. not zero if there is no zero
+ // {
+ // id: 0,
+ // concurrency: 0,
+ // name: null,
+ // active: true,
+ // notes: null,
+ // wiki: null,
+ // customFields: "{}",
+ // tags: [],
+ // dateStarted: window.$gz.locale.nowUTC8601String(),
+ // dateCompleted: null,
+ // workorderOverseerId: null,
+ // accountNumber: null
+ // }
{
- id: 0,
- concurrency: 0,
- name: null,
- active: true,
- notes: null,
- wiki: null,
- customFields: "{}",
- tags: [],
- dateStarted: window.$gz.locale.nowUTC8601String(),
- dateCompleted: null,
- workorderOverseerId: null,
- accountNumber: null
+ data: {
+ id: 0,
+ concurrency: 0,
+ serial: null,
+ notes: null,
+ wiki: null,
+ customFields: "{}",
+ tags: [],
+ customerId: null,
+ projectId: null,
+ internalReferenceNumber: null,
+ customerReferenceNumber: null,
+ customerContactName: null,
+ fromQuoteId: null,
+ fromPMId: null,
+ fromCSRId: null,
+ serviceDate: null,
+ completeByDate: null,
+ invoiceNumber: null,
+ customerSignature: null,
+ customerSignatureName: null,
+ customerSignatureCaptured: null,
+ postAddress: null,
+ postCity: null,
+ postRegion: null,
+ postCountry: null,
+ postCode: null,
+ address: null,
+ city: null,
+ region: null,
+ country: null,
+ latitude: null,
+ longitude: null,
+ items: [],
+ states: [],
+ isDirty: false
+ }
},
formState: {
ready: false,
@@ -125,7 +179,8 @@ export default {
serverError: {}
},
rights: window.$gz.role.defaultRightsObject(),
- ayaType: window.$gz.type.WorkOrder
+ ayaType: window.$gz.type.WorkOrder,
+ selectedItemIndex: null
};
},
//WATCHERS
@@ -533,8 +588,8 @@ async function initForm(vm) {
async function fetchTranslatedText(vm) {
await window.$gz.translation.cacheTranslations([
"WorkOrder",
- "WorkOrderName",
- "WorkOrderNotes",
+ "WorkOrderSerialNumber",
+ "WorkOrderSummary",
"WorkOrderCustom1",
"WorkOrderCustom2",
"WorkOrderCustom3",