This commit is contained in:
@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using AyaNova.Util;
|
using AyaNova.Util;
|
||||||
using AyaNova.Api.ControllerHelpers;
|
using AyaNova.Api.ControllerHelpers;
|
||||||
using AyaNova.Models;
|
using AyaNova.Models;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace AyaNova.Biz
|
namespace AyaNova.Biz
|
||||||
{
|
{
|
||||||
@@ -70,6 +71,10 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
Validate(putObject, dbObject);
|
Validate(putObject, dbObject);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
|
|
||||||
|
List<string> originalTags = dbObject.AllTags();
|
||||||
|
List<string> newTags = putObject.AllTags();
|
||||||
|
|
||||||
ct.Replace(dbObject, putObject);
|
ct.Replace(dbObject, putObject);
|
||||||
|
|
||||||
|
|
||||||
@@ -87,6 +92,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Log modification and save context
|
//Log modification and save context
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, 1, BizType, AyaEvent.Modified), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, 1, BizType, AyaEvent.Modified), ct);
|
||||||
|
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newTags, originalTags);
|
||||||
|
|
||||||
return putObject;
|
return putObject;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,26 @@ namespace AyaNova.Models
|
|||||||
public string SignatureFooter { get; set; }
|
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()
|
public GlobalBizSettings()
|
||||||
{
|
{
|
||||||
Id = 1;//always 1
|
Id = 1;//always 1
|
||||||
|
|||||||
Reference in New Issue
Block a user