This commit is contained in:
2020-02-26 20:43:35 +00:00
parent c37aead05a
commit 8237f2e8c0
3 changed files with 4 additions and 25 deletions

View File

@@ -44,30 +44,6 @@ CURRENT TODOs
todo: default "df" thing isn't really working at the moment, I can remove the Name column from widgets and then I can't open a widget from teh grid
- CHANGES replace df column with a flag indicating which column is the required rowID column or "RID" or "rid" of first column (as defined in field column definitions) is always required and identifies the row:
- Remove df column from server, client and tests
- SERVER:
- Change datalist SQL builder select columns code at server to always return rid column even if not in listview
- ListView save Validation change to check that rid column is *always* present in listview, not valid if it's missing
- this will happen with our tools automatically but need it for api users
- CLIENT: column with rid:true or rid:1 or just present is *always* the row ID column and can't be hidden and is required to show in datatable
- must be present but doesn't matter which order it's in as long as it's there
- Add code to listVieweditor to always have rid flagged column set to required / visible and cannot be set to hidden (take away the switch to make it obvious)
-It can be moved all they want but never not included
- INTEGRATION TESTS:
- test to ensure the rid column as is always included even if attempt to circumvent by not defining it
- validation test to ensure attempt to save a listview without the rid column present results in fail required
todo: when duplicate is inactive it looks the same, is it really being set inactive?
- It's inactive if the dlv is dirty or invalid

View File

@@ -79,7 +79,7 @@
"
@change="includeChanged(item)"
></v-switch>
<div v-if="item.rid" class="v-label mb-7 mt-6">
<div v-if="item.rid" class="v-label mb-8 mt-6">
{{ lt("Include") }}
</div>
<!-- RE-ORDER CONTROL -->

View File

@@ -395,11 +395,13 @@ export default {
//enable / disable duplicate button
var canDuplicate = !val.dirty && val.valid && !val.readOnly;
if (canDuplicate) {
console.log("enabling duplicate");
window.$gz.eventBus.$emit(
"menu-enable-item",
FORM_KEY + ":duplicate"
);
} else {
console.log("disabling duplicate");
window.$gz.eventBus.$emit(
"menu-disable-item",
FORM_KEY + ":duplicate"
@@ -702,6 +704,7 @@ function generateMenu(vm) {
});
if (vm.rights.change) {
console.log("Adding duplicate menu option");
menuOptions.menuItems.push({
title: window.$gz.locale.get("Duplicate"),
icon: "clone",