diff --git a/Disco.BI/BI/Extensions/JobActionExtensions.cs b/Disco.BI/BI/Extensions/JobActionExtensions.cs index fefe32fe..7147870a 100644 --- a/Disco.BI/BI/Extensions/JobActionExtensions.cs +++ b/Disco.BI/BI/Extensions/JobActionExtensions.cs @@ -378,19 +378,44 @@ namespace Disco.BI.Extensions !j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue; } - public static void OnLogRepair(this Job j, DiscoDataContext Database, string RepairDescription, PluginFeatureManifest RepairProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary RepairProviderProperties) + public static void OnLogRepair(this Job j, DiscoDataContext Database, string RepairDescription, List SendAttachments, PluginFeatureManifest RepairProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary RepairProviderProperties) { if (!j.CanLogRepair()) throw new InvalidOperationException("Log Repair was Denied"); - if (string.IsNullOrWhiteSpace(RepairDescription)) - RepairDescription = j.GenerateFaultDescriptionFooter(Database, RepairProviderDefinition); - else - RepairDescription = string.Concat(RepairDescription, Environment.NewLine, Environment.NewLine, j.GenerateFaultDescriptionFooter(Database, RepairProviderDefinition)); - + PublishJobResult publishJobResult = null; + using (RepairProviderFeature RepairProvider = RepairProviderDefinition.CreateInstance()) { - string providerRef = RepairProvider.SubmitJob(Database, j, Address, TechUser, RepairDescription, RepairProviderProperties); + if (SendAttachments != null && SendAttachments.Count > 0) + { + publishJobResult = DiscoServicesJobs.Publish( + Database, + j, + TechUser, + RepairProvider.ProviderId, + null, + RepairDescription, + SendAttachments, + Disco.BI.Extensions.AttachmentExtensions.RepositoryFilename); + + if (!publishJobResult.Success) + throw new Exception(string.Format("Disco ICT Online Services failed with the following message: ", publishJobResult.ErrorMessage)); + + if (string.IsNullOrWhiteSpace(RepairDescription)) + RepairDescription = publishJobResult.PublishMessage; + else + RepairDescription = string.Concat(RepairDescription, Environment.NewLine, "___", Environment.NewLine, publishJobResult.PublishMessage); + } + + string submitDescription; + + if (string.IsNullOrWhiteSpace(RepairDescription)) + submitDescription = j.GenerateFaultDescriptionFooter(Database, RepairProviderDefinition); + else + submitDescription = string.Concat(RepairDescription, Environment.NewLine, Environment.NewLine, j.GenerateFaultDescriptionFooter(Database, RepairProviderDefinition)); + + string providerRef = RepairProvider.SubmitJob(Database, j, Address, TechUser, submitDescription, RepairProviderProperties); j.JobMetaNonWarranty.RepairerLoggedDate = DateTime.Now; j.JobMetaNonWarranty.RepairerName = RepairProvider.ProviderId; @@ -406,9 +431,18 @@ namespace Disco.BI.Extensions JobId = j.Id, TechUserId = TechUser.UserId, Timestamp = DateTime.Now, - Comments = string.Format("####Repair Request Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n{3}", RepairProvider.Manifest.Name, Address.Name, providerRef, RepairDescription) + Comments = string.Format("####Repair Request Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", RepairProvider.Manifest.Name, Address.Name, providerRef, RepairDescription) }; Database.JobLogs.Add(jobLog); + + if (publishJobResult != null) + { + try + { + DiscoServicesJobs.UpdateRecipientReference(Database, j, publishJobResult.Id, publishJobResult.Secret, j.JobMetaNonWarranty.RepairerReference); + } + catch (Exception) { } // Ignore Errors as this is not completely necessary + } } } public static void OnLogRepair(this Job j, DiscoDataContext Database, string FaultDescription, string ManualProviderName, string ManualProviderReference, OrganisationAddress Address, User TechUser) diff --git a/Disco.Web/Controllers/JobController.cs b/Disco.Web/Controllers/JobController.cs index 7126fce2..bba7c3e2 100644 --- a/Disco.Web/Controllers/JobController.cs +++ b/Disco.Web/Controllers/JobController.cs @@ -512,6 +512,7 @@ namespace Disco.Web.Controllers WarrantyProviderId = m.WarrantyProviderId, OrganisationAddressId = m.OrganisationAddressId, FaultDescription = m.FaultDescription, + PublishAttachmentIds = m.PublishAttachmentIds, PublishAttachments = m.PublishAttachments }; updatedModel.UpdateModel(Database, false); @@ -693,7 +694,9 @@ namespace Disco.Web.Controllers JobId = m.JobId, RepairProviderId = m.RepairProviderId, OrganisationAddressId = m.OrganisationAddressId, - RepairDescription = m.RepairDescription + RepairDescription = m.RepairDescription, + PublishAttachmentIds = m.PublishAttachmentIds, + PublishAttachments = m.PublishAttachments }; updatedModel.UpdateModel(Database, false); @@ -753,7 +756,7 @@ namespace Disco.Web.Controllers case "Submit": try { - m.Job.OnLogRepair(Database, m.RepairDescription, m.RepairProvider, m.OrganisationAddress, m.TechUser, m.ProviderProperties()); + m.Job.OnLogRepair(Database, m.RepairDescription, m.PublishAttachments, m.RepairProvider, m.OrganisationAddress, m.TechUser, m.ProviderProperties()); Database.SaveChanges(); return RedirectToAction(MVC.Job.Show(m.JobId)); } diff --git a/Disco.Web/Models/Job/LogRepairModel.cs b/Disco.Web/Models/Job/LogRepairModel.cs index 0c89062d..062c28e5 100644 --- a/Disco.Web/Models/Job/LogRepairModel.cs +++ b/Disco.Web/Models/Job/LogRepairModel.cs @@ -18,6 +18,8 @@ namespace Disco.Web.Models.Job public List OrganisationAddresses { get; set; } public Disco.Models.BI.Config.OrganisationAddress OrganisationAddress { get; set; } + public List PublishAttachments { get; set; } + public Disco.Models.Repository.User TechUser { get; set; } [Required] @@ -28,6 +30,7 @@ namespace Disco.Web.Models.Job public string RepairProviderId { get; set; } [Required(ErrorMessage = "A fault description is required"), DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)] public string RepairDescription { get; set; } + public List PublishAttachmentIds { get; set; } [Required] public string SubmissionAction { get; set; } @@ -77,16 +80,16 @@ namespace Disco.Web.Models.Job try { UserService.GetUser(jobUserId, Database, true); - } catch (Exception) {} + } + catch (Exception) { } } - Job = (from j in Database.Jobs.Include("Device.DeviceModel").Include("JobMetaNonWarranty").Include("JobSubTypes") - where (j.Id == JobId) - select j).FirstOrDefault(); + Job = Database.Jobs.Include("Device.DeviceModel").Include("JobMetaWarranty").Include("JobSubTypes").Include("JobAttachments") + .Where(j => j.Id == JobId) + .FirstOrDefault(); + if (Job == null) - { throw new ArgumentException("Invalid Job Number Specified", "JobId"); - } } // Update TechUser's Details [#12] @@ -116,6 +119,16 @@ namespace Disco.Web.Models.Job if (!string.IsNullOrEmpty(RepairDescription)) RepairDescription = RepairDescription.Trim(); + + if (PublishAttachmentIds == null) + { + PublishAttachmentIds = new List(); + PublishAttachments = new List(); + } + else + { + PublishAttachments = Job.JobAttachments.Where(ja => PublishAttachmentIds.Contains(ja.Id)).ToList(); + } } } } \ No newline at end of file diff --git a/Disco.Web/Views/Job/LogRepair.cshtml b/Disco.Web/Views/Job/LogRepair.cshtml index b4fe77b5..5618a8d2 100644 --- a/Disco.Web/Views/Job/LogRepair.cshtml +++ b/Disco.Web/Views/Job/LogRepair.cshtml @@ -111,6 +111,34 @@ + if (!Model.IsManualProvider && Authorization.Has(Claims.Job.ShowAttachments) && Model.Job.JobAttachments.Count > 0) + { + + } if (Model.RepairProvider != null && Model.RepairProviderSubmitJobBeginResult != null) {
diff --git a/Disco.Web/Views/Job/LogRepair.generated.cs b/Disco.Web/Views/Job/LogRepair.generated.cs index 1fed7ca0..06fd0dd8 100644 --- a/Disco.Web/Views/Job/LogRepair.generated.cs +++ b/Disco.Web/Views/Job/LogRepair.generated.cs @@ -506,6 +506,247 @@ WriteLiteral("\r\n \r\n \r\n #line 114 "..\..\Views\Job\LogRepair.cshtml" + if (!Model.IsManualProvider && Authorization.Has(Claims.Job.ShowAttachments) && Model.Job.JobAttachments.Count > 0) + { + + + #line default + #line hidden +WriteLiteral(" \r\n

Send Attachments

\r\n \r\n \r\n " + +" \r\n \r\n \r\n \r\n"); + + + #line 141 "..\..\Views\Job\LogRepair.cshtml" + } if (Model.RepairProvider != null && Model.RepairProviderSubmitJobBeginResult != null) { @@ -521,7 +762,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 117 "..\..\Views\Job\LogRepair.cshtml" + #line 145 "..\..\Views\Job\LogRepair.cshtml" Write(Html.PartialCompiled(Model.RepairProviderSubmitJobBeginResult.Item1, Model.RepairProviderSubmitJobBeginResult.Item2)); @@ -530,7 +771,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n"); - #line 119 "..\..\Views\Job\LogRepair.cshtml" + #line 147 "..\..\Views\Job\LogRepair.cshtml" } @@ -543,13 +784,13 @@ WriteLiteral(" class=\"actionBar\""); WriteLiteral(">\r\n"); - #line 121 "..\..\Views\Job\LogRepair.cshtml" + #line 149 "..\..\Views\Job\LogRepair.cshtml" #line default #line hidden - #line 121 "..\..\Views\Job\LogRepair.cshtml" + #line 149 "..\..\Views\Job\LogRepair.cshtml" if (Model.IsManualProvider) { @@ -567,7 +808,7 @@ WriteLiteral(" value=\"Save Repair Request\""); WriteLiteral(" />\r\n"); - #line 124 "..\..\Views\Job\LogRepair.cshtml" + #line 152 "..\..\Views\Job\LogRepair.cshtml" } else { @@ -586,7 +827,7 @@ WriteLiteral(" value=\"Preview Repair Request\""); WriteLiteral(" />\r\n"); - #line 128 "..\..\Views\Job\LogRepair.cshtml" + #line 156 "..\..\Views\Job\LogRepair.cshtml" } @@ -595,7 +836,7 @@ WriteLiteral(" />\r\n"); WriteLiteral(" \r\n"); - #line 130 "..\..\Views\Job\LogRepair.cshtml" + #line 158 "..\..\Views\Job\LogRepair.cshtml" } diff --git a/Disco.Web/Views/Job/LogRepairDisclose.cshtml b/Disco.Web/Views/Job/LogRepairDisclose.cshtml index 4623b891..3e3b834a 100644 --- a/Disco.Web/Views/Job/LogRepairDisclose.cshtml +++ b/Disco.Web/Views/Job/LogRepairDisclose.cshtml @@ -1,7 +1,7 @@ @model Disco.Web.Models.Job.LogRepairModel @{ Authorization.Require(Claims.Job.Actions.LogRepair); - + ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Repair"); } @using (Html.BeginForm(MVC.Job.LogRepair(), FormMethod.Post)) @@ -16,32 +16,28 @@
\r\n \r\n"); + + + #line 122 "..\..\Views\Job\LogRepair.cshtml" + + + #line default + #line hidden + + #line 122 "..\..\Views\Job\LogRepair.cshtml" + foreach (var ja in Model.Job.JobAttachments) + { + + + #line default + #line hidden +WriteLiteral(" (Url.Action(MVC.API.Job.AttachmentDownload(ja.Id)) + + #line default + #line hidden +, 5182), false) +); + +WriteLiteral(" data-attachmentid=\""); + + + #line 124 "..\..\Views\Job\LogRepair.cshtml" + Write(ja.Id); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(" data-mimetype=\""); + + + #line 124 "..\..\Views\Job\LogRepair.cshtml" + Write(ja.MimeType); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(">\r\n (ja.Id + + #line default + #line hidden +, 5397), false) +); + +WriteLiteral(" "); + + + #line 125 "..\..\Views\Job\LogRepair.cshtml" + Write(Model.PublishAttachmentIds.Contains(ja.Id) ? "checked" : null); + + + #line default + #line hidden +WriteLiteral(" />\r\n (ja.Filename + + #line default + #line hidden +, 5532), false) +); + +WriteLiteral(">\r\n (Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)) + + #line default + #line hidden +, 5621), false) +); + +WriteLiteral(" />\r\n (ja.Comments + + #line default + #line hidden +, 5749), false) +); + +WriteLiteral(">\r\n"); + + + #line 129 "..\..\Views\Job\LogRepair.cshtml" + + + #line default + #line hidden + + #line 129 "..\..\Views\Job\LogRepair.cshtml" + if (!string.IsNullOrEmpty(ja.DocumentTemplateId)) + { + + #line default + #line hidden + + #line 130 "..\..\Views\Job\LogRepair.cshtml" + Write(ja.DocumentTemplate.Description); + + + #line default + #line hidden + + #line 130 "..\..\Views\Job\LogRepair.cshtml" + } + else + { + + #line default + #line hidden + + #line 132 "..\..\Views\Job\LogRepair.cshtml" + Write(ja.Comments); + + + #line default + #line hidden + + #line 132 "..\..\Views\Job\LogRepair.cshtml" + } + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 133 "..\..\Views\Job\LogRepair.cshtml" + Write(ja.TechUser.ToStringFriendly()); + + + #line default + #line hidden +WriteLiteral("
- - - - - - - - + @if (Model.PublishAttachments.Count > 0) + { + + + + + }
- Internal Job Id: + Internal Job Id: @Model.JobId
- Device Serial Number: + Device Serial Number: @Model.Job.Device.SerialNumber
- Device Model: + Device Model: @Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
- Technician: + Technician: @Model.TechUser.DisplayName @@ -52,8 +48,7 @@
- Repair Address: + Repair Address:
@@ -67,24 +62,21 @@
- Repair Provider: + Repair Provider: @Model.RepairProvider.Name (@Model.RepairProvider.Id) @Model.RepairProvider.PluginManifest.Version.ToString(3)
- Repair Description: + Repair Description: @Model.RepairDescription.ToMultilineString()
- Disclosed Information + Disclosed Information
@@ -102,9 +94,59 @@
Sending Attachments + +
+
+

Submitting Repair Request...

+
+
- +
} \ No newline at end of file diff --git a/Disco.Web/Views/Job/LogRepairDisclose.generated.cs b/Disco.Web/Views/Job/LogRepairDisclose.generated.cs index 3aefc34b..6299aff6 100644 --- a/Disco.Web/Views/Job/LogRepairDisclose.generated.cs +++ b/Disco.Web/Views/Job/LogRepairDisclose.generated.cs @@ -48,7 +48,7 @@ namespace Disco.Web.Views.Job #line 2 "..\..\Views\Job\LogRepairDisclose.cshtml" Authorization.Require(Claims.Job.Actions.LogRepair); - + ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Repair"); @@ -166,39 +166,37 @@ WriteLiteral(" class=\"form\""); WriteLiteral(" style=\"width: 650px\""); -WriteLiteral(">\r\n \r\n \r\n \r\n \r\n"); + + + #line 97 "..\..\Views\Job\LogRepairDisclose.cshtml" + + + #line default + #line hidden + + #line 97 "..\..\Views\Job\LogRepairDisclose.cshtml" + if (Model.PublishAttachments.Count > 0) + { + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n " + +" \r\n \r\n"); + + + #line 122 "..\..\Views\Job\LogRepairDisclose.cshtml" + } + + + #line default + #line hidden +WriteLiteral("
\r\n I" + -"nternal Job Id:\r\n \r\n"); +WriteLiteral(">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Device Serial Number:\r\n \r\n " + -" \r\n \r\n \r\n \r\n Device Model:\r\n \r\n \r\n"); +">Device Model:\r\n \r\n \r\n \r\n \r\n \r\n Technician:\r\n \r\n \r\n WriteLiteral(" style=\"width: 150px\""); -WriteLiteral(">\r\n Repair Address:\r\n \r\n \r\n Repair Address:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Repair Description:\r\n \r\n " + -" \r\n \r\n \r\n \r\n Disclosed Information\r\n \r\n " + -" \r\n
Internal Job Id:\r\n " + +" \r\n"); WriteLiteral(" "); - #line 23 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 22 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.JobId); #line default #line hidden WriteLiteral("\r\n
\r\n"); +">Device Serial Number:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 31 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 29 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.Job.Device.SerialNumber); #line default #line hidden WriteLiteral("\r\n
\r\n"); WriteLiteral(" "); - #line 39 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 36 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.Job.Device.DeviceModel.Manufacturer); @@ -207,20 +205,19 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 39 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 36 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.Job.Device.DeviceModel.Model); #line default #line hidden WriteLiteral("\r\n
\r" + -"\n"); +">Technician:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 47 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 43 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.TechUser.DisplayName); @@ -233,7 +230,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">\r\n Email Address: "); - #line 49 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 45 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.TechUser.EmailAddress); @@ -242,7 +239,7 @@ WriteLiteral(">\r\n Email Address: "); WriteLiteral("
\r\n Phone Number: "); - #line 50 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 46 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.TechUser.PhoneNumber); @@ -253,8 +250,8 @@ WriteLiteral("\r\n \r\n
\r\n " + +" \r\n"); WriteLiteral(" "); - #line 60 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 55 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.OrganisationAddress.Name); @@ -276,7 +273,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">\r\n "); - #line 62 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 57 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.OrganisationAddress.Address); @@ -285,7 +282,7 @@ WriteLiteral(">\r\n "); WriteLiteral("
\r\n "); - #line 63 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 58 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.OrganisationAddress.Suburb); @@ -294,7 +291,7 @@ WriteLiteral("
\r\n "); WriteLiteral(", "); - #line 63 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 58 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.OrganisationAddress.Postcode); @@ -303,7 +300,7 @@ WriteLiteral(", "); WriteLiteral("
\r\n "); - #line 64 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 59 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.OrganisationAddress.State); @@ -312,20 +309,20 @@ WriteLiteral("
\r\n "); WriteLiteral(", "); - #line 64 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 59 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.OrganisationAddress.Country); #line default #line hidden WriteLiteral("\r\n \r\n \r\n " + -"
\r\n " + -" Repair Provider:\r\n \r\n"); +"
Repair Provi" + +"der:\r\n \r\n"); WriteLiteral(" "); - #line 74 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 68 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.RepairProvider.Name); @@ -334,7 +331,7 @@ WriteLiteral(" "); WriteLiteral(" ("); - #line 74 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 68 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.RepairProvider.Id); @@ -343,41 +340,40 @@ WriteLiteral(" ("); WriteLiteral(") "); - #line 74 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 68 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.RepairProvider.PluginManifest.Version.ToString(3)); #line default #line hidden WriteLiteral("\r\n
\r\n"); +">Repair Description:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 82 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 75 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(Model.RepairDescription.ToMultilineString()); #line default #line hidden WriteLiteral("\r\n
\r\n Disclosed Information\r\n \r\n \r\n " + +" \r\n \r\n"); - #line 92 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 84 "..\..\Views\Job\LogRepairDisclose.cshtml" #line default #line hidden - #line 92 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 84 "..\..\Views\Job\LogRepairDisclose.cshtml" foreach (var dp in Model.DiscloseProperties) { @@ -387,7 +383,7 @@ WriteLiteral(">\r\n
\r\n"); WriteLiteral(" \r\n \r\n " \r\n "> \r\n"); - #line 100 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 92 "..\..\Views\Job\LogRepairDisclose.cshtml" } #line default #line hidden WriteLiteral("
"); - #line 95 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 87 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(dp.Key); @@ -397,7 +393,7 @@ WriteLiteral(":\r\n "); - #line 97 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 89 "..\..\Views\Job\LogRepairDisclose.cshtml" Write(dp.Value); @@ -407,14 +403,294 @@ WriteLiteral("\r\n
\r\n \r\n \r\n
\r\n \r\n"); +"d>\r\n
Sending Attachments\r\n
\r\n \r\n"); + + + #line 104 "..\..\Views\Job\LogRepairDisclose.cshtml" + + + #line default + #line hidden + + #line 104 "..\..\Views\Job\LogRepairDisclose.cshtml" + foreach (var ja in Model.PublishAttachments) + { + + + #line default + #line hidden +WriteLiteral(" (ja.Id + + #line default + #line hidden +, 4125), false) +); + +WriteLiteral(" />\r\n"); + +WriteLiteral(" (Url.Action(MVC.API.Job.AttachmentDownload(ja.Id)) + + #line default + #line hidden +, 4182), false) +); + +WriteLiteral(" data-attachmentid=\""); + + + #line 107 "..\..\Views\Job\LogRepairDisclose.cshtml" + Write(ja.Id); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(" data-mimetype=\""); + + + #line 107 "..\..\Views\Job\LogRepairDisclose.cshtml" + Write(ja.MimeType); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(">\r\n (ja.Filename + + #line default + #line hidden +, 4358), false) +); + +WriteLiteral(">\r\n (Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)) + + #line default + #line hidden +, 4455), false) +); + +WriteLiteral(" />\r\n (ja.Comments + + #line default + #line hidden +, 4591), false) +); + +WriteLiteral(">\r\n"); + + + #line 111 "..\..\Views\Job\LogRepairDisclose.cshtml" + + + #line default + #line hidden + + #line 111 "..\..\Views\Job\LogRepairDisclose.cshtml" + if (!string.IsNullOrEmpty(ja.DocumentTemplateId)) + { + + #line default + #line hidden + + #line 112 "..\..\Views\Job\LogRepairDisclose.cshtml" + Write(ja.DocumentTemplate.Description); + + + #line default + #line hidden + + #line 112 "..\..\Views\Job\LogRepairDisclose.cshtml" + } + else + { + + #line default + #line hidden + + #line 114 "..\..\Views\Job\LogRepairDisclose.cshtml" + Write(ja.Comments); + + + #line default + #line hidden + + #line 114 "..\..\Views\Job\LogRepairDisclose.cshtml" + } + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 115 "..\..\Views\Job\LogRepairDisclose.cshtml" + Write(ja.TechUser.ToStringFriendly()); + + + #line default + #line hidden +WriteLiteral("
\r\n \r\n " + +"
\r\n \r\n"); + +WriteLiteral(" \r\n

Submitting Repair Request...

\r\n \r\n"); + +WriteLiteral(@" +"); WriteLiteral(" \r\n \r\n \r\n"); - #line 110 "..\..\Views\Job\LogRepairDisclose.cshtml" + #line 152 "..\..\Views\Job\LogRepairDisclose.cshtml" } #line default