This commit is contained in:
2019-01-09 20:30:47 +00:00
parent 44a22c29a7
commit 4cacf19b65
4 changed files with 33 additions and 9 deletions

View File

@@ -34,13 +34,13 @@ UI FEATURE - The ability to customize forms:
## TODO
- Need a FormCustom table and model to hold the user's form customization data
- Like DataFilter, holds a JSON fragment in one field and the form key in another field
- JSON FRAGMENT holds items that differ from stock, no "core" fields allowed
- FieldKey
- Hide
- Required
- Type (checkbox, date, date time, decimal, number, picklist, and text)
- #DONE# Need a FormCustom table and model to hold the user's form customization data
- Like DataFilter, holds a JSON fragment in one field and the form key in another field
- JSON FRAGMENT holds items that differ from stock, no "core" fields allowed
- FieldKey
- Hide
- Required
- Type (checkbox, date, date time, decimal, number, picklist(FUTURE), and text)
- #DONE# Need a FormAvailableFields static collection class that contains the fields available to each form
- This should be independent from any other class tied to a particular route or controller or db table as it could be some or none of all of those things

View File

@@ -22,6 +22,7 @@ namespace AyaNova.Models
public virtual DbSet<LocaleItem> LocaleItem { get; set; }
public virtual DbSet<DataFilter> DataFilter { get; set; }
public virtual DbSet<Tag> Tag { get; set; }
public virtual DbSet<FormCustom> FormCustom { get; set; }
//Note: had to add this constructor to work with the code in startup.cs that gets the connection string from the appsettings.json file
//and commented out the above on configuring

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
namespace AyaNova.Models
{
public partial class FormCustom
{
public long Id { get; set; }
public uint ConcurrencyToken { get; set; }
[Required]
public long OwnerId { get; set; }
[Required, MaxLength(255)]
public string FormKey { get; set; }//max 255 characters ascii set
public string Template { get; set; }//JSON fragment of form customization template
}
}

View File

@@ -22,8 +22,8 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 10;
internal const long EXPECTED_COLUMN_COUNT = 98;
internal const long EXPECTED_INDEX_COUNT = 22;
internal const long EXPECTED_COLUMN_COUNT = 102;
internal const long EXPECTED_INDEX_COUNT = 24;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!