From d143e30b96c6c1b8c04d73bbc07c2fdba998d861 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 29 Apr 2021 19:11:59 +0000 Subject: [PATCH] --- ayanova/src/api/open-object-handler.js | 8 +++++++- ayanova/src/components/work-order-state.vue | 16 ++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/ayanova/src/api/open-object-handler.js b/ayanova/src/api/open-object-handler.js index e9a9a9e3..15fedde8 100644 --- a/ayanova/src/api/open-object-handler.js +++ b/ayanova/src/api/open-object-handler.js @@ -10,7 +10,13 @@ export default { // called from App.vue handleOpenObjectClick(vm, tid) { //expects extra data (tid) to be one of { type: [AYATYPE], id: [RECORDID] } - //NOTE: for new objects all edit pages assume record ID 0 means create rather than open + //NOTE: for new objects all edit pages assume record ID 0 (or null) means create rather than open + + //for sake of ease of coding I'm going to assume null id also means make a new record intent + //so I don't have to parse and decide constantly on forms for every control that has a open record link in it + if (tid.id == null) { + tid.id = 0; + } if (tid.type && tid.id != null) { //if these come from route parameters they may well be strings diff --git a/ayanova/src/components/work-order-state.vue b/ayanova/src/components/work-order-state.vue index 77f30f62..8058c858 100644 --- a/ayanova/src/components/work-order-state.vue +++ b/ayanova/src/components/work-order-state.vue @@ -77,7 +77,7 @@ item-value="id" dense :label="$ay.t('NewStatus')" - :prepend-icon="editStateIcon()" + prepend-icon="$ayiEdit" @click:prepend="handleEditStateClick()" >