From f3fc3af8ed28fa674eca2b77f1a691dbcf6f4d2a Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 19 Aug 2021 22:59:59 +0000 Subject: [PATCH] --- ayanova/src/views/svc-meter-reading.vue | 18 +++++++++++++----- ayanova/src/views/svc-unit.vue | 13 +++++++++---- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ayanova/src/views/svc-meter-reading.vue b/ayanova/src/views/svc-meter-reading.vue index 6d4a81ab..94815e6c 100644 --- a/ayanova/src/views/svc-meter-reading.vue +++ b/ayanova/src/views/svc-meter-reading.vue @@ -139,17 +139,25 @@ export default { usertypes: [] }, customername: undefined, + /* + + public string Description { get; set; } + public long Meter { get; set; } + public DateTime MeterDate { get; set; } + public long UnitId { get; set; } + public long? WorkOrderItemUnitId { get; set; } + */ obj: { //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 //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, - notes: null, - noteDate: window.$gz.locale.nowUTC8601String(), - tags: [], - customerId: undefined, - userId: undefined + description: null, + meter: 0, + meterDate: window.$gz.locale.nowUTC8601String(), + unitId: undefined, + workOrderItemUnitId: undefined }, formState: { ready: false, diff --git a/ayanova/src/views/svc-unit.vue b/ayanova/src/views/svc-unit.vue index 52133044..05862136 100644 --- a/ayanova/src/views/svc-unit.vue +++ b/ayanova/src/views/svc-unit.vue @@ -982,11 +982,16 @@ export default { if (this.canOpenMeter()) { this.$router.push({ name: "meter-readings", - params: { - aType: window.$gz.type.Unit, - objectId: this.$route.params.recordid - } + params: { unitid: this.obj.id, unitname: this.obj.serial } }); + + // this.$router.push({ + // name: "meter-readings", + // params: { + // aType: window.$gz.type.Unit, + // objectId: this.$route.params.recordid + // } + // }); } }, canSave: function() {