refactor job logs/comments [#145]
This commit is contained in:
1 parent
b56e82d5c4
commit
092c6249ee
14 files changed
+537
-600
No files matched your search
@@ -1,10 +1,18 @@
|
||||
using System.Web.Mvc;
|
||||
using System.Net;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Services.Web
|
||||
{
|
||||
[HandleError]
|
||||
public class BaseController : Controller
|
||||
{
|
||||
protected static HttpStatusCodeResult Ok(string message = null)
|
||||
=> StatusCode(HttpStatusCode.OK, message);
|
||||
|
||||
protected static HttpStatusCodeResult BadRequest(string message = null)
|
||||
=> StatusCode(HttpStatusCode.BadRequest, message);
|
||||
|
||||
protected static HttpStatusCodeResult StatusCode(HttpStatusCode statusCode, string message = null)
|
||||
=> new HttpStatusCodeResult(statusCode, message);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ using Disco.Web.Extensions;
|
||||
using Disco.Web.Models.Job;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -78,7 +79,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult Update(int id, string key, string value = null, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -311,79 +312,79 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Update Shortcut Methods
|
||||
[DiscoAuthorize(Claims.Job.Properties.ExpectedClosedDate)]
|
||||
public virtual ActionResult UpdateExpectedClosedDate(int id, string ExpectedClosedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateExpectedClosedDate(int id, string ExpectedClosedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pExpectedClosedDate, ExpectedClosedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.DeviceHeldLocation)]
|
||||
public virtual ActionResult UpdateDeviceHeldLocation(int id, string DeviceHeldLocation, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateDeviceHeldLocation(int id, string DeviceHeldLocation, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pDeviceHeldLocation, DeviceHeldLocation, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.Flags)]
|
||||
public virtual ActionResult UpdateFlags(int id, string Flags, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateFlags(int id, string Flags, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pFlags, Flags, redirect);
|
||||
}
|
||||
|
||||
#region NonWarranty
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.AccountingChargeRequired)]
|
||||
public virtual ActionResult UpdateNonWarrantyAccountingChargeRequired(int id, string AccountingChargeRequiredDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyAccountingChargeRequired(int id, string AccountingChargeRequiredDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyAccountingChargeRequired, AccountingChargeRequiredDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.AccountingChargeAdded)]
|
||||
public virtual ActionResult UpdateNonWarrantyAccountingChargeAdded(int id, string AccountingChargeAddedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyAccountingChargeAdded(int id, string AccountingChargeAddedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyAccountingChargeAdded, AccountingChargeAddedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.AccountingChargePaid)]
|
||||
public virtual ActionResult UpdateNonWarrantyAccountingChargePaid(int id, string AccountingChargePaidDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyAccountingChargePaid(int id, string AccountingChargePaidDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyAccountingChargePaid, AccountingChargePaidDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderRaised)]
|
||||
public virtual ActionResult UpdateNonWarrantyPurchaseOrderRaised(int id, string PurchaseOrderRaisedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyPurchaseOrderRaised(int id, string PurchaseOrderRaisedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyPurchaseOrderRaised, PurchaseOrderRaisedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderReference)]
|
||||
public virtual ActionResult UpdateNonWarrantyPurchaseOrderReference(int id, string PurchaseOrderReference, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyPurchaseOrderReference(int id, string PurchaseOrderReference, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyPurchaseOrderReference, PurchaseOrderReference, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderSent)]
|
||||
public virtual ActionResult UpdateNonWarrantyPurchaseOrderSent(int id, string PurchaseOrderSentDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyPurchaseOrderSent(int id, string PurchaseOrderSentDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyPurchaseOrderSent, PurchaseOrderSentDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InvoiceReceived)]
|
||||
public virtual ActionResult UpdateNonWarrantyInvoiceReceived(int id, string InvoiceReceivedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyInvoiceReceived(int id, string InvoiceReceivedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyInvoiceReceived, InvoiceReceivedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.RepairerName)]
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerName(int id, string RepairerName, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerName(int id, string RepairerName, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyRepairerName, RepairerName, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.RepairerLoggedDate)]
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerLoggedDate(int id, string RepairerLoggedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerLoggedDate(int id, string RepairerLoggedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyRepairerLoggedDate, RepairerLoggedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.RepairerReference)]
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerReference(int id, string RepairerReference, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerReference(int id, string RepairerReference, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyRepairerReference, RepairerReference, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.RepairerCompletedDate)]
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerCompletedDate(int id, string RepairerCompletedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyRepairerCompletedDate(int id, string RepairerCompletedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyRepairerCompletedDate, RepairerCompletedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.IsInsuranceClaim)]
|
||||
public virtual ActionResult UpdateNonWarrantyIsInsuranceClaim(int id, bool IsInsuranceClaim, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateNonWarrantyIsInsuranceClaim(int id, bool IsInsuranceClaim, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pNonWarrantyIsInsuranceClaim, IsInsuranceClaim.ToString(), redirect);
|
||||
}
|
||||
@@ -392,92 +393,92 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
#region Insurance
|
||||
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceLossOrDamageDate(int id, string LossOrDamageDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceLossOrDamageDate(int id, string LossOrDamageDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceLossOrDamageDate, LossOrDamageDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceEventLocation(int id, string EventLocation, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceEventLocation(int id, string EventLocation, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceEventLocation, EventLocation, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceDescription(int id, string Description, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceDescription(int id, string Description, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceDescription, Description, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceThirdPartyCaused(int id, string ThirdPartyCaused, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceThirdPartyCaused(int id, string ThirdPartyCaused, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceThirdPartyCaused, ThirdPartyCaused, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceThirdPartyCausedName(int id, string ThirdPartyCausedName, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceThirdPartyCausedName(int id, string ThirdPartyCausedName, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceThirdPartyCausedName, ThirdPartyCausedName, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceThirdPartyCausedWhy(int id, string ThirdPartyCausedWhy, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceThirdPartyCausedWhy(int id, string ThirdPartyCausedWhy, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceThirdPartyCausedWhy, ThirdPartyCausedWhy, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceWitnessesNamesAddresses(int id, string WitnessesNamesAddresses, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceWitnessesNamesAddresses(int id, string WitnessesNamesAddresses, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceWitnessesNamesAddresses, WitnessesNamesAddresses, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceBurglaryTheftMethodOfEntry(int id, string BurglaryTheftMethodOfEntry, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceBurglaryTheftMethodOfEntry(int id, string BurglaryTheftMethodOfEntry, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceBurglaryTheftMethodOfEntry, BurglaryTheftMethodOfEntry, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsurancePropertyLastSeenDate(int id, string PropertyLastSeenDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsurancePropertyLastSeenDate(int id, string PropertyLastSeenDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsurancePropertyLastSeenDate, PropertyLastSeenDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsurancePoliceNotified(int id, string PoliceNotified, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsurancePoliceNotified(int id, string PoliceNotified, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsurancePoliceNotified, PoliceNotified, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsurancePoliceNotifiedStation(int id, string PoliceNotifiedStation, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsurancePoliceNotifiedStation(int id, string PoliceNotifiedStation, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsurancePoliceNotifiedStation, PoliceNotifiedStation, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsurancePoliceNotifiedDate(int id, string PoliceNotifiedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsurancePoliceNotifiedDate(int id, string PoliceNotifiedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsurancePoliceNotifiedDate, PoliceNotifiedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsurancePoliceNotifiedCrimeReportNo(int id, string PoliceNotifiedCrimeReportNo, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsurancePoliceNotifiedCrimeReportNo(int id, string PoliceNotifiedCrimeReportNo, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsurancePoliceNotifiedCrimeReportNo, PoliceNotifiedCrimeReportNo, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceRecoverReduceAction(int id, string RecoverReduceAction, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceRecoverReduceAction(int id, string RecoverReduceAction, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceRecoverReduceAction, RecoverReduceAction, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceOtherInterestedParties(int id, string OtherInterestedParties, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceOtherInterestedParties(int id, string OtherInterestedParties, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceOtherInterestedParties, OtherInterestedParties, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails)]
|
||||
public virtual ActionResult UpdateInsuranceDateOfPurchase(int id, string DateOfPurchase, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceDateOfPurchase(int id, string DateOfPurchase, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceDateOfPurchase, DateOfPurchase, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent)]
|
||||
public virtual ActionResult UpdateInsuranceClaimFormSentDate(int id, string ClaimFormSentDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceClaimFormSentDate(int id, string ClaimFormSentDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceClaimFormSentDate, ClaimFormSentDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent)]
|
||||
public virtual ActionResult UpdateInsuranceClaimFormSentUserId(int id, string ClaimFormSentUserId, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateInsuranceClaimFormSentUserId(int id, string ClaimFormSentUserId, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pInsuranceClaimFormSentUserId, ClaimFormSentUserId, redirect);
|
||||
}
|
||||
@@ -486,22 +487,22 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Warranty
|
||||
[DiscoAuthorize(Claims.Job.Properties.WarrantyProperties.ExternalName)]
|
||||
public virtual ActionResult UpdateWarrantyExternalName(int id, string ExternalName, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateWarrantyExternalName(int id, string ExternalName, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pWarrantyExternalName, ExternalName, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate)]
|
||||
public virtual ActionResult UpdateWarrantyExternalLoggedDate(int id, string ExternalLoggedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateWarrantyExternalLoggedDate(int id, string ExternalLoggedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pWarrantyExternalLoggedDate, ExternalLoggedDate, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.WarrantyProperties.ExternalReference)]
|
||||
public virtual ActionResult UpdateWarrantyExternalReference(int id, string ExternalReference, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateWarrantyExternalReference(int id, string ExternalReference, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pWarrantyExternalReference, ExternalReference, redirect);
|
||||
}
|
||||
[DiscoAuthorize(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate)]
|
||||
public virtual ActionResult UpdateWarrantyExternalCompletedDate(int id, string ExternalCompletedDate, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateWarrantyExternalCompletedDate(int id, string ExternalCompletedDate, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pWarrantyExternalCompletedDate, ExternalCompletedDate, redirect);
|
||||
}
|
||||
@@ -598,7 +599,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
if (!job.Flags.HasValue || (long)job.Flags.Value != flags)
|
||||
{
|
||||
job.Flags = (Disco.Models.Repository.Job.UserManagementFlags)flags;
|
||||
job.Flags = (Job.UserManagementFlags)flags;
|
||||
Database.SaveChanges();
|
||||
}
|
||||
}
|
||||
@@ -623,7 +624,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
job.JobMetaNonWarranty.IsInsuranceClaim = bIsInsuranceClaim;
|
||||
if (job.JobMetaInsurance == null)
|
||||
{
|
||||
var jmi = new Disco.Models.Repository.JobMetaInsurance();
|
||||
var jmi = new JobMetaInsurance();
|
||||
jmi.JobId = job.Id;
|
||||
|
||||
if (job.Device.DeviceBatch != null)
|
||||
@@ -1444,7 +1445,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
#region Job Actions
|
||||
|
||||
[DiscoAuthorize(Claims.Job.Actions.UpdateSubTypes)]
|
||||
public virtual ActionResult UpdateSubTypes(int id, List<string> SubTypes = null, Nullable<bool> AddComponents = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateSubTypes(int id, List<string> SubTypes = null, bool? AddComponents = null, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1480,7 +1481,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Job.Properties.Flags)]
|
||||
public virtual ActionResult UpdateFlag(int id, long? Flag, string Reason, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateFlag(int id, long? Flag, string Reason, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1502,7 +1503,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{ // Remove Flag
|
||||
if (flagStatus.Item2)
|
||||
{
|
||||
job.Flags = (Disco.Models.Repository.Job.UserManagementFlags)((long)(job.Flags ?? 0) ^ (flag * -1));
|
||||
job.Flags = (Job.UserManagementFlags)((long)(job.Flags ?? 0) ^ (flag * -1));
|
||||
Database.SaveChanges();
|
||||
}
|
||||
}
|
||||
@@ -1510,7 +1511,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{ // Add Flag
|
||||
if (!flagStatus.Item2)
|
||||
{
|
||||
job.Flags = (Disco.Models.Repository.Job.UserManagementFlags)((long)(job.Flags ?? 0) | flag);
|
||||
job.Flags = (Job.UserManagementFlags)((long)(job.Flags ?? 0) | flag);
|
||||
}
|
||||
// Write Reason
|
||||
JobLog jobLog = new JobLog()
|
||||
@@ -1546,7 +1547,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Job.Properties.WaitingForUserAction)]
|
||||
public virtual ActionResult WaitingForUserAction(int id, string Reason, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult WaitingForUserAction(int id, string Reason, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1577,7 +1578,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Job.Properties.NotWaitingForUserAction)]
|
||||
public virtual ActionResult NotWaitingForUserAction(int id, string Resolution, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult NotWaitingForUserAction(int id, string Resolution, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1681,7 +1682,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Job.Actions.ForceClose)]
|
||||
public virtual ActionResult ForceClose(int id, string Reason, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult ForceClose(int id, string Reason, bool? redirect = null)
|
||||
{
|
||||
var j = Database.Jobs.Find(id);
|
||||
Database.Configuration.LazyLoadingEnabled = true;
|
||||
@@ -1810,7 +1811,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Job Comments
|
||||
|
||||
[HttpPost, ValidateAntiForgeryToken, DiscoAuthorize(Claims.Job.Actions.Create)]
|
||||
[DiscoAuthorize(Claims.Job.Actions.Create)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult InitialComments(CreateModel m)
|
||||
{
|
||||
m.UpdateModel(Database, Authorization);
|
||||
@@ -1819,39 +1821,49 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Job.ShowLogs)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult Comments(int id)
|
||||
{
|
||||
var j = Database.Jobs.Include("JobLogs.TechUser").Where(m => m.Id == id).FirstOrDefault();
|
||||
if (j != null)
|
||||
{
|
||||
var c = new Models.Job.CommentsModel() { Result = "OK" };
|
||||
c.Comments = j.JobLogs.OrderByDescending(m => m.Timestamp).Select(jl => Models.Job._CommentModel.FromJobLog(jl)).ToList();
|
||||
var job = Database.Jobs
|
||||
.Include(j => j.JobLogs.Select(l => l.TechUser))
|
||||
.Where(j => j.Id == id).FirstOrDefault();
|
||||
if (job == null)
|
||||
return BadRequest("Invalid Job Number");
|
||||
|
||||
var results = job.JobLogs.OrderByDescending(m => m.Timestamp).Select(jl => Models.Shared.CommentModel.FromJobLog(jl)).ToList();
|
||||
return Json(results);
|
||||
|
||||
return Json(c, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
return Json(new Models.Job.CommentsModel() { Result = "Invalid Job Number" }, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Job.ShowLogs)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult Comment(int id)
|
||||
{
|
||||
var jl = Database.JobLogs.Include("TechUser").FirstOrDefault(l => l.Id == id);
|
||||
if (jl != null)
|
||||
{
|
||||
var c = Models.Job._CommentModel.FromJobLog(jl);
|
||||
var jobLog = Database.JobLogs
|
||||
.Include(l => l.TechUser)
|
||||
.FirstOrDefault(l => l.Id == id);
|
||||
|
||||
return Json(c, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
return Json(new Models.Job.CommentsModel() { Result = "Invalid Comment Id" }, JsonRequestBehavior.AllowGet);
|
||||
if (jobLog == null)
|
||||
return BadRequest("Invalid JobLog Id");
|
||||
|
||||
var c = Models.Shared.CommentModel.FromJobLog(jobLog);
|
||||
return Json(c);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Job.Actions.AddLogs)]
|
||||
public virtual ActionResult CommentPost(int id, string comment)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult CommentAdd(int id, string comment = null)
|
||||
{
|
||||
var j = Database.Jobs.Find(id);
|
||||
if (j != null)
|
||||
if (string.IsNullOrWhiteSpace(comment))
|
||||
return BadRequest("Comment is required");
|
||||
|
||||
var job = Database.Jobs.Find(id);
|
||||
if (job == null)
|
||||
return BadRequest("Invalid Job Number");
|
||||
|
||||
var jl = new JobLog()
|
||||
{
|
||||
var jl = new Disco.Models.Repository.JobLog()
|
||||
{
|
||||
JobId = j.Id,
|
||||
JobId = job.Id,
|
||||
TechUserId = CurrentUser.UserId,
|
||||
Timestamp = DateTime.Now,
|
||||
Comments = comment
|
||||
@@ -1859,29 +1871,26 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
Database.JobLogs.Add(jl);
|
||||
Database.SaveChanges();
|
||||
|
||||
jl = Database.JobLogs.Include("TechUser").Where(m => m.Id == jl.Id).FirstOrDefault();
|
||||
return Json(new Models.Job.CommentPostModel() { Result = "OK", Comment = Models.Job._CommentModel.FromJobLog(jl) }, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
return Json(new Models.Job.CommentPostModel() { Result = "Invalid Job Number" }, JsonRequestBehavior.AllowGet);
|
||||
return Json(jl.Id);
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAny(Claims.Job.Actions.RemoveAnyLogs, Claims.Job.Actions.RemoveOwnLogs)]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public virtual ActionResult CommentRemove(int id)
|
||||
{
|
||||
var jl = Database.JobLogs.Find(id);
|
||||
if (jl != null)
|
||||
var jobLog = Database.JobLogs.Find(id);
|
||||
if (jobLog != null)
|
||||
{
|
||||
if (jl.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase))
|
||||
if (jobLog.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase))
|
||||
Authorization.RequireAny(Claims.Job.Actions.RemoveAnyLogs, Claims.Job.Actions.RemoveOwnLogs);
|
||||
else
|
||||
Authorization.Require(Claims.Job.Actions.RemoveAnyLogs);
|
||||
|
||||
Database.JobLogs.Remove(jl);
|
||||
Database.JobLogs.Remove(jobLog);
|
||||
Database.SaveChanges();
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
// Doesn't Exist/Already Deleted - OK
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
return Ok();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -2066,7 +2075,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
Cost = Cost.Substring(Cost.IndexOf("$") + 1);
|
||||
decimal.TryParse(Cost, out cost);
|
||||
|
||||
var jc = new Disco.Models.Repository.JobComponent()
|
||||
var jc = new JobComponent()
|
||||
{
|
||||
JobId = j.Id,
|
||||
Description = Description,
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Disco.Web.Areas.API.Models.Job
|
||||
{
|
||||
public class CommentPostModel
|
||||
{
|
||||
public string Result { get; set; }
|
||||
public _CommentModel Comment { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.API.Models.Job
|
||||
{
|
||||
public class CommentsModel
|
||||
{
|
||||
public string Result { get; set; }
|
||||
public List<_CommentModel> Comments { get; set; }
|
||||
}
|
||||
}
|
||||
+12
-9
@@ -1,25 +1,28 @@
|
||||
using System;
|
||||
using Disco.Models.Repository;
|
||||
using System;
|
||||
|
||||
namespace Disco.Web.Areas.API.Models.Job
|
||||
namespace Disco.Web.Areas.API.Models.Shared
|
||||
{
|
||||
public class _CommentModel
|
||||
public class CommentModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int JobId { get; set; }
|
||||
public AttachmentTypes TargetType { get; set; }
|
||||
public string TargetId { get; set; }
|
||||
public string AuthorId { get; set; }
|
||||
public string Author { get; set; }
|
||||
public DateTime Timestamp { get; set; }
|
||||
public string Comments { get; set; }
|
||||
public string HtmlComments { get; set; }
|
||||
public long TimestampUnixEpoc { get { return this.Timestamp.ToUnixEpoc(); } }
|
||||
public string TimestampFull { get { return Timestamp.ToFullDateTime(); } }
|
||||
public long TimestampUnixEpoc => Timestamp.ToUnixEpoc();
|
||||
public string TimestampFull => Timestamp.ToFullDateTime();
|
||||
|
||||
public static _CommentModel FromJobLog(Disco.Models.Repository.JobLog jl)
|
||||
public static CommentModel FromJobLog(JobLog jl)
|
||||
{
|
||||
return new _CommentModel
|
||||
return new CommentModel
|
||||
{
|
||||
Id = jl.Id,
|
||||
JobId = jl.JobId,
|
||||
TargetType = AttachmentTypes.Job,
|
||||
TargetId = jl.JobId.ToString(),
|
||||
AuthorId = jl.TechUserId,
|
||||
Author = jl.TechUser.ToString(),
|
||||
Timestamp = jl.Timestamp,
|
||||
@@ -4999,9 +4999,14 @@ table th {
|
||||
table.none {
|
||||
border: none !important;
|
||||
}
|
||||
table.none tr,
|
||||
table.none td,
|
||||
table.none th {
|
||||
table.none > tr > td,
|
||||
table.none > thead > tr > td,
|
||||
table.none > tbody > tr > td,
|
||||
table.none > tfoot > tr > td,
|
||||
table.none > tr > th,
|
||||
table.none > thead > tr > th,
|
||||
table.none > tbody > tr > th,
|
||||
table.none > tfoot > tr > th {
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
background: none !important;
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:1
|
||||
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
|
||||
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
||||
*/
|
||||
@font-face{font-family:'FontAwesome';src:url('/ClientSource/Style/FontAwesome/fontawesome-webfont.eot?v=4.7.0');src:url('/ClientSource/Style/FontAwesome/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal;}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%;}.fa-2x{font-size:2em;}.fa-3x{font-size:3em;}.fa-4x{font-size:4em;}.fa-5x{font-size:5em;}.fa-fw{width:1.28571429em;text-align:center;}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none;}.fa-ul>li{position:relative;}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center;}.fa-li.fa-lg{left:-1.85714286em;}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em;}.fa-pull-left{float:left;}.fa-pull-right{float:right;}.fa.fa-pull-left{margin-right:.3em;}.fa.fa-pull-right{margin-left:.3em;}.pull-right{float:right;}.pull-left{float:left;}.fa.pull-left{margin-right:.3em;}.fa.pull-right{margin-left:.3em;}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear;}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8);}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg);}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg);}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg);}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1);}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1);}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none;}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle;}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center;}.fa-stack-1x{line-height:inherit;}.fa-stack-2x{font-size:2em;}.fa-inverse{color:#fff;}.fa-glass:before{content:"";}.fa-music:before{content:"";}.fa-search:before{content:"";}.fa-envelope-o:before{content:"";}.fa-heart:before{content:"";}.fa-star:before{content:"";}.fa-star-o:before{content:"";}.fa-user:before{content:"";}.fa-film:before{content:"";}.fa-th-large:before{content:"";}.fa-th:before{content:"";}.fa-th-list:before{content:"";}.fa-check:before{content:"";}.fa-remove:before,.fa-close:before,.fa-times:before{content:"";}.fa-search-plus:before{content:"";}.fa-search-minus:before{content:"";}.fa-power-off:before{content:"";}.fa-signal:before{content:"";}.fa-gear:before,.fa-cog:before{content:"";}.fa-trash-o:before{content:"";}.fa-home:before{content:"";}.fa-file-o:before{content:"";}.fa-clock-o:before{content:"";}.fa-road:before{content:"";}.fa-download:before{content:"";}.fa-arrow-circle-o-down:before{content:"";}.fa-arrow-circle-o-up:before{content:"";}.fa-inbox:before{content:"";}.fa-play-circle-o:before{content:"";}.fa-rotate-right:before,.fa-repeat:before{content:"";}.fa-refresh:before{content:"";}.fa-list-alt:before{content:"";}.fa-lock:before{content:"";}.fa-flag:before{content:"";}.fa-headphones:before{content:"";}.fa-volume-off:before{content:"";}.fa-volume-down:before{content:"";}.fa-volume-up:before{content:"";}.fa-qrcode:before{content:"";}.fa-barcode:before{content:"";}.fa-tag:before{content:"";}.fa-tags:before{content:"";}.fa-book:before{content:"";}.fa-bookmark:before{content:"";}.fa-print:before{content:"";}.fa-camera:before{content:"";}.fa-font:before{content:"";}.fa-bold:before{contLine truncated
|
||||
@font-face{font-family:'FontAwesome';src:url('/ClientSource/Style/FontAwesome/fontawesome-webfont.eot?v=4.7.0');src:url('/ClientSource/Style/FontAwesome/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('/ClientSource/Style/FontAwesome/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal;}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%;}.fa-2x{font-size:2em;}.fa-3x{font-size:3em;}.fa-4x{font-size:4em;}.fa-5x{font-size:5em;}.fa-fw{width:1.28571429em;text-align:center;}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none;}.fa-ul>li{position:relative;}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center;}.fa-li.fa-lg{left:-1.85714286em;}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em;}.fa-pull-left{float:left;}.fa-pull-right{float:right;}.fa.fa-pull-left{margin-right:.3em;}.fa.fa-pull-right{margin-left:.3em;}.pull-right{float:right;}.pull-left{float:left;}.fa.pull-left{margin-right:.3em;}.fa.pull-right{margin-left:.3em;}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear;}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8);}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg);}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg);}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg);}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1);}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1);}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none;}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle;}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center;}.fa-stack-1x{line-height:inherit;}.fa-stack-2x{font-size:2em;}.fa-inverse{color:#fff;}.fa-glass:before{content:"";}.fa-music:before{content:"";}.fa-search:before{content:"";}.fa-envelope-o:before{content:"";}.fa-heart:before{content:"";}.fa-star:before{content:"";}.fa-star-o:before{content:"";}.fa-user:before{content:"";}.fa-film:before{content:"";}.fa-th-large:before{content:"";}.fa-th:before{content:"";}.fa-th-list:before{content:"";}.fa-check:before{content:"";}.fa-remove:before,.fa-close:before,.fa-times:before{content:"";}.fa-search-plus:before{content:"";}.fa-search-minus:before{content:"";}.fa-power-off:before{content:"";}.fa-signal:before{content:"";}.fa-gear:before,.fa-cog:before{content:"";}.fa-trash-o:before{content:"";}.fa-home:before{content:"";}.fa-file-o:before{content:"";}.fa-clock-o:before{content:"";}.fa-road:before{content:"";}.fa-download:before{content:"";}.fa-arrow-circle-o-down:before{content:"";}.fa-arrow-circle-o-up:before{content:"";}.fa-inbox:before{content:"";}.fa-play-circle-o:before{content:"";}.fa-rotate-right:before,.fa-repeat:before{content:"";}.fa-refresh:before{content:"";}.fa-list-alt:before{content:"";}.fa-lock:before{content:"";}.fa-flag:before{content:"";}.fa-headphones:before{content:"";}.fa-volume-off:before{content:"";}.fa-volume-down:before{content:"";}.fa-volume-up:before{content:"";}.fa-qrcode:before{content:"";}.fa-barcode:before{content:"";}.fa-tag:before{content:"";}.fa-tags:before{content:"";}.fa-book:before{content:"";}.fa-bookmark:before{content:"";}.fa-print:before{content:"";}.fa-camera:before{content:"";}.fa-font:before{content:"";}.fa-bold:before{contLine truncated
|
||||
@@ -567,9 +567,14 @@ table th {
|
||||
table.none {
|
||||
border: none !important;
|
||||
}
|
||||
table.none tr,
|
||||
table.none td,
|
||||
table.none th {
|
||||
table.none > tr > td,
|
||||
table.none > thead > tr > td,
|
||||
table.none > tbody > tr > td,
|
||||
table.none > tfoot > tr > td,
|
||||
table.none > tr > th,
|
||||
table.none > thead > tr > th,
|
||||
table.none > tbody > tr > th,
|
||||
table.none > tfoot > tr > th {
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
background: none !important;
|
||||
|
||||
@@ -519,12 +519,14 @@ table {
|
||||
table.none {
|
||||
border: none !important;
|
||||
|
||||
tr, td, th {
|
||||
& > tr, & > thead > tr, & > tbody > tr, & > tfoot > tr {
|
||||
& > td, & > th {
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table.genericData {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}.tableData>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}.tableData>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4;}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse;}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff;}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8;}.tableDataContainer{background-color:#fff;}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0;}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right;}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa;}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right;}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right;}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer;}.subtleUntilHover{-moz-opacity:.3;opacity:.3;}.subtleUntilHover:hover{-moz-opacity:1;opacity:1;}body{font-size:12px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;margin:0;padding:0;color:#333;}body.layout{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAFvCAIAAAD8Hs23AAAIvUlEQVRoQ4VQCUIUSwzN/W8HArIKiAyC4Bl+vSVLN4M/9FQlb0tp/P1nxR5wfegK30cKTOD8+EDLY43ToHCys/uA6kPhKfdtHS/RTifqHQD/fmC3KBFMTffHR0gsnik2Sxxs1Iudx1+4zR4p0FtgtiN8Ej2Lft8QnAWVuxTv725xmZ5QWt/X33xacxUVFL3zKzjZ9/fYBFtDP9vItGLQoijGbjFaUSwj4SbhMOLmUWE2F5pPTwypHrcp0fZvimO69zbPoP8Y+oOuvqSzTc2s+TSUzRb9Cbb8GSw7gPAi75WGJ+8Q0T9GlErhwrll0O+iCdutTIYDI42Oc8Z7wNMyMmXZsWL0rJYxfAfv6pN7W/H2522PsYC+gR7zp2K4lHm43uhu8A0AjiTXXoYXRDYjcAdNheOusDe8nBPQLuY4vLBNhnZyt9BhFI1ebhtEzWWmeXblBtF7tquf9rleX0m/7nHX68Y9VNXGK0JwbATs7H6F4BUTbmixlkhQJIEs7NUwXD7N3pL6V++mt/+sBl1J1ujwkpBrIBmW9BidnNEbeldbOpdu62s3q+jf/HrQFLh/r2rqd0l/z3DJpIMAXQAEXjacmGe44NyQIQrXxFNo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bNOdT0pM79SgsTps8Nd4A6Kqkazw9jVOBRspLGO5m0Qkli79gRoOAdRCwm9q0kBTA3ZZmjG90DjdmMsX4X0u2AyTkgfBcPPDcSPrrSvrk5PRkQ6hMFzU1q4+dZ6cLNCcrmlcTBEQPgq3FCtebeGZLKcq7pW9/1klIlQkVJfiEu5WLU6DP9dktzKbsTrF7onuV3GNW+YknJ/8B9KCQK8XraVEAAAAASUVORK5CYII=) left top repeat-x #d1d1d1;background:linear-gradient(to bottom,#f2f2f2 0,#d1d1d1 370px) left top repeat-x #d1d1d1;min-height:370px;}.page{max-width:1232px;min-width:768px;margin-left:auto;margin-right:auto;}header,#header{position:relative;background-color:#333;margin:0;padding:0;height:34px;}header #heading,#header #heading{float:left;height:34px;}header #heading i,#header #heading i{display:block;height:Line truncated
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}.tableData>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}.tableData>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4;}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse;}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff;}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8;}.tableDataContainer{background-color:#fff;}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0;}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right;}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa;}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right;}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right;}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer;}.subtleUntilHover{-moz-opacity:.3;opacity:.3;}.subtleUntilHover:hover{-moz-opacity:1;opacity:1;}body{font-size:12px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;margin:0;padding:0;color:#333;}body.layout{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAFvCAIAAAD8Hs23AAAIvUlEQVRoQ4VQCUIUSwzN/W8HArIKiAyC4Bl+vSVLN4M/9FQlb0tp/P1nxR5wfegK30cKTOD8+EDLY43ToHCys/uA6kPhKfdtHS/RTifqHQD/fmC3KBFMTffHR0gsnik2Sxxs1Iudx1+4zR4p0FtgtiN8Ej2Lft8QnAWVuxTv725xmZ5QWt/X33xacxUVFL3zKzjZ9/fYBFtDP9vItGLQoijGbjFaUSwj4SbhMOLmUWE2F5pPTwypHrcp0fZvimO69zbPoP8Y+oOuvqSzTc2s+TSUzRb9Cbb8GSw7gPAi75WGJ+8Q0T9GlErhwrll0O+iCdutTIYDI42Oc8Z7wNMyMmXZsWL0rJYxfAfv6pN7W/H2522PsYC+gR7zp2K4lHm43uhu8A0AjiTXXoYXRDYjcAdNheOusDe8nBPQLuY4vLBNhnZyt9BhFI1ebhtEzWWmeXblBtF7tquf9rleX0m/7nHX68Y9VNXGK0JwbATs7H6F4BUTbmixlkhQJIEs7NUwXD7N3pL6V++mt/+sBl1J1ujwkpBrIBmW9BidnNEbeldbOpdu62s3q+jf/HrQFLh/r2rqd0l/z3DJpIMAXQAEXjacmGe44NyQIQrXxFNoywNmIeZ1WcLdHlJkBHeM2Yldr8udtIhjdA5bEjXoI/Uy6JeX7o3I/cK/4jmYVpczFUVz9xZ5kcZJ3i3g03KEG35BOcpCPC3X8aLAQnyhLksxfsELXi59WltNAO4qKvwKAQpPQ+NGN27hs/a063DQvacNpyAOBzaHIg75kXYnyU51EG3uBUnOAkc6DZ2YotVh91BnYwXoNoqRH9ABL894YM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KCQK8XraVEAAAAASUVORK5CYII=) left top repeat-x #d1d1d1;background:linear-gradient(to bottom,#f2f2f2 0,#d1d1d1 370px) left top repeat-x #d1d1d1;min-height:370px;}.page{max-width:1232px;min-width:768px;margin-left:auto;margin-right:auto;}header,#header{position:relative;background-color:#333;margin:0;padding:0;height:34px;}header #heading,#header #heading{float:left;height:34px;}header #heading i,#header #heading i{display:block;height:Line truncated
|
||||
@@ -503,10 +503,8 @@
|
||||
<Compile Include="Areas\API\Models\DocumentTemplate\ImporterUndetectedDataIdLookupModel.cs" />
|
||||
<Compile Include="Areas\API\Models\DocumentTemplate\ImporterUndetectedFilesModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Expressions\ValidateExpressionModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Job\CommentPostModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Job\CommentsModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Job\ComponentModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Job\_CommentModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Shared\CommentModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Job\_ComponentModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Job\_DateChangeModel.cs" />
|
||||
<Compile Include="Areas\API\Models\Logs\LogEventTypeModel.cs" />
|
||||
|
||||
@@ -379,9 +379,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult CommentPost()
|
||||
public virtual System.Web.Mvc.ActionResult CommentAdd()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.CommentPost);
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.CommentAdd);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -549,7 +549,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string InitialComments = "InitialComments";
|
||||
public readonly string Comments = "Comments";
|
||||
public readonly string Comment = "Comment";
|
||||
public readonly string CommentPost = "CommentPost";
|
||||
public readonly string CommentAdd = "CommentAdd";
|
||||
public readonly string CommentRemove = "CommentRemove";
|
||||
public readonly string AttachmentDownload = "AttachmentDownload";
|
||||
public readonly string AttachmentThumbnail = "AttachmentThumbnail";
|
||||
@@ -626,7 +626,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string InitialComments = "InitialComments";
|
||||
public const string Comments = "Comments";
|
||||
public const string Comment = "Comment";
|
||||
public const string CommentPost = "CommentPost";
|
||||
public const string CommentAdd = "CommentAdd";
|
||||
public const string CommentRemove = "CommentRemove";
|
||||
public const string AttachmentDownload = "AttachmentDownload";
|
||||
public const string AttachmentThumbnail = "AttachmentThumbnail";
|
||||
@@ -1168,11 +1168,11 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public readonly string id = "id";
|
||||
}
|
||||
static readonly ActionParamsClass_CommentPost s_params_CommentPost = new ActionParamsClass_CommentPost();
|
||||
static readonly ActionParamsClass_CommentAdd s_params_CommentAdd = new ActionParamsClass_CommentAdd();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_CommentPost CommentPostParams { get { return s_params_CommentPost; } }
|
||||
public ActionParamsClass_CommentAdd CommentAddParams { get { return s_params_CommentAdd; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_CommentPost
|
||||
public class ActionParamsClass_CommentAdd
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string comment = "comment";
|
||||
@@ -2064,15 +2064,15 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void CommentPostOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string comment);
|
||||
partial void CommentAddOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string comment);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult CommentPost(int id, string comment)
|
||||
public override System.Web.Mvc.ActionResult CommentAdd(int id, string comment)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.CommentPost);
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.CommentAdd);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "comment", comment);
|
||||
CommentPostOverride(callInfo, id, comment);
|
||||
CommentAddOverride(callInfo, id, comment);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
@if (canShowLogs)
|
||||
{
|
||||
<td id="CommentsContainer">
|
||||
<div id="Comments" class="@(canAddLogs ? "canAddLogs" : "cannotAddLogs")">
|
||||
<div id="Comments" class="@(canAddLogs ? "canAddLogs" : "cannotAddLogs") @(canRemoveAnyLogs ? "canRemoveAnyLogs" : "cannotRemoveAnyLogs") @(canRemoveOwnLogs ? "canRemoveOwnLogs" : "cannotRemoveOwnLogs")" data-jobid="@Model.Job.Id" data-addurl="@Url.Action(MVC.API.Job.CommentAdd(Model.Job.Id))" data-removeurl="@Url.Action(MVC.API.Job.CommentRemove())" data-geturl="@Url.Action(MVC.API.Job.Comment())" data-userid="@CurrentUser.UserId">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="commentOutput">
|
||||
@foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
@@ -43,8 +44,8 @@
|
||||
@if (canAddLogs)
|
||||
{
|
||||
<div class="commentInput clearfix">
|
||||
<textarea class="commentInput" placeholder="write comment..." accesskey="l"></textarea>
|
||||
<span class="action post commentInputPost fa fa-comment disabled" title="Post Comment"></span>
|
||||
<textarea class="commentInput" placeholder="add comment..." accesskey="l"></textarea>
|
||||
<span class="action post commentInputPost fa fa-comment disabled" title="Add Comment"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -87,22 +88,6 @@
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
@if (canShowLogs && (canRemoveAnyLogs || canRemoveOwnLogs))
|
||||
{
|
||||
<div id="dialogRemoveLog" class="dialog" title="Remove this Comment?">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
@if (canShowAttachments && (canRemoveAnyAttachments || canRemoveOwnAttachments))
|
||||
{
|
||||
<div id="dialogRemoveAttachment" class="dialog" title="Remove this Attachment?">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
@if (canShowLogs)
|
||||
{
|
||||
<script>
|
||||
@@ -111,12 +96,12 @@
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var jobId = parseInt('@(Model.Job.Id)');
|
||||
|
||||
//#region Comments
|
||||
var $Comments = $('#Comments');
|
||||
var $CommentOutput = $Comments.find('.commentOutput');
|
||||
var $CommentOutputContainer = $Comments.find('.commentOutputContainer');
|
||||
const $Comments = $('#Comments');
|
||||
const jobId = parseInt($Comments.attr('data-jobid'));
|
||||
|
||||
const $CommentOutput = $Comments.find('.commentOutput');
|
||||
const $CommentOutputContainer = $Comments.find('.commentOutputContainer');
|
||||
|
||||
window.setTimeout(function () {
|
||||
$CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom
|
||||
@@ -131,23 +116,23 @@
|
||||
{<text>
|
||||
//#region Add Logs
|
||||
|
||||
var $CommentInput = $Comments.find('textarea.commentInput');
|
||||
|
||||
$Comments.find('.commentInputPost').click(postComment);
|
||||
$CommentInput.keypress(function (e) {
|
||||
const $CommentInput = $Comments.find('textarea.commentInput');
|
||||
const $CommentInputPost = $Comments.find('.commentInputPost');
|
||||
$CommentInputPost.on('click', postComment);
|
||||
$CommentInput.on('keypress', function (e) {
|
||||
if (e.which == 13 && !e.shiftKey) {
|
||||
postComment();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function postComment() {
|
||||
if ($Comments.find('.commentInputPost').hasClass('disabled')) {
|
||||
async function postComment() {
|
||||
if ($CommentInputPost.hasClass('disabled')) {
|
||||
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
||||
return;
|
||||
}
|
||||
|
||||
var comment = $CommentInput.val();
|
||||
const comment = $CommentInput.val();
|
||||
|
||||
if (comment == '') {
|
||||
alert('Enter a comment to post');
|
||||
@@ -155,26 +140,23 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var data = { comment: comment }
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
// Should be added via Repository Notifications
|
||||
// addComment(d.Comment, false);
|
||||
$CommentInput.val('').attr('disabled', false).focus();
|
||||
} else {
|
||||
alert('Unable to post comment: ' + d.Result);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to post comment: ' + textStatus);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
$CommentInput.prop('disabled', true);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $Comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('comment', comment);
|
||||
|
||||
const response = await fetch($Comments.attr('data-addurl'), {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
$CommentInput.val('').prop('disabled', false).focus();
|
||||
} else {
|
||||
alert('Unable to add comment: ' + response.statusText);
|
||||
$CommentInput.prop('disabled', false).focus();
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion
|
||||
@@ -183,16 +165,36 @@
|
||||
{<text>
|
||||
//#region Remove Logs
|
||||
|
||||
var $dialogRemoveLog;
|
||||
let $dialogRemoveLog = null;
|
||||
|
||||
$CommentOutput.find('span.remove').click(removePost);
|
||||
$CommentOutput.on('click', 'span.remove', removePost);
|
||||
|
||||
async function removeComment(commentId) {
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $Comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('id', commentId);
|
||||
|
||||
const response = await fetch($Comments.attr('data-removeurl'), {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
alert('Unable to remove comment: ' + response.statusText);
|
||||
}
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
|
||||
function removePost(e) {
|
||||
e.preventDefault();
|
||||
|
||||
function removePost() {
|
||||
$this = $(this);
|
||||
var data = { id: $this.closest('div').attr('data-logid') };
|
||||
const commentId = $this.closest('div').attr('data-logid');
|
||||
|
||||
if (!$dialogRemoveLog) {
|
||||
$dialogRemoveLog = $('#dialogRemoveLog').dialog({
|
||||
$dialogRemoveLog = $('<div class="dialog" title="Remove this Comment?"><p><i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?</p></div>')
|
||||
.appendTo(document.body)
|
||||
.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
@@ -204,79 +206,60 @@
|
||||
"Remove": function () {
|
||||
$dialogRemoveLog.dialog("disable");
|
||||
$dialogRemoveLog.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Should be removed via Repository Notifications
|
||||
//$this.closest('div').slideUp(300).delay(300).queue(function () {
|
||||
// $(this).remove();
|
||||
//});
|
||||
} else {
|
||||
alert('Unable to remove comment: ' + d);
|
||||
}
|
||||
$dialogRemoveLog.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove comment: ' + textStatus);
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
removeComment(commentId);
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
</text>}
|
||||
|
||||
function loadLiveComment(key) {
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.Comment())',
|
||||
dataType: 'json',
|
||||
data: { id: key },
|
||||
success: function (d) {
|
||||
if (d && d.JobId == jobId) {
|
||||
@if (canRemoveAnyLogs)
|
||||
{<text>addComment(d, false, true);</text>}
|
||||
else if (canRemoveOwnLogs)
|
||||
{<text>addComment(d, false, (d.AuthorId === '@(CurrentUser.UserId)'));</text>}
|
||||
else
|
||||
{<text>addComment(d, false, false);</text>}
|
||||
async function loadLiveComment(id) {
|
||||
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load live comment ' + id + ': ' + textStatus);
|
||||
}
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $Comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('id', id);
|
||||
|
||||
const response = await fetch($Comments.attr('data-geturl'), {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
alert('Unable to load live comment ' + id + ': ' + textStatus);
|
||||
} else {
|
||||
const comment = await response.json();
|
||||
|
||||
if ($Comments.hasClass('canRemoveAnyLogs'))
|
||||
addComment(comment, false, true);
|
||||
else if ($Comments.hasClass('canRemoveOwnLogs'))
|
||||
addComment(comment, false, (comment.AuthorId === $Comments.attr('data-userid')));
|
||||
else
|
||||
addComment(comment, false, false);
|
||||
}
|
||||
function liveRemoveComment(key) {
|
||||
$CommentOutput.children('div[data-logid="' + key + '"]').slideUp(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
}
|
||||
function liveRemoveComment(id) {
|
||||
$CommentOutput.children('div[data-logid="' + id + '"]').slideUp(300).delay(300).queue(function () {
|
||||
const $this = $(this);
|
||||
$this.find('.timestamp').livestamp('destroy');
|
||||
$this.remove();
|
||||
});
|
||||
}
|
||||
function addComment(c, quick, canRemove) {
|
||||
var t = '<div><span class="author" />';
|
||||
let t = '<div><span class="author" />';
|
||||
if (canRemove)
|
||||
t += '<span class="remove fa fa-times-circle" />';
|
||||
t += '<span class="timestamp" /><div class="comment" /></div>';
|
||||
|
||||
var e = $(t);
|
||||
const e = $(t);
|
||||
e.attr('data-logid', c.Id);
|
||||
e.find('.author').text(c.Author);
|
||||
e.find('.timestamp').text(c.TimestampFull).attr('title', c.TimestampFull).livestamp(c.TimestampUnixEpoc);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removePost);
|
||||
var eComment = e.find('.comment').html(c.HtmlComments);
|
||||
e.find('.comment').html(c.HtmlComments);
|
||||
|
||||
$CommentOutput.append(e);
|
||||
|
||||
@@ -291,7 +274,9 @@
|
||||
}
|
||||
|
||||
// Add Globally Available Functions
|
||||
document.DiscoFunctions.liveLoadComment = loadLiveComment;
|
||||
document.DiscoFunctions.liveLoadComment = function (id) {
|
||||
loadLiveComment(id);
|
||||
};
|
||||
document.DiscoFunctions.liveRemoveComment = liveRemoveComment;
|
||||
//#endregion
|
||||
});
|
||||
@@ -379,7 +364,9 @@
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
$dialogRemoveAttachment = $('<div class="dialog" title="Remove this Attachment?"><p><i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?</p></div>')
|
||||
.appendTo(document.body)
|
||||
.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user