@model Disco.Web.Areas.Config.Models.DeviceBatch.ShowModel @using Disco.Services.Devices.ManagedGroups; @using Disco.Web.Areas.Config.Models.Shared; @{ Authorization.Require(Claims.Config.DeviceBatch.Show); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), Model.DeviceBatch.ToString()); var canConfig = Authorization.Has(Claims.Config.DeviceBatch.Configure); var canDeviceModelShow = Authorization.Has(Claims.Config.DeviceModel.Show); var hideAdvanced = Model.DeviceBatch.AssignedUsersLinkedGroup == null && Model.DeviceBatch.DevicesLinkedGroup == null; Html.BundleDeferred("~/Style/Shadowbox"); Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox"); Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR"); if (canConfig) { Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); Html.BundleDeferred("~/ClientScripts/Modules/tinymce"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-AttachmentUploader"); } }
| Id: | @Html.DisplayFor(model => model.DeviceBatch.Id) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Name: | @if (canConfig) { @Html.EditorFor(model => model.DeviceBatch.Name) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader() } else { @Model.DeviceBatch.Name } | |||||||||
| Default Device Model: | @if (canConfig)
{
@Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems(null, true))
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
}
else
{
if (Model.DefaultDeviceModel == null)
{<None Specified>}
else
{@Model.DefaultDeviceModel.ToString();
}
}
Devices added offline will default to this Device Model. Once a device enrols the Device Model will be accurately represented. |
|||||||||
| Devices |
@if (Model.DeviceModelMembers.Count > 0)
{
No device models are referenced in this batch.
}
@if (Model.DeviceBatch.UnitQuantity.HasValue && Model.DeviceBatch.UnitQuantity.Value > Model.DeviceCount)
{
var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount;
@Model.DeviceCount.ToString("n0") of @(Model.DeviceBatch.UnitQuantity.Value.ToString("n0")) purchased devices are managed by Disco. @missingCount.ToString("n0") @(missingCount == 1 ? "is" : "are") not managed. |
|||||||||
| Purchase: |
Details @AjaxHelpers.AjaxLoader("ajaxPurchaseDetails")
@if (canConfig)
{
@Html.EditorFor(model => model.DeviceBatch.PurchaseDetails)
}
else
{
if (string.IsNullOrEmpty(Model.DeviceBatch.PurchaseDetails))
{<None Specified>}
else
{@(new HtmlString(Model.DeviceBatch.PurchaseDetails))}
}
|
|||||||||
| Warranty: |
Details @AjaxHelpers.AjaxLoader("ajaxWarrantyDetails")
@if (canConfig)
{
@Html.EditorFor(model => model.DeviceBatch.WarrantyDetails)
}
else
{
if (string.IsNullOrEmpty(Model.DeviceBatch.WarrantyDetails))
{<None Specified>}
else
{@(new HtmlString(Model.DeviceBatch.WarrantyDetails))}
}
|
|||||||||
| Insurance: |
Details @AjaxHelpers.AjaxLoader("ajaxInsuranceDetails")
@if (canConfig)
{
@Html.EditorFor(model => model.DeviceBatch.InsuranceDetails)
}
else
{
if (string.IsNullOrEmpty(Model.DeviceBatch.InsuranceDetails))
{<None Specified>}
else
{@(new HtmlString(Model.DeviceBatch.InsuranceDetails))}
}
|
|||||||||
| Comments: @AjaxHelpers.AjaxLoader("ajaxComments") |
@if (canConfig) { @Html.EditorFor(model => model.DeviceBatch.Comments) } else { if (string.IsNullOrEmpty(Model.DeviceBatch.Comments)) {<None Specified>} else {@(new HtmlString(Model.DeviceBatch.Comments))} } | |||||||||
| Attachments: |
Drop Attachments HereAre you sure? |
|||||||||
| Linked Groups: |
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
{
CanConfigure = canConfig,
CategoryDescription = DeviceBatchDevicesManagedGroup.GetCategoryDescription(Model.DeviceBatch),
Description = DeviceBatchDevicesManagedGroup.GetDescription(Model.DeviceBatch),
ManagedGroup = Model.DevicesLinkedGroup,
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateDevicesLinkedGroup(Model.DeviceBatch.Id, redirect: true))
})
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
{
CanConfigure = canConfig,
CategoryDescription = DeviceBatchAssignedUsersManagedGroup.GetCategoryDescription(Model.DeviceBatch),
Description = DeviceBatchAssignedUsersManagedGroup.GetDescription(Model.DeviceBatch),
ManagedGroup = Model.AssignedUsersLinkedGroup,
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateAssignedUsersLinkedGroup(Model.DeviceBatch.Id, redirect: true))
})
@if (canConfig)
{
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)
}
|
|||||||||