This commit is contained in:
@@ -78,13 +78,27 @@ DONE: Turn widget edit ROLES into a static select populated from server
|
||||
DONE: Widget - NOTES FIELD
|
||||
DONE: TAGS!!!
|
||||
- Implement and componentize
|
||||
|
||||
### TODO: Custom fields
|
||||
|
||||
TODO: WIDGET Customize menu item
|
||||
- Make a menu item that shows in Widget edit form for users who are BizAdminFull only, title is "customize"
|
||||
- this takes user to customize form where they can customize the widget form, set custom fields, maybe what shows or not etc
|
||||
- this is to customize the form but it should contain a link to the locale text editor in case that's what they actually intend to customize
|
||||
TODO: Form customize UI
|
||||
- Where you create custom fields and edit
|
||||
TODO: Custom fields
|
||||
- DONE Server route that can verify if customization is still valid
|
||||
- Client needs to cache the form customization settings because it would eat up bandwidth to check *every* time that the form is loaded
|
||||
- So need client to keep that cached, and either every time or periodically check with the server to see if it's still valid by sending the known concurrency token to the get customization route
|
||||
- If the concurrency token is still valid it returns the least possible data, perhaps the unchange or not modified http code
|
||||
- If the concurrency token is invalid then it returns the form custom data for that form to replace what is held
|
||||
- Implement then Componentize
|
||||
- Maybe start with a component first now that I have my feet wet in it, saves time
|
||||
- Have to think about the design, but probably most useful when on the same page as the main record just like in v7 windows
|
||||
- Should be a single component I can reference on the form that handles it all directly
|
||||
- Custom field "slot" maybe just like the VUE Way so that it can be easily optionally shown or not in it's slot
|
||||
- Though, these need to be part of the record as well, hmmm...maybe better if they appear to be just normal fields and are added dynamically??
|
||||
- It would be nice though to just insert a slot and let a component handle it rather than buncvh of code on every form...
|
||||
- It's kind of like one control that is bound to the JSON custom fields-field and it would update it as edited and required so I guess this is how to think about it and implement it, as a control
|
||||
|
||||
|
||||
TODO: Record history display / check other AyaNova 7 options / buttons that need to carry forward
|
||||
|
||||
@@ -98,7 +98,8 @@ export default {
|
||||
"AreYouSureUnsavedChanges",
|
||||
"Leave",
|
||||
"Copy",
|
||||
"Tags"
|
||||
"Tags",
|
||||
"Customize"
|
||||
],
|
||||
decimalValidate(required) {
|
||||
return { required: required, decimal: [2, this.format().decimalSeparator] };
|
||||
|
||||
45
ayanova/src/components/custom-fields-control.vue
Normal file
45
ayanova/src/components/custom-fields-control.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div>
|
||||
CUSTOM FIELDS:
|
||||
<span>
|
||||
{{ value }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/* Xeslint-disable */
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
obj: { blah: "blah", rhubarb: "rhubarb" }
|
||||
};
|
||||
},
|
||||
props: {
|
||||
value: String
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
//this ensures the parent form gets the onchange event
|
||||
//not actually sure why there are two here but it worked with the datetime picker so I replicated it here
|
||||
this.$emit("input", val);
|
||||
this.$emit("change", val);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {},
|
||||
beforeCreate() {
|
||||
//check pre-requisites exist just in case
|
||||
if (this.$gzdevmode()) {
|
||||
if (!this.$_) {
|
||||
throw "tag-picker: $_ (lodash) is required and missing";
|
||||
}
|
||||
if (!this.$gzlocale) {
|
||||
throw "tag-picker: $gzlocale is required and missing";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user