This commit is contained in:
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
DefaultColumns = new List<string>() { "PMSerialNumber", "Customer", "PMNextServiceDate", "PMNextWoGenerateDate", "pmactive", "PMStopGeneratingDate" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "PMNextWoGenerateDate", "-" } };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "PMSerialNumber", "-" } };
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
|
||||
@@ -704,6 +704,28 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
|
||||
//Did they exclude *all* days of the week (int value 127)
|
||||
if ((int)proposedObj.ExcludeDaysOfWeek == 127)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "ExcludeDaysOfWeek");
|
||||
}
|
||||
|
||||
//GenerateBefore MUST be less than Repeat Interval or bad things happen
|
||||
//normalizing to dates makes this easier
|
||||
var dtNow = DateTime.UtcNow;
|
||||
var dtGenBefore = CalculateNewDateFromSpanAndUnit(dtNow, proposedObj.GenerateBeforeUnit, proposedObj.GenerateBeforeInterval);
|
||||
var dtRepeat = CalculateNewDateFromSpanAndUnit(dtNow, proposedObj.RepeatUnit, proposedObj.RepeatInterval);
|
||||
if (!(dtGenBefore < dtRepeat))
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "GenerateBeforeInterval", "message here??");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
todo: quote status list first, it's a table of created items, keep properties from v7 but add the following properties:
|
||||
|
||||
Reference in New Issue
Block a user