This commit is contained in:
2021-11-18 23:45:16 +00:00
parent fab6212113
commit 0c31799f8e
2 changed files with 26 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
using AyaNova.Util;
using AyaNova.Api.ControllerHelpers;
using AyaNova.Models;
using System.Collections.Generic;
namespace AyaNova.Biz
{
@@ -70,6 +71,10 @@ namespace AyaNova.Biz
}
Validate(putObject, dbObject);
if (HasErrors) return null;
List<string> originalTags = dbObject.AllTags();
List<string> newTags = putObject.AllTags();
ct.Replace(dbObject, putObject);
@@ -87,6 +92,7 @@ namespace AyaNova.Biz
//Log modification and save context
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, 1, BizType, AyaEvent.Modified), ct);
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newTags, originalTags);
return putObject;
}

View File

@@ -118,6 +118,26 @@ namespace AyaNova.Models
public string SignatureFooter { get; set; }
public List<string> AllTags(){
var t=new List<string>();
t.AddRange(this.CustomerWorkOrderReport1Tags);
t.AddRange(this.CustomerWorkOrderReport2Tags);
t.AddRange(this.CustomerWorkOrderReport3Tags);
t.AddRange(this.CustomerWorkOrderReport4Tags);
t.AddRange(this.CustomerWorkOrderReport5Tags);
t.AddRange(this.CustomerAllowCSRInTags);
t.AddRange(this.CustomerAllowViewWOInTags);
t.AddRange(this.CustomerAllowWOWikiInTags);
t.AddRange(this.CustomerAllowWOAttachmentsInTags);
t.AddRange(this.CustomerAllowUserSettingsInTags);
t.AddRange(this.CustomerAllowNotifyServiceImminentInTags);
t.AddRange(this.CustomerAllowNotifyCSRAcceptedInTags);
t.AddRange(this.CustomerAllowNotifyCSRRejectedInTags);
t.AddRange(this.CustomerAllowNotifyWOCreatedInTags);
t.AddRange(this.CustomerAllowNotifyWOCompletedInTags);
return t;
}
public GlobalBizSettings()
{
Id = 1;//always 1