Update: Auth Claims Refinement, Job Creation
Auth Claims for Job Creation types, user details.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Disco.BI.Extensions
|
||||
|
||||
public static bool CanCreateJob(this Device d)
|
||||
{
|
||||
if (!UserService.CurrentAuthorization.Has(Claims.Job.Actions.Create))
|
||||
if (!JobActionExtensions.CanCreate())
|
||||
return false;
|
||||
|
||||
return !d.IsDecommissioned();
|
||||
|
||||
@@ -13,6 +13,18 @@ namespace Disco.BI.Extensions
|
||||
{
|
||||
public static class JobActionExtensions
|
||||
{
|
||||
#region Create
|
||||
public static bool CanCreate()
|
||||
{
|
||||
if (!UserService.CurrentAuthorization.Has(Claims.Job.Actions.Create))
|
||||
return false;
|
||||
|
||||
if (!UserService.CurrentAuthorization.HasAny(Claims.Job.Types.CreateHMisc, Claims.Job.Types.CreateHNWar, Claims.Job.Types.CreateHWar, Claims.Job.Types.CreateSApp, Claims.Job.Types.CreateSImg, Claims.Job.Types.CreateSOS, Claims.Job.Types.CreateUMgmt))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Device Held
|
||||
public static bool CanDeviceHeld(this Job j)
|
||||
@@ -350,7 +362,7 @@ namespace Disco.BI.Extensions
|
||||
private static bool CanCloseNever(this Job j, JobQueueJob IgnoreJobQueueJob = null)
|
||||
{
|
||||
if (!UserService.CurrentAuthorization.Has(Claims.Job.Actions.Close))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
if (j.ClosedDate.HasValue)
|
||||
return true; // Job already Closed
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.IO;
|
||||
using Disco.Models.BI.DocumentTemplates;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Models.BI.Job;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
namespace Disco.BI.Extensions
|
||||
{
|
||||
@@ -190,5 +191,42 @@ namespace Disco.BI.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
private static List<string> FilterCreatableTypePermissions(AuthorizationToken Authorization)
|
||||
{
|
||||
if (!Authorization.HasAll(Claims.Job.Types.CreateHMisc, Claims.Job.Types.CreateHNWar, Claims.Job.Types.CreateHWar, Claims.Job.Types.CreateSApp, Claims.Job.Types.CreateSImg, Claims.Job.Types.CreateSOS, Claims.Job.Types.CreateUMgmt))
|
||||
{
|
||||
// Must Filter
|
||||
List<string> allowedTypes = new List<string>(6);
|
||||
if (Authorization.Has(Claims.Job.Types.CreateHMisc))
|
||||
allowedTypes.Add(JobType.JobTypeIds.HMisc);
|
||||
if (Authorization.Has(Claims.Job.Types.CreateHNWar))
|
||||
allowedTypes.Add(JobType.JobTypeIds.HNWar);
|
||||
if (Authorization.Has(Claims.Job.Types.CreateHWar))
|
||||
allowedTypes.Add(JobType.JobTypeIds.HWar);
|
||||
if (Authorization.Has(Claims.Job.Types.CreateSApp))
|
||||
allowedTypes.Add(JobType.JobTypeIds.SApp);
|
||||
if (Authorization.Has(Claims.Job.Types.CreateSImg))
|
||||
allowedTypes.Add(JobType.JobTypeIds.SImg);
|
||||
if (Authorization.Has(Claims.Job.Types.CreateSOS))
|
||||
allowedTypes.Add(JobType.JobTypeIds.SOS);
|
||||
if (Authorization.Has(Claims.Job.Types.CreateUMgmt))
|
||||
allowedTypes.Add(JobType.JobTypeIds.UMgmt);
|
||||
|
||||
return allowedTypes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static IQueryable<JobType> FilterCreatableTypePermissions(this IQueryable<JobType> JobTypes, AuthorizationToken Authorization)
|
||||
{
|
||||
var allowedTypes = FilterCreatableTypePermissions(Authorization);
|
||||
|
||||
if (allowedTypes != null)
|
||||
{
|
||||
return JobTypes.Where(jt => allowedTypes.Contains(jt.Id));
|
||||
}
|
||||
|
||||
return JobTypes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,5 +61,13 @@ namespace Disco.BI.Extensions
|
||||
{
|
||||
return Interop.ActiveDirectory.ActiveDirectory.GetUserAccount(User.Id, AdditionalProperties);
|
||||
}
|
||||
|
||||
public static bool CanCreateJob(this User u)
|
||||
{
|
||||
if (!JobActionExtensions.CanCreate())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Disco.BI.JobBI
|
||||
query = query.Take(LimitCount.Value);
|
||||
|
||||
JobTableModel model = new JobTableModel() { ShowStatus = IncludeJobStatus };
|
||||
model.Fill(Database, query);
|
||||
model.Fill(Database, query, true);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Disco.Models.UI.Job
|
||||
|
||||
bool? DeviceHeld { get; set; }
|
||||
|
||||
string QuickLogDestinationUrl { get; set; }
|
||||
string SourceUrl { get; set; }
|
||||
|
||||
bool? QuickLog { get; set; }
|
||||
int? QuickLogTaskTimeMinutes { get; set; }
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace Disco.Services.Authorization
|
||||
internal const string RequireDiscoAuthorizationMessage = "Your account does not have the required permission to access this feature. This feature requires your account to be included in at least one Disco Authorization Role.";
|
||||
internal const string RequireMessageTemplate = "Your account does not have the required permission to access this feature.\r\n";
|
||||
internal const string RequireMessageSingleTemplate = RequireMessageTemplate + "This feature requires the following permission:\r\n- {0}";
|
||||
internal const string RequireAllMessageTemplate = RequireMessageTemplate + "This feature requires permission for:{0}.";
|
||||
internal const string RequireAnyMessageTemplate = RequireMessageTemplate + "This feature requires at least one of these permissions:{0}.";
|
||||
internal const string RequireAllMessageTemplate = RequireMessageTemplate + "This feature requires permission for:\r\n- {0}";
|
||||
internal const string RequireAnyMessageTemplate = RequireMessageTemplate + "This feature requires at least one of these permissions:\r\n- {0}";
|
||||
|
||||
internal static string BuildRequireMessage(string ClaimKey)
|
||||
{
|
||||
|
||||
@@ -145,6 +145,13 @@ namespace Disco.Services.Authorization
|
||||
{ "Job.Properties.Flags", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.Flags, (c, v) => c.Job.Properties.Flags = v, "Flags Property", "Can update property", false) },
|
||||
{ "Job.Properties.NotWaitingForUserAction", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NotWaitingForUserAction, (c, v) => c.Job.Properties.NotWaitingForUserAction = v, "Not Waiting For User Action Property", "Can update property", false) },
|
||||
{ "Job.Properties.WaitingForUserAction", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WaitingForUserAction, (c, v) => c.Job.Properties.WaitingForUserAction = v, "Waiting For User Action Property", "Can update property", false) },
|
||||
{ "Job.Types.CreateHMisc", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateHMisc, (c, v) => c.Job.Types.CreateHMisc = v, "Create Hardware - Miscellaneous Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
|
||||
{ "Job.Types.CreateHNWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateHNWar, (c, v) => c.Job.Types.CreateHNWar = v, "Create Hardware - Non-Warranty Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
|
||||
{ "Job.Types.CreateHWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateHWar, (c, v) => c.Job.Types.CreateHWar = v, "Create Hardware - Warranty Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
|
||||
{ "Job.Types.CreateSApp", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateSApp, (c, v) => c.Job.Types.CreateSApp = v, "Create Software - Application Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
|
||||
{ "Job.Types.CreateSOS", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateSOS, (c, v) => c.Job.Types.CreateSOS = v, "Create Software - Operating System Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
|
||||
{ "Job.Types.CreateSImg", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateSImg, (c, v) => c.Job.Types.CreateSImg = v, "Create Software - Reimage Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
|
||||
{ "Job.Types.CreateUMgmt", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateUMgmt, (c, v) => c.Job.Types.CreateUMgmt = v, "Create User Management Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
|
||||
{ "Job.Types.ShowHMisc", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowHMisc, (c, v) => c.Job.Types.ShowHMisc = v, "Show Hardware - Miscellaneous Jobs", "Can show jobs of this type", false) },
|
||||
{ "Job.Types.ShowHNWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowHNWar, (c, v) => c.Job.Types.ShowHNWar = v, "Show Hardware - Non-Warranty Jobs", "Can show jobs of this type", false) },
|
||||
{ "Job.Types.ShowHWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowHWar, (c, v) => c.Job.Types.ShowHWar = v, "Show Hardware - Warranty Jobs", "Can show jobs of this type", false) },
|
||||
@@ -195,8 +202,10 @@ namespace Disco.Services.Authorization
|
||||
{ "User.Search", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Search, (c, v) => c.User.Search = v, "Search Users", "Can search users", false) },
|
||||
{ "User.ShowAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAttachments, (c, v) => c.User.ShowAttachments = v, "Show Attachments", "Can show user attachments", false) },
|
||||
{ "User.ShowAssignmentHistory", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAssignmentHistory, (c, v) => c.User.ShowAssignmentHistory = v, "Show Device Assignment History", "Can show the device assignment history for users", false) },
|
||||
{ "User.ShowAssignments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAssignments, (c, v) => c.User.ShowAssignments = v, "Show Device Assignments", "Can show the current device assignments users", false) },
|
||||
{ "User.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Show, (c, v) => c.User.Show = v, "Show Users", "Can show users", false) },
|
||||
{ "User.ShowAuthorization", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAuthorization, (c, v) => c.User.ShowAuthorization = v, "Show Users Authorization", "Can show authorization permissions associated with users", false) },
|
||||
{ "User.ShowDetails", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowDetails, (c, v) => c.User.ShowDetails = v, "Show Users Details", "Can show users contact and personal details", false) },
|
||||
{ "User.ShowJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowJobs, (c, v) => c.User.ShowJobs = v, "Show Users Jobs", "Can show jobs associated with users", false) },
|
||||
{ "ComputerAccount", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.ComputerAccount, (c, v) => c.ComputerAccount = v, "Computer Account", "Represents a computer account", true) },
|
||||
{ "DiscoAdminAccount", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.DiscoAdminAccount, (c, v) => c.DiscoAdminAccount = v, "Disco Administrator Account", "Represents a Disco Administrator account", true) }
|
||||
@@ -275,11 +284,11 @@ namespace Disco.Services.Authorization
|
||||
new ClaimNavigatorItem("Config.Plugin.Show", false),
|
||||
new ClaimNavigatorItem("Config.Plugin.Uninstall", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Config.Show", false),
|
||||
new ClaimNavigatorItem("Config.System", "System", "Permissions related to System Configuration", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Config.System.ConfigureProxy", false),
|
||||
new ClaimNavigatorItem("Config.System.Show", false)
|
||||
})
|
||||
}),
|
||||
new ClaimNavigatorItem("Config.Show", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Job", "Job", "Permissions related to Jobs", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Job.Actions", "Actions", "Permissions related to Job Actions", false, new List<IClaimNavigatorItem>() {
|
||||
@@ -305,12 +314,6 @@ namespace Disco.Services.Authorization
|
||||
new ClaimNavigatorItem("Job.Actions.UpdateSubTypes", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Job.Properties", "Job Properties", "Permissions related to Job Properties", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceHeldLocation", false),
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceHeld", false),
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceReadyForReturn", false),
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceReturned", false),
|
||||
new ClaimNavigatorItem("Job.Properties.ExpectedClosedDate", false),
|
||||
new ClaimNavigatorItem("Job.Properties.Flags", false),
|
||||
new ClaimNavigatorItem("Job.Properties.JobQueueProperties", "Job Queue Properties", "Permissions related to Job Queue Job Properties", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditAnyComments", false),
|
||||
new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditAnyPriority", false),
|
||||
@@ -337,8 +340,6 @@ namespace Disco.Services.Authorization
|
||||
new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.RepairerName", false),
|
||||
new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.RepairerReference", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Job.Properties.NotWaitingForUserAction", false),
|
||||
new ClaimNavigatorItem("Job.Properties.WaitingForUserAction", false),
|
||||
new ClaimNavigatorItem("Job.Properties.WarrantyProperties", "Warranty Properties", "Permissions related to Warranty Job Properties", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ExternalCompletedDate", false),
|
||||
new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ExternalLoggedDate", false),
|
||||
@@ -346,7 +347,15 @@ namespace Disco.Services.Authorization
|
||||
new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ExternalReference", false),
|
||||
new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ProviderDetails", false),
|
||||
new ClaimNavigatorItem("Job.Properties.WarrantyProperties.WarrantyCompleted", false)
|
||||
})
|
||||
}),
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceHeldLocation", false),
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceHeld", false),
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceReadyForReturn", false),
|
||||
new ClaimNavigatorItem("Job.Properties.DeviceReturned", false),
|
||||
new ClaimNavigatorItem("Job.Properties.ExpectedClosedDate", false),
|
||||
new ClaimNavigatorItem("Job.Properties.Flags", false),
|
||||
new ClaimNavigatorItem("Job.Properties.NotWaitingForUserAction", false),
|
||||
new ClaimNavigatorItem("Job.Properties.WaitingForUserAction", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Job.Lists", "Lists", "Permissions related to Job Lists", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Job.Lists.AllOpen", false),
|
||||
@@ -366,6 +375,22 @@ namespace Disco.Services.Authorization
|
||||
new ClaimNavigatorItem("Job.Lists.MyJobsOrphaned", false),
|
||||
new ClaimNavigatorItem("Job.Lists.RecentlyClosed", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Job.Types", "Types", "Permissions related to Job Types", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Job.Types.CreateHMisc", false),
|
||||
new ClaimNavigatorItem("Job.Types.CreateHNWar", false),
|
||||
new ClaimNavigatorItem("Job.Types.CreateHWar", false),
|
||||
new ClaimNavigatorItem("Job.Types.CreateSApp", false),
|
||||
new ClaimNavigatorItem("Job.Types.CreateSOS", false),
|
||||
new ClaimNavigatorItem("Job.Types.CreateSImg", false),
|
||||
new ClaimNavigatorItem("Job.Types.CreateUMgmt", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowHMisc", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowHNWar", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowHWar", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowSApp", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowSOS", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowSImg", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowUMgmt", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Job.Search", false),
|
||||
new ClaimNavigatorItem("Job.ShowAttachments", false),
|
||||
new ClaimNavigatorItem("Job.ShowDailyChart", false),
|
||||
@@ -377,16 +402,7 @@ namespace Disco.Services.Authorization
|
||||
new ClaimNavigatorItem("Job.ShowNonWarrantyFinance", false),
|
||||
new ClaimNavigatorItem("Job.ShowNonWarrantyInsurance", false),
|
||||
new ClaimNavigatorItem("Job.ShowNonWarrantyRepairs", false),
|
||||
new ClaimNavigatorItem("Job.ShowWarranty", false),
|
||||
new ClaimNavigatorItem("Job.Types", "Types", "Permissions related to Job Types", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Job.Types.ShowHMisc", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowHNWar", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowHWar", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowSApp", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowSOS", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowSImg", false),
|
||||
new ClaimNavigatorItem("Job.Types.ShowUMgmt", false)
|
||||
})
|
||||
new ClaimNavigatorItem("Job.ShowWarranty", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("Device", "Device", "Permissions related to Devices", false, new List<IClaimNavigatorItem>() {
|
||||
new ClaimNavigatorItem("Device.Actions", "Actions", "Permissions related to Device Actions", false, new List<IClaimNavigatorItem>() {
|
||||
@@ -428,8 +444,10 @@ namespace Disco.Services.Authorization
|
||||
new ClaimNavigatorItem("User.Search", false),
|
||||
new ClaimNavigatorItem("User.ShowAttachments", false),
|
||||
new ClaimNavigatorItem("User.ShowAssignmentHistory", false),
|
||||
new ClaimNavigatorItem("User.ShowAssignments", false),
|
||||
new ClaimNavigatorItem("User.Show", false),
|
||||
new ClaimNavigatorItem("User.ShowAuthorization", false),
|
||||
new ClaimNavigatorItem("User.ShowDetails", false),
|
||||
new ClaimNavigatorItem("User.ShowJobs", false)
|
||||
}),
|
||||
new ClaimNavigatorItem("ComputerAccount", true),
|
||||
@@ -617,6 +635,13 @@ namespace Disco.Services.Authorization
|
||||
c.Job.Properties.Flags = true;
|
||||
c.Job.Properties.NotWaitingForUserAction = true;
|
||||
c.Job.Properties.WaitingForUserAction = true;
|
||||
c.Job.Types.CreateHMisc = true;
|
||||
c.Job.Types.CreateHNWar = true;
|
||||
c.Job.Types.CreateHWar = true;
|
||||
c.Job.Types.CreateSApp = true;
|
||||
c.Job.Types.CreateSOS = true;
|
||||
c.Job.Types.CreateSImg = true;
|
||||
c.Job.Types.CreateUMgmt = true;
|
||||
c.Job.Types.ShowHMisc = true;
|
||||
c.Job.Types.ShowHNWar = true;
|
||||
c.Job.Types.ShowHWar = true;
|
||||
@@ -667,8 +692,10 @@ namespace Disco.Services.Authorization
|
||||
c.User.Search = true;
|
||||
c.User.ShowAttachments = true;
|
||||
c.User.ShowAssignmentHistory = true;
|
||||
c.User.ShowAssignments = true;
|
||||
c.User.Show = true;
|
||||
c.User.ShowAuthorization = true;
|
||||
c.User.ShowDetails = true;
|
||||
c.User.ShowJobs = true;
|
||||
c.DiscoAdminAccount = true;
|
||||
#endregion
|
||||
@@ -1433,6 +1460,41 @@ namespace Disco.Services.Authorization
|
||||
public static class Types
|
||||
{
|
||||
|
||||
/// <summary>Create Hardware - Miscellaneous Jobs
|
||||
/// <para>Can create jobs of this type (Requires: Create Jobs)</para>
|
||||
/// </summary>
|
||||
public const string CreateHMisc = "Job.Types.CreateHMisc";
|
||||
|
||||
/// <summary>Create Hardware - Non-Warranty Jobs
|
||||
/// <para>Can create jobs of this type (Requires: Create Jobs)</para>
|
||||
/// </summary>
|
||||
public const string CreateHNWar = "Job.Types.CreateHNWar";
|
||||
|
||||
/// <summary>Create Hardware - Warranty Jobs
|
||||
/// <para>Can create jobs of this type (Requires: Create Jobs)</para>
|
||||
/// </summary>
|
||||
public const string CreateHWar = "Job.Types.CreateHWar";
|
||||
|
||||
/// <summary>Create Software - Application Jobs
|
||||
/// <para>Can create jobs of this type (Requires: Create Jobs)</para>
|
||||
/// </summary>
|
||||
public const string CreateSApp = "Job.Types.CreateSApp";
|
||||
|
||||
/// <summary>Create Software - Operating System Jobs
|
||||
/// <para>Can create jobs of this type (Requires: Create Jobs)</para>
|
||||
/// </summary>
|
||||
public const string CreateSOS = "Job.Types.CreateSOS";
|
||||
|
||||
/// <summary>Create Software - Reimage Jobs
|
||||
/// <para>Can create jobs of this type (Requires: Create Jobs)</para>
|
||||
/// </summary>
|
||||
public const string CreateSImg = "Job.Types.CreateSImg";
|
||||
|
||||
/// <summary>Create User Management Jobs
|
||||
/// <para>Can create jobs of this type (Requires: Create Jobs)</para>
|
||||
/// </summary>
|
||||
public const string CreateUMgmt = "Job.Types.CreateUMgmt";
|
||||
|
||||
/// <summary>Show Hardware - Miscellaneous Jobs
|
||||
/// <para>Can show jobs of this type</para>
|
||||
/// </summary>
|
||||
@@ -1719,6 +1781,11 @@ namespace Disco.Services.Authorization
|
||||
/// </summary>
|
||||
public const string ShowAssignmentHistory = "User.ShowAssignmentHistory";
|
||||
|
||||
/// <summary>Show Device Assignments
|
||||
/// <para>Can show the current device assignments users</para>
|
||||
/// </summary>
|
||||
public const string ShowAssignments = "User.ShowAssignments";
|
||||
|
||||
/// <summary>Show Users
|
||||
/// <para>Can show users</para>
|
||||
/// </summary>
|
||||
@@ -1729,6 +1796,11 @@ namespace Disco.Services.Authorization
|
||||
/// </summary>
|
||||
public const string ShowAuthorization = "User.ShowAuthorization";
|
||||
|
||||
/// <summary>Show Users Details
|
||||
/// <para>Can show users contact and personal details</para>
|
||||
/// </summary>
|
||||
public const string ShowDetails = "User.ShowDetails";
|
||||
|
||||
/// <summary>Show Users Jobs
|
||||
/// <para>Can show jobs associated with users</para>
|
||||
/// </summary>
|
||||
|
||||
@@ -213,7 +213,7 @@ void WriteNavigator_Recurse(Permission p, string Prefix){
|
||||
var groupPrefix = string.Concat(key, ".");
|
||||
WriteLine("new ClaimNavigatorItem(\"{0}{1}\", \"{2}\", \"{3}\", {4}, new List<IClaimNavigatorItem>() {{", Prefix, p.Name, p.FriendlyName, p.Description, p.Hidden ? "true" : "false");
|
||||
PushIndent(" ");
|
||||
var children = p.Children.OrderBy(c => c.FriendlyName).ToList();
|
||||
var children = p.Children.OrderBy(c => !c.IsGroup).ThenBy(c => c.FriendlyName).ToList();
|
||||
for (int childIndex = 0; childIndex < children.Count; childIndex++)
|
||||
{
|
||||
WriteNavigator_Recurse(children[childIndex], groupPrefix);
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
[ClaimDetails("Types", "Permissions related to Job Types")]
|
||||
public class JobTypesClaims : BaseRoleClaimGroup
|
||||
{
|
||||
// Show Jobs
|
||||
[ClaimDetails("Show Hardware - Miscellaneous Jobs", "Can show jobs of this type")]
|
||||
public bool ShowHMisc { get; set; }
|
||||
[ClaimDetails("Show Hardware - Non-Warranty Jobs", "Can show jobs of this type")]
|
||||
@@ -25,5 +26,23 @@ namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
|
||||
[ClaimDetails("Show User Management Jobs", "Can show jobs of this type")]
|
||||
public bool ShowUMgmt { get; set; }
|
||||
|
||||
// Create Jobs
|
||||
[ClaimDetails("Create Hardware - Miscellaneous Jobs", "Can create jobs of this type (Requires: Create Jobs)")]
|
||||
public bool CreateHMisc { get; set; }
|
||||
[ClaimDetails("Create Hardware - Non-Warranty Jobs", "Can create jobs of this type (Requires: Create Jobs)")]
|
||||
public bool CreateHNWar { get; set; }
|
||||
[ClaimDetails("Create Hardware - Warranty Jobs", "Can create jobs of this type (Requires: Create Jobs)")]
|
||||
public bool CreateHWar { get; set; }
|
||||
|
||||
[ClaimDetails("Create Software - Application Jobs", "Can create jobs of this type (Requires: Create Jobs)")]
|
||||
public bool CreateSApp { get; set; }
|
||||
[ClaimDetails("Create Software - Reimage Jobs", "Can create jobs of this type (Requires: Create Jobs)")]
|
||||
public bool CreateSImg { get; set; }
|
||||
[ClaimDetails("Create Software - Operating System Jobs", "Can create jobs of this type (Requires: Create Jobs)")]
|
||||
public bool CreateSOS { get; set; }
|
||||
|
||||
[ClaimDetails("Create User Management Jobs", "Can create jobs of this type (Requires: Create Jobs)")]
|
||||
public bool CreateUMgmt { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,18 @@ namespace Disco.Services.Authorization.Roles.ClaimGroups.User
|
||||
[ClaimDetails("Show Users", "Can show users")]
|
||||
public bool Show { get; set; }
|
||||
|
||||
[ClaimDetails("Show Users Details", "Can show users contact and personal details")]
|
||||
public bool ShowDetails { get; set; }
|
||||
|
||||
[ClaimDetails("Show Attachments", "Can show user attachments")]
|
||||
public bool ShowAttachments { get; set; }
|
||||
|
||||
[ClaimDetails("Show Device Assignment History", "Can show the device assignment history for users")]
|
||||
public bool ShowAssignmentHistory { get; set; }
|
||||
|
||||
[ClaimDetails("Show Device Assignments", "Can show the current device assignments users")]
|
||||
public bool ShowAssignments { get; set; }
|
||||
|
||||
[ClaimDetails("Show Users Jobs", "Can show jobs associated with users")]
|
||||
public bool ShowJobs { get; set; }
|
||||
|
||||
|
||||
@@ -107,33 +107,13 @@ namespace Disco.Services
|
||||
return Items;
|
||||
}
|
||||
|
||||
public static IEnumerable<JobTableItemModel> DetermineItems(this JobTableModel model, DiscoDataContext Database, IQueryable<Job> Jobs)
|
||||
public static IEnumerable<JobTableItemModel> DetermineItems(this JobTableModel model, DiscoDataContext Database, IQueryable<Job> Jobs, bool FilterAuthorization)
|
||||
{
|
||||
List<JobTableItemModel> items;
|
||||
|
||||
// Permissions
|
||||
var auth = UserService.CurrentAuthorization;
|
||||
if (!auth.HasAll(Claims.Job.Types.ShowHMisc, Claims.Job.Types.ShowHNWar, Claims.Job.Types.ShowHWar, Claims.Job.Types.ShowSApp, Claims.Job.Types.ShowSImg, Claims.Job.Types.ShowSOS, Claims.Job.Types.ShowUMgmt))
|
||||
{
|
||||
// Must Filter
|
||||
List<string> allowedTypes = new List<string>(6);
|
||||
if (auth.Has(Claims.Job.Types.ShowHMisc))
|
||||
allowedTypes.Add(JobType.JobTypeIds.HMisc);
|
||||
if (auth.Has(Claims.Job.Types.ShowHNWar))
|
||||
allowedTypes.Add(JobType.JobTypeIds.HNWar);
|
||||
if (auth.Has(Claims.Job.Types.ShowHWar))
|
||||
allowedTypes.Add(JobType.JobTypeIds.HWar);
|
||||
if (auth.Has(Claims.Job.Types.ShowSApp))
|
||||
allowedTypes.Add(JobType.JobTypeIds.SApp);
|
||||
if (auth.Has(Claims.Job.Types.ShowSImg))
|
||||
allowedTypes.Add(JobType.JobTypeIds.SImg);
|
||||
if (auth.Has(Claims.Job.Types.ShowSOS))
|
||||
allowedTypes.Add(JobType.JobTypeIds.SOS);
|
||||
if (auth.Has(Claims.Job.Types.ShowUMgmt))
|
||||
allowedTypes.Add(JobType.JobTypeIds.UMgmt);
|
||||
|
||||
Jobs = Jobs.Where(j => allowedTypes.Contains(j.JobTypeId));
|
||||
}
|
||||
if (FilterAuthorization)
|
||||
Jobs = model.FilterPermissions(Jobs, UserService.CurrentAuthorization);
|
||||
|
||||
if (model.ShowStatus)
|
||||
{
|
||||
@@ -226,9 +206,9 @@ namespace Disco.Services
|
||||
return items;
|
||||
}
|
||||
|
||||
public static void Fill(this JobTableModel model, DiscoDataContext Database, IQueryable<Job> Jobs)
|
||||
public static void Fill(this JobTableModel model, DiscoDataContext Database, IQueryable<Job> Jobs, bool FilterAuthorization)
|
||||
{
|
||||
model.Items = model.DetermineItems(Database, Jobs);
|
||||
model.Items = model.DetermineItems(Database, Jobs, FilterAuthorization);
|
||||
}
|
||||
|
||||
public static double? SlaPrecentageRemaining(this IEnumerable<JobTableStatusQueueItemModel> queueItems)
|
||||
|
||||
@@ -47,7 +47,7 @@ using Disco.Services.Authorization;
|
||||
ShowDeviceAddress = true,
|
||||
ShowLocation = true,
|
||||
ShowStatus = true
|
||||
}.Initialize(Database);
|
||||
}.Initialize(Database, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,25 +56,25 @@ using Disco.Services.Authorization;
|
||||
return new JobTableModel()
|
||||
{
|
||||
ShowStatus = true,
|
||||
Items = FilterFunction(openJobs.Items.Cast<JobTableStatusItemModel>())
|
||||
Items = FilterFunction(openJobs.Items.Cast<JobTableStatusItemModel>()).PermissionsFiltered(UserService.CurrentAuthorization)
|
||||
};
|
||||
}
|
||||
|
||||
public static JobTableModel MyJobsTable(AuthorizationToken AuthToken)
|
||||
{
|
||||
var openJobs = ManagedJobList.openJobs.Items.PermissionsFiltered(AuthToken).Cast<JobTableStatusItemModel>();
|
||||
IEnumerable<Tuple<JobTableStatusItemModel, byte, byte, DateTime?>> allJobs = null;
|
||||
|
||||
if (AuthToken.Has(Claims.Job.Lists.MyJobsOrphaned))
|
||||
{
|
||||
allJobs = AwaitingTechnicianActionFilter(
|
||||
openJobs.Items.Cast<JobTableStatusItemModel>()
|
||||
.Where(i => i.ActiveJobQueues == null || i.ActiveJobQueues.Count() == 0)
|
||||
openJobs.Where(i => i.ActiveJobQueues == null || i.ActiveJobQueues.Count() == 0)
|
||||
).Select(i => new Tuple<JobTableStatusItemModel, byte, byte, DateTime?>(i, (byte)JobQueuePriority.Normal, (byte)JobQueuePriority.Normal, null));
|
||||
}
|
||||
|
||||
var usersQueues = JobQueueService.UsersQueues(AuthToken).ToDictionary(q => q.JobQueue.Id);
|
||||
|
||||
var queueJobs = openJobs.Items.Cast<JobTableStatusItemModel>()
|
||||
var queueJobs = openJobs
|
||||
.Where(i => i.ActiveJobQueues != null && i.ActiveJobQueues.Any(jqj => usersQueues.ContainsKey(jqj.QueueId)))
|
||||
.Select(i => new Tuple<JobTableStatusItemModel, byte, byte, DateTime?>(
|
||||
i,
|
||||
@@ -117,11 +117,11 @@ using Disco.Services.Authorization;
|
||||
this.SortFunction = SortFunction;
|
||||
}
|
||||
|
||||
public ManagedJobList Initialize(DiscoDataContext Database)
|
||||
public ManagedJobList Initialize(DiscoDataContext Database, bool FilterAuthorization)
|
||||
{
|
||||
// Can only Initialize once
|
||||
if (base.Items != null)
|
||||
return ReInitialize(Database);
|
||||
return ReInitialize(Database, FilterAuthorization);
|
||||
|
||||
lock (updateLock)
|
||||
{
|
||||
@@ -144,20 +144,20 @@ using Disco.Services.Authorization;
|
||||
.Subscribe(JobNotification, NotificationError);
|
||||
|
||||
// Initially fill table
|
||||
base.Items = this.SortFunction(this.DetermineItems(Database, this.FilterFunction(Database.Jobs))).ToList();
|
||||
base.Items = this.SortFunction(this.DetermineItems(Database, this.FilterFunction(Database.Jobs), FilterAuthorization)).ToList();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public ManagedJobList ReInitialize(DiscoDataContext Database)
|
||||
public ManagedJobList ReInitialize(DiscoDataContext Database, bool FilterAuthorization)
|
||||
{
|
||||
return ReInitialize(Database, null, null);
|
||||
return ReInitialize(Database, null, null, FilterAuthorization);
|
||||
}
|
||||
public ManagedJobList ReInitialize(DiscoDataContext Database, FilterFunc FilterFunction)
|
||||
public ManagedJobList ReInitialize(DiscoDataContext Database, FilterFunc FilterFunction, bool FilterAuthorization)
|
||||
{
|
||||
return ReInitialize(Database, FilterFunction, null);
|
||||
return ReInitialize(Database, FilterFunction, null, FilterAuthorization);
|
||||
}
|
||||
public ManagedJobList ReInitialize(DiscoDataContext Database, FilterFunc FilterFunction, SortFunc SortFunction)
|
||||
public ManagedJobList ReInitialize(DiscoDataContext Database, FilterFunc FilterFunction, SortFunc SortFunction, bool FilterAuthorization)
|
||||
{
|
||||
if (Database == null)
|
||||
throw new ArgumentNullException("Database");
|
||||
@@ -169,7 +169,7 @@ using Disco.Services.Authorization;
|
||||
if (SortFunction != null)
|
||||
this.SortFunction = SortFunction;
|
||||
|
||||
base.Items = this.SortFunction(this.DetermineItems(Database, this.FilterFunction(Database.Jobs))).ToList();
|
||||
base.Items = this.SortFunction(this.DetermineItems(Database, this.FilterFunction(Database.Jobs), FilterAuthorization)).ToList();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ using Disco.Services.Authorization;
|
||||
if (existingItems == null)
|
||||
existingItems = base.Items.Where(i => jobIds.Contains(i.Id)).ToArray();
|
||||
|
||||
var updatedItems = this.DetermineItems(Database, this.FilterFunction(Database.Jobs.Where(j => jobIds.Contains(j.Id))));
|
||||
var updatedItems = this.DetermineItems(Database, this.FilterFunction(Database.Jobs.Where(j => jobIds.Contains(j.Id))), false);
|
||||
|
||||
var refreshedList = base.Items.ToList();
|
||||
|
||||
|
||||
@@ -3376,7 +3376,6 @@ header nav ul#menu > li > ul,
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
border-left: 1px solid #d1d1d1;
|
||||
border-bottom: 1px solid #d1d1d1;
|
||||
border-right: 1px solid #d1d1d1;
|
||||
background-color: #f2f2f2;
|
||||
padding: 0;
|
||||
@@ -3394,6 +3393,10 @@ header nav ul#menu > li > ul li:first-child,
|
||||
#header nav ul#menu > li > ul li:first-child {
|
||||
border-top: 1px solid #d1d1d1;
|
||||
}
|
||||
header nav ul#menu > li > ul li:last-child,
|
||||
#header nav ul#menu > li > ul li:last-child {
|
||||
border-bottom: 1px solid #d1d1d1;
|
||||
}
|
||||
header nav ul#menu > li > ul li:hover,
|
||||
#header nav ul#menu > li > ul li:hover {
|
||||
border-top: 1px solid #d9d9d9;
|
||||
@@ -3439,7 +3442,6 @@ header nav ul#menu > li > ul ul,
|
||||
background-color: #f2f2f2;
|
||||
border-left: 1px solid #d1d1d1;
|
||||
border-right: 1px solid #d1d1d1;
|
||||
border-bottom: 1px solid #d1d1d1;
|
||||
padding: 0;
|
||||
min-width: 180px;
|
||||
box-shadow: 2px 2px 5px rgba(209, 209, 209, 0.5);
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -748,3 +748,13 @@
|
||||
#createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutes {
|
||||
width: 50px;
|
||||
}
|
||||
#createJobRedirect h1 {
|
||||
margin-top: 60px !important;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
#createJobRedirect > div {
|
||||
text-align: right;
|
||||
}
|
||||
#createJobRedirect > div i {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -553,14 +553,17 @@
|
||||
background-color: @white;
|
||||
}
|
||||
}
|
||||
|
||||
#Job_Show_Queues_Actions_EditAddedComment_Dialog, #Job_Show_Queues_Actions_EditRemovedComment_Dialog, #Job_Show_Queues_Actions_EditSla_Dialog {
|
||||
h4 {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
#Job_Show_Queues_Actions_EditAddedComment_Dialog_Comment {
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
#Job_Show_Queues_Actions_EditRemovedComment_Dialog_Comment {
|
||||
width: 280px;
|
||||
}
|
||||
@@ -789,3 +792,18 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#createJobRedirect {
|
||||
h1 {
|
||||
margin-top: 60px !important;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
& > div {
|
||||
text-align: right;
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -175,7 +175,6 @@ header nav ul#menu > li > ul,
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
border-left: 1px solid #d1d1d1;
|
||||
border-bottom: 1px solid #d1d1d1;
|
||||
border-right: 1px solid #d1d1d1;
|
||||
background-color: #f2f2f2;
|
||||
padding: 0;
|
||||
@@ -193,6 +192,10 @@ header nav ul#menu > li > ul li:first-child,
|
||||
#header nav ul#menu > li > ul li:first-child {
|
||||
border-top: 1px solid #d1d1d1;
|
||||
}
|
||||
header nav ul#menu > li > ul li:last-child,
|
||||
#header nav ul#menu > li > ul li:last-child {
|
||||
border-bottom: 1px solid #d1d1d1;
|
||||
}
|
||||
header nav ul#menu > li > ul li:hover,
|
||||
#header nav ul#menu > li > ul li:hover {
|
||||
border-top: 1px solid #d9d9d9;
|
||||
@@ -238,7 +241,6 @@ header nav ul#menu > li > ul ul,
|
||||
background-color: #f2f2f2;
|
||||
border-left: 1px solid #d1d1d1;
|
||||
border-right: 1px solid #d1d1d1;
|
||||
border-bottom: 1px solid #d1d1d1;
|
||||
padding: 0;
|
||||
min-width: 180px;
|
||||
box-shadow: 2px 2px 5px rgba(209, 209, 209, 0.5);
|
||||
|
||||
@@ -97,7 +97,6 @@ header, #header {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
border-left: 1px solid @BackgroundColour;
|
||||
border-bottom: 1px solid @BackgroundColour;
|
||||
border-right: 1px solid @BackgroundColour;
|
||||
background-color: hsla(hue(@BackgroundColour), saturation(@BackgroundColour), 95%, 1);
|
||||
padding: 0;
|
||||
@@ -113,6 +112,9 @@ header, #header {
|
||||
&:first-child {
|
||||
border-top: 1px solid @BackgroundColour;
|
||||
}
|
||||
&:last-child {
|
||||
border-bottom: 1px solid @BackgroundColour;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-top: 1px solid hsla(hue(@BackgroundColour), saturation(@BackgroundColour), 85%, 1);
|
||||
@@ -159,7 +161,6 @@ header, #header {
|
||||
background-color: hsla(hue(@BackgroundColour), saturation(@BackgroundColour), 95%, 1);
|
||||
border-left: 1px solid @BackgroundColour;
|
||||
border-right: 1px solid @BackgroundColour;
|
||||
border-bottom: 1px solid @BackgroundColour;
|
||||
padding: 0;
|
||||
min-width: 180px;
|
||||
box-shadow: 2px 2px 5px fade(@BackgroundColour, 50%);
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -160,7 +160,7 @@ namespace Disco.Web.Controllers
|
||||
HideClosedJobs = true,
|
||||
EnablePaging = false
|
||||
};
|
||||
m.Jobs.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.DeviceSerialNumber == m.Device.SerialNumber).OrderByDescending(j => j.Id));
|
||||
m.Jobs.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.DeviceSerialNumber == m.Device.SerialNumber).OrderByDescending(j => j.Id), true);
|
||||
}
|
||||
|
||||
if (Authorization.Has(Claims.Device.ShowCertificates))
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Disco.Web.Controllers
|
||||
public virtual ActionResult AwaitingTechnicianAction()
|
||||
{
|
||||
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Technician Action" };
|
||||
|
||||
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(ManagedJobList.AwaitingTechnicianActionFilter);
|
||||
|
||||
// UI Extensions
|
||||
@@ -110,7 +110,7 @@ namespace Disco.Web.Controllers
|
||||
{
|
||||
var m = new Models.Job.ListModel() { Title = "Jobs with Devices Awaiting Repair" };
|
||||
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
(j.JobMetaNonWarranty_RepairerLoggedDate != null && j.JobMetaNonWarranty_RepairerCompletedDate == null) ||
|
||||
(j.JobMetaWarranty_ExternalLoggedDate != null && j.JobMetaWarranty_ExternalCompletedDate == null)
|
||||
).OrderBy(j => j.Id));
|
||||
@@ -126,7 +126,7 @@ namespace Disco.Web.Controllers
|
||||
public virtual ActionResult AwaitingFinance()
|
||||
{
|
||||
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance" };
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_IsInsuranceClaim.Value && !j.JobMetaInsurance_ClaimFormSentDate.HasValue)) ||
|
||||
(j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue))) ||
|
||||
(j.JobTypeId == JobType.JobTypeIds.HNWar && (!j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue || !j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue)) ||
|
||||
@@ -146,7 +146,7 @@ namespace Disco.Web.Controllers
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue))
|
||||
).OrderBy(j => j.Id));
|
||||
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Disco.Web.Controllers
|
||||
closedThreshold = closedThreshold.AddDays(-2);
|
||||
if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday)
|
||||
closedThreshold = closedThreshold.AddDays(-1);
|
||||
m.JobTable.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id));
|
||||
m.JobTable.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id), true);
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -333,7 +333,7 @@ namespace Disco.Web.Controllers
|
||||
DeviceSerialNumber = DeviceSerialNumber,
|
||||
UserId = UserId
|
||||
};
|
||||
m.UpdateModel(Database);
|
||||
m.UpdateModel(Database, Authorization);
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobCreateModel>(this.ControllerContext, m);
|
||||
@@ -343,7 +343,7 @@ namespace Disco.Web.Controllers
|
||||
[HttpPost, DiscoAuthorize(Claims.Job.Actions.Create)]
|
||||
public virtual ActionResult Create(Models.Job.CreateModel m)
|
||||
{
|
||||
m.UpdateModel(Database);
|
||||
m.UpdateModel(Database, Authorization);
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
@@ -365,7 +365,7 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m.QuickLog.HasValue && m.QuickLog.Value && m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0)
|
||||
if (Authorization.Has(Claims.Job.Actions.Close) && m.QuickLog.HasValue && m.QuickLog.Value && m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0)
|
||||
{
|
||||
// Quick Log
|
||||
// Set Opened Date in the past
|
||||
@@ -396,10 +396,19 @@ namespace Disco.Web.Controllers
|
||||
|
||||
// Return Dialog Redirect
|
||||
var redirectModel = new Models.Job.CreateRedirectModel();
|
||||
if (m.QuickLog.HasValue && m.QuickLog.Value && !string.IsNullOrWhiteSpace(m.QuickLogDestinationUrl))
|
||||
redirectModel.RedirectLink = m.QuickLogDestinationUrl;
|
||||
redirectModel.RedirectDelay = TimeSpan.FromSeconds(2);
|
||||
if (m.QuickLog.HasValue && m.QuickLog.Value && !string.IsNullOrWhiteSpace(m.SourceUrl))
|
||||
redirectModel.RedirectLink = m.SourceUrl;
|
||||
else if (!Authorization.Has(Claims.Job.Show))
|
||||
if (!string.IsNullOrWhiteSpace(m.SourceUrl))
|
||||
redirectModel.RedirectLink = m.SourceUrl;
|
||||
else
|
||||
redirectModel.RedirectLink = Url.Action(MVC.Job.Index());
|
||||
else
|
||||
{
|
||||
redirectModel.RedirectLink = Url.Action(MVC.Job.Show(j.Id));
|
||||
redirectModel.RedirectDelay = null;
|
||||
}
|
||||
|
||||
return View(Views.Create_Redirect, redirectModel);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Disco.Web.Controllers
|
||||
HideClosedJobs = true,
|
||||
EnablePaging = false
|
||||
};
|
||||
m.Jobs.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.UserId == id).OrderByDescending(j => j.Id));
|
||||
m.Jobs.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.UserId == id).OrderByDescending(j => j.Id), true);
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.UI.Job;
|
||||
using Disco.Services.Authorization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.UI.Job;
|
||||
|
||||
namespace Disco.Web.Models.Job
|
||||
{
|
||||
@@ -25,7 +27,7 @@ namespace Disco.Web.Models.Job
|
||||
[Required(ErrorMessage = "Please specify whether the device is held or not")]
|
||||
public bool? DeviceHeld { get; set; }
|
||||
|
||||
public string QuickLogDestinationUrl { get; set; }
|
||||
public string SourceUrl { get; set; }
|
||||
|
||||
[Display(Description = "Automatically close this job")]
|
||||
public bool? QuickLog { get; set; }
|
||||
@@ -38,10 +40,10 @@ namespace Disco.Web.Models.Job
|
||||
public Disco.Models.Repository.User User { get; set; }
|
||||
public List<Disco.Models.Repository.JobType> JobTypes { get; set; }
|
||||
|
||||
public void UpdateModel(DiscoDataContext Database)
|
||||
public void UpdateModel(DiscoDataContext Database, AuthorizationToken Authorization)
|
||||
{
|
||||
if (this.JobTypes == null)
|
||||
JobTypes = Database.JobTypes.Include("JobSubTypes.JobQueues").ToList();
|
||||
this.JobTypes = Database.JobTypes.Include("JobSubTypes.JobQueues").FilterCreatableTypePermissions(Authorization).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(DeviceSerialNumber))
|
||||
{
|
||||
@@ -55,7 +57,7 @@ namespace Disco.Web.Models.Job
|
||||
this.UserId = this.Device.AssignedUserId;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.Type))
|
||||
this.Type = this.JobTypes.First(jt => jt.Id == Disco.Models.Repository.JobType.JobTypeIds.HWar).Id;
|
||||
this.Type = this.JobTypes.Any(jt => jt.Id == Disco.Models.Repository.JobType.JobTypeIds.HWar) ? Disco.Models.Repository.JobType.JobTypeIds.HWar : this.JobTypes.First().Id;
|
||||
|
||||
if (string.IsNullOrEmpty(this.UserId))
|
||||
{
|
||||
@@ -93,7 +95,7 @@ namespace Disco.Web.Models.Job
|
||||
|
||||
// Set Default Job Type for Users
|
||||
if (string.IsNullOrEmpty(this.Type))
|
||||
this.Type = this.JobTypes.First(jt => jt.Id == Disco.Models.Repository.JobType.JobTypeIds.SApp).Id;
|
||||
this.Type = this.JobTypes.Any(jt => jt.Id == Disco.Models.Repository.JobType.JobTypeIds.SApp) ? Disco.Models.Repository.JobType.JobTypeIds.SApp : this.JobTypes.First().Id;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(UserId))
|
||||
{
|
||||
|
||||
@@ -9,5 +9,6 @@ namespace Disco.Web.Models.Job
|
||||
public class CreateRedirectModel
|
||||
{
|
||||
public string RedirectLink { get; set; }
|
||||
public TimeSpan? RedirectDelay { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -171,13 +171,16 @@
|
||||
<div id="Device_Show_User">
|
||||
<div id="Device_Show_User_DisplayName" title="Display Name">@Html.ActionLink(assignedUser.DisplayName, MVC.User.Show(assignedUser.Id))</div>
|
||||
<div id="Device_Show_User_Id" title="Id">@assignedUser.Id</div>
|
||||
@if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
|
||||
@if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
|
||||
{
|
||||
<div id="Device_Show_User_PhoneNumber" title="Phone Number">@assignedUser.PhoneNumber</div>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
|
||||
{
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
|
||||
{
|
||||
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)">@assignedUser.EmailAddress</a></div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
@@ -769,8 +770,10 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 174 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
|
||||
if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -784,7 +787,7 @@ WriteLiteral(" title=\"Phone Number\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 176 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 178 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(assignedUser.PhoneNumber);
|
||||
|
||||
|
||||
@@ -793,18 +796,10 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 177 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
|
||||
{
|
||||
#line 179 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -817,21 +812,21 @@ WriteLiteral(" title=\"Email Address\"");
|
||||
|
||||
WriteLiteral("><a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 10705), Tuple.Create("\"", 10760)
|
||||
, Tuple.Create(Tuple.Create("", 10712), Tuple.Create("mailto:", 10712), true)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 10856), Tuple.Create("\"", 10911)
|
||||
, Tuple.Create(Tuple.Create("", 10863), Tuple.Create("mailto:", 10863), true)
|
||||
|
||||
#line 180 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 10719), Tuple.Create<System.Object, System.Int32>(Model.Device.AssignedUser.EmailAddress
|
||||
#line 182 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 10870), Tuple.Create<System.Object, System.Int32>(Model.Device.AssignedUser.EmailAddress
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 10719), false)
|
||||
, 10870), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 180 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 182 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(assignedUser.EmailAddress);
|
||||
|
||||
|
||||
@@ -840,7 +835,8 @@ WriteLiteral(">");
|
||||
WriteLiteral("</a></div>\r\n");
|
||||
|
||||
|
||||
#line 181 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 183 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -849,7 +845,7 @@ WriteLiteral("</a></div>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 183 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 186 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -864,7 +860,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Not Assigned</span>\r\n");
|
||||
|
||||
|
||||
#line 187 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 190 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -874,13 +870,13 @@ WriteLiteral(" </td>\r\n </tr>
|
||||
" </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 192 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 195 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 192 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 195 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Actions.GenerateDocuments))
|
||||
{
|
||||
|
||||
@@ -898,7 +894,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 195 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 198 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.DropDownList("Device_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems));
|
||||
|
||||
|
||||
@@ -912,7 +908,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
"ar generatePdfUrl = \'");
|
||||
|
||||
|
||||
#line 198 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 201 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.GeneratePdf(Model.Device.SerialNumber.ToString(), null)));
|
||||
|
||||
|
||||
@@ -933,7 +929,7 @@ WriteLiteral(@"?DocumentTemplateId=';
|
||||
");
|
||||
|
||||
|
||||
#line 210 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 213 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -956,7 +952,7 @@ WriteLiteral(" title=\"Device Profile\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 216 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 219 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(Model.Device.DeviceProfile.Name, MVC.Config.DeviceProfile.Index(Model.Device.DeviceProfileId)));
|
||||
|
||||
|
||||
@@ -974,7 +970,7 @@ WriteLiteral(">Distribution:</span>\r\n </td>\r\n
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 221 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 224 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.DeviceProfile.DistributionType.ToString());
|
||||
|
||||
|
||||
@@ -989,7 +985,7 @@ WriteLiteral(">Address:</span>\r\n </td>\r\n
|
||||
"<td>");
|
||||
|
||||
|
||||
#line 227 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 230 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
if (Model.DeviceProfileDefaultOrganisationAddress != null)
|
||||
{
|
||||
@@ -1004,7 +1000,7 @@ WriteLiteral(" id=\"Device_Show_Policies_Profile_Address\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 230 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 233 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.DeviceProfileDefaultOrganisationAddress.Name);
|
||||
|
||||
|
||||
@@ -1013,7 +1009,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 231 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 234 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1030,7 +1026,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">None</span>\r\n");
|
||||
|
||||
|
||||
#line 235 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 238 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1045,7 +1041,7 @@ WriteLiteral(">Provision Account:</span>\r\n </td>\r\
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 242 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 245 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.DeviceProfile.ProvisionADAccount ? "Active Directory" : "No");
|
||||
|
||||
|
||||
@@ -1060,7 +1056,7 @@ WriteLiteral(">Allocate Certificate:</span>\r\n </td>
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 248 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 251 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.DeviceProfileCertificateProvider != null ? Model.DeviceProfileCertificateProvider.Name : "No");
|
||||
|
||||
|
||||
@@ -1070,13 +1066,13 @@ WriteLiteral("\r\n </td>\r\n <
|
||||
" </table>\r\n");
|
||||
|
||||
|
||||
#line 252 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 255 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 252 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 255 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateDeviceProfile())
|
||||
{
|
||||
|
||||
@@ -1084,14 +1080,14 @@ WriteLiteral("\r\n </td>\r\n <
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 254 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 257 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Update Profile", MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber, null, true), "Device_Show_Policies_Profile_Actions_Update_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 254 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 257 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1113,13 +1109,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 259 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 262 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 259 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 262 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
foreach (var dp in Model.DeviceProfiles.OrderBy(i => i.Name))
|
||||
{
|
||||
|
||||
@@ -1134,7 +1130,7 @@ WriteLiteral(" type=\"radio\"");
|
||||
WriteLiteral(" data-deviceprofileid=\"");
|
||||
|
||||
|
||||
#line 262 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 265 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(dp.Id);
|
||||
|
||||
|
||||
@@ -1144,45 +1140,45 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" name=\"DeviceProfile\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 15482), Tuple.Create("\"", 15509)
|
||||
, Tuple.Create(Tuple.Create("", 15487), Tuple.Create("DeviceProfile_", 15487), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 15680), Tuple.Create("\"", 15707)
|
||||
, Tuple.Create(Tuple.Create("", 15685), Tuple.Create("DeviceProfile_", 15685), true)
|
||||
|
||||
#line 262 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15501), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
#line 265 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15699), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 15501), false)
|
||||
, 15699), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 15519), Tuple.Create("\"", 15547)
|
||||
, Tuple.Create(Tuple.Create("", 15525), Tuple.Create("DeviceProfile_", 15525), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 15717), Tuple.Create("\"", 15745)
|
||||
, Tuple.Create(Tuple.Create("", 15723), Tuple.Create("DeviceProfile_", 15723), true)
|
||||
|
||||
#line 262 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15539), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
#line 265 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15737), Tuple.Create<System.Object, System.Int32>(dp.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 15539), false)
|
||||
, 15737), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 15548), Tuple.Create("\"", 15592)
|
||||
, Tuple.Create(Tuple.Create("", 15556), Tuple.Create("Distribution:", 15556), true)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 15746), Tuple.Create("\"", 15790)
|
||||
, Tuple.Create(Tuple.Create("", 15754), Tuple.Create("Distribution:", 15754), true)
|
||||
|
||||
#line 262 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 15569), Tuple.Create<System.Object, System.Int32>(dp.DistributionType
|
||||
#line 265 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 15767), Tuple.Create<System.Object, System.Int32>(dp.DistributionType
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 15570), false)
|
||||
, 15768), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 262 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 265 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(dp.Name);
|
||||
|
||||
|
||||
@@ -1191,7 +1187,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</label></li> \r\n");
|
||||
|
||||
|
||||
#line 263 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 266 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1204,7 +1200,7 @@ WriteLiteral(" <script>\r\n $(
|
||||
" var currentProfile = \'");
|
||||
|
||||
|
||||
#line 269 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 272 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.DeviceProfileId);
|
||||
|
||||
|
||||
@@ -1256,7 +1252,7 @@ WriteLiteral("\';\r\n var button = $(\'#Device_Sh
|
||||
">\r\n");
|
||||
|
||||
|
||||
#line 319 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 322 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1271,13 +1267,13 @@ WriteLiteral(" class=\"status\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 322 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 325 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 322 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 325 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
|
||||
@@ -1291,7 +1287,7 @@ WriteLiteral(" title=\"Device Batch\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 324 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 327 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(Model.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Device.DeviceBatchId.Value)));
|
||||
|
||||
|
||||
@@ -1311,7 +1307,7 @@ WriteLiteral(">Purchased:</span>\r\n </td>\r\n
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 329 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 332 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.PurchaseDate));
|
||||
|
||||
|
||||
@@ -1326,7 +1322,7 @@ WriteLiteral(">Supplier:</span>\r\n </td>\r\n
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 335 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 338 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.DeviceBatch.Supplier ?? "Unknown");
|
||||
|
||||
|
||||
@@ -1340,20 +1336,20 @@ WriteLiteral(" title=\"Warranty Valid Until\"");
|
||||
WriteLiteral(">Warranty Until:</span>\r\n </td>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 20656), Tuple.Create("\"", 20804)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 20854), Tuple.Create("\"", 21002)
|
||||
|
||||
#line 341 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 20664), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null
|
||||
#line 344 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 20862), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 20664), false)
|
||||
, 20862), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 341 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 344 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.WarrantyValidUntil, "Unknown", null));
|
||||
|
||||
|
||||
@@ -1368,7 +1364,7 @@ WriteLiteral(">Insurance Supplier:</span>\r\n </t
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 347 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 350 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.DeviceBatch.InsuranceSupplier ?? "Unknown");
|
||||
|
||||
|
||||
@@ -1382,20 +1378,20 @@ WriteLiteral(" title=\"Insured Until\"");
|
||||
WriteLiteral(">Insured Until:</span>\r\n </td>\r\n " +
|
||||
" <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 21506), Tuple.Create("\"", 21642)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 21704), Tuple.Create("\"", 21840)
|
||||
|
||||
#line 353 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 21514), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null
|
||||
#line 356 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 21712), Tuple.Create<System.Object, System.Int32>(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 21514), false)
|
||||
, 21712), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 353 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 356 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.InsuredUntil, "Unknown", null));
|
||||
|
||||
|
||||
@@ -1405,7 +1401,7 @@ WriteLiteral("\r\n </td>\r\n
|
||||
" </table>\r\n");
|
||||
|
||||
|
||||
#line 357 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 360 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1416,7 +1412,7 @@ WriteLiteral("\r\n </td>\r\n
|
||||
WriteLiteral(" <h2>Batch: <em>Not Associated</em></h2>\r\n");
|
||||
|
||||
|
||||
#line 361 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 364 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1425,7 +1421,7 @@ WriteLiteral(" <h2>Batch: <em>Not Associated</em></h2>\r\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 362 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 365 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateDeviceBatch())
|
||||
{
|
||||
|
||||
@@ -1433,14 +1429,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 364 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 367 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Update Batch", MVC.API.Device.UpdateDeviceBatchId(Model.Device.SerialNumber, null, true), "Device_Show_Policies_Batch_Actions_Update_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 364 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 367 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1462,13 +1458,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 369 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 372 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 369 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 372 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
foreach (var db in Model.DeviceBatches.OrderBy(i => i.Name))
|
||||
{
|
||||
|
||||
@@ -1483,7 +1479,7 @@ WriteLiteral(" type=\"radio\"");
|
||||
WriteLiteral(" data-devicebatchid=\"");
|
||||
|
||||
|
||||
#line 372 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 375 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(db.Id);
|
||||
|
||||
|
||||
@@ -1493,45 +1489,45 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" name=\"DeviceBatch\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 22792), Tuple.Create("\"", 22817)
|
||||
, Tuple.Create(Tuple.Create("", 22797), Tuple.Create("DeviceBatch_", 22797), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 22990), Tuple.Create("\"", 23015)
|
||||
, Tuple.Create(Tuple.Create("", 22995), Tuple.Create("DeviceBatch_", 22995), true)
|
||||
|
||||
#line 372 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 22809), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
#line 375 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23007), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 22809), false)
|
||||
, 23007), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 22827), Tuple.Create("\"", 22853)
|
||||
, Tuple.Create(Tuple.Create("", 22833), Tuple.Create("DeviceBatch_", 22833), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 23025), Tuple.Create("\"", 23051)
|
||||
, Tuple.Create(Tuple.Create("", 23031), Tuple.Create("DeviceBatch_", 23031), true)
|
||||
|
||||
#line 372 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 22845), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
#line 375 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23043), Tuple.Create<System.Object, System.Int32>(db.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 22845), false)
|
||||
, 23043), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 22854), Tuple.Create("\"", 22901)
|
||||
, Tuple.Create(Tuple.Create("", 22862), Tuple.Create("Purchased:", 22862), true)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 23052), Tuple.Create("\"", 23099)
|
||||
, Tuple.Create(Tuple.Create("", 23060), Tuple.Create("Purchased:", 23060), true)
|
||||
|
||||
#line 372 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 22872), Tuple.Create<System.Object, System.Int32>(db.PurchaseDate.FromNow()
|
||||
#line 375 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 23070), Tuple.Create<System.Object, System.Int32>(db.PurchaseDate.FromNow()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 22873), false)
|
||||
, 23071), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 372 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 375 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(db.Name);
|
||||
|
||||
|
||||
@@ -1540,7 +1536,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</label></li> \r\n");
|
||||
|
||||
|
||||
#line 373 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 376 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1553,7 +1549,7 @@ WriteLiteral(" <script>\r\n $(
|
||||
" var currentBatch = \'");
|
||||
|
||||
|
||||
#line 379 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 382 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.DeviceBatchId);
|
||||
|
||||
|
||||
@@ -1604,7 +1600,7 @@ WriteLiteral("\';\r\n var button = $(\'#Device_Sh
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 429 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 432 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1631,7 +1627,7 @@ WriteLiteral(" title=\"Model Description\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 436 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 439 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(Model.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId)));
|
||||
|
||||
|
||||
@@ -1643,14 +1639,14 @@ WriteLiteral(" id=\"Device_Show_Aspects_Model_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 27170), Tuple.Create("\"", 27280)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 27368), Tuple.Create("\"", 27478)
|
||||
|
||||
#line 437 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 27176), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
#line 440 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 27374), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 27176), false)
|
||||
, 27374), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n <t" +
|
||||
@@ -1665,13 +1661,13 @@ WriteLiteral(" id=\"Device_Show_Device_Actions\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 444 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 447 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 444 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 447 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanCreateJob())
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
@@ -1680,14 +1676,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 447 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 450 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.Device.SerialNumber, Model.Device.AssignedUserId), "buttonCreateJob"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 447 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 450 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -1697,7 +1693,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 449 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 452 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateAssignment())
|
||||
{
|
||||
|
||||
@@ -1705,14 +1701,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 451 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 454 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Update Assignment", MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber, null, true), "Device_Show_User_Actions_Assign_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 451 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 454 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1753,13 +1749,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 464 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 467 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 464 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 467 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
if (assignedUser != null)
|
||||
{
|
||||
@@ -1781,7 +1777,7 @@ WriteLiteral(@"
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 475 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 478 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1812,7 +1808,7 @@ WriteLiteral("\r\n \"Assign\": function () {\r\n
|
||||
" source: \'");
|
||||
|
||||
|
||||
#line 506 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 509 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.User.UpstreamUsers()));
|
||||
|
||||
|
||||
@@ -1842,7 +1838,7 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 527 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 530 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1851,7 +1847,7 @@ WriteLiteral(@"',
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 528 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 531 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateTrustEnrol())
|
||||
{
|
||||
|
||||
@@ -1859,14 +1855,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 530 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 533 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Trust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true), "Device_Show_Device_Actions_TrustEnrol_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 530 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 533 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1900,7 +1896,7 @@ WriteLiteral("></i> \r\n This action will al
|
||||
"claiming</em> to have the Serial Number \'");
|
||||
|
||||
|
||||
#line 536 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 539 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -1960,7 +1956,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 575 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 578 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1969,7 +1965,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 576 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 579 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateUntrustEnrol())
|
||||
{
|
||||
|
||||
@@ -1977,14 +1973,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 578 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 581 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Untrust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true), "Device_Show_Device_Actions_UntrustEnrol_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 578 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 581 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2046,7 +2042,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 614 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 617 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2055,7 +2051,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 615 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 618 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDecommission())
|
||||
{
|
||||
|
||||
@@ -2063,14 +2059,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 617 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 620 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Decommission", MVC.API.Device.Decommission(), "Device_Show_Device_Actions_Decommission_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 617 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 620 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2102,13 +2098,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 624 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 627 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 624 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 627 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
foreach (Device.DecommissionReasons decommissionReason in Enum.GetValues(typeof(Device.DecommissionReasons)))
|
||||
{
|
||||
|
||||
@@ -2119,34 +2115,34 @@ WriteLiteral(" <li>\r\n
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 38401), Tuple.Create("\"", 38479)
|
||||
, Tuple.Create(Tuple.Create("", 38406), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 38406), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 38599), Tuple.Create("\"", 38677)
|
||||
, Tuple.Create(Tuple.Create("", 38604), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 38604), true)
|
||||
|
||||
#line 627 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 38453), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 630 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 38651), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 38453), false)
|
||||
, 38651), false)
|
||||
);
|
||||
|
||||
WriteLiteral("\r\n name=\"Device_Show_Device_Actions_Decomm" +
|
||||
"ission_Reason\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 38575), Tuple.Create("\"", 38609)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 38773), Tuple.Create("\"", 38807)
|
||||
|
||||
#line 628 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 38583), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 631 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 38781), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 38583), false)
|
||||
, 38781), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 628 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 631 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write((decommissionReason == Device.DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty);
|
||||
|
||||
|
||||
@@ -2154,21 +2150,21 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral("/>\r\n <label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 38759), Tuple.Create("\"", 38838)
|
||||
, Tuple.Create(Tuple.Create("", 38765), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 38765), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 38957), Tuple.Create("\"", 39036)
|
||||
, Tuple.Create(Tuple.Create("", 38963), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 38963), true)
|
||||
|
||||
#line 629 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 38812), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 632 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 39010), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 38812), false)
|
||||
, 39010), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 629 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 632 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(decommissionReason.ReasonMessage());
|
||||
|
||||
|
||||
@@ -2177,7 +2173,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 631 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 634 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2195,7 +2191,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
"uttonDialog = null;\r\n var deviceSerialNumber = \'");
|
||||
|
||||
|
||||
#line 639 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 642 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -2228,7 +2224,7 @@ WriteLiteral("\';\r\n\r\n button.click(function () {\r\n\
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 675 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 678 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2237,7 +2233,7 @@ WriteLiteral("\';\r\n\r\n button.click(function () {\r\n\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 676 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 679 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanRecommission())
|
||||
{
|
||||
|
||||
@@ -2245,14 +2241,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 678 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 681 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Recommission", MVC.API.Device.Recommission(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Recommission_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 678 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 681 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2306,7 +2302,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 713 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 716 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2315,7 +2311,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 714 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 717 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDelete())
|
||||
{
|
||||
|
||||
@@ -2323,14 +2319,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 716 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 719 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Delete Device", MVC.API.Device.Delete(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 716 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 719 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2390,7 +2386,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 754 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 757 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
@Html.HiddenFor(m => m.DeviceSerialNumber)
|
||||
@Html.HiddenFor(m => m.UserId)
|
||||
@Html.HiddenFor(m => m.QuickLogDestinationUrl)
|
||||
@Html.HiddenFor(m => m.SourceUrl)
|
||||
|
||||
@Html.Partial(MVC.Job.Views._CreateSubject, Model)
|
||||
@Html.ValidationSummary(true)
|
||||
@@ -62,6 +62,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||
<div id="createJob_QuickLogContainer" class="createJob_Component">
|
||||
<div id="createJob_QuickLogAutoCloseContainer">
|
||||
<input id="createJob_QuickLog" name="QuickLog" type="checkbox" value="true" /><label for="createJob_QuickLog">Automatically close this job</label>
|
||||
@@ -80,6 +81,7 @@
|
||||
@Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes)
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@@ -87,7 +89,7 @@
|
||||
var init = true;
|
||||
//#region Parent Dialog
|
||||
if (window.parent && window.parent.document) {
|
||||
$('#QuickLogDestinationUrl').val(window.parent.window.location.href);
|
||||
$('#SourceUrl').val(window.parent.window.location.href);
|
||||
|
||||
var parentDialog = $('#createJobDialog', window.parent.document);
|
||||
if (parentDialog.length > 0) {
|
||||
@@ -165,6 +167,8 @@
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
@if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||
<text>
|
||||
// Validate QuickLog Task Time
|
||||
if ($quickLog.is(':checked')) {
|
||||
var selectedTime = $quickLogTaskTimes.filter(':checked');
|
||||
@@ -186,6 +190,8 @@
|
||||
} else {
|
||||
$quickLogTaskTimeValidationMessage.removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
}
|
||||
</text>
|
||||
}
|
||||
|
||||
return isValid;
|
||||
}
|
||||
@@ -233,6 +239,8 @@
|
||||
}
|
||||
//#endregion
|
||||
|
||||
@if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||
<text>
|
||||
//#region QuickLog
|
||||
var $quickLog = $('#createJob_QuickLog');
|
||||
var $quickLogContainer = $('#createJob_QuickLogContainer');
|
||||
@@ -295,6 +303,8 @@
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
</text>
|
||||
}
|
||||
|
||||
init = false;
|
||||
});
|
||||
|
||||
@@ -105,14 +105,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.QuickLogDestinationUrl));
|
||||
Write(Html.HiddenFor(m => m.SourceUrl));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -210,15 +210,15 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1091), Tuple.Create("\"", 1122)
|
||||
, Tuple.Create(Tuple.Create("", 1096), Tuple.Create("createJob_SubType_", 1096), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1078), Tuple.Create("\"", 1109)
|
||||
, Tuple.Create(Tuple.Create("", 1083), Tuple.Create("createJob_SubType_", 1083), true)
|
||||
|
||||
#line 28 "..\..\Views\Job\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1114), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 1101), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1114), false)
|
||||
, 1101), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"createJob_SubType\"");
|
||||
@@ -333,6 +333,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Job\Create.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_QuickLogContainer\"");
|
||||
@@ -452,7 +459,7 @@ WriteLiteral(" />\r\n Minutes\r\n </span>\r\n"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Job\Create.cshtml"
|
||||
#line 81 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes));
|
||||
|
||||
|
||||
@@ -461,7 +468,8 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Job\Create.cshtml"
|
||||
#line 84 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -473,129 +481,187 @@ WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var discoDialogMethods;\r\n var " +
|
||||
"init = true;\r\n //#region Parent Dialog\r\n if (window.parent" +
|
||||
" && window.parent.document) {\r\n $(\'#QuickLogDestinationUrl\').val(" +
|
||||
"window.parent.window.location.href);\r\n\r\n var parentDialog = $(\'#c" +
|
||||
"reateJobDialog\', window.parent.document);\r\n if (parentDialog.leng" +
|
||||
"th > 0) {\r\n discoDialogMethods = parentDialog[0].discoDialogM" +
|
||||
"ethods;\r\n var buttons = {\r\n \"Create Jo" +
|
||||
"b\": function () {\r\n createJobForm.submit()\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" discoDialogMethods.close();\r\n }\r\n " +
|
||||
" }\r\n\r\n discoDialogMethods.setButtons(buttons);\r\n " +
|
||||
" }\r\n }\r\n //#endregion\r\n\r\n\r\n var crea" +
|
||||
"teJobForm = $(\'form\');\r\n var validator = createJobForm.data(\'validato" +
|
||||
"r\');\r\n var unobtrusiveValidation = createJobForm.data(\'unobtrusiveVal" +
|
||||
"idation\');\r\n\r\n // Validate all Fields\r\n validator.settings" +
|
||||
".ignore = \'\';\r\n\r\n //#region Job Type/SubTypes\r\n var $jobTy" +
|
||||
"peContainer = $(\'#createJob_Type\');\r\n var $typeValidationMessage = $(" +
|
||||
"\'[data-valmsg-for=\"Type\"]\', $jobTypeContainer)\r\n var $subTypesValidat" +
|
||||
"ionMessage = $(\'[data-valmsg-for=\"SubTypes\"]\', $jobTypeContainer)\r\n v" +
|
||||
"ar $jobTypes = $jobTypeContainer.find(\'input[type=\"radio\"]\').change(jobTypeChang" +
|
||||
"e);\r\n $(\'#createJob_SubTypes\').find(\'input[type=\"checkbox\"]\').change(" +
|
||||
"jobSubTypeHighlight).each(jobSubTypeHighlight);\r\n jobTypeChange();\r\n " +
|
||||
" function jobSubTypeHighlight() {\r\n var $this = $(this)" +
|
||||
";\r\n if ($this.is(\':checked\'))\r\n $this.closest(" +
|
||||
"\'li\').addClass(\'highlight\');\r\n else\r\n $this.cl" +
|
||||
"osest(\'li\').removeClass(\'highlight\');\r\n }\r\n function jobTy" +
|
||||
"peChange() {\r\n var $checkedItem = $jobTypes.filter(\':checked\');\r\n" +
|
||||
"\r\n $jobTypes.closest(\'li\').removeClass(\'highlight\');\r\n\r\n " +
|
||||
" $checkedItem.closest(\'li\').addClass(\'highlight\');\r\n\r\n if (" +
|
||||
"init) {\r\n var jobType = $checkedItem.val();\r\n " +
|
||||
" $(\'#createJob_SubType_\' + jobType).show();\r\n } else {\r\n " +
|
||||
" $(\'#createJob_SubTypes\').find(\'.createJob_SubType:visible\').slideU" +
|
||||
"p();\r\n var jobType = $checkedItem.val();\r\n " +
|
||||
" $(\'#createJob_SubType_\' + jobType).slideDown();\r\n }\r\n " +
|
||||
" }\r\n\r\n\r\n var additionalValidation = function (form) {\r\n " +
|
||||
" var isValid = true;\r\n\r\n // Validate Type\r\n var t" +
|
||||
"ypeValue = $jobTypes.filter(\':checked\').val();\r\n if (typeValue) {" +
|
||||
"\r\n $typeValidationMessage.removeClass(\'field-validation-error" +
|
||||
"\').addClass(\'field-validation-valid\');\r\n // Validate SubTypes" +
|
||||
"\r\n if ($(\'#createJob_SubType_\' + typeValue).find(\'input:check" +
|
||||
"ed\').length > 0) {\r\n $subTypesValidationMessage.removeCla" +
|
||||
"ss(\'field-validation-error\').addClass(\'field-validation-valid\');\r\n " +
|
||||
" } else {\r\n $subTypesValidationMessage.text(\'At leas" +
|
||||
"t one Job Sub Type is required\').removeClass(\'field-validation-valid\').addClass(" +
|
||||
"\'field-validation-error\');\r\n isValid = false;\r\n " +
|
||||
" }\r\n } else {\r\n $typeValidationMessag" +
|
||||
"e.text(\'A Job Type is required\').removeClass(\'field-validation-valid\').addClass(" +
|
||||
"\'field-validation-error\');\r\n isValid = false;\r\n " +
|
||||
" }\r\n\r\n // Validate QuickLog Task Time\r\n if ($quic" +
|
||||
"kLog.is(\':checked\')) {\r\n var selectedTime = $quickLogTaskTime" +
|
||||
"s.filter(\':checked\');\r\n if (selectedTime.length > 0) {\r\n " +
|
||||
" if (selectedTime.val() === \'\') {\r\n " +
|
||||
" // Handle \'Other\'\r\n var otherTime = parseInt($quickL" +
|
||||
"ogTaskTimeOtherMinutes.val());\r\n if (!otherTime || ot" +
|
||||
"herTime <= 0) {\r\n $quickLogTaskTimeValidationMess" +
|
||||
"age.text(\'A Task Time is required\').removeClass(\'field-validation-valid\').addCla" +
|
||||
"ss(\'field-validation-error\');\r\n isValid = false;\r" +
|
||||
"\n }\r\n } else {\r\n " +
|
||||
" $quickLogTaskTimeValidationMessage.removeClass(\'field-validation-v" +
|
||||
"alid\').addClass(\'field-validation-error\');\r\n }\r\n " +
|
||||
" } else {\r\n $quickLogTaskTimeValidationMessage." +
|
||||
"text(\'A Task Time is required\').removeClass(\'field-validation-valid\').addClass(\'" +
|
||||
"field-validation-error\');\r\n isValid = false;\r\n " +
|
||||
" }\r\n } else {\r\n $quickLogTaskTimeValid" +
|
||||
"ationMessage.removeClass(\'field-validation-valid\').addClass(\'field-validation-er" +
|
||||
"ror\');\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n " +
|
||||
" validator.settings.submitHandler = function (form) {\r\n " +
|
||||
" if (additionalValidation()) {\r\n discoDialogMethods.setButton" +
|
||||
"s({});\r\n form.submit();\r\n }\r\n }\r\n " +
|
||||
" //#endregion\r\n\r\n //#region DeviceHeld\r\n var $dev" +
|
||||
"iceHeld = $(\'#DeviceHeld\');\r\n\r\n if ($(\'#DeviceSerialNumber\').val()) {" +
|
||||
"\r\n switch ($deviceHeld.val()) {\r\n case \'True\':" +
|
||||
"\r\n $(\'#createJob_DeviceHeld\').prop(\'checked\', true);\r\n " +
|
||||
" $(\'#createJob_DeviceNotHeld\').prop(\'checked\', false);\r\n " +
|
||||
" break;\r\n case \'False\':\r\n " +
|
||||
" $(\'#createJob_DeviceHeld\').prop(\'checked\', false);\r\n " +
|
||||
" $(\'#createJob_DeviceNotHeld\').prop(\'checked\', true);\r\n " +
|
||||
" break;\r\n default:\r\n $(\'#createJob_Dev" +
|
||||
"iceHeld\').prop(\'checked\', false);\r\n $(\'#createJob_DeviceN" +
|
||||
"otHeld\').prop(\'checked\', false);\r\n break;\r\n " +
|
||||
" }\r\n $(\'#createJob_DeviceHeldContainer\').find(\'input[type=\"radio" +
|
||||
"\"]\').change(function () {\r\n // Update Hidden Field with Boole" +
|
||||
"an Value\r\n // Set DeviceHeld\r\n var deviceH" +
|
||||
"eldValue = \'\';\r\n if ($(\'#createJob_DeviceHeld\').is(\':checked\'" +
|
||||
"))\r\n deviceHeldValue = \'True\';\r\n if ($" +
|
||||
"(\'#createJob_DeviceNotHeld\').is(\':checked\'))\r\n deviceHeld" +
|
||||
"Value = \'False\';\r\n $deviceHeld.val(deviceHeldValue).change();" +
|
||||
"\r\n });\r\n } else {\r\n // No Device Associ" +
|
||||
"ated\r\n $deviceHeld.val(\'False\');\r\n $(\'#createJob_D" +
|
||||
"eviceHeldContainer\').hide();\r\n }\r\n //#endregion\r\n\r\n " +
|
||||
" //#region QuickLog\r\n var $quickLog = $(\'#createJob_QuickLog\');\r\n" +
|
||||
" var $quickLogContainer = $(\'#createJob_QuickLogContainer\');\r\n " +
|
||||
" var $quickLogTaskTimeContainer = $(\'#createJob_QuickLogTaskTimeContainer\');" +
|
||||
"\r\n var $quickLogTaskTimes = $quickLogTaskTimeContainer.find(\'input[ty" +
|
||||
"pe=\"radio\"]\');\r\n var $quickLogTaskTimeOtherMinutes = $(\'#createJob_Ta" +
|
||||
"skTimeOtherMinutes\');\r\n var $quickLogTaskTimeValidationMessage = $qui" +
|
||||
"ckLogTaskTimeContainer.find(\'[data-valmsg-for=\"QuickLogTaskTimeMinutes\"]\');\r\n\r\n " +
|
||||
" $deviceHeld.change(validateQuickLog);\r\n $jobTypes.change(v" +
|
||||
"alidateQuickLog);\r\n validateQuickLog();\r\n\r\n function valid" +
|
||||
"ateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " +
|
||||
" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowed = fals" +
|
||||
"e;\r\n } else {\r\n var selectedType = $jobTypes.f" +
|
||||
"ilter(\':checked\').val();\r\n switch (selectedType) {\r\n " +
|
||||
" case \'HMisc\':\r\n case \'SApp\':\r\n " +
|
||||
" case \'SImg\':\r\n case \'SOS\':\r\n " +
|
||||
" case \'UMgmt\':\r\n quickLogAllowed = true;\r\n " +
|
||||
" break;\r\n default:\r\n " +
|
||||
" quickLogAllowed = false;\r\n break;\r\n " +
|
||||
" }\r\n }\r\n\r\n if (quickLogAllowed) {\r\n " +
|
||||
" $quickLogContainer.slideDown();\r\n } else {\r\n " +
|
||||
" if (init)\r\n $quickLogContainer.hide();\r" +
|
||||
"\n else\r\n $quickLogContainer.slideUp();" +
|
||||
"\r\n $quickLog.prop(\'checked\', false).change();\r\n " +
|
||||
" }\r\n }\r\n\r\n $quickLog.change(function () {\r\n " +
|
||||
" if ($(this).is(\':checked\')) {\r\n $quickLogTaskTimeContainer." +
|
||||
"slideDown();\r\n } else {\r\n $quickLogTaskTimeCon" +
|
||||
"tainer.slideUp();\r\n }\r\n });\r\n\r\n $quickLogTa" +
|
||||
"skTimes.change(function () {\r\n if ($quickLogTaskTimes.filter(\':ch" +
|
||||
"ecked\').val() === \"\") {\r\n $(\'#createJob_TaskTimeOtherMinutesC" +
|
||||
"ontainer\').show();\r\n $quickLogTaskTimeOtherMinutes.attr(\'disa" +
|
||||
"bled\', null).focus().select();\r\n } else {\r\n $(" +
|
||||
"\'#createJob_TaskTimeOtherMinutesContainer\').hide();\r\n $quickL" +
|
||||
"ogTaskTimeOtherMinutes.attr(\'disabled\', \'disabled\');\r\n }\r\n " +
|
||||
" });\r\n //#endregion\r\n\r\n init = false;\r\n });\r\n " +
|
||||
" </script>\r\n</div>\r\n");
|
||||
" && window.parent.document) {\r\n $(\'#SourceUrl\').val(window.parent" +
|
||||
".window.location.href);\r\n\r\n var parentDialog = $(\'#createJobDialo" +
|
||||
"g\', window.parent.document);\r\n if (parentDialog.length > 0) {\r\n " +
|
||||
" discoDialogMethods = parentDialog[0].discoDialogMethods;\r\n " +
|
||||
" var buttons = {\r\n \"Create Job\": function " +
|
||||
"() {\r\n createJobForm.submit()\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" discoDialogMethods.close();\r\n }\r\n }\r\n" +
|
||||
"\r\n discoDialogMethods.setButtons(buttons);\r\n }" +
|
||||
"\r\n }\r\n //#endregion\r\n\r\n\r\n var createJobForm = $" +
|
||||
"(\'form\');\r\n var validator = createJobForm.data(\'validator\');\r\n " +
|
||||
" var unobtrusiveValidation = createJobForm.data(\'unobtrusiveValidation\');\r\n\r" +
|
||||
"\n // Validate all Fields\r\n validator.settings.ignore = \'\';" +
|
||||
"\r\n\r\n //#region Job Type/SubTypes\r\n var $jobTypeContainer =" +
|
||||
" $(\'#createJob_Type\');\r\n var $typeValidationMessage = $(\'[data-valmsg" +
|
||||
"-for=\"Type\"]\', $jobTypeContainer)\r\n var $subTypesValidationMessage = " +
|
||||
"$(\'[data-valmsg-for=\"SubTypes\"]\', $jobTypeContainer)\r\n var $jobTypes " +
|
||||
"= $jobTypeContainer.find(\'input[type=\"radio\"]\').change(jobTypeChange);\r\n " +
|
||||
" $(\'#createJob_SubTypes\').find(\'input[type=\"checkbox\"]\').change(jobSubTypeHig" +
|
||||
"hlight).each(jobSubTypeHighlight);\r\n jobTypeChange();\r\n fu" +
|
||||
"nction jobSubTypeHighlight() {\r\n var $this = $(this);\r\n " +
|
||||
" if ($this.is(\':checked\'))\r\n $this.closest(\'li\').addClas" +
|
||||
"s(\'highlight\');\r\n else\r\n $this.closest(\'li\').r" +
|
||||
"emoveClass(\'highlight\');\r\n }\r\n function jobTypeChange() {\r" +
|
||||
"\n var $checkedItem = $jobTypes.filter(\':checked\');\r\n\r\n " +
|
||||
" $jobTypes.closest(\'li\').removeClass(\'highlight\');\r\n\r\n $check" +
|
||||
"edItem.closest(\'li\').addClass(\'highlight\');\r\n\r\n if (init) {\r\n " +
|
||||
" var jobType = $checkedItem.val();\r\n $(\'#creat" +
|
||||
"eJob_SubType_\' + jobType).show();\r\n } else {\r\n " +
|
||||
" $(\'#createJob_SubTypes\').find(\'.createJob_SubType:visible\').slideUp();\r\n " +
|
||||
" var jobType = $checkedItem.val();\r\n $(\'#createJo" +
|
||||
"b_SubType_\' + jobType).slideDown();\r\n }\r\n }\r\n\r\n\r\n " +
|
||||
" var additionalValidation = function (form) {\r\n var isValid" +
|
||||
" = true;\r\n\r\n // Validate Type\r\n var typeValue = $j" +
|
||||
"obTypes.filter(\':checked\').val();\r\n if (typeValue) {\r\n " +
|
||||
" $typeValidationMessage.removeClass(\'field-validation-error\').addClass(\'" +
|
||||
"field-validation-valid\');\r\n // Validate SubTypes\r\n " +
|
||||
" if ($(\'#createJob_SubType_\' + typeValue).find(\'input:checked\').length >" +
|
||||
" 0) {\r\n $subTypesValidationMessage.removeClass(\'field-val" +
|
||||
"idation-error\').addClass(\'field-validation-valid\');\r\n } else " +
|
||||
"{\r\n $subTypesValidationMessage.text(\'At least one Job Sub" +
|
||||
" Type is required\').removeClass(\'field-validation-valid\').addClass(\'field-valida" +
|
||||
"tion-error\');\r\n isValid = false;\r\n }\r\n" +
|
||||
" } else {\r\n $typeValidationMessage.text(\'A Job" +
|
||||
" Type is required\').removeClass(\'field-validation-valid\').addClass(\'field-valida" +
|
||||
"tion-error\');\r\n isValid = false;\r\n }\r\n\r\n");
|
||||
|
||||
|
||||
#line 170 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 170 "..\..\Views\Job\Create.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral(@"
|
||||
// Validate QuickLog Task Time
|
||||
if ($quickLog.is(':checked')) {
|
||||
var selectedTime = $quickLogTaskTimes.filter(':checked');
|
||||
if (selectedTime.length > 0) {
|
||||
if (selectedTime.val() === '') {
|
||||
// Handle 'Other'
|
||||
var otherTime = parseInt($quickLogTaskTimeOtherMinutes.val());
|
||||
if (!otherTime || otherTime <= 0) {
|
||||
$quickLogTaskTimeValidationMessage.text('A Task Time is required').removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
isValid = false;
|
||||
}
|
||||
} else {
|
||||
$quickLogTaskTimeValidationMessage.removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
}
|
||||
} else {
|
||||
$quickLogTaskTimeValidationMessage.text('A Task Time is required').removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
isValid = false;
|
||||
}
|
||||
} else {
|
||||
$quickLogTaskTimeValidationMessage.removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
}
|
||||
");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 194 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n return isValid;\r\n }\r\n\r\n validator.setting" +
|
||||
"s.submitHandler = function (form) {\r\n if (additionalValidation())" +
|
||||
" {\r\n discoDialogMethods.setButtons({});\r\n " +
|
||||
"form.submit();\r\n }\r\n }\r\n //#endregion\r\n\r\n " +
|
||||
" //#region DeviceHeld\r\n var $deviceHeld = $(\'#DeviceHeld\');\r" +
|
||||
"\n\r\n if ($(\'#DeviceSerialNumber\').val()) {\r\n switch ($d" +
|
||||
"eviceHeld.val()) {\r\n case \'True\':\r\n $(" +
|
||||
"\'#createJob_DeviceHeld\').prop(\'checked\', true);\r\n $(\'#cre" +
|
||||
"ateJob_DeviceNotHeld\').prop(\'checked\', false);\r\n break;\r\n" +
|
||||
" case \'False\':\r\n $(\'#createJob_DeviceH" +
|
||||
"eld\').prop(\'checked\', false);\r\n $(\'#createJob_DeviceNotHe" +
|
||||
"ld\').prop(\'checked\', true);\r\n break;\r\n " +
|
||||
" default:\r\n $(\'#createJob_DeviceHeld\').prop(\'checked\', fa" +
|
||||
"lse);\r\n $(\'#createJob_DeviceNotHeld\').prop(\'checked\', fal" +
|
||||
"se);\r\n break;\r\n }\r\n $(\'#cre" +
|
||||
"ateJob_DeviceHeldContainer\').find(\'input[type=\"radio\"]\').change(function () {\r\n " +
|
||||
" // Update Hidden Field with Boolean Value\r\n " +
|
||||
" // Set DeviceHeld\r\n var deviceHeldValue = \'\';\r\n " +
|
||||
" if ($(\'#createJob_DeviceHeld\').is(\':checked\'))\r\n " +
|
||||
"deviceHeldValue = \'True\';\r\n if ($(\'#createJob_DeviceNotHeld\')" +
|
||||
".is(\':checked\'))\r\n deviceHeldValue = \'False\';\r\n " +
|
||||
" $deviceHeld.val(deviceHeldValue).change();\r\n });\r\n " +
|
||||
" } else {\r\n // No Device Associated\r\n $devic" +
|
||||
"eHeld.val(\'False\');\r\n $(\'#createJob_DeviceHeldContainer\').hide();" +
|
||||
"\r\n }\r\n //#endregion\r\n\r\n");
|
||||
|
||||
|
||||
#line 242 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 242 "..\..\Views\Job\Create.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("\r\n //#region QuickLog\r\n var $quickLog = $(\'#createJob_Quick" +
|
||||
"Log\');\r\n var $quickLogContainer = $(\'#createJob_QuickLogContainer\');\r" +
|
||||
"\n var $quickLogTaskTimeContainer = $(\'#createJob_QuickLogTaskTimeCont" +
|
||||
"ainer\');\r\n var $quickLogTaskTimes = $quickLogTaskTimeContainer.find(\'" +
|
||||
"input[type=\"radio\"]\');\r\n var $quickLogTaskTimeOtherMinutes = $(\'#crea" +
|
||||
"teJob_TaskTimeOtherMinutes\');\r\n var $quickLogTaskTimeValidationMessag" +
|
||||
"e = $quickLogTaskTimeContainer.find(\'[data-valmsg-for=\"QuickLogTaskTimeMinutes\"]" +
|
||||
"\');\r\n\r\n $deviceHeld.change(validateQuickLog);\r\n $jobTypes." +
|
||||
"change(validateQuickLog);\r\n validateQuickLog();\r\n\r\n functi" +
|
||||
"on validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " +
|
||||
" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowe" +
|
||||
"d = false;\r\n } else {\r\n var selectedType = $jo" +
|
||||
"bTypes.filter(\':checked\').val();\r\n switch (selectedType) {\r\n " +
|
||||
" case \'HMisc\':\r\n case \'SApp\':\r\n " +
|
||||
" case \'SImg\':\r\n case \'SOS\':\r\n " +
|
||||
" case \'UMgmt\':\r\n quickLogAllowed = true" +
|
||||
";\r\n break;\r\n default:\r\n " +
|
||||
" quickLogAllowed = false;\r\n break" +
|
||||
";\r\n }\r\n }\r\n\r\n if (quickLogAllow" +
|
||||
"ed) {\r\n $quickLogContainer.slideDown();\r\n } el" +
|
||||
"se {\r\n if (init)\r\n $quickLogContainer." +
|
||||
"hide();\r\n else\r\n $quickLogContainer.sl" +
|
||||
"ideUp();\r\n $quickLog.prop(\'checked\', false).change();\r\n " +
|
||||
" }\r\n }\r\n\r\n $quickLog.change(function () {\r\n " +
|
||||
" if ($(this).is(\':checked\')) {\r\n $quickLogTaskTimeCo" +
|
||||
"ntainer.slideDown();\r\n } else {\r\n $quickLogTas" +
|
||||
"kTimeContainer.slideUp();\r\n }\r\n });\r\n\r\n $qu" +
|
||||
"ickLogTaskTimes.change(function () {\r\n if ($quickLogTaskTimes.fil" +
|
||||
"ter(\':checked\').val() === \"\") {\r\n $(\'#createJob_TaskTimeOther" +
|
||||
"MinutesContainer\').show();\r\n $quickLogTaskTimeOtherMinutes.at" +
|
||||
"tr(\'disabled\', null).focus().select();\r\n } else {\r\n " +
|
||||
" $(\'#createJob_TaskTimeOtherMinutesContainer\').hide();\r\n " +
|
||||
" $quickLogTaskTimeOtherMinutes.attr(\'disabled\', \'disabled\');\r\n }\r" +
|
||||
"\n });\r\n //#endregion\r\n ");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 307 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n init = false;\r\n });\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
@model Disco.Web.Models.Job.CreateRedirectModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
|
||||
Layout = null;
|
||||
|
||||
Layout = MVC.Shared.Views._DialogLayout;
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting...");
|
||||
}
|
||||
<a id="redirectLink" href="@Model.RedirectLink">Redirecting...</a>
|
||||
<div id="createJobRedirect">
|
||||
<h1>Job Created Successfully</h1>
|
||||
|
||||
<div>
|
||||
<i class="ajaxLoading" title="Loading..."></i><a id="redirectLink" href="@Model.RedirectLink">Redirecting...</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var redirectLink = document.getElementById('redirectLink').getAttribute('href');
|
||||
var redirectLink = '@(Model.RedirectLink)';
|
||||
var redirectDelay = parseInt(@(Model.RedirectDelay.HasValue ? Model.RedirectDelay.Value.TotalMilliseconds : 0));
|
||||
|
||||
//#region Parent Dialog
|
||||
if (window.parent) {
|
||||
function parentRedirect() {
|
||||
window.parent.window.location.href = redirectLink;
|
||||
|
||||
var parentDialog = window.parent.document.getElementById('createJobDialog');
|
||||
@@ -19,5 +26,12 @@
|
||||
discoDialogMethods.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (window.parent) {
|
||||
if (redirectDelay)
|
||||
window.setTimeout(parentRedirect, redirectDelay);
|
||||
else
|
||||
parentRedirect();
|
||||
}
|
||||
//#endregion
|
||||
</script>
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Job
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
@@ -47,33 +48,59 @@ namespace Disco.Web.Views.Job
|
||||
#line 2 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
|
||||
Layout = null;
|
||||
|
||||
Layout = MVC.Shared.Views._DialogLayout;
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting...");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<a");
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"createJobRedirect\"");
|
||||
|
||||
WriteLiteral(">\r\n <h1>Job Created Successfully</h1>\r\n\r\n <div>\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"ajaxLoading\"");
|
||||
|
||||
WriteLiteral(" title=\"Loading...\"");
|
||||
|
||||
WriteLiteral("></i><a");
|
||||
|
||||
WriteLiteral(" id=\"redirectLink\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 249), Tuple.Create("\"", 275)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 407), Tuple.Create("\"", 433)
|
||||
|
||||
#line 8 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 256), Tuple.Create<System.Object, System.Int32>(Model.RedirectLink
|
||||
#line 12 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 414), Tuple.Create<System.Object, System.Int32>(Model.RedirectLink
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 256), false)
|
||||
, 414), false)
|
||||
);
|
||||
|
||||
WriteLiteral(@">Redirecting...</a>
|
||||
<script>
|
||||
var redirectLink = document.getElementById('redirectLink').getAttribute('href');
|
||||
WriteLiteral(">Redirecting...</a>\r\n </div>\r\n</div>\r\n<script>\r\n var redirectLink = \'");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
Write(Model.RedirectLink);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var redirectDelay = parseInt(");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
Write(Model.RedirectDelay.HasValue ? Model.RedirectDelay.Value.TotalMilliseconds : 0);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@");
|
||||
|
||||
//#region Parent Dialog
|
||||
if (window.parent) {
|
||||
function parentRedirect() {
|
||||
window.parent.window.location.href = redirectLink;
|
||||
|
||||
var parentDialog = window.parent.document.getElementById('createJobDialog');
|
||||
@@ -82,6 +109,13 @@ WriteLiteral(@">Redirecting...</a>
|
||||
discoDialogMethods.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (window.parent) {
|
||||
if (redirectDelay)
|
||||
window.setTimeout(parentRedirect, redirectDelay);
|
||||
else
|
||||
parentRedirect();
|
||||
}
|
||||
//#endregion
|
||||
</script>
|
||||
");
|
||||
|
||||
@@ -359,10 +359,13 @@
|
||||
{@Model.Job.User.DisplayName}
|
||||
</h2>
|
||||
<div id="Job_Show_User_Id" title="Id">@Model.Job.UserId</div>
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
@if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
{<div id="Job_Show_User_PhoneNumber" title="Phone Number">Phone: @Model.Job.User.PhoneNumber</div>}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
{<div id="Job_Show_User_EmailAddress" title="Email Address">Email: <a href="mailto:@(Model.Job.User.EmailAddress)">@Model.Job.User.EmailAddress</a></div>}
|
||||
}
|
||||
@if (Model.Job.WaitingForUserAction.HasValue)
|
||||
{
|
||||
<div id="Job_Show_User_WaitingForUserAction" class="status">
|
||||
|
||||
@@ -1455,7 +1455,9 @@ WriteLiteral("</div>\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 362 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
{
|
||||
|
||||
#line default
|
||||
@@ -1469,7 +1471,7 @@ WriteLiteral(" title=\"Phone Number\"");
|
||||
WriteLiteral(">Phone: ");
|
||||
|
||||
|
||||
#line 363 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 365 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Model.Job.User.PhoneNumber);
|
||||
|
||||
|
||||
@@ -1478,17 +1480,9 @@ WriteLiteral(">Phone: ");
|
||||
WriteLiteral("</div>");
|
||||
|
||||
|
||||
#line 363 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 365 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 364 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
{
|
||||
|
||||
#line default
|
||||
@@ -1501,21 +1495,21 @@ WriteLiteral(" title=\"Email Address\"");
|
||||
|
||||
WriteLiteral(">Email: <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 24636), Tuple.Create("\"", 24680)
|
||||
, Tuple.Create(Tuple.Create("", 24643), Tuple.Create("mailto:", 24643), true)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 24727), Tuple.Create("\"", 24771)
|
||||
, Tuple.Create(Tuple.Create("", 24734), Tuple.Create("mailto:", 24734), true)
|
||||
|
||||
#line 365 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 24650), Tuple.Create<System.Object, System.Int32>(Model.Job.User.EmailAddress
|
||||
#line 367 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 24741), Tuple.Create<System.Object, System.Int32>(Model.Job.User.EmailAddress
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 24650), false)
|
||||
, 24741), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 365 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 367 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Model.Job.User.EmailAddress);
|
||||
|
||||
|
||||
@@ -1524,8 +1518,9 @@ WriteLiteral(">");
|
||||
WriteLiteral("</a></div>");
|
||||
|
||||
|
||||
#line 365 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 367 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -1533,7 +1528,7 @@ WriteLiteral("</a></div>");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 366 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 369 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.WaitingForUserAction.HasValue)
|
||||
{
|
||||
|
||||
@@ -1550,7 +1545,7 @@ WriteLiteral(">\r\n <h4>Awaiting Action</h4>\r\n
|
||||
" Since: ");
|
||||
|
||||
|
||||
#line 370 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 373 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Model.Job.WaitingForUserAction.FromNow());
|
||||
|
||||
|
||||
@@ -1559,7 +1554,7 @@ WriteLiteral(">\r\n <h4>Awaiting Action</h4>\r\n
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 372 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 375 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1568,7 +1563,7 @@ WriteLiteral("\r\n </div>\r\n");
|
||||
WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 375 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 378 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1585,13 +1580,13 @@ WriteLiteral(" id=\"Job_Show_Job_Actions\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 379 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 382 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 379 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 382 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanCloseForced())
|
||||
{
|
||||
|
||||
@@ -1599,14 +1594,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 381 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 384 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Forcibly Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 381 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 384 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1623,13 +1618,13 @@ WriteLiteral(" title=\"Forcibly Close this Job?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 383 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 386 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 383 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 386 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.ForceClose(Model.Job.Id, null, true)))
|
||||
{
|
||||
|
||||
@@ -1653,7 +1648,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 392 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 395 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1686,7 +1681,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 425 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 428 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1695,13 +1690,13 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 427 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 430 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 427 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 430 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanCloseNormally())
|
||||
{
|
||||
|
||||
@@ -1709,14 +1704,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 429 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 432 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 429 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 432 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1762,7 +1757,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 466 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 469 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1771,7 +1766,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 467 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 470 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanReopen())
|
||||
{
|
||||
|
||||
@@ -1779,14 +1774,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 469 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 472 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Reopen Job", MVC.API.Job.Reopen(Model.Job.Id, true), "Job_Show_Job_Actions_Reopen_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 469 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 472 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1833,7 +1828,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 507 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 510 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1842,7 +1837,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 508 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 511 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanDelete())
|
||||
{
|
||||
|
||||
@@ -1850,14 +1845,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 510 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 513 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Delete", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 510 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 513 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1905,7 +1900,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" </script>\r\n");
|
||||
|
||||
|
||||
#line 548 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 551 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1914,7 +1909,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 549 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 552 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanAddQueues() && Model.AvailableQueues != null && Model.AvailableQueues.Count > 0)
|
||||
{
|
||||
|
||||
@@ -1928,14 +1923,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 557 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 560 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Add to Queue", MVC.API.JobQueueJob.AddJob(), "Job_Show_Job_Actions_AddQueue_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 557 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 560 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1952,13 +1947,13 @@ WriteLiteral(" title=\"Add Job to Queue\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 559 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 562 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 559 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 562 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.JobQueueJob.AddJob())){
|
||||
|
||||
|
||||
@@ -1982,14 +1977,14 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"JobId\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 35204), Tuple.Create("\"", 35225)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 35318), Tuple.Create("\"", 35339)
|
||||
|
||||
#line 561 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35212), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
|
||||
#line 564 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35326), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 35212), false)
|
||||
, 35326), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
@@ -2001,13 +1996,13 @@ WriteLiteral(" class=\"queuePicker\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 563 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 563 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
foreach (var jobQueue in Model.AvailableQueues.OrderBy(jq => jq.Name))
|
||||
{
|
||||
|
||||
@@ -2021,7 +2016,7 @@ WriteLiteral(" class=\"queue\"");
|
||||
WriteLiteral(" data-queueid=\"");
|
||||
|
||||
|
||||
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 568 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(jobQueue.Id);
|
||||
|
||||
|
||||
@@ -2032,7 +2027,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-queuesla=\"");
|
||||
|
||||
|
||||
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 568 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(jobQueue.DefaultSLAExpiry.HasValue ? jobQueue.DefaultSLAExpiry.Value.ToString() : null);
|
||||
|
||||
|
||||
@@ -2043,7 +2038,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-queuepriority=\"");
|
||||
|
||||
|
||||
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 568 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(jobQueue.Priority.ToString());
|
||||
|
||||
|
||||
@@ -2053,32 +2048,32 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 35674), Tuple.Create("\"", 35741)
|
||||
, Tuple.Create(Tuple.Create("", 35682), Tuple.Create("fa", 35682), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 35684), Tuple.Create("fa-", 35685), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 35788), Tuple.Create("\"", 35855)
|
||||
, Tuple.Create(Tuple.Create("", 35796), Tuple.Create("fa", 35796), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 35798), Tuple.Create("fa-", 35799), true)
|
||||
|
||||
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35688), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
|
||||
#line 569 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35802), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 35688), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 35704), Tuple.Create("fa-fw", 35705), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 35710), Tuple.Create("fa-lg", 35711), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 35716), Tuple.Create("d-", 35717), true)
|
||||
, 35802), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 35818), Tuple.Create("fa-fw", 35819), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 35824), Tuple.Create("fa-lg", 35825), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 35830), Tuple.Create("d-", 35831), true)
|
||||
|
||||
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35719), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
|
||||
#line 569 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 35833), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 35719), false)
|
||||
, 35833), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 569 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(jobQueue.Name);
|
||||
|
||||
|
||||
@@ -2087,7 +2082,7 @@ WriteLiteral("></i>");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 568 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 571 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2105,7 +2100,7 @@ WriteLiteral(">\r\n <div>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 573 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 576 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.DropDownList("Priority", priorityItems));
|
||||
|
||||
|
||||
@@ -2113,27 +2108,27 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 36055), Tuple.Create("\"", 36103)
|
||||
, Tuple.Create(Tuple.Create("", 36063), Tuple.Create("fa", 36063), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 36065), Tuple.Create("d-priority-", 36066), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 36169), Tuple.Create("\"", 36217)
|
||||
, Tuple.Create(Tuple.Create("", 36177), Tuple.Create("fa", 36177), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 36179), Tuple.Create("d-priority-", 36180), true)
|
||||
|
||||
#line 573 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 36077), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
|
||||
#line 576 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 36191), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 36077), false)
|
||||
, 36191), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 36104), Tuple.Create("\"", 36137)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 36218), Tuple.Create("\"", 36251)
|
||||
|
||||
#line 573 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 36112), Tuple.Create<System.Object, System.Int32>(priorityValue
|
||||
#line 576 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 36226), Tuple.Create<System.Object, System.Int32>(priorityValue
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 36112), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 36128), Tuple.Create("Priority", 36129), true)
|
||||
, 36226), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 36242), Tuple.Create("Priority", 36243), true)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n </div>\r\n <div>\r\n " +
|
||||
@@ -2142,7 +2137,7 @@ WriteLiteral("></i>\r\n </div>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 577 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 580 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.DropDownList("SLAExpiresMinutes", slaOptions));
|
||||
|
||||
|
||||
@@ -2154,7 +2149,7 @@ WriteLiteral("\r\n </div>\r\n <div
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 581 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 584 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.TextArea("Comment"));
|
||||
|
||||
|
||||
@@ -2163,7 +2158,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 584 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 587 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2219,7 +2214,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 654 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 657 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2228,7 +2223,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 655 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 658 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanLogWarranty())
|
||||
{
|
||||
|
||||
@@ -2236,14 +2231,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 657 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 660 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Log Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 657 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 660 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2253,7 +2248,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 659 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 662 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanWarrantyCompleted())
|
||||
{
|
||||
|
||||
@@ -2261,14 +2256,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 661 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 664 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Warranty Complete", MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_WarrantyComplete_Button", "alert"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 661 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 664 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2278,7 +2273,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 663 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 666 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanInsuranceClaimFormSent())
|
||||
{
|
||||
|
||||
@@ -2286,14 +2281,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 665 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 668 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Insurance Claim Sent", MVC.API.Job.UpdateInsuranceClaimFormSentDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_InsuranceClaimSent_Button", "alert"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 665 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 668 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2303,7 +2298,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 667 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 670 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanLogRepair())
|
||||
{
|
||||
|
||||
@@ -2311,14 +2306,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 669 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 672 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Repairs Logged", MVC.API.Job.LogRepair(Model.Job.Id, null, null, true), "Job_Show_Job_Actions_LogRepair_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 669 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 672 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2335,13 +2330,13 @@ WriteLiteral(" title=\"Repairs Logged\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 671 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 674 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 671 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 674 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.LogRepair(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
|
||||
@@ -2373,7 +2368,7 @@ WriteLiteral(" name=\"RepairerReference\"");
|
||||
WriteLiteral(" />\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 681 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 684 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2411,7 +2406,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 719 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2420,7 +2415,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 720 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 723 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanRepairComplete())
|
||||
{
|
||||
|
||||
@@ -2428,14 +2423,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 725 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Repairs Complete", MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_RepairComplete_Button", "alert"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 725 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2445,7 +2440,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 724 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 727 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanConvertHWarToHNWar())
|
||||
{
|
||||
|
||||
@@ -2453,14 +2448,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 726 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 729 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Convert to Non-Warranty", MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true), "Job_Show_Job_Actions_ConvertToHNWar_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 726 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 729 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2508,7 +2503,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" \r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 766 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 769 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2517,13 +2512,13 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 768 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 771 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 768 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 771 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.Device != null)
|
||||
{
|
||||
|
||||
@@ -2537,13 +2532,13 @@ WriteLiteral(" id=\"Job_Show_Device_Actions\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 771 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 774 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 771 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 774 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanDeviceHeld())
|
||||
{
|
||||
|
||||
@@ -2551,14 +2546,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 773 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 776 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Device Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 773 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 776 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2568,7 +2563,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 775 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 778 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanDeviceReadyForReturn())
|
||||
{
|
||||
|
||||
@@ -2576,14 +2571,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 777 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 780 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Device Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 777 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 780 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2593,7 +2588,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 779 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 782 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanDeviceReturned())
|
||||
{
|
||||
|
||||
@@ -2601,14 +2596,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 781 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 784 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Device Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 781 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 784 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -2618,7 +2613,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 784 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 787 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2627,7 +2622,7 @@ WriteLiteral(" </td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 785 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 788 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.User != null)
|
||||
{
|
||||
|
||||
@@ -2641,13 +2636,13 @@ WriteLiteral(" id=\"Job_Show_User_Actions\"");
|
||||
WriteLiteral(">\r\n\r\n\r\n");
|
||||
|
||||
|
||||
#line 790 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 793 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 790 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 793 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanWaitingForUserAction())
|
||||
{
|
||||
|
||||
@@ -2675,13 +2670,13 @@ WriteLiteral(" title=\"Waiting for User Action\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 794 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 797 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 794 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 797 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true)))
|
||||
{
|
||||
|
||||
@@ -2699,7 +2694,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 800 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 803 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2734,7 +2729,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 833 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 836 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2743,7 +2738,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 834 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 837 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
if (Model.Job.CanNotWaitingForUserAction())
|
||||
{
|
||||
|
||||
@@ -2771,13 +2766,13 @@ WriteLiteral(" title=\"Not Waiting for User Action\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 838 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 841 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 838 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 841 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true)))
|
||||
{
|
||||
|
||||
@@ -2795,7 +2790,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 844 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 847 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2831,7 +2826,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 878 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 881 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2840,7 +2835,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 881 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
#line 884 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Shared
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
|
||||
@@ -98,8 +98,12 @@
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
@if (Authorization.HasAny(Claims.Device.Search, Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices)){
|
||||
<li class="@((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null)">@Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2")</li>
|
||||
}
|
||||
@if (Authorization.HasAny(Claims.User.Search)){
|
||||
<li class="@((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null)">@Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")</li>
|
||||
}
|
||||
<li class="moveRight@((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null)">@Html.ActionLink("Reports", MVC.Public.Public.Index())</li>
|
||||
@if (Authorization.Has(Claims.Config.Show))
|
||||
{
|
||||
@@ -112,8 +116,9 @@
|
||||
{ @Html.ActionLink(CurrentUser.ToString(), MVC.User.Show(CurrentUser.Id))}
|
||||
else
|
||||
{@CurrentUser.ToString()}</span>
|
||||
@using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{ @Html.TextBox("term", null, new { id="SearchQuery", accesskey = "s", placeholder="Search" }) }
|
||||
@if (Authorization.HasAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search)){
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{ @Html.TextBox("term", null, new { id="SearchQuery", accesskey = "s", placeholder="Search" }) }}
|
||||
</div>
|
||||
</header>
|
||||
<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty)</div>
|
||||
|
||||
@@ -645,66 +645,107 @@ WriteLiteral("</li>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </li>\r\n <li" +
|
||||
"");
|
||||
WriteLiteral(" </ul>\r\n </li>\r\n");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6231), Tuple.Create("\"", 6319)
|
||||
|
||||
#line 101 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6239), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6239), false)
|
||||
|
||||
#line 101 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.HasAny(Claims.Device.Search, Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6398), Tuple.Create("\"", 6486)
|
||||
|
||||
#line 102 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6406), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6406), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 102 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6414), Tuple.Create("\"", 6500)
|
||||
|
||||
#line 102 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6422), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6422), false)
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.HasAny(Claims.User.Search)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6673), Tuple.Create("\"", 6759)
|
||||
|
||||
#line 105 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6681), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6681), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 102 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 105 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6591), Tuple.Create("\"", 6689)
|
||||
, Tuple.Create(Tuple.Create("", 6599), Tuple.Create("moveRight", 6599), true)
|
||||
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6608), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
#line 106 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6608), false)
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6873), Tuple.Create("\"", 6971)
|
||||
, Tuple.Create(Tuple.Create("", 6881), Tuple.Create("moveRight", 6881), true)
|
||||
|
||||
#line 107 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6890), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6890), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 107 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Reports", MVC.Public.Public.Index()));
|
||||
|
||||
|
||||
@@ -713,13 +754,13 @@ WriteLiteral(">");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 108 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 104 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 108 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Show))
|
||||
{
|
||||
|
||||
@@ -728,20 +769,20 @@ WriteLiteral("</li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6867), Tuple.Create("\"", 6955)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7149), Tuple.Create("\"", 7237)
|
||||
|
||||
#line 106 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6875), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
#line 110 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7157), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6875), false)
|
||||
, 7157), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 106 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 110 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0"));
|
||||
|
||||
|
||||
@@ -750,7 +791,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -763,21 +804,21 @@ WriteLiteral(" id=\"headerMenu\"");
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 112 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 116 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink(CurrentUser.ToString(), MVC.User.Show(CurrentUser.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 112 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 116 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -785,14 +826,14 @@ WriteLiteral(">\r\n <span>");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 114 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 118 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CurrentUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 114 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 118 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -800,28 +841,29 @@ WriteLiteral(">\r\n <span>");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 119 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
#line 119 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.HasAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search)){
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 116 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 121 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.TextBox("term", null, new { id="SearchQuery", accesskey = "s", placeholder="Search" }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 116 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
#line 121 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -833,7 +875,7 @@ WriteLiteral(" id=\"layout_PageHeading\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 124 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty));
|
||||
|
||||
|
||||
@@ -848,7 +890,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 121 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 126 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
@@ -857,7 +899,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
|
||||
|
||||
#line 124 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 129 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
@@ -868,7 +910,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("@ ");
|
||||
|
||||
|
||||
#line 124 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 129 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
|
||||
|
||||
@@ -878,7 +920,7 @@ WriteLiteral(" | <a\r\n href=\"https://discoict.com.au/\" target=
|
||||
"om.au</a> | ");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 130 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
|
||||
|
||||
|
||||
@@ -887,7 +929,7 @@ WriteLiteral(" | <a\r\n href=\"https://discoict.com.au/\" target=
|
||||
WriteLiteral(" | ");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 130 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
|
||||
|
||||
|
||||
@@ -896,13 +938,13 @@ WriteLiteral(" | ");
|
||||
WriteLiteral("\r\n </footer>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 128 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 133 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 128 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 133 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
|
||||
|
||||
#line default
|
||||
|
||||
@@ -32,36 +32,39 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="User_Show_Details_Attributes" class="status">
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td>Email:</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(Model.User.EmailAddress))
|
||||
{
|
||||
<span id="User_Show_Details_Attributes_Email" title="Email Address [Update in Active Directory]">@Model.User.EmailAddress</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Phone:</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(Model.User.PhoneNumber))
|
||||
{
|
||||
<span id="User_Show_Details_Attributes_Phone" title="Phone Number [Update in Active Directory]">@Model.User.PhoneNumber</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
<div id="User_Show_Details_Attributes" class="status">
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td>Email:</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(Model.User.EmailAddress))
|
||||
{
|
||||
<span id="User_Show_Details_Attributes_Email" title="Email Address [Update in Active Directory]">@Model.User.EmailAddress</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Phone:</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(Model.User.PhoneNumber))
|
||||
{
|
||||
<span id="User_Show_Details_Attributes_Phone" title="Phone Number [Update in Active Directory]">@Model.User.PhoneNumber</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.Actions.GenerateDocuments))
|
||||
{
|
||||
<div id="User_Show_GenerateDocument_Container" class="status">
|
||||
@@ -82,7 +85,7 @@
|
||||
</div>
|
||||
}
|
||||
<div id="User_Show_Details_Actions">
|
||||
@if (Authorization.Has(Claims.Job.Actions.Create))
|
||||
@if (Model.User.CanCreateJob())
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
@Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "User_Show_Details_Actions_CreateJob_Button")
|
||||
@@ -92,8 +95,7 @@
|
||||
<div class="clearfix">
|
||||
<i class="fa fa-info-circle information"></i> Multiple devices are assigned to this user.
|
||||
<br />
|
||||
<strong>
|
||||
Which device should be associated with this job?
|
||||
<strong>Which device should be associated with this job?
|
||||
</strong>
|
||||
</div>
|
||||
<div>
|
||||
@@ -202,83 +204,86 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td id="User_Show_AssignedDevices">
|
||||
<div>
|
||||
<div id="User_Show_AssignedDevices_Active">
|
||||
<h3>Current Device Assignments</h3>
|
||||
@if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
@if (Authorization.Has(Claims.User.ShowAssignments))
|
||||
{
|
||||
<td id="User_Show_AssignedDevices">
|
||||
<div>
|
||||
<div id="User_Show_AssignedDevices_Active">
|
||||
<h3>Current Device Assignments</h3>
|
||||
@if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
<div class="User_Show_AssignedDevices_CurrentAssignment clearfix" data-deviceserialnumber="@assignment.DeviceSerialNumber">
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))">
|
||||
<div class="User_Show_AssignedDevices_CurrentAssignment clearfix" data-deviceserialnumber="@assignment.DeviceSerialNumber">
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
<a href="@Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))">
|
||||
<img class="User_Show_AssignedDevices_CurrentAssignment_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))" />
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img class="User_Show_AssignedDevices_CurrentAssignment_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))" />
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img class="User_Show_AssignedDevices_CurrentAssignment_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))" />
|
||||
}
|
||||
<div class="User_Show_AssignedDevices_CurrentAssignment_Details">
|
||||
<table class="none">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Serial Number:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_SerialNumber">
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
}
|
||||
<div class="User_Show_AssignedDevices_CurrentAssignment_Details">
|
||||
<table class="none">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Serial Number:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_SerialNumber">
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
@Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
}
|
||||
else
|
||||
{
|
||||
@assignment.Device.SerialNumber
|
||||
}
|
||||
</span>(<span>@assignment.Device.ComputerName</span>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Model">@assignment.Device.DeviceModel.ToString()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
@Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Asset">@assignment.Device.AssetNumber</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@assignment.Device.SerialNumber
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</span>(<span>@assignment.Device.ComputerName</span>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Model">@assignment.Device.DeviceModel.ToString()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Asset">@assignment.Device.AssetNumber</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assigned:</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Assigned">@CommonHelpers.FriendlyDate(assignment.AssignedDate)</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assigned:</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Assigned">@CommonHelpers.FriendlyDate(assignment.AssignedDate)</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Current Device Assignments</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Current Device Assignments</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.User.UserParts
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
@@ -138,34 +139,50 @@ WriteLiteral(">");
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span></td>\r\n </tr>\r\n </table>" +
|
||||
"\r\n </div>\r\n <div");
|
||||
"\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowDetails))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Attributes\"");
|
||||
|
||||
WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none verticalHeadings\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td>Email:</" +
|
||||
"td>\r\n <td>\r\n");
|
||||
WriteLiteral(">\r\n <tr>\r\n <td>" +
|
||||
"Email:</td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
#line 42 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(Model.User.EmailAddress))
|
||||
{
|
||||
#line 42 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(Model.User.EmailAddress))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Attributes_Email\"");
|
||||
|
||||
@@ -174,8 +191,8 @@ WriteLiteral(" title=\"Email Address [Update in Active Directory]\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.EmailAddress);
|
||||
#line 44 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.EmailAddress);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -183,46 +200,46 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
#line 45 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
#line 49 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n " +
|
||||
" <tr>\r\n <td>Phone:</td>\r\n " +
|
||||
" <td>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r" +
|
||||
"\n <tr>\r\n <td>P" +
|
||||
"hone:</td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
#line 55 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(Model.User.PhoneNumber))
|
||||
{
|
||||
#line 55 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(Model.User.PhoneNumber))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Attributes_Phone\"");
|
||||
|
||||
@@ -231,8 +248,8 @@ WriteLiteral(" title=\"Phone Number [Update in Active Directory]\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.PhoneNumber);
|
||||
#line 57 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.PhoneNumber);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -240,38 +257,41 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
#line 58 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
#line 62 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n " +
|
||||
" </table>\r\n </div>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r" +
|
||||
"\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
#line 67 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 68 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.User.Actions.GenerateDocuments))
|
||||
{
|
||||
|
||||
@@ -289,7 +309,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 71 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems));
|
||||
|
||||
|
||||
@@ -303,7 +323,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" var generatePdfUrl = \'");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 74 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null)));
|
||||
|
||||
|
||||
@@ -324,7 +344,7 @@ WriteLiteral(@"?DocumentTemplateId=';
|
||||
");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 86 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -337,14 +357,14 @@ WriteLiteral(" id=\"User_Show_Details_Actions\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 88 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 85 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Actions.Create))
|
||||
#line 88 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Model.User.CanCreateJob())
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
|
||||
@@ -352,14 +372,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 91 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "User_Show_Details_Actions_CreateJob_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 91 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
if (currentDeviceAssignments.Count > 1)
|
||||
{
|
||||
@@ -385,8 +405,7 @@ WriteLiteral(" class=\"fa fa-info-circle information\"");
|
||||
|
||||
WriteLiteral(@"></i> Multiple devices are assigned to this user.
|
||||
<br />
|
||||
<strong>
|
||||
Which device should be associated with this job?
|
||||
<strong>Which device should be associated with this job?
|
||||
</strong>
|
||||
</div>
|
||||
<div>
|
||||
@@ -399,13 +418,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 103 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 101 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 103 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
{
|
||||
|
||||
@@ -419,7 +438,7 @@ WriteLiteral(" class=\"CreateJob_Assignment clearfix\"");
|
||||
WriteLiteral(" data-createjoburl=\"");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 105 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.Job.Create(assignment.DeviceSerialNumber, Model.User.Id)));
|
||||
|
||||
|
||||
@@ -433,14 +452,14 @@ WriteLiteral(" class=\"CreateJob_Assignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6297), Tuple.Create("\"", 6418)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6472), Tuple.Create("\"", 6593)
|
||||
|
||||
#line 104 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6303), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 106 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6478), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6303), false)
|
||||
, 6478), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n <div");
|
||||
@@ -460,7 +479,7 @@ WriteLiteral(@">
|
||||
<span>");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 114 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -469,7 +488,7 @@ WriteLiteral(@">
|
||||
WriteLiteral("</span> (<span>");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 114 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
@@ -485,7 +504,7 @@ WriteLiteral(@"</span>)
|
||||
<span>");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 121 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -500,13 +519,13 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 127 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 125 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 127 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
@@ -516,7 +535,7 @@ WriteLiteral(@"</span>
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 127 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 129 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -525,7 +544,7 @@ WriteLiteral("
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 128 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 130 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -540,7 +559,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 132 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 134 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -554,7 +573,7 @@ WriteLiteral(@" <
|
||||
<span>");
|
||||
|
||||
|
||||
#line 138 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 140 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -570,7 +589,7 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 145 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 147 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -607,7 +626,7 @@ WriteLiteral(" <script>\r\n
|
||||
"ipt>\r\n");
|
||||
|
||||
|
||||
#line 185 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 187 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -630,49 +649,64 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 200 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 202 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </div>\r\n </td>\r\n " +
|
||||
" <td");
|
||||
WriteLiteral(" </div>\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 207 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 207 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAssignments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_AssignedDevices\"");
|
||||
|
||||
WriteLiteral(">\r\n <div>\r\n <div");
|
||||
WriteLiteral(">\r\n <div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_AssignedDevices_Active\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>Current Device Assignments</h3>\r\n");
|
||||
WriteLiteral(">\r\n <h3>Current Device Assignments</h3>\r\n");
|
||||
|
||||
|
||||
#line 209 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
#line 213 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 209 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
#line 213 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment clearfix\"");
|
||||
|
||||
WriteLiteral(" data-deviceserialnumber=\"");
|
||||
|
||||
|
||||
#line 213 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.DeviceSerialNumber);
|
||||
#line 217 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.DeviceSerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -682,209 +716,209 @@ WriteLiteral("\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 214 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
#line 218 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 214 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
#line 218 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 13290), Tuple.Create("\"", 13357)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 13594), Tuple.Create("\"", 13661)
|
||||
|
||||
#line 216 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13297), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
#line 220 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13601), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 13297), false)
|
||||
, 13601), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 13481), Tuple.Create("\"", 13602)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 13789), Tuple.Create("\"", 13910)
|
||||
|
||||
#line 217 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13487), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 221 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13795), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 13487), false)
|
||||
, 13795), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </a>\r\n");
|
||||
WriteLiteral(" />\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 219 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
#line 223 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <img");
|
||||
WriteLiteral(" <img");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 13874), Tuple.Create("\"", 13995)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 14202), Tuple.Create("\"", 14323)
|
||||
|
||||
#line 222 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13880), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 226 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 14208), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 13880), false)
|
||||
, 14208), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 223 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
#line 227 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Details\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Serial Number:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Serial Number:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 232 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 232 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
#line 236 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 234 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 234 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line 236 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 238 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 238 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 242 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>(<span>");
|
||||
|
||||
#line 242 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line 240 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>(<span>");
|
||||
|
||||
|
||||
#line 244 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"</span>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
#line 251 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
");
|
||||
|
||||
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
#line 257 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
#line 257 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 255 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
#line 259 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -892,79 +926,88 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 256 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
#line 260 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 260 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
#line 264 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assigned:</td>
|
||||
<td>
|
||||
<span");
|
||||
WriteLiteral(@" </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assigned:</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 266 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
#line 270 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
");
|
||||
|
||||
|
||||
#line 273 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 277 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Current Device Assignments</span>\r\n");
|
||||
|
||||
|
||||
#line 278 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
#line 282 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </div>\r\n </td>\r\n </" +
|
||||
"tr>\r\n </tbody>\r\n</table>\r\n");
|
||||
WriteLiteral(" </div>\r\n </div>\r\n </td>" +
|
||||
"\r\n");
|
||||
|
||||
|
||||
#line 286 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n </tbody>\r\n</table>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user