This commit is contained in:
@@ -173,18 +173,57 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//WO REPORT
|
||||||
//determine effective wo report if not default, there are 5 slots, any could be used or not so just iterate from bottom to top, last one wins in case of ties
|
//determine effective wo report if not default, there are 5 slots, any could be used or not so just iterate from bottom to top, last one wins in case of ties
|
||||||
//this prioritizes the lowest numbered slot automatically, i.e. first choice
|
//this prioritizes the lowest numbered slot automatically, i.e. first choice
|
||||||
|
//SLOT 5
|
||||||
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport5Id != null && AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport5Tags.Count > 0)
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport5Id != null && AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport5Tags.Count > 0)
|
||||||
{
|
{
|
||||||
if (CustomerWorkOrderReportByTagTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport5Tags).Any())
|
if (CustomerWorkOrderReportByTagTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport5Tags).Any())
|
||||||
ThisWOEffectiveWorkOrderReportId = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport5Id;
|
ThisWOEffectiveWorkOrderReportId = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport5Id;
|
||||||
|
}
|
||||||
|
//SLOT 4
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport4Id != null && AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport4Tags.Count > 0)
|
||||||
|
{
|
||||||
|
if (CustomerWorkOrderReportByTagTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport4Tags).Any())
|
||||||
|
ThisWOEffectiveWorkOrderReportId = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport4Id;
|
||||||
|
}
|
||||||
|
//SLOT 3
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport3Id != null && AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport3Tags.Count > 0)
|
||||||
|
{
|
||||||
|
if (CustomerWorkOrderReportByTagTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport3Tags).Any())
|
||||||
|
ThisWOEffectiveWorkOrderReportId = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport3Id;
|
||||||
|
}
|
||||||
|
//SLOT 2
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport2Id != null && AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport2Tags.Count > 0)
|
||||||
|
{
|
||||||
|
if (CustomerWorkOrderReportByTagTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport2Tags).Any())
|
||||||
|
ThisWOEffectiveWorkOrderReportId = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport2Id;
|
||||||
|
}
|
||||||
|
//SLOT 1
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport1Id != null && AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport1Tags.Count > 0)
|
||||||
|
{
|
||||||
|
if (CustomerWorkOrderReportByTagTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerWorkOrderReport1Tags).Any())
|
||||||
|
ThisWOEffectiveWorkOrderReportId = AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerTagWorkOrderReport1Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//WO WIKI
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOWiki)
|
||||||
|
{
|
||||||
|
ThisWOCanWiki = true;
|
||||||
|
//Tag override?
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOWikiInTags.Count > 0)
|
||||||
|
ThisWOCanWiki = CustomerWorkOrderWikiAttachmentTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOWikiInTags).Any();
|
||||||
|
}
|
||||||
|
|
||||||
|
//WO ATTACHMENTS
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOAttachments)
|
||||||
|
{
|
||||||
|
ThisWOCanAttachments = true;
|
||||||
|
//Tag override?
|
||||||
|
if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOAttachmentsInTags.Count > 0)
|
||||||
|
ThisWOCanAttachments = CustomerWorkOrderWikiAttachmentTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOAttachmentsInTags).Any();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user