From a40309f8cb51e478ecbc9187741746c9e321aae4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 27 Nov 2019 01:06:09 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 15 ++++++++++----- ayanova/src/components/custom-fields-control.vue | 10 ++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index d74855f0..20d397c4 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -45,13 +45,18 @@ CURRENT ROADMAP CURRENT TODOs =-=-=-=-=-=-= -TODO: Date picker is not immediately updating the view when a selection is made when it starts empty - - Time picker works properly - - diagnose this with the standalone date-picker component for custom field and then port to the dateAndTime picker which exhibits the same issue - -TODO: Date picker and time picker were copied from dateAndTime picker and seem to be retaining the full date and time when they should really only have a single part or is that wrong? +TODO: What is the default value for time with a date only picker and date for a time only picker? Date picker and time picker were copied from dateAndTime picker and seem to be retaining the full date and time when they should really only have a single part or is that wrong? - i.e. Date picker is still accessing the time and factoring it in and Time picker is still using the date - DateOnly method used in time picker and timeonly method used in datepicker when setting the value + - What is the scope of the data usage going to be? + - Will I need to report on a time only custom field? + - What is it in v7 right now, a full date and time value or ...? + - Theoretically the unused part is really unnecessary but these things have a way of being necessary later so think about it now and refer to v7 as a helpful reference + +TODO: In a few places in my own components I'm emitting multiple events for changes when possibly it should just be one + - Determine which events are being emitted in custom controls + - Research those events to see what they actually mean to VUE / VUETIFY + - Remove any extraneous or unnecessary events (even just to test if they are required) TODO: Change detection dirty tracking not quite right on the widget form: - Make a new record then click into each field and edit it and notice the save button doesn't enable diff --git a/ayanova/src/components/custom-fields-control.vue b/ayanova/src/components/custom-fields-control.vue index b970d91b..eca52510 100644 --- a/ayanova/src/components/custom-fields-control.vue +++ b/ayanova/src/components/custom-fields-control.vue @@ -214,11 +214,9 @@ export default { //get the data out of the JSON string value var cData = JSON.parse(this.value); + //POtentially, down the road might need to co-erce the value to the right type, this is where that would happen //get the type it *should* be - //TODO: method here - //coerce it to that type and return it - //TODO: Method here return cData[dataKey]; }, @@ -236,8 +234,8 @@ export default { } else { //then set item in the cData - //TODO: This will likely need also to be converted because dates and stuff - //initial naive attempt: (tostring is suspect) + //POtentially, down the road might need to co-erce the value to the right type, this is where that would happen + cData[dataKey] = newValue.toString(); } @@ -245,7 +243,7 @@ export default { var ret = JSON.stringify(cData); this.$emit("update:value", ret); //this triggers the onchange routine in the parent form - //mainly for custom fields purposes so that the dirty checking works + //so that the dirty checking works this.$emit("change", ret); } },