Feature: Disco ICT Online Services - Job Publishing
When warranty jobs are submitted (via plugins) users can choose to include attachments. These attachments are submitted to Disco ICT Online Services. A secure link is then provided to the plugin so the attachments can be retrieved.
This commit is contained in:
@@ -10,6 +10,9 @@ using Disco.Services.Users;
|
|||||||
using Disco.Services.Authorization;
|
using Disco.Services.Authorization;
|
||||||
using Disco.Services.Plugins.Features.RepairProvider;
|
using Disco.Services.Plugins.Features.RepairProvider;
|
||||||
|
|
||||||
|
using PublishJobResult = Disco.Models.Services.Interop.DiscoServices.PublishJobResult;
|
||||||
|
using DiscoServicesJobs = Disco.Services.Interop.DiscoServices.Jobs;
|
||||||
|
|
||||||
namespace Disco.BI.Extensions
|
namespace Disco.BI.Extensions
|
||||||
{
|
{
|
||||||
public static class JobActionExtensions
|
public static class JobActionExtensions
|
||||||
@@ -147,25 +150,50 @@ namespace Disco.BI.Extensions
|
|||||||
{
|
{
|
||||||
if (!UserService.CurrentAuthorization.Has(Claims.Job.Actions.LogWarranty))
|
if (!UserService.CurrentAuthorization.Has(Claims.Job.Actions.LogWarranty))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !j.ClosedDate.HasValue &&
|
return !j.ClosedDate.HasValue &&
|
||||||
(j.DeviceSerialNumber != null) &&
|
(j.DeviceSerialNumber != null) &&
|
||||||
j.JobTypeId == JobType.JobTypeIds.HWar &&
|
j.JobTypeId == JobType.JobTypeIds.HWar &&
|
||||||
!j.JobMetaWarranty.ExternalLoggedDate.HasValue;
|
!j.JobMetaWarranty.ExternalLoggedDate.HasValue;
|
||||||
}
|
}
|
||||||
public static void OnLogWarranty(this Job j, DiscoDataContext Database, string FaultDescription, PluginFeatureManifest WarrantyProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary<string, string> WarrantyProviderProperties)
|
public static void OnLogWarranty(this Job j, DiscoDataContext Database, string FaultDescription, List<JobAttachment> SendAttachments, PluginFeatureManifest WarrantyProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary<string, string> WarrantyProviderProperties)
|
||||||
{
|
{
|
||||||
if (!j.CanLogWarranty())
|
if (!j.CanLogWarranty())
|
||||||
throw new InvalidOperationException("Log Warranty was Denied");
|
throw new InvalidOperationException("Log Warranty was Denied");
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(FaultDescription))
|
PublishJobResult publishJobResult = null;
|
||||||
FaultDescription = j.GenerateFaultDescriptionFooter(Database, WarrantyProviderDefinition);
|
|
||||||
else
|
|
||||||
FaultDescription = string.Concat(FaultDescription, Environment.NewLine, Environment.NewLine, j.GenerateFaultDescriptionFooter(Database, WarrantyProviderDefinition));
|
|
||||||
|
|
||||||
using (WarrantyProviderFeature WarrantyProvider = WarrantyProviderDefinition.CreateInstance<WarrantyProviderFeature>())
|
using (WarrantyProviderFeature WarrantyProvider = WarrantyProviderDefinition.CreateInstance<WarrantyProviderFeature>())
|
||||||
{
|
{
|
||||||
string providerRef = WarrantyProvider.SubmitJob(Database, j, Address, TechUser, FaultDescription, WarrantyProviderProperties);
|
if (SendAttachments != null && SendAttachments.Count > 0)
|
||||||
|
{
|
||||||
|
publishJobResult = DiscoServicesJobs.Publish(
|
||||||
|
Database,
|
||||||
|
j,
|
||||||
|
TechUser,
|
||||||
|
WarrantyProvider.WarrantyProviderId,
|
||||||
|
null,
|
||||||
|
FaultDescription,
|
||||||
|
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(FaultDescription))
|
||||||
|
FaultDescription = publishJobResult.PublishMessage;
|
||||||
|
else
|
||||||
|
FaultDescription = string.Concat(FaultDescription, Environment.NewLine, "___", Environment.NewLine, publishJobResult.PublishMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
string submitDescription;
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(FaultDescription))
|
||||||
|
submitDescription = j.GenerateFaultDescriptionFooter(Database, WarrantyProviderDefinition);
|
||||||
|
else
|
||||||
|
submitDescription = string.Concat(FaultDescription, Environment.NewLine, Environment.NewLine, j.GenerateFaultDescriptionFooter(Database, WarrantyProviderDefinition));
|
||||||
|
|
||||||
|
string providerRef = WarrantyProvider.SubmitJob(Database, j, Address, TechUser, submitDescription, WarrantyProviderProperties);
|
||||||
|
|
||||||
j.JobMetaWarranty.ExternalLoggedDate = DateTime.Now;
|
j.JobMetaWarranty.ExternalLoggedDate = DateTime.Now;
|
||||||
j.JobMetaWarranty.ExternalName = WarrantyProvider.WarrantyProviderId;
|
j.JobMetaWarranty.ExternalName = WarrantyProvider.WarrantyProviderId;
|
||||||
@@ -184,6 +212,15 @@ namespace Disco.BI.Extensions
|
|||||||
Comments = string.Format("####Warranty Claim Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription)
|
Comments = string.Format("####Warranty Claim Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription)
|
||||||
};
|
};
|
||||||
Database.JobLogs.Add(jobLog);
|
Database.JobLogs.Add(jobLog);
|
||||||
|
|
||||||
|
if (publishJobResult != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DiscoServicesJobs.UpdateRecipientReference(Database, j, publishJobResult.Id, publishJobResult.Secret, j.JobMetaWarranty.ExternalReference);
|
||||||
|
}
|
||||||
|
catch (Exception) { } // Ignore Errors as this is not completely necessary
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void OnLogWarranty(this Job j, DiscoDataContext Database, string FaultDescription, string ManualProviderName, string ManualProviderReference, OrganisationAddress Address, User TechUser)
|
public static void OnLogWarranty(this Job j, DiscoDataContext Database, string FaultDescription, string ManualProviderName, string ManualProviderReference, OrganisationAddress Address, User TechUser)
|
||||||
@@ -458,7 +495,7 @@ namespace Disco.BI.Extensions
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool CanCloseNormally(this Job j)
|
public static bool CanCloseNormally(this Job j)
|
||||||
{
|
{
|
||||||
if (j.CanCloseNever())
|
if (j.CanCloseNever())
|
||||||
|
|||||||
@@ -59,6 +59,14 @@
|
|||||||
<Reference Include="System.DirectoryServices" />
|
<Reference Include="System.DirectoryServices" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.Extensions">
|
||||||
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.Primitives">
|
||||||
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="System.Reactive.Core, Version=2.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Reactive.Core, Version=2.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Rx-Core.2.2.4\lib\net45\System.Reactive.Core.dll</HintPath>
|
<HintPath>..\packages\Rx-Core.2.2.4\lib\net45\System.Reactive.Core.dll</HintPath>
|
||||||
@@ -205,10 +213,15 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2014/6/1" />
|
<UserProperties BuildVersion_StartDate="2014/6/1" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
||||||
|
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||||
|
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
||||||
|
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
|
||||||
|
</Target>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -40,6 +40,10 @@
|
|||||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net45" />
|
||||||
<package id="Rx-Core" version="2.2.4" targetFramework="net45" />
|
<package id="Rx-Core" version="2.2.4" targetFramework="net45" />
|
||||||
<package id="Rx-Interfaces" version="2.2.4" targetFramework="net45" />
|
<package id="Rx-Interfaces" version="2.2.4" targetFramework="net45" />
|
||||||
<package id="Rx-Linq" version="2.2.4" targetFramework="net45" />
|
<package id="Rx-Linq" version="2.2.4" targetFramework="net45" />
|
||||||
|
|||||||
@@ -109,6 +109,7 @@
|
|||||||
<Compile Include="Services\Devices\Importing\IDeviceImportContext.cs" />
|
<Compile Include="Services\Devices\Importing\IDeviceImportContext.cs" />
|
||||||
<Compile Include="Services\Devices\Importing\IDeviceImportField.cs" />
|
<Compile Include="Services\Devices\Importing\IDeviceImportField.cs" />
|
||||||
<Compile Include="Services\Interop\ActiveDirectory\ADManagedGroupConfiguration.cs" />
|
<Compile Include="Services\Interop\ActiveDirectory\ADManagedGroupConfiguration.cs" />
|
||||||
|
<Compile Include="Services\Interop\DiscoServices\PublishJobResult.cs" />
|
||||||
<Compile Include="Services\Interop\DiscoServices\UpdateRequestV2.cs" />
|
<Compile Include="Services\Interop\DiscoServices\UpdateRequestV2.cs" />
|
||||||
<Compile Include="Services\Interop\DiscoServices\UpdateResponseV2.cs" />
|
<Compile Include="Services\Interop\DiscoServices\UpdateResponseV2.cs" />
|
||||||
<Compile Include="Services\Jobs\JobLists\JobLocationReference.cs" />
|
<Compile Include="Services\Jobs\JobLists\JobLocationReference.cs" />
|
||||||
@@ -181,7 +182,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2014/6/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2014/6/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
namespace Disco.Models.Services.Interop.DiscoServices
|
||||||
|
{
|
||||||
|
public class PublishJobResult
|
||||||
|
{
|
||||||
|
public bool Success { get; set; }
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Secret { get; set; }
|
||||||
|
public string DeepLink { get; set; }
|
||||||
|
public string PublishMessage { get; set; }
|
||||||
|
|
||||||
|
public string ErrorMessage { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ namespace Disco.Models.Services.Interop.DiscoServices
|
|||||||
public bool IsBetaDeployment { get; set; }
|
public bool IsBetaDeployment { get; set; }
|
||||||
|
|
||||||
public string OrganisationName { get; set; }
|
public string OrganisationName { get; set; }
|
||||||
public string BroadbandDoeWanId { get; set; }
|
public string VicEduDeptWanId { get; set; }
|
||||||
|
|
||||||
public List<StatisticInt> Stat_JobCounts { get; set; }
|
public List<StatisticInt> Stat_JobCounts { get; set; }
|
||||||
public List<StatisticInt> Stat_OpenJobCounts { get; set; }
|
public List<StatisticInt> Stat_OpenJobCounts { get; set; }
|
||||||
|
|||||||
@@ -79,6 +79,14 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.DirectoryServices" />
|
<Reference Include="System.DirectoryServices" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.Extensions">
|
||||||
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.Primitives">
|
||||||
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="System.Reactive.Core, Version=2.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Reactive.Core, Version=2.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Rx-Core.2.2.4\lib\net45\System.Reactive.Core.dll</HintPath>
|
<HintPath>..\packages\Rx-Core.2.2.4\lib\net45\System.Reactive.Core.dll</HintPath>
|
||||||
@@ -237,6 +245,7 @@
|
|||||||
<Compile Include="Interop\ActiveDirectory\Description.cs" />
|
<Compile Include="Interop\ActiveDirectory\Description.cs" />
|
||||||
<Compile Include="Interop\ActiveDirectory\IADObject.cs" />
|
<Compile Include="Interop\ActiveDirectory\IADObject.cs" />
|
||||||
<Compile Include="Interop\DiscoServices\DiscoServiceHelpers.cs" />
|
<Compile Include="Interop\DiscoServices\DiscoServiceHelpers.cs" />
|
||||||
|
<Compile Include="Interop\DiscoServices\Jobs.cs" />
|
||||||
<Compile Include="Interop\VicEduDept\VicSmart.cs" />
|
<Compile Include="Interop\VicEduDept\VicSmart.cs" />
|
||||||
<Compile Include="Interop\DiscoServices\UpdateQuery.cs" />
|
<Compile Include="Interop\DiscoServices\UpdateQuery.cs" />
|
||||||
<Compile Include="Interop\DiscoServices\UpdateQueryTask.cs" />
|
<Compile Include="Interop\DiscoServices\UpdateQueryTask.cs" />
|
||||||
@@ -368,7 +377,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2014/6/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2014/6/1" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -379,6 +388,11 @@
|
|||||||
xcopy /s /y "$(SolutionDir)packages\Microsoft.SqlServer.Compact.4.0.8876.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"</PostBuildEvent>
|
xcopy /s /y "$(SolutionDir)packages\Microsoft.SqlServer.Compact.4.0.8876.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
||||||
|
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||||
|
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
||||||
|
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
|
||||||
|
</Target>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
using Disco.Data.Repository;
|
||||||
|
using Disco.Models.Repository;
|
||||||
|
using Disco.Models.Services.Interop.DiscoServices;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
|
||||||
|
namespace Disco.Services.Interop.DiscoServices
|
||||||
|
{
|
||||||
|
public static class Jobs
|
||||||
|
{
|
||||||
|
private static string ServiceUrl(string Action)
|
||||||
|
{
|
||||||
|
return string.Concat(DiscoServiceHelpers.ServicesUrl, "API/Jobs/", Action);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PublishJobResult Publish(DiscoDataContext Database, Job Job, User TechUser, string Recipient, string RecipientReference, string Comments, List<JobAttachment> Attachments, Func<JobAttachment, DiscoDataContext, string> AttachmentFilenameRetriever)
|
||||||
|
{
|
||||||
|
var url = ServiceUrl("Publish");
|
||||||
|
|
||||||
|
using (var httpClient = new HttpClient())
|
||||||
|
{
|
||||||
|
using (var formData = new MultipartFormDataContent())
|
||||||
|
{
|
||||||
|
formData.Add(new StringContent(Database.DiscoConfiguration.DeploymentId), "DeploymentId");
|
||||||
|
formData.Add(new StringContent(Job.Id.ToString()), "JobId");
|
||||||
|
|
||||||
|
formData.Add(new StringContent(TechUser.UserId), "TechnicianId");
|
||||||
|
formData.Add(new StringContent(TechUser.DisplayName ?? TechUser.UserId), "TechnicianName");
|
||||||
|
if (!string.IsNullOrWhiteSpace(TechUser.PhoneNumber))
|
||||||
|
formData.Add(new StringContent(TechUser.PhoneNumber), "TechnicianPhone");
|
||||||
|
if (!string.IsNullOrWhiteSpace(TechUser.EmailAddress))
|
||||||
|
formData.Add(new StringContent(TechUser.EmailAddress), "TechnicianEmail");
|
||||||
|
|
||||||
|
formData.Add(new StringContent(Recipient), "Recipient");
|
||||||
|
if (!string.IsNullOrWhiteSpace(RecipientReference))
|
||||||
|
formData.Add(new StringContent(RecipientReference), "RecipientReference");
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(Comments))
|
||||||
|
formData.Add(new StringContent(Comments), "PublishedComments");
|
||||||
|
|
||||||
|
if (Attachments != null && Attachments.Count > 0)
|
||||||
|
{
|
||||||
|
Attachments
|
||||||
|
.Select(a => new { Attachment = a, Filename = AttachmentFilenameRetriever(a, Database) })
|
||||||
|
.Where(a => System.IO.File.Exists(a.Filename))
|
||||||
|
.Select((a, i) => new { Attachment = a.Attachment, Filename = a.Filename, Index = i })
|
||||||
|
.ToList()
|
||||||
|
.ForEach(a =>
|
||||||
|
{
|
||||||
|
formData.Add(new StringContent(a.Attachment.Filename), string.Format("Attachments[{0}].Filename", a.Index));
|
||||||
|
formData.Add(new StringContent(a.Attachment.MimeType), string.Format("Attachments[{0}].MimeType", a.Index));
|
||||||
|
formData.Add(new StringContent(a.Attachment.Timestamp.ToISO8601()), string.Format("Attachments[{0}].CreatedDate", a.Index));
|
||||||
|
if (a.Attachment.DocumentTemplateId != null)
|
||||||
|
formData.Add(new StringContent(a.Attachment.DocumentTemplateId), string.Format("Attachments[{0}].DocumentTemplateId", a.Index));
|
||||||
|
if (a.Attachment.Comments != null)
|
||||||
|
formData.Add(new StringContent(a.Attachment.Comments), string.Format("Attachments[{0}].Comments", a.Index));
|
||||||
|
|
||||||
|
formData.Add(new ByteArrayContent(File.ReadAllBytes(a.Filename)), string.Format("Attachments[{0}].File", a.Index), a.Attachment.Filename);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var response = httpClient.PostAsync(url, formData).Result;
|
||||||
|
|
||||||
|
response.EnsureSuccessStatusCode();
|
||||||
|
|
||||||
|
var resultJson = response.Content.ReadAsStringAsync().Result;
|
||||||
|
var result = JsonConvert.DeserializeObject<PublishJobResult>(resultJson);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PublishJobResult UpdateRecipientReference(DiscoDataContext Database, Job Job, int PublishedJobId, string PublishedJobSecret, string RecipientReference)
|
||||||
|
{
|
||||||
|
var url = ServiceUrl("UpdateRecipientReference");
|
||||||
|
|
||||||
|
using (var httpClient = new HttpClient())
|
||||||
|
{
|
||||||
|
using (var formData = new FormUrlEncodedContent(new KeyValuePair<string, string>[] {
|
||||||
|
new KeyValuePair<string, string>("PublishedJobId", PublishedJobId.ToString()),
|
||||||
|
new KeyValuePair<string, string>("PublishedJobSecret", PublishedJobSecret),
|
||||||
|
new KeyValuePair<string, string>("RecipientReference", RecipientReference)
|
||||||
|
}))
|
||||||
|
{
|
||||||
|
var response = httpClient.PostAsync(url, formData).Result;
|
||||||
|
|
||||||
|
response.EnsureSuccessStatusCode();
|
||||||
|
|
||||||
|
var resultJson = response.Content.ReadAsStringAsync().Result;
|
||||||
|
var result = JsonConvert.DeserializeObject<PublishJobResult>(resultJson);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -141,7 +141,7 @@ namespace Disco.Services.Interop.DiscoServices
|
|||||||
|
|
||||||
var whoAmIResponse = VicEduDept.VicSmart.WhoAmI();
|
var whoAmIResponse = VicEduDept.VicSmart.WhoAmI();
|
||||||
if (whoAmIResponse != null && !string.IsNullOrWhiteSpace(whoAmIResponse.Item1))
|
if (whoAmIResponse != null && !string.IsNullOrWhiteSpace(whoAmIResponse.Item1))
|
||||||
m.BroadbandDoeWanId = whoAmIResponse.Item1;
|
m.VicEduDeptWanId = whoAmIResponse.Item1;
|
||||||
|
|
||||||
m.Stat_JobCounts = Database.Jobs.GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { K = g.Key, V = g.Count() }).ToList();
|
m.Stat_JobCounts = Database.Jobs.GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { K = g.Key, V = g.Count() }).ToList();
|
||||||
m.Stat_OpenJobCounts = Database.Jobs.Where(j => j.ClosedDate == null).GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { K = g.Key, V = g.Count() }).ToList();
|
m.Stat_OpenJobCounts = Database.Jobs.Where(j => j.ClosedDate == null).GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { K = g.Key, V = g.Count() }).ToList();
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.SignalR.Core" version="2.1.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.SignalR.Core" version="2.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin" version="2.0.1" targetFramework="net45" />
|
<package id="Microsoft.Owin" version="2.0.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Security" version="2.0.1" targetFramework="net45" />
|
<package id="Microsoft.Owin.Security" version="2.0.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.SqlServer.Compact" version="4.0.8876.1" targetFramework="net45" />
|
<package id="Microsoft.SqlServer.Compact" version="4.0.8876.1" targetFramework="net45" />
|
||||||
|
|||||||
@@ -36,6 +36,10 @@
|
|||||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -50,6 +50,14 @@
|
|||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data.Entity" />
|
<Reference Include="System.Data.Entity" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.Extensions">
|
||||||
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.Primitives">
|
||||||
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@@ -126,10 +134,15 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2014/6/1" />
|
<UserProperties BuildVersion_StartDate="2014/6/1" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
||||||
|
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||||
|
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
||||||
|
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
|
||||||
|
</Target>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net45" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="net45" />
|
||||||
<package id="WebActivatorEx" version="2.0.5" targetFramework="net45" />
|
<package id="WebActivatorEx" version="2.0.5" targetFramework="net45" />
|
||||||
|
|||||||
@@ -294,6 +294,7 @@
|
|||||||
}
|
}
|
||||||
#jobShowResources #Comments div.commentOutput > div div.comment p {
|
#jobShowResources #Comments div.commentOutput > div div.comment p {
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
|
padding-bottom: .2em;
|
||||||
}
|
}
|
||||||
#jobShowResources #Comments div.commentOutput > div:hover span.remove {
|
#jobShowResources #Comments div.commentOutput > div:hover span.remove {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
@@ -706,6 +707,88 @@
|
|||||||
width: 600px;
|
width: 600px;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
}
|
}
|
||||||
|
#publishJobAttachments {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
background-color: #ffffff;
|
||||||
|
position: relative;
|
||||||
|
max-height: 249px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
height: 48px;
|
||||||
|
width: 261px;
|
||||||
|
padding: 2px;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 0.95em;
|
||||||
|
border: 1px solid #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.comments,
|
||||||
|
#publishJobAttachments > a span.author,
|
||||||
|
#publishJobAttachments > a span.timestamp {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
width: 188px;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.author {
|
||||||
|
color: #888;
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.timestamp {
|
||||||
|
color: #888;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.icon {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
height: 48px;
|
||||||
|
width: 48px;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.icon img {
|
||||||
|
height: 48px;
|
||||||
|
width: 48px;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.icon img.loading {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a input.select {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
line-height: 48px;
|
||||||
|
margin-right: 2px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a:hover {
|
||||||
|
background-color: #ededed;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a:hover span.remove {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.remove {
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: #e51400;
|
||||||
|
margin-left: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
#publishJobAttachments > a span.remove:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
#submitDialog {
|
||||||
|
padding-top: 50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#submitDialog i {
|
||||||
|
margin-right: 10px;
|
||||||
|
color: #1e6dab;
|
||||||
|
}
|
||||||
#repairJobForm #repairDisclosedInformation table {
|
#repairJobForm #repairDisclosedInformation table {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,9 +269,10 @@
|
|||||||
clear: both;
|
clear: both;
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
|
padding-bottom: .2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,6 +501,7 @@
|
|||||||
select {
|
select {
|
||||||
min-width: 270px;
|
min-width: 270px;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
min-width: 270px;
|
min-width: 270px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@@ -735,6 +737,101 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#publishJobAttachments {
|
||||||
|
border: 1px solid @SubtleBorderColour;
|
||||||
|
background-color: @white;
|
||||||
|
position: relative;
|
||||||
|
max-height: 249px;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
& > a {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
height: 48px;
|
||||||
|
width: 261px;
|
||||||
|
padding: 2px;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 0.95em;
|
||||||
|
border: 1px solid @white;
|
||||||
|
color: @black;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
span.comments, span.author, span.timestamp {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
width: 188px;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.author {
|
||||||
|
color: #888;
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.timestamp {
|
||||||
|
color: #888;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.icon {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
height: 48px;
|
||||||
|
width: 48px;
|
||||||
|
margin-right: 2px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 48px;
|
||||||
|
width: 48px;
|
||||||
|
|
||||||
|
&.loading {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input.select {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
line-height: 48px;
|
||||||
|
margin-right: 2px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: @SubtleColour;
|
||||||
|
border: 1px solid @SubtleBorderColour;
|
||||||
|
|
||||||
|
span.remove {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span.remove {
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: @StatusRemove;
|
||||||
|
margin-left: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#submitDialog {
|
||||||
|
padding-top: 50px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
i {
|
||||||
|
margin-right: 10px;
|
||||||
|
color: @StatusInformation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#repairJobForm {
|
#repairJobForm {
|
||||||
#repairDisclosedInformation {
|
#repairDisclosedInformation {
|
||||||
table {
|
table {
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -511,7 +511,8 @@ namespace Disco.Web.Controllers
|
|||||||
JobId = m.JobId,
|
JobId = m.JobId,
|
||||||
WarrantyProviderId = m.WarrantyProviderId,
|
WarrantyProviderId = m.WarrantyProviderId,
|
||||||
OrganisationAddressId = m.OrganisationAddressId,
|
OrganisationAddressId = m.OrganisationAddressId,
|
||||||
FaultDescription = m.FaultDescription
|
FaultDescription = m.FaultDescription,
|
||||||
|
PublishAttachments = m.PublishAttachments
|
||||||
};
|
};
|
||||||
updatedModel.UpdateModel(Database, false);
|
updatedModel.UpdateModel(Database, false);
|
||||||
|
|
||||||
@@ -572,7 +573,7 @@ namespace Disco.Web.Controllers
|
|||||||
case "Submit":
|
case "Submit":
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m.Job.OnLogWarranty(Database, m.FaultDescription, m.WarrantyProvider, m.OrganisationAddress, m.TechUser, m.ProviderProperties());
|
m.Job.OnLogWarranty(Database, m.FaultDescription, m.PublishAttachments, m.WarrantyProvider, m.OrganisationAddress, m.TechUser, m.ProviderProperties());
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
return RedirectToAction(MVC.Job.Show(m.JobId));
|
return RedirectToAction(MVC.Job.Show(m.JobId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,9 @@ namespace Disco.Web
|
|||||||
private static Lazy<Regex> htmlCommentDeviceRegex = new Lazy<Regex>(() => { return new Regex(@"((?<!&)!([\w\d-_.]+[\w\d]))", RegexOptions.Compiled, TimeSpan.FromSeconds(.1)); });
|
private static Lazy<Regex> htmlCommentDeviceRegex = new Lazy<Regex>(() => { return new Regex(@"((?<!&)!([\w\d-_.]+[\w\d]))", RegexOptions.Compiled, TimeSpan.FromSeconds(.1)); });
|
||||||
private static IMarkdownOptions markdownOptions = new MarkdownOptions()
|
private static IMarkdownOptions markdownOptions = new MarkdownOptions()
|
||||||
{
|
{
|
||||||
AutoNewLines = true
|
AutoNewLines = true,
|
||||||
|
AutoHyperlink = true,
|
||||||
|
LinkEmails = true
|
||||||
};
|
};
|
||||||
public static MvcHtmlString ToHtmlComment(this string s)
|
public static MvcHtmlString ToHtmlComment(this string s)
|
||||||
{
|
{
|
||||||
@@ -180,7 +182,7 @@ namespace Disco.Web
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new MvcHtmlString(markdown);
|
return new MvcHtmlString(markdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEnumerable<SelectListItem> ToSelectListItems(this IEnumerable<string> Items, string SelectedItem = null)
|
public static IEnumerable<SelectListItem> ToSelectListItems(this IEnumerable<string> Items, string SelectedItem = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ namespace Disco.Web.Models.Job
|
|||||||
public List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
|
public List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
|
||||||
public Disco.Models.BI.Config.OrganisationAddress OrganisationAddress { get; set; }
|
public Disco.Models.BI.Config.OrganisationAddress OrganisationAddress { get; set; }
|
||||||
|
|
||||||
|
public List<Disco.Models.Repository.JobAttachment> PublishAttachments { get; set; }
|
||||||
|
|
||||||
public Disco.Models.Repository.User TechUser { get; set; }
|
public Disco.Models.Repository.User TechUser { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
@@ -28,6 +30,7 @@ namespace Disco.Web.Models.Job
|
|||||||
public string WarrantyProviderId { get; set; }
|
public string WarrantyProviderId { get; set; }
|
||||||
[Required(ErrorMessage = "A fault description is required"), DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
|
[Required(ErrorMessage = "A fault description is required"), DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
|
||||||
public string FaultDescription { get; set; }
|
public string FaultDescription { get; set; }
|
||||||
|
public List<int> PublishAttachmentIds { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string SubmissionAction { get; set; }
|
public string SubmissionAction { get; set; }
|
||||||
|
|
||||||
@@ -81,13 +84,12 @@ namespace Disco.Web.Models.Job
|
|||||||
} catch (Exception) {}
|
} catch (Exception) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Job = (from j in Database.Jobs.Include("Device.DeviceModel").Include("JobMetaWarranty").Include("JobSubTypes")
|
Job = Database.Jobs.Include("Device.DeviceModel").Include("JobMetaWarranty").Include("JobSubTypes").Include("JobAttachments")
|
||||||
where (j.Id == JobId)
|
.Where(j => j.Id == JobId)
|
||||||
select j).FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
if (Job == null)
|
if (Job == null)
|
||||||
{
|
|
||||||
throw new ArgumentException("Invalid Job Number Specified", "JobId");
|
throw new ArgumentException("Invalid Job Number Specified", "JobId");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update TechUser's Details [#12]
|
// Update TechUser's Details [#12]
|
||||||
@@ -117,6 +119,16 @@ namespace Disco.Web.Models.Job
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(FaultDescription))
|
if (!string.IsNullOrEmpty(FaultDescription))
|
||||||
FaultDescription = FaultDescription.Trim();
|
FaultDescription = FaultDescription.Trim();
|
||||||
|
|
||||||
|
if (PublishAttachmentIds == null)
|
||||||
|
{
|
||||||
|
PublishAttachmentIds = new List<int>();
|
||||||
|
PublishAttachments = new List<Disco.Models.Repository.JobAttachment>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PublishAttachments = Job.JobAttachments.Where(ja => PublishAttachmentIds.Contains(ja.Id)).ToList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,6 +111,34 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
if (!Model.IsManualProvider && Authorization.Has(Claims.Job.ShowAttachments) && Model.Job.JobAttachments.Count > 0)
|
||||||
|
{
|
||||||
|
<div class="form" style="width: 650px; margin-top: 15px;">
|
||||||
|
<h2>Send Attachments</h2>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="publishJobAttachments">
|
||||||
|
@foreach (var ja in Model.Job.JobAttachments)
|
||||||
|
{
|
||||||
|
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||||
|
<input type="checkbox" class="select" name="PublishAttachmentIds" value="@ja.Id" @(Model.PublishAttachmentIds.Contains(ja.Id) ? "checked" : null) />
|
||||||
|
<span class="icon" title="@ja.Filename">
|
||||||
|
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
||||||
|
<span class="comments" title="@ja.Comments">
|
||||||
|
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||||
|
{ @ja.DocumentTemplate.Description}
|
||||||
|
else
|
||||||
|
{ @ja.Comments }}
|
||||||
|
</span><span class="author">@ja.TechUser.ToStringFriendly()</span><span class="timestamp" data-livestamp="@(ja.Timestamp.ToUnixEpoc())" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFullDateTime()</span>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
||||||
{
|
{
|
||||||
<div id="warrantyJobProviderProperties">
|
<div id="warrantyJobProviderProperties">
|
||||||
|
|||||||
@@ -506,6 +506,247 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>
|
|||||||
|
|
||||||
|
|
||||||
#line 114 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 114 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
if (!Model.IsManualProvider && Authorization.Has(Claims.Job.ShowAttachments) && Model.Job.JobAttachments.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"form\"");
|
||||||
|
|
||||||
|
WriteLiteral(" style=\"width: 650px; margin-top: 15px;\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <h2>Send Attachments</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||||
|
" <td>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"publishJobAttachments\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 122 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 122 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
foreach (var ja in Model.Job.JobAttachments)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
|
WriteAttribute("href", Tuple.Create(" href=\"", 5195), Tuple.Create("\"", 5252)
|
||||||
|
|
||||||
|
#line 124 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 5202), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 5202), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" data-attachmentid=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 124 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(ja.Id);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(" data-mimetype=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 124 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(ja.MimeType);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <input");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"checkbox\"");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"select\"");
|
||||||
|
|
||||||
|
WriteLiteral(" name=\"PublishAttachmentIds\"");
|
||||||
|
|
||||||
|
WriteAttribute("value", Tuple.Create(" value=\"", 5409), Tuple.Create("\"", 5423)
|
||||||
|
|
||||||
|
#line 125 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 5417), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 5417), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 125 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(Model.PublishAttachmentIds.Contains(ja.Id) ? "checked" : null);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" />\r\n <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"icon\"");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 5544), Tuple.Create("\"", 5564)
|
||||||
|
|
||||||
|
#line 126 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 5552), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 5552), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
|
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||||
|
|
||||||
|
WriteAttribute("src", Tuple.Create(" src=\"", 5635), Tuple.Create("\"", 5694)
|
||||||
|
|
||||||
|
#line 127 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 5641), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 5641), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" /></span>\r\n <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"comments\"");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 5761), Tuple.Create("\"", 5781)
|
||||||
|
|
||||||
|
#line 128 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 5769), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 5769), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 129 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 129 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||||
|
{
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 130 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(ja.DocumentTemplate.Description);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 130 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 132 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(ja.Comments);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 132 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </span><span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"author\"");
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 133 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(ja.TechUser.ToStringFriendly());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</span><span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"timestamp\"");
|
||||||
|
|
||||||
|
WriteLiteral(" data-livestamp=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 133 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(ja.Timestamp.ToUnixEpoc());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 6217), Tuple.Create("\"", 6255)
|
||||||
|
|
||||||
|
#line 133 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 6225), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 6225), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 133 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(ja.Timestamp.ToFullDateTime());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</span>\r\n </a> \r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 135 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n </t" +
|
||||||
|
"able>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 141 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
}
|
||||||
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -521,7 +762,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 117 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 145 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
|
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
|
||||||
|
|
||||||
|
|
||||||
@@ -530,7 +771,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </div>\r\n");
|
WriteLiteral("\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 119 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 147 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -543,13 +784,13 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 121 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 149 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 121 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 149 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
if (Model.IsManualProvider)
|
if (Model.IsManualProvider)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -567,7 +808,7 @@ WriteLiteral(" value=\"Save Warranty Claim\"");
|
|||||||
WriteLiteral(" />\r\n");
|
WriteLiteral(" />\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 124 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 152 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -586,7 +827,7 @@ WriteLiteral(" value=\"Preview Warranty Claim\"");
|
|||||||
WriteLiteral(" />\r\n");
|
WriteLiteral(" />\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 128 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 156 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -595,7 +836,7 @@ WriteLiteral(" />\r\n");
|
|||||||
WriteLiteral(" </div>\r\n");
|
WriteLiteral(" </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 130 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 158 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@model Disco.Web.Models.Job.LogWarrantyModel
|
@model Disco.Web.Models.Job.LogWarrantyModel
|
||||||
@{
|
@{
|
||||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||||
}
|
}
|
||||||
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||||
@@ -16,32 +16,28 @@
|
|||||||
<div id="warrantyJobForm" class="form" style="width: 650px">
|
<div id="warrantyJobForm" class="form" style="width: 650px">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Internal Job Id:
|
||||||
Internal Job Id:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.JobId
|
@Model.JobId
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Device Serial Number:
|
||||||
Device Serial Number:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.Job.Device.SerialNumber
|
@Model.Job.Device.SerialNumber
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Device Model:
|
||||||
Device Model:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
|
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Technician:
|
||||||
Technician:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.TechUser.DisplayName
|
@Model.TechUser.DisplayName
|
||||||
@@ -52,8 +48,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 150px">
|
<th style="width: 150px">Warranty Address:
|
||||||
Warranty Address:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<div id="organisationAddressDetails">
|
<div id="organisationAddressDetails">
|
||||||
@@ -67,24 +62,21 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Warranty Provider:
|
||||||
Warranty Provider:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.WarrantyProvider.Name (@Model.WarrantyProvider.Id) @Model.WarrantyProvider.PluginManifest.Version.ToString(3)
|
@Model.WarrantyProvider.Name (@Model.WarrantyProvider.Id) @Model.WarrantyProvider.PluginManifest.Version.ToString(3)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Fault Description:
|
||||||
Fault Description:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.FaultDescription.ToMultilineString()
|
@Model.FaultDescription.ToMultilineString()
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Disclosed Information
|
||||||
Disclosed Information
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<div id="warrantyDisclosedInformation">
|
<div id="warrantyDisclosedInformation">
|
||||||
@@ -102,9 +94,59 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@if (Model.PublishAttachments.Count > 0)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<th>Sending Attachments</th>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<div id="publishJobAttachments">
|
||||||
|
@foreach (var ja in Model.PublishAttachments)
|
||||||
|
{
|
||||||
|
<input type="hidden" name="PublishAttachmentIds" value="@ja.Id" />
|
||||||
|
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||||
|
<span class="icon" title="@ja.Filename">
|
||||||
|
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
||||||
|
<span class="comments" title="@ja.Comments">
|
||||||
|
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||||
|
{ @ja.DocumentTemplate.Description}
|
||||||
|
else
|
||||||
|
{ @ja.Comments }}
|
||||||
|
</span><span class="author">@ja.TechUser.ToStringFriendly()</span><span class="timestamp" data-livestamp="@(ja.Timestamp.ToUnixEpoc())" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFullDateTime()</span>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="submitDialog" class="dialog" title="Please Wait">
|
||||||
|
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Submitting Warranty Job...</h4>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
var dialog = null;
|
||||||
|
|
||||||
|
$('#submitJob').closest('form').submit(function () {
|
||||||
|
if (dialog == null) {
|
||||||
|
dialog = $('#submitDialog').dialog({
|
||||||
|
width: 400,
|
||||||
|
height: 160,
|
||||||
|
resizable: false,
|
||||||
|
modal: true,
|
||||||
|
autoOpen: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.setTimeout(function () {
|
||||||
|
dialog.dialog('open');
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<div class="actionBar">
|
<div class="actionBar">
|
||||||
<input type="submit" class="button" value="Submit Warranty Claim" />
|
<input id="submitJob" type="submit" class="button" value="Submit Warranty Claim" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ namespace Disco.Web.Views.Job
|
|||||||
#line 2 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 2 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
|
||||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||||
|
|
||||||
|
|
||||||
@@ -166,39 +166,37 @@ WriteLiteral(" class=\"form\"");
|
|||||||
|
|
||||||
WriteLiteral(" style=\"width: 650px\"");
|
WriteLiteral(" style=\"width: 650px\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Internal Job Id:\r\n " +
|
||||||
"nternal Job Id:\r\n </th>\r\n <td>\r\n");
|
" </th>\r\n <td>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 23 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 22 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.JobId);
|
Write(Model.JobId);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Device Serial Number:\r\n </th>\r\n " +
|
">Device Serial Number:\r\n </th>\r\n <td>\r\n");
|
||||||
" <td>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 31 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 29 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.Job.Device.SerialNumber);
|
Write(Model.Job.Device.SerialNumber);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Device Model:\r\n </th>\r\n <td" +
|
">Device Model:\r\n </th>\r\n <td>\r\n");
|
||||||
">\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 36 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||||
|
|
||||||
|
|
||||||
@@ -207,20 +205,19 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 36 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.Job.Device.DeviceModel.Model);
|
Write(Model.Job.Device.DeviceModel.Model);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Technician:\r\n </th>\r\n <td>\r" +
|
">Technician:\r\n </th>\r\n <td>\r\n");
|
||||||
"\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 47 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 43 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.TechUser.DisplayName);
|
Write(Model.TechUser.DisplayName);
|
||||||
|
|
||||||
|
|
||||||
@@ -233,7 +230,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
|||||||
WriteLiteral(">\r\n Email Address: ");
|
WriteLiteral(">\r\n Email Address: ");
|
||||||
|
|
||||||
|
|
||||||
#line 49 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 45 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.TechUser.EmailAddress);
|
Write(Model.TechUser.EmailAddress);
|
||||||
|
|
||||||
|
|
||||||
@@ -242,7 +239,7 @@ WriteLiteral(">\r\n Email Address: ");
|
|||||||
WriteLiteral("<br />\r\n Phone Number: ");
|
WriteLiteral("<br />\r\n Phone Number: ");
|
||||||
|
|
||||||
|
|
||||||
#line 50 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 46 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.TechUser.PhoneNumber);
|
Write(Model.TechUser.PhoneNumber);
|
||||||
|
|
||||||
|
|
||||||
@@ -253,8 +250,8 @@ WriteLiteral("\r\n </div>\r\n </td>\r\n
|
|||||||
|
|
||||||
WriteLiteral(" style=\"width: 150px\"");
|
WriteLiteral(" style=\"width: 150px\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n Warranty Address:\r\n </th>\r\n " +
|
WriteLiteral(">Warranty Address:\r\n </th>\r\n <td>\r\n " +
|
||||||
"<td>\r\n <div");
|
" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"organisationAddressDetails\"");
|
WriteLiteral(" id=\"organisationAddressDetails\"");
|
||||||
|
|
||||||
@@ -263,7 +260,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 60 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 55 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.OrganisationAddress.Name);
|
Write(Model.OrganisationAddress.Name);
|
||||||
|
|
||||||
|
|
||||||
@@ -276,7 +273,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
|||||||
WriteLiteral(">\r\n <span>");
|
WriteLiteral(">\r\n <span>");
|
||||||
|
|
||||||
|
|
||||||
#line 62 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 57 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.OrganisationAddress.Address);
|
Write(Model.OrganisationAddress.Address);
|
||||||
|
|
||||||
|
|
||||||
@@ -285,7 +282,7 @@ WriteLiteral(">\r\n <span>");
|
|||||||
WriteLiteral("</span><br />\r\n <span>");
|
WriteLiteral("</span><br />\r\n <span>");
|
||||||
|
|
||||||
|
|
||||||
#line 63 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 58 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.OrganisationAddress.Suburb);
|
Write(Model.OrganisationAddress.Suburb);
|
||||||
|
|
||||||
|
|
||||||
@@ -294,7 +291,7 @@ WriteLiteral("</span><br />\r\n <span>");
|
|||||||
WriteLiteral(", ");
|
WriteLiteral(", ");
|
||||||
|
|
||||||
|
|
||||||
#line 63 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 58 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.OrganisationAddress.Postcode);
|
Write(Model.OrganisationAddress.Postcode);
|
||||||
|
|
||||||
|
|
||||||
@@ -303,7 +300,7 @@ WriteLiteral(", ");
|
|||||||
WriteLiteral("</span><br />\r\n <span>");
|
WriteLiteral("</span><br />\r\n <span>");
|
||||||
|
|
||||||
|
|
||||||
#line 64 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 59 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.OrganisationAddress.State);
|
Write(Model.OrganisationAddress.State);
|
||||||
|
|
||||||
|
|
||||||
@@ -312,20 +309,20 @@ WriteLiteral("</span><br />\r\n <span>");
|
|||||||
WriteLiteral(", ");
|
WriteLiteral(", ");
|
||||||
|
|
||||||
|
|
||||||
#line 64 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 59 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.OrganisationAddress.Country);
|
Write(Model.OrganisationAddress.Country);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("</span>\r\n </div>\r\n </div>\r\n " +
|
WriteLiteral("</span>\r\n </div>\r\n </div>\r\n " +
|
||||||
" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
" </td>\r\n </tr>\r\n <tr>\r\n <th>Warranty Pro" +
|
||||||
" Warranty Provider:\r\n </th>\r\n <td>\r\n");
|
"vider:\r\n </th>\r\n <td>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 74 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 68 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.WarrantyProvider.Name);
|
Write(Model.WarrantyProvider.Name);
|
||||||
|
|
||||||
|
|
||||||
@@ -334,7 +331,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral(" (");
|
WriteLiteral(" (");
|
||||||
|
|
||||||
|
|
||||||
#line 74 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 68 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.WarrantyProvider.Id);
|
Write(Model.WarrantyProvider.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -343,41 +340,40 @@ WriteLiteral(" (");
|
|||||||
WriteLiteral(") ");
|
WriteLiteral(") ");
|
||||||
|
|
||||||
|
|
||||||
#line 74 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 68 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
|
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Fault Description:\r\n </th>\r\n " +
|
">Fault Description:\r\n </th>\r\n <td>\r\n");
|
||||||
" <td>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 82 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 75 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(Model.FaultDescription.ToMultilineString());
|
Write(Model.FaultDescription.ToMultilineString());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Disclosed Information\r\n </th>\r\n " +
|
">Disclosed Information\r\n </th>\r\n <td>\r\n " +
|
||||||
" <td>\r\n <div");
|
" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"warrantyDisclosedInformation\"");
|
WriteLiteral(" id=\"warrantyDisclosedInformation\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n <table>\r\n");
|
WriteLiteral(">\r\n <table>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 92 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 84 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 92 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 84 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
foreach (var dp in Model.DiscloseProperties)
|
foreach (var dp in Model.DiscloseProperties)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -387,7 +383,7 @@ WriteLiteral(">\r\n <table>\r\n");
|
|||||||
WriteLiteral(" <tr>\r\n <th>");
|
WriteLiteral(" <tr>\r\n <th>");
|
||||||
|
|
||||||
|
|
||||||
#line 95 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 87 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(dp.Key);
|
Write(dp.Key);
|
||||||
|
|
||||||
|
|
||||||
@@ -397,7 +393,7 @@ WriteLiteral(":\r\n </th>\r\n
|
|||||||
" <td>");
|
" <td>");
|
||||||
|
|
||||||
|
|
||||||
#line 97 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 89 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
Write(dp.Value);
|
Write(dp.Value);
|
||||||
|
|
||||||
|
|
||||||
@@ -407,14 +403,294 @@ WriteLiteral("\r\n </td>\r\n
|
|||||||
"> \r\n");
|
"> \r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 100 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 92 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" </table>\r\n </div>\r\n </t" +
|
WriteLiteral(" </table>\r\n </div>\r\n </t" +
|
||||||
"d>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
"d>\r\n </tr>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 97 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 97 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
if (Model.PublishAttachments.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <tr>\r\n <th>Sending Attachments</th>\r\n " +
|
||||||
|
" <td>\r\n <div>\r\n <div" +
|
||||||
|
"");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"publishJobAttachments\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 104 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 104 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
foreach (var ja in Model.PublishAttachments)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <input");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"hidden\"");
|
||||||
|
|
||||||
|
WriteLiteral(" name=\"PublishAttachmentIds\"");
|
||||||
|
|
||||||
|
WriteAttribute("value", Tuple.Create(" value=\"", 4138), Tuple.Create("\"", 4152)
|
||||||
|
|
||||||
|
#line 106 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 4146), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 4146), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" />\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
|
WriteAttribute("href", Tuple.Create(" href=\"", 4196), Tuple.Create("\"", 4253)
|
||||||
|
|
||||||
|
#line 107 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 4203), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 4203), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" data-attachmentid=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 107 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
Write(ja.Id);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(" data-mimetype=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 107 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
Write(ja.MimeType);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"icon\"");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 4371), Tuple.Create("\"", 4391)
|
||||||
|
|
||||||
|
#line 108 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 4379), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 4379), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
|
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||||
|
|
||||||
|
WriteAttribute("src", Tuple.Create(" src=\"", 4470), Tuple.Create("\"", 4529)
|
||||||
|
|
||||||
|
#line 109 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 4476), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 4476), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" /></span>\r\n <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"comments\"");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 4604), Tuple.Create("\"", 4624)
|
||||||
|
|
||||||
|
#line 110 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 4612), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 4612), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 111 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 111 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||||
|
{
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 112 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
Write(ja.DocumentTemplate.Description);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 112 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 114 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
Write(ja.Comments);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 114 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </span><span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"author\"");
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 115 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
Write(ja.TechUser.ToStringFriendly());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</span><span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"timestamp\"");
|
||||||
|
|
||||||
|
WriteLiteral(" data-livestamp=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 115 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
Write(ja.Timestamp.ToUnixEpoc());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteAttribute("title", Tuple.Create(" title=\"", 5100), Tuple.Create("\"", 5138)
|
||||||
|
|
||||||
|
#line 115 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 5108), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 5108), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 115 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
Write(ja.Timestamp.ToFullDateTime());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</span>\r\n </a> \r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 117 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </div>\r\n </div>\r\n " +
|
||||||
|
" </td>\r\n </tr>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 122 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </table>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"submitDialog\"");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"dialog\"");
|
||||||
|
|
||||||
|
WriteLiteral(" title=\"Please Wait\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <h4><i");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"fa fa-lg fa-cog fa-spin\"");
|
||||||
|
|
||||||
|
WriteLiteral(" title=\"Please Wait\"");
|
||||||
|
|
||||||
|
WriteLiteral("></i>Submitting Warranty Job...</h4>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(@" <script>
|
||||||
|
$(function () {
|
||||||
|
var dialog = null;
|
||||||
|
|
||||||
|
$('#submitJob').closest('form').submit(function () {
|
||||||
|
if (dialog == null) {
|
||||||
|
dialog = $('#submitDialog').dialog({
|
||||||
|
width: 400,
|
||||||
|
height: 160,
|
||||||
|
resizable: false,
|
||||||
|
modal: true,
|
||||||
|
autoOpen: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.setTimeout(function () {
|
||||||
|
dialog.dialog('open');
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
");
|
||||||
|
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
@@ -422,6 +698,8 @@ WriteLiteral(" class=\"actionBar\"");
|
|||||||
|
|
||||||
WriteLiteral(">\r\n <input");
|
WriteLiteral(">\r\n <input");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"submitJob\"");
|
||||||
|
|
||||||
WriteLiteral(" type=\"submit\"");
|
WriteLiteral(" type=\"submit\"");
|
||||||
|
|
||||||
WriteLiteral(" class=\"button\"");
|
WriteLiteral(" class=\"button\"");
|
||||||
@@ -431,7 +709,7 @@ WriteLiteral(" value=\"Submit Warranty Claim\"");
|
|||||||
WriteLiteral(" />\r\n </div>\r\n");
|
WriteLiteral(" />\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 110 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
#line 152 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
Reference in New Issue
Block a user