LISTS WORKING cleanup afterwords

This commit is contained in:
2021-02-08 20:10:28 +00:00
parent 4a7f9f06ca
commit 658b345378
48 changed files with 50 additions and 2586 deletions

View File

@@ -14,17 +14,6 @@ namespace AyaNova.Models
}
/*
OLD EXAMPLE:
{"offset":0,"limit":10,"dataListKey":"CustomerDataList",
"listView":"[
{\"fld\":\"customername\",\"sort\":\"+\",\"filter\":{\"items\":[{\"op\":\"=\",\"value\":\"dfdfdf\"},{\"op\":\"=\",\"value\":\"3333\"}],\"any\":true}},
{\"fld\":\"customerphone1\",\"filter\":{\"items\":[{\"op\":\">\",\"value\":\"44444\"},
{\"op\":\"<\",\"value\":\"7777\"}]}},
{\"fld\":\"customeremail\"}
{\"fld\":\"customerheadoffice\"},
{\"fld\":\"customertags\",\"sort\":\"+\"}]"}
NEW:
columns:["PartInventoryTransactionEntryDate","PartPartNumber","PartWarehouseName","PartInventoryTransactionQuantity","PartInventoryTransactionDescription","PartInventoryTransactionSource","PartInventoryBalance"]
sortBy:[{"PartInventoryTransactionEntryDate":"-"}],//All sorted columns here as keyvalue pairs value is a string of "+" for ascending "-" for descending and are IN ORDER of how to be sorted
filter:[{column:"PartPartNumber",any:true/false,items:[{op: "=",value: "400735"}]}],

View File

@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System;
namespace AyaNova.Models
{
//common base class for data table display at client, reporting and mass bulk operations
public class DataListProcessingBase
{
@@ -18,6 +17,4 @@ namespace AyaNova.Models
Filter = new List<DataListFilterOption>();
}
}
}

View File

@@ -3,7 +3,6 @@ using AyaNova.DataList;
using Newtonsoft.Json.Linq;
namespace AyaNova.Models
{
public class DataListReportProcessingOptions : DataListSelectedProcessingOptions
{
internal DataListReportProcessingOptions(DataListSelectedRequest request, IDataListProcessing dataList, DataListColumnView savedView, DataListSavedFilter savedFilter, long userId, AuthorizationRoles userRoles) : base(request, dataList, savedView, savedFilter, userId, userRoles)
@@ -11,13 +10,6 @@ namespace AyaNova.Models
}
public long ReportId { get; set; }
public JToken ClientMeta { get; set; }//meta JSON data passed from client, not part of biz object data
//public long[] SelectedRowIds { get; set; }
// public string DataListKey { get; set; }
// public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList
// public string MetaView { get; set; }//optional meta list view to integrate into the standard list view. Used by client to add "meta" filter conditions above the user's choices e.g. customer notes customer id
public JToken ClientMeta { get; set; }//meta JSON data passed from client, not part of biz object data
}
}

View File

@@ -1,7 +1,6 @@
using Newtonsoft.Json.Linq;
namespace AyaNova.Models
{
public class DataListReportRequest : DataListSelectedRequest
{
public long ReportId { get; set; }

View File

@@ -1,7 +1,6 @@
using System;
namespace AyaNova.Models
{
//common base class for REQUESTING a datalist from the client
public class DataListRequestBase
{

View File

@@ -2,9 +2,7 @@
using System.ComponentModel.DataAnnotations;
namespace AyaNova.Models
{
//this is a hiearchical object so saving as a JSON fragment still best option
{
public class DataListSavedFilter
{
public long Id { get; set; }

View File

@@ -11,12 +11,6 @@ namespace AyaNova.Models
//be used to rehydrate a list of id's
public class DataListSelectedProcessingOptions : DataListProcessingBase
{
//public AyaType ObjectType { get; set; }
// public long[] SelectedRowIds { get; set; }
// public string DataListKey { get; set; }
// public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList
// public string MetaView { get; set; }//optional meta list view to integrate into the standard list view. Used by client to add "meta" filter conditions above the user's choices e.g. customer notes customer id
internal DataListSelectedProcessingOptions(
DataListSelectedRequest request,
IDataListProcessing dataList,
@@ -71,14 +65,6 @@ namespace AyaNova.Models
DataListSelectedProcessingOptions d = new DataListSelectedProcessingOptions(selectedRequest, DataList, SavedView, SavedFilter, userId, userRoles);
//hydrate the saved view and filter
// DataListSelectedProcessingOptions dataListSelectedOptions = new DataListSelectedProcessingOptions(selectedRequest, DataList, SavedView, SavedFilter, UserId, UserRoles);
// //------------------------
// if (SelectedRowIds.Length == 0)
// SelectedRowIds = await AyaNova.DataList.DataListFetcher.GetIdListResponseAsync(ct, this, userRoles, log, userId);
return await AyaNova.DataList.DataListFetcher.GetIdListResponseAsync(ct, d, DataList, userRoles, log, userId);
}

View File

@@ -60,7 +60,7 @@ namespace AyaNova.Models
return Columns.Union(base.Filter.Select(z => z.Column).ToList()).ToList();
}
}
}
}

View File

@@ -1,6 +1,5 @@
namespace AyaNova.Models
{
//Handles posts from client
public sealed class DataListTableRequest : DataListRequestBase
{
public int? Offset { get; set; }