This commit is contained in:
@@ -18,6 +18,7 @@ UI FEATURE - The ability to customize forms:
|
|||||||
- This form can then be re-used everywhere as it's a stock object and this way we don't need to have a customize form for every existing CRUD form
|
- This form can then be re-used everywhere as it's a stock object and this way we don't need to have a customize form for every existing CRUD form
|
||||||
- Choosing to expose one or more of up to 16 custom fields on form in custom field section that shows when at least one is enabled
|
- Choosing to expose one or more of up to 16 custom fields on form in custom field section that shows when at least one is enabled
|
||||||
- Set the localized text for the current locale for every existing field and any custom ones enabled
|
- Set the localized text for the current locale for every existing field and any custom ones enabled
|
||||||
|
- Show in the UI that a particular field is shared so that users know they are changing system wide i.e. "CommonActive" or "Tags"
|
||||||
- Set whether a field is visible or not to user
|
- Set whether a field is visible or not to user
|
||||||
- Some stock fields will never be able to be hidden, they will be "core" fields required for AyaNova operations and will have their hidden checkbox grayed out
|
- Some stock fields will never be able to be hidden, they will be "core" fields required for AyaNova operations and will have their hidden checkbox grayed out
|
||||||
- Set whether a field custom or stock is required to have a value entered or have it's value changed
|
- Set whether a field custom or stock is required to have a value entered or have it's value changed
|
||||||
@@ -43,7 +44,7 @@ UI FEATURE - The ability to customize forms:
|
|||||||
|
|
||||||
- Need a FormAvailableFields static collection class that contains the fields available to each form
|
- 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
|
- 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
|
||||||
- Method: GetFields(FormKey): FieldKey (localekey), Core (bool, true means can't be hidden), IsCustom (bool, means it's one of the custom fields that can be set to type etc)
|
- Method: GetFields(FormKey): FieldKey (localekey), Hideable (bool), SharedLTKey (bool means it's not specific to that form), Custom (bool, means it's one of the custom fields that can be set to type etc)
|
||||||
- Method: GetForms() returns a list of form names
|
- Method: GetForms() returns a list of form names
|
||||||
- Method: IsValidForm(string formKey) bool exists or not
|
- Method: IsValidForm(string formKey) bool exists or not
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
public static class FormAvailableFields
|
public static class FormAvailableFields
|
||||||
{
|
{
|
||||||
|
|
||||||
private const string WIDGET = "widget";
|
private const string WIDGET = "widget";
|
||||||
|
|
||||||
|
|
||||||
public static List<string> AvailableFormKeys
|
public static List<string> AvailableFormKeys
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -27,34 +30,7 @@ namespace AyaNova.Biz
|
|||||||
List<FormField> l = new List<FormField>();
|
List<FormField> l = new List<FormField>();
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case WIDGET:
|
case WIDGET:
|
||||||
/*"Widget":"Widget",
|
|
||||||
"WidgetList":"Widgets",
|
|
||||||
"WidgetName":"Name",
|
|
||||||
"WidgetSerial":"Serial #",
|
|
||||||
"WidgetDollarAmount":"Price",
|
|
||||||
"WidgetCount":"Count",
|
|
||||||
"WidgetRoles":"Roles",
|
|
||||||
"WidgetStartDate":"Start",
|
|
||||||
"WidgetEndDate":"End",
|
|
||||||
"WidgetNotes":"Notes",
|
|
||||||
"WidgetCustom1": "Custom1",
|
|
||||||
"WidgetCustom2": "Custom2",
|
|
||||||
"WidgetCustom3": "Custom3",
|
|
||||||
"WidgetCustom4": "Custom4",
|
|
||||||
"WidgetCustom5": "Custom5",
|
|
||||||
"WidgetCustom6": "Custom6",
|
|
||||||
"WidgetCustom7": "Custom7",
|
|
||||||
"WidgetCustom8": "Custom8",
|
|
||||||
"WidgetCustom9": "Custom9",
|
|
||||||
"WidgetCustom10": "Custom10",
|
|
||||||
"WidgetCustom11": "Custom11",
|
|
||||||
"WidgetCustom12": "Custom12",
|
|
||||||
"WidgetCustom13": "Custom13",
|
|
||||||
"WidgetCustom14": "Custom14",
|
|
||||||
"WidgetCustom15": "Custom15",
|
|
||||||
"WidgetCustom16": "Custom16", */
|
|
||||||
|
|
||||||
l.Add(new FormField("WidgetName", false, false));//is not shared localized text key and not hideable as it is in the validation rules for widget
|
l.Add(new FormField("WidgetName", false, false));//is not shared localized text key and not hideable as it is in the validation rules for widget
|
||||||
l.Add(new FormField("WidgetSerial"));//not in validation rules...you get the idea
|
l.Add(new FormField("WidgetSerial"));//not in validation rules...you get the idea
|
||||||
l.Add(new FormField("WidgetDollarAmount"));
|
l.Add(new FormField("WidgetDollarAmount"));
|
||||||
@@ -81,13 +57,12 @@ namespace AyaNova.Biz
|
|||||||
l.Add(new FormField("WidgetCustom14", false, true, true));
|
l.Add(new FormField("WidgetCustom14", false, true, true));
|
||||||
l.Add(new FormField("WidgetCustom15", false, true, true));
|
l.Add(new FormField("WidgetCustom15", false, true, true));
|
||||||
l.Add(new FormField("WidgetCustom16", false, true, true));
|
l.Add(new FormField("WidgetCustom16", false, true, true));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new System.ArgumentOutOfRangeException($"FormAvailableFields: {key} is not a valid form key");
|
throw new System.ArgumentOutOfRangeException($"FormAvailableFields: {key} is not a valid form key");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user