This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace AyaNova.Biz
|
namespace AyaNova.Biz
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
internal class WorkOrderBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject, IExportAbleObject
|
internal class WorkOrderBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject, IExportAbleObject
|
||||||
{
|
{
|
||||||
@@ -83,7 +83,7 @@ namespace AyaNova.Biz
|
|||||||
await ProcessChangeOfContractAsync(newObject.Id);
|
await ProcessChangeOfContractAsync(newObject.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await WorkOrderPopulateVizFields(newObject, true);//doing this here ahead of notification because notification may require the viz field lookup anyway and afaict no harm in it
|
||||||
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
||||||
return newObject;
|
return newObject;
|
||||||
}
|
}
|
||||||
@@ -140,6 +140,7 @@ namespace AyaNova.Biz
|
|||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
||||||
await WorkOrderSearchIndexAsync(newObject, true);
|
await WorkOrderSearchIndexAsync(newObject, true);
|
||||||
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
|
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
|
||||||
|
await WorkOrderPopulateVizFields(newObject, false);//doing this here ahead of notification because notification may require the viz field lookup anyway and afaict no harm in it
|
||||||
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
||||||
return newObject;
|
return newObject;
|
||||||
}
|
}
|
||||||
@@ -185,7 +186,7 @@ namespace AyaNova.Biz
|
|||||||
ret.IsDirty = false;
|
ret.IsDirty = false;
|
||||||
|
|
||||||
if (populateDisplayFields)
|
if (populateDisplayFields)
|
||||||
await WorkOrderPopulateVizFields(ret);
|
await WorkOrderPopulateVizFields(ret, false);
|
||||||
|
|
||||||
if (logTheGetEvent && ret != null)
|
if (logTheGetEvent && ret != null)
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct);
|
||||||
@@ -250,6 +251,7 @@ namespace AyaNova.Biz
|
|||||||
await GetCurrentContractFromContractIdAsync(newContractId);
|
await GetCurrentContractFromContractIdAsync(newContractId);
|
||||||
await ProcessChangeOfContractAsync(putObject.Id);
|
await ProcessChangeOfContractAsync(putObject.Id);
|
||||||
}
|
}
|
||||||
|
await WorkOrderPopulateVizFields(putObject, true);//doing this here ahead of notification because notification may require the viz field lookup anyway and afaict no harm in it
|
||||||
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Modified, putObject, dbObject);
|
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Modified, putObject, dbObject);
|
||||||
return putObject;
|
return putObject;
|
||||||
}
|
}
|
||||||
@@ -396,7 +398,7 @@ namespace AyaNova.Biz
|
|||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, workOrderId, BizType, AyaEvent.Modified), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, workOrderId, BizType, AyaEvent.Modified), ct);
|
||||||
await GetCurrentContractFromContractIdAsync(newContractId);
|
await GetCurrentContractFromContractIdAsync(newContractId);
|
||||||
var updatedWorkOrder = await ProcessChangeOfContractAsync(workOrderId);
|
var updatedWorkOrder = await ProcessChangeOfContractAsync(workOrderId);
|
||||||
await WorkOrderPopulateVizFields(updatedWorkOrder);
|
await WorkOrderPopulateVizFields(updatedWorkOrder, false);
|
||||||
return updatedWorkOrder;//return entire workorder
|
return updatedWorkOrder;//return entire workorder
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -717,13 +719,15 @@ namespace AyaNova.Biz
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//VIZ POPULATE
|
//VIZ POPULATE
|
||||||
//
|
//
|
||||||
private async Task WorkOrderPopulateVizFields(WorkOrder o)
|
private async Task WorkOrderPopulateVizFields(WorkOrder o, bool headerOnly)
|
||||||
{
|
{
|
||||||
await Task.CompletedTask;
|
if (!headerOnly)
|
||||||
foreach (var v in o.States)
|
{
|
||||||
await StatePopulateVizFields(v);
|
foreach (var v in o.States)
|
||||||
foreach (var v in o.Items)
|
await StatePopulateVizFields(v);
|
||||||
await ItemPopulateVizFields(v);
|
foreach (var v in o.Items)
|
||||||
|
await ItemPopulateVizFields(v);
|
||||||
|
}
|
||||||
|
|
||||||
//popup Alert notes
|
//popup Alert notes
|
||||||
//Customer notes first then others below
|
//Customer notes first then others below
|
||||||
|
|||||||
Reference in New Issue
Block a user