This commit is contained in:
@@ -33,9 +33,10 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
|
|
||||||
//turn the DataListTableRequest into a DataListTableProcesingOptions object here
|
//turn the DataListTableRequest into a DataListTableProcesingOptions object here
|
||||||
|
//hydrates filter and column selections etc
|
||||||
DataListTableProcessingOptions dataListTableOptions = new DataListTableProcessingOptions(dataListTableRequest, DataList, ct);
|
DataListTableProcessingOptions dataListTableOptions = new DataListTableProcessingOptions(dataListTableRequest, DataList, ct);
|
||||||
|
|
||||||
DataList.SetListOptionDefaultsIfNecessary(dataListTableOptions);
|
//#### TODO: below block into above method to clean it up and centralize it
|
||||||
|
|
||||||
|
|
||||||
//STATIC filter options from server
|
//STATIC filter options from server
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace AyaNova.Models
|
|||||||
public virtual DbSet<Translation> Translation { get; set; }
|
public virtual DbSet<Translation> Translation { get; set; }
|
||||||
public virtual DbSet<TranslationItem> TranslationItem { get; set; }
|
public virtual DbSet<TranslationItem> TranslationItem { get; set; }
|
||||||
public virtual DbSet<DataListSavedFilter> DataListSavedFilter { get; set; }
|
public virtual DbSet<DataListSavedFilter> DataListSavedFilter { get; set; }
|
||||||
|
public virtual DbSet<DataListSavedColumnView> DataListSavedColumnView { get; set; }
|
||||||
public virtual DbSet<Tag> Tag { get; set; }
|
public virtual DbSet<Tag> Tag { get; set; }
|
||||||
public virtual DbSet<FormCustom> FormCustom { get; set; }
|
public virtual DbSet<FormCustom> FormCustom { get; set; }
|
||||||
public virtual DbSet<PickListTemplate> PickListTemplate { get; set; }
|
public virtual DbSet<PickListTemplate> PickListTemplate { get; set; }
|
||||||
|
|||||||
27
server/AyaNova/models/DataListSavedColumnView.cs
Normal file
27
server/AyaNova/models/DataListSavedColumnView.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace AyaNova.Models
|
||||||
|
{
|
||||||
|
//this is a hiearchical object so saving as a JSON fragment still best option
|
||||||
|
|
||||||
|
public class DataListSavedColumnView
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public long UserId { get; set; }//only relevant if non-public for fetching either in list or single (public true OR userid matches)
|
||||||
|
|
||||||
|
[Required, MaxLength(255)]
|
||||||
|
public string ListKey { get; set; }//max 255 characters ascii set
|
||||||
|
|
||||||
|
public string Columns { get; set; }//JSON serialized Column array: columns:["PartInventoryTransactionEntryDate","PartPartNumber","PartWarehouseName","PartInventoryTransactionQuantity","PartInventoryTransactionDescription","PartInventoryTransactionSource","PartInventoryBalance"]
|
||||||
|
public string Sort { get; set; }//JSON serialized SortBy Dictionary: 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
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,9 +24,18 @@ namespace AyaNova.Models
|
|||||||
base.ClientCriteria=request.ClientCriteria;
|
base.ClientCriteria=request.ClientCriteria;
|
||||||
base.DataListKey=request.DataListKey;
|
base.DataListKey=request.DataListKey;
|
||||||
|
|
||||||
|
dataList.SetListOptionDefaultsIfNecessary(this);
|
||||||
|
|
||||||
//populate some values from saved filter and default columnview
|
//populate some values from saved filter and default columnview
|
||||||
|
|
||||||
//COLUMNS
|
//SET COLUMNS
|
||||||
|
//get user default DataListProcessingBase for this list key
|
||||||
|
|
||||||
|
//SET SORTBY
|
||||||
|
|
||||||
|
//SET FILTER
|
||||||
|
|
||||||
|
//SERVER FILTER PROCESSING HERE CODE SEE DATALISTFETCHER
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -504,13 +504,17 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
//DATALISTSAVEDFILTER
|
//DATALISTSAVEDFILTER / DATALISTSAVEDCOLUMNVIEW
|
||||||
if (currentSchema < 7)
|
if (currentSchema < 7)
|
||||||
{
|
{
|
||||||
LogUpdateMessage(log);
|
LogUpdateMessage(log);
|
||||||
|
|
||||||
await ExecQueryAsync("CREATE TABLE adatalistsavedfilter (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid BIGINT NOT NULL, name TEXT NOT NULL, public BOOL NOT NULL, " +
|
await ExecQueryAsync("CREATE TABLE adatalistsavedfilter (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid BIGINT NOT NULL, name TEXT NOT NULL, public BOOL NOT NULL, "
|
||||||
"default BOOL NOT NULL, listkey VARCHAR(255) NOT NULL, filter TEXT)");
|
+ "default BOOL NOT NULL, listkey VARCHAR(255) NOT NULL, filter TEXT)");
|
||||||
|
|
||||||
|
await ExecQueryAsync("CREATE TABLE adatalistsavedcolumnview (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid BIGINT NOT NULL, "
|
||||||
|
+ "listkey VARCHAR(255) NOT NULL, columns TEXT, sort TEXT)");
|
||||||
|
|
||||||
|
|
||||||
await SetSchemaLevelAsync(++currentSchema);
|
await SetSchemaLevelAsync(++currentSchema);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user