fix: device batch timeline link
This commit is contained in:
@@ -18,22 +18,22 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
{
|
{
|
||||||
public partial class DeviceBatchController : AuthorizedDatabaseController
|
public partial class DeviceBatchController : AuthorizedDatabaseController
|
||||||
{
|
{
|
||||||
const string pName = "name";
|
private const string pName = "name";
|
||||||
const string pPurchaseDate = "purchasedate";
|
private const string pPurchaseDate = "purchasedate";
|
||||||
const string pSupplier = "supplier";
|
private const string pSupplier = "supplier";
|
||||||
const string pPurchaseDetails = "purchasedetails";
|
private const string pPurchaseDetails = "purchasedetails";
|
||||||
const string pUnitCost = "unitcost";
|
private const string pUnitCost = "unitcost";
|
||||||
const string pUnitQuantity = "unitquantity";
|
private const string pUnitQuantity = "unitquantity";
|
||||||
const string pDefaultDeviceModelId = "defaultdevicemodelid";
|
private const string pDefaultDeviceModelId = "defaultdevicemodelid";
|
||||||
const string pWarrantyValidUntil = "warrantyvaliduntil";
|
private const string pWarrantyValidUntil = "warrantyvaliduntil";
|
||||||
const string pWarrantyDetails = "warrantydetails";
|
private const string pWarrantyDetails = "warrantydetails";
|
||||||
const string pInsuredDate = "insureddate";
|
private const string pInsuredDate = "insureddate";
|
||||||
const string pInsuranceSupplier = "insurancesupplier";
|
private const string pInsuranceSupplier = "insurancesupplier";
|
||||||
const string pInsuredUntil = "insureduntil";
|
private const string pInsuredUntil = "insureduntil";
|
||||||
const string pInsuranceDetails = "insurancedetails";
|
private const string pInsuranceDetails = "insurancedetails";
|
||||||
const string pComments = "comments";
|
private const string pComments = "comments";
|
||||||
const string pDevicesLinkedGroup = "deviceslinkedgroup";
|
private const string pDevicesLinkedGroup = "deviceslinkedgroup";
|
||||||
const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
private const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
@@ -582,6 +582,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
var batchesInformation = Database.DeviceBatches.Select(db => new
|
var batchesInformation = Database.DeviceBatches.Select(db => new
|
||||||
{
|
{
|
||||||
|
Id = db.Id,
|
||||||
Name = db.Name,
|
Name = db.Name,
|
||||||
Comments = db.Comments,
|
Comments = db.Comments,
|
||||||
PurchaseDate = db.PurchaseDate,
|
PurchaseDate = db.PurchaseDate,
|
||||||
@@ -614,7 +615,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
description = bi.Comments ?? string.Empty,
|
description = bi.Comments ?? string.Empty,
|
||||||
color = ColorTranslator.ToHtml(color),
|
color = ColorTranslator.ToHtml(color),
|
||||||
image = Url.Action(MVC.API.DeviceModel.Image(bi.DefaultModelId)),
|
image = Url.Action(MVC.API.DeviceModel.Image(bi.DefaultModelId)),
|
||||||
link = Url.Action(MVC.Config.DeviceBatch.Index(bi.DefaultModelId))
|
link = Url.Action(MVC.Config.DeviceBatch.Index(bi.Id))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user