Right in the middle of conversion, not compilable yet
This commit is contained in:
@@ -89,25 +89,54 @@ todo: DataList view and filter are combined and this is wrong
|
|||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
dataListKey: "PartInventoryTransactionsDataList",
|
dataListKey: "PartInventoryTransactionsDataList",
|
||||||
columns:["PartInventoryTransactionEntryDate","PartPartNumber","PartWarehouseName","PartInventoryTransactionQuantity","PartInventoryTransactionDescription","PartInventoryTransactionSource","PartInventoryBalance"]
|
columns:["PartInventoryTransactionEntryDate","PartPartNumber","PartWarehouseName","PartInventoryTransactionQuantity","PartInventoryTransactionDescription","PartInventoryTransactionSource","PartInventoryBalance"]
|
||||||
sortBy:["PartInventoryTransactionEntryDate"],//same as grid natively does all columns here
|
sortBy:["PartInventoryTransactionEntryDate-"],//All sorted columns here appends + for ascending - for descending to field name
|
||||||
sortDesc:[true]//same as grid natively does, all columns here true or false each
|
filter:[{column:"PartPartNumber",items:[{op: "=",value: "400735"}]}],
|
||||||
filter:[{column:"PartPartNumber",items:[{op: "=",value: "400735"}]}]
|
clientCriteria:"2" //could be anything here that makes sense to the list, in this case an example customer id for customernotedatalist
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# METAVIEW / VARIANT
|
# METAVIEW / VARIANT / PROGRAMMATIC FILTERING
|
||||||
|
There are filters users make and filters the program makes
|
||||||
|
Some filters are STATIC and always applied regardless for security or other reasons and those should be done entirely at teh server
|
||||||
|
(IAyaDataListServerCriteria)
|
||||||
|
Memo, Reminders so only can see their own, Reviews filter by role to see more potentially
|
||||||
|
Some filters are DYNAMIC and restrict by columns that the user can control so they replace user filters adn appear as same as user filter
|
||||||
|
user can remove it to see all or adjust it or whatever
|
||||||
|
Some filters are MIXED / INVISIBLE as they require data provided by client but user doesn't see them or control them
|
||||||
|
CustomerNoteDataList
|
||||||
|
potentially more in future so needs support, is ideally solved by metafilter now but if that is being removed need alternative
|
||||||
|
|
||||||
|
CURRENT METAVIEW DATALIST FILTERS IN USE
|
||||||
|
InsideUserDataList (adm-users) STATIC (could use IAyaDataListServerCriteria)
|
||||||
|
MemoDataList STATIC current TO user only uses IAyaDataListServerCriteria already
|
||||||
|
ServiceBankDataList DYNAMIC
|
||||||
|
OutsideUserDataList (cust-users) STATIC could use IAyaDataListServerCriteria
|
||||||
|
ReviewDataList (home-reviews) DYNAMIC (both single and multiple)
|
||||||
|
PartInventoryTransactionsDataList (inv-part-inventory-transactions) DYNAMIC
|
||||||
|
PartInventoryDataList (inv-part-inventory) DYNAMIC
|
||||||
|
* CustomerNoteDataList (cust-customer-notes) MIXED STATIC but with DYNAMIC value currently using metaview but is actually static, however current server IAyaDataListServerCriteria can't accept a customer id so...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NOTES: Metaview is used for two different thigns currently:
|
NOTES: Metaview is used for two different thigns currently:
|
||||||
STATICALLY restricting a list to an always required filter like adm-users and cust-users and cust-customer-notes
|
STATICALLY restricting a list to an always required filter like adm-users and cust-users and cust-customer-notes
|
||||||
solution is use variant system like picklist
|
solution is use variant system like picklist
|
||||||
DYNAMICALLY restricting a list to an on the fly filter like ShowAll
|
DYNAMICALLY restricting a list to an on the fly filter like ShowAll
|
||||||
solution is solved by above changes and can provide alterantive filter programmatically any time
|
solution is solved by above changes and can provide alterantive filter programmatically any time
|
||||||
|
MIXED restricting a list on teh fly but also support user filtering
|
||||||
|
|
||||||
|
|
||||||
todo: remove metaview entirely at both ends
|
todo: remove metaview entirely at both ends
|
||||||
|
|
||||||
todo: Modify DataList and implement Variant system just like picklists already does
|
todo: replace STATIC FILTERS with existing IAyaDataListServerCriteria interface and filter
|
||||||
must work with same capabilities shown in the current UnitPickList GetVariantCriteria which will work for the current STATICALLY filtered lists
|
todo: replace DYNAMIC FILTERS with system above
|
||||||
(any list where the metaview was static and not optional but required for the view to work)
|
todo: replace MIXED VARIANT FILTERS with variant system
|
||||||
|
|
||||||
|
|
||||||
SEEDER
|
SEEDER
|
||||||
@@ -121,7 +150,8 @@ todo: DataList - there are a bunch of props being set that don't exist, for exam
|
|||||||
remove them with impunity
|
remove them with impunity
|
||||||
|
|
||||||
todo: userbiz validate can delete has funky error
|
todo: userbiz validate can delete has funky error
|
||||||
|
todo: bugbug filter on a phone number field results in error at server as unsupported type
|
||||||
|
make sure all types are supported
|
||||||
todo: *biz objects with foreign key constraints should call ValidateCanDelete
|
todo: *biz objects with foreign key constraints should call ValidateCanDelete
|
||||||
and validatecandelete *MUST* check for those constraints and return a proper error object
|
and validatecandelete *MUST* check for those constraints and return a proper error object
|
||||||
Note: this must happen independently for EACH reference so check each referencing table one by one and add an error for each to send back to user
|
Note: this must happen independently for EACH reference so check each referencing table one by one and add an error for each to send back to user
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (vm.objectId && vm.objectId != 0 && vm.objectType) {
|
if (vm.objectId && vm.objectId != 0 && vm.objectType) {
|
||||||
//pre-filter
|
//DYNAMIC FILTER
|
||||||
vm.metaView = JSON.stringify([
|
vm.metaView = JSON.stringify([
|
||||||
{
|
{
|
||||||
fld: "metaservicebankobjectid",
|
fld: "metaservicebankobjectid",
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
const FORM_KEY = "adm-users";
|
const FORM_KEY = "adm-users";
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
//Inside users only
|
//STATIC FILTER Inside users only
|
||||||
this.metaView = JSON.stringify([
|
this.metaView = JSON.stringify([
|
||||||
{
|
{
|
||||||
fld: "usertype",
|
fld: "usertype",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:dataListSort="dataListSort"
|
:dataListSort="dataListSort"
|
||||||
:showSelect="rights.read"
|
:showSelect="rights.read"
|
||||||
:reload="reload"
|
:reload="reload"
|
||||||
:metaView="metaView"
|
:clientCriteria="clientCriteria"
|
||||||
v-on:selection-change="handleSelected"
|
v-on:selection-change="handleSelected"
|
||||||
data-cy="customerNotesTable"
|
data-cy="customerNotesTable"
|
||||||
>
|
>
|
||||||
@@ -31,18 +31,12 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const FORM_KEY = "cust-customer-notes";
|
const FORM_KEY = "cust-customer-notes";
|
||||||
//"[{\"fld\":\"widgetname\",\"filter\":{\"items\":[{\"op\":\"%-\",\"value\":\"Awesome\"}]}},{\"fld\":\"widgetserial\"},{\"fld\":\"widgetdollaramount\"},{\"fld\":\"widgetusertype\",\"filter\":{\"items\":[{\"op\":\"=\",\"value\":1}]}},{\"fld\":\"widgetstartdate\"},{\"fld\":\"widgetactive\"},{\"fld\":\"username\",\"filter\":{\"items\":[{\"op\":\"=\",\"value\":\"aya\"}]}},{\"fld\":\"widgettags\"},{\"fld\":\"widgetcustom1\"},{\"fld\":\"widgetcustom2\"}]"
|
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
this.customername = this.$route.params.customername;
|
this.customername = this.$route.params.customername;
|
||||||
this.customerId = parseInt(this.$route.params.customerid);
|
this.customerId = parseInt(this.$route.params.customerid);
|
||||||
this.metaView = JSON.stringify([
|
//MIXED STATIC But with provided criteria FILTER
|
||||||
{
|
this.clientCriteria = this.customerId.toString();
|
||||||
fld: "metacustomer",
|
|
||||||
filter: { items: [{ op: "=", value: this.customerId }] }
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
this.rights = window.$gz.role.getRights(window.$gz.type.CustomerNote);
|
this.rights = window.$gz.role.getRights(window.$gz.type.CustomerNote);
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
generateMenu(this);
|
generateMenu(this);
|
||||||
@@ -58,7 +52,7 @@ export default {
|
|||||||
dataListKey: "CustomerNoteDataList",
|
dataListKey: "CustomerNoteDataList",
|
||||||
dataListFilter: "",
|
dataListFilter: "",
|
||||||
dataListSort: "",
|
dataListSort: "",
|
||||||
metaView: undefined,
|
clientCriteria: undefined,
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
ayType: window.$gz.type.CustomerNote,
|
ayType: window.$gz.type.CustomerNote,
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user