This commit is contained in:
@@ -10,7 +10,7 @@ namespace AyaNova.DataList
|
|||||||
SQLFrom = "from aworkorderstatus";
|
SQLFrom = "from aworkorderstatus";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "WorkOrderStatusName", "WorkOrderStatusNotes", "Active" };
|
DefaultColumns = new List<string>() { "WorkOrderStatusName", "SelectRoles", "WorkOrderStatusRemoveRoles", "Active" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "WorkOrderStatusName", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "WorkOrderStatusName", "+" } };
|
||||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ namespace AyaNova.DataList
|
|||||||
SqlValueColumnName = "aworkorderstatus.locked"
|
SqlValueColumnName = "aworkorderstatus.locked"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "SelectRoles",
|
TKey = "SelectRoles",
|
||||||
FieldKey = "SelectRoles",
|
FieldKey = "SelectRoles",
|
||||||
@@ -68,7 +68,7 @@ namespace AyaNova.DataList
|
|||||||
SqlValueColumnName = "aworkorderstatus.selectroles"
|
SqlValueColumnName = "aworkorderstatus.selectroles"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "WorkOrderStatusRemoveRoles",
|
TKey = "WorkOrderStatusRemoveRoles",
|
||||||
FieldKey = "WorkOrderStatusRemoveRoles",
|
FieldKey = "WorkOrderStatusRemoveRoles",
|
||||||
|
|||||||
@@ -889,7 +889,7 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#c00000";
|
stat.Color = "#c00000";
|
||||||
stat.Completed = false;
|
stat.Completed = false;
|
||||||
stat.Locked = true;
|
stat.Locked = true;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted;
|
||||||
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
stat.Notes = "Use to lock workorder and wait for approval from manager";
|
stat.Notes = "Use to lock workorder and wait for approval from manager";
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
@@ -913,8 +913,8 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#80ffff";
|
stat.Color = "#80ffff";
|
||||||
stat.Completed = false;
|
stat.Completed = false;
|
||||||
stat.Locked = false;
|
stat.Locked = false;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin | AuthorizationRoles.Tech;
|
||||||
stat.RemoveRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin | AuthorizationRoles.Tech;
|
||||||
stat.Notes = "Waiting for technicians to be assigned to this work";
|
stat.Notes = "Waiting for technicians to be assigned to this work";
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
@@ -937,8 +937,8 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#00ff00";
|
stat.Color = "#00ff00";
|
||||||
stat.Completed = false;
|
stat.Completed = false;
|
||||||
stat.Locked = false;
|
stat.Locked = false;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Tech | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
stat.RemoveRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin | AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted;
|
||||||
stat.Notes = "Scheduled / ready for service";
|
stat.Notes = "Scheduled / ready for service";
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
@@ -961,7 +961,7 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#ff0000";
|
stat.Color = "#ff0000";
|
||||||
stat.Completed = true;
|
stat.Completed = true;
|
||||||
stat.Locked = true;
|
stat.Locked = true;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
|
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
@@ -985,8 +985,8 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#8080ff";
|
stat.Color = "#8080ff";
|
||||||
stat.Completed = false;
|
stat.Completed = false;
|
||||||
stat.Locked = true;
|
stat.Locked = true;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
stat.RemoveRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin | AuthorizationRoles.Tech;
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
||||||
@@ -1008,8 +1008,8 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#c0c000";
|
stat.Color = "#c0c000";
|
||||||
stat.Completed = false;
|
stat.Completed = false;
|
||||||
stat.Locked = false;
|
stat.Locked = false;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
stat.RemoveRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin | AuthorizationRoles.Tech | AuthorizationRoles.Inventory;
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
||||||
@@ -1031,8 +1031,8 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#ff00ff";
|
stat.Color = "#ff00ff";
|
||||||
stat.Completed = false;
|
stat.Completed = false;
|
||||||
stat.Locked = false;
|
stat.Locked = false;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
stat.RemoveRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin | AuthorizationRoles.Tech | AuthorizationRoles.Inventory;
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
||||||
@@ -1054,8 +1054,8 @@ namespace AyaNova.Util
|
|||||||
stat.Color = "#ffc0c0";
|
stat.Color = "#ffc0c0";
|
||||||
stat.Completed = false;
|
stat.Completed = false;
|
||||||
stat.Locked = true;
|
stat.Locked = true;
|
||||||
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
|
stat.SelectRoles = AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
stat.RemoveRoles = AuthorizationRoles.Sales | AuthorizationRoles.Accounting | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
stat.RemoveRoles = AuthorizationRoles.Tech | AuthorizationRoles.Accounting | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
|
||||||
@@ -2634,7 +2634,7 @@ namespace AyaNova.Util
|
|||||||
};
|
};
|
||||||
woItem.ScheduledUsers.Add(woItemScheduledUser);
|
woItem.ScheduledUsers.Add(woItemScheduledUser);
|
||||||
|
|
||||||
woItemScheduledUser = new WorkOrderItemScheduledUser()
|
woItemScheduledUser = new WorkOrderItemScheduledUser()
|
||||||
{
|
{
|
||||||
UserId = KnownUserSubContractorId,
|
UserId = KnownUserSubContractorId,
|
||||||
EstimatedQuantity = 2,
|
EstimatedQuantity = 2,
|
||||||
@@ -2644,7 +2644,7 @@ namespace AyaNova.Util
|
|||||||
woItem.ScheduledUsers.Add(woItemScheduledUser);
|
woItem.ScheduledUsers.Add(woItemScheduledUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (y == 3)
|
if (y == 3)
|
||||||
{
|
{
|
||||||
//known restricted tech and subcontractor on some items
|
//known restricted tech and subcontractor on some items
|
||||||
woItemScheduledUser = new WorkOrderItemScheduledUser()
|
woItemScheduledUser = new WorkOrderItemScheduledUser()
|
||||||
@@ -2656,7 +2656,7 @@ namespace AyaNova.Util
|
|||||||
};
|
};
|
||||||
woItem.ScheduledUsers.Add(woItemScheduledUser);
|
woItem.ScheduledUsers.Add(woItemScheduledUser);
|
||||||
|
|
||||||
woItemScheduledUser = new WorkOrderItemScheduledUser()
|
woItemScheduledUser = new WorkOrderItemScheduledUser()
|
||||||
{
|
{
|
||||||
UserId = KnownUserSubContractorRestrictedId,
|
UserId = KnownUserSubContractorRestrictedId,
|
||||||
EstimatedQuantity = 2,
|
EstimatedQuantity = 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user