This commit is contained in:
@@ -81,6 +81,18 @@ namespace AyaNova.Biz
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
||||
await WorkOrderSearchIndexAsync(newObject, true);
|
||||
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
|
||||
|
||||
//Was this a full workorder posted all at once?
|
||||
//(seeder or api user, not something AyaNova front end would do)
|
||||
if (newObject.Items.Count > 0)//our front end will post the header alone on new so this indicates a fully populated wo was saved
|
||||
{
|
||||
if (newObject.ContractId != null)
|
||||
mContractInEffect = await ct.Contract.AsNoTracking().FirstOrDefaultAsync(z => z.Id == newObject.ContractId);
|
||||
mFetchedContractAlready = true;
|
||||
await ProcessChangeOfContractAsync(newObject.Id);
|
||||
}
|
||||
|
||||
|
||||
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
||||
return newObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user