fix small screen spacing.
This commit is contained in:
@@ -55,9 +55,16 @@ namespace CarCareTracker.Controllers
|
|||||||
{
|
{
|
||||||
return View(model: tab);
|
return View(model: tab);
|
||||||
}
|
}
|
||||||
public IActionResult Kiosk()
|
public IActionResult Kiosk(string exceptions)
|
||||||
{
|
{
|
||||||
return View();
|
try {
|
||||||
|
var exceptionList = string.IsNullOrWhiteSpace(exceptions) ? new List<int>() : exceptions.Split(',').Select(x => int.Parse(x)).ToList();
|
||||||
|
return View(exceptionList);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return View(new List<int>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public IActionResult KioskContent(List<int> exceptionList)
|
public IActionResult KioskContent(List<int> exceptionList)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace CarCareTracker.Helper
|
|||||||
case "PastDue":
|
case "PastDue":
|
||||||
return "Past Due";
|
return "Past Due";
|
||||||
default:
|
default:
|
||||||
return input.ToString();
|
return input;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Kiosk";
|
ViewData["Title"] = "Kiosk";
|
||||||
}
|
}
|
||||||
|
@model List<int>
|
||||||
<div class="progress" role="progressbar" aria-label="Refresh Progress" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" style="height: 1px">
|
<div class="progress" role="progressbar" aria-label="Refresh Progress" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" style="height: 1px">
|
||||||
<div class="progress-bar" style="width: 0%"></div>
|
<div class="progress-bar" style="width: 0%"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -9,9 +10,20 @@
|
|||||||
<script>
|
<script>
|
||||||
let refreshTimer;
|
let refreshTimer;
|
||||||
let exceptionList = [];
|
let exceptionList = [];
|
||||||
|
let subtractAmount = 0;
|
||||||
|
|
||||||
|
@foreach(int exception in Model)
|
||||||
|
{
|
||||||
|
@:exceptionList.push(@exception);
|
||||||
|
}
|
||||||
|
|
||||||
function initKiosk() {
|
function initKiosk() {
|
||||||
$("body > div").removeClass("container");
|
$("body > div").removeClass("container");
|
||||||
$("body > div").css('height', '100vh');
|
$("body > div").css('height', '100vh');
|
||||||
|
subtractAmount = parseInt($("#kioskContainer").width() * 0.0016); //remove 0.0016% of width every 100 ms which will approximate to one minute.
|
||||||
|
if (subtractAmount < 2) {
|
||||||
|
subtractAmount = 2;
|
||||||
|
}
|
||||||
retrieveKioskContent();
|
retrieveKioskContent();
|
||||||
}
|
}
|
||||||
function retrieveKioskContent(){
|
function retrieveKioskContent(){
|
||||||
@@ -26,7 +38,7 @@
|
|||||||
refreshTimer = setInterval(function () {
|
refreshTimer = setInterval(function () {
|
||||||
var currentWidth = $(".progress-bar").width();
|
var currentWidth = $(".progress-bar").width();
|
||||||
if (currentWidth > 0) {
|
if (currentWidth > 0) {
|
||||||
$(".progress-bar").width(currentWidth - 20);
|
$(".progress-bar").width(currentWidth - subtractAmount);
|
||||||
} else {
|
} else {
|
||||||
retrieveKioskContent();
|
retrieveKioskContent();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,22 +16,22 @@
|
|||||||
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
||||||
<h5 class="card-title">@($"{vehicle.VehicleData.Year} {vehicle.VehicleData.Make} {vehicle.VehicleData.Model} ({StaticHelper.GetVehicleIdentifier(vehicle.VehicleData)})")</h5>
|
<h5 class="card-title">@($"{vehicle.VehicleData.Year} {vehicle.VehicleData.Make} {vehicle.VehicleData.Model} ({StaticHelper.GetVehicleIdentifier(vehicle.VehicleData)})")</h5>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.ServiceRecordCount</p>
|
<p class="display-7">@vehicle.ServiceRecordCount</p>
|
||||||
<p class="lead text-truncate">@translator.Translate(userLanguage, "Service")</p>
|
<p class="lead text-truncate">@translator.Translate(userLanguage, "Service")</p>
|
||||||
<p class="lead text-truncate">@vehicle.ServiceRecordCost.ToString("C0")</p>
|
<p class="lead text-truncate">@vehicle.ServiceRecordCost.ToString("C0")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.RepairRecordCount</p>
|
<p class="display-7">@vehicle.RepairRecordCount</p>
|
||||||
<p class="lead text-truncate">@translator.Translate(userLanguage, "Repairs")</p>
|
<p class="lead text-truncate">@translator.Translate(userLanguage, "Repairs")</p>
|
||||||
<p class="lead text-truncate">@vehicle.RepairRecordCost.ToString("C0")</p>
|
<p class="lead text-truncate">@vehicle.RepairRecordCost.ToString("C0")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.UpgradeRecordCount</p>
|
<p class="display-7">@vehicle.UpgradeRecordCount</p>
|
||||||
<p class="lead text-truncate">@translator.Translate(userLanguage, "Upgrades")</p>
|
<p class="lead text-truncate">@translator.Translate(userLanguage, "Upgrades")</p>
|
||||||
<p class="lead text-truncate">@vehicle.UpgradeRecordCost.ToString("C0")</p>
|
<p class="lead text-truncate">@vehicle.UpgradeRecordCost.ToString("C0")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.GasRecordCount</p>
|
<p class="display-7">@vehicle.GasRecordCount</p>
|
||||||
<p class="lead text-truncate">@translator.Translate(userLanguage, "Fuel")</p>
|
<p class="lead text-truncate">@translator.Translate(userLanguage, "Fuel")</p>
|
||||||
<p class="lead text-truncate">@vehicle.GasRecordCost.ToString("C0")</p>
|
<p class="lead text-truncate">@vehicle.GasRecordCost.ToString("C0")</p>
|
||||||
@@ -44,19 +44,19 @@
|
|||||||
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
||||||
<h5 class="card-title">@translator.Translate(userLanguage, "Reminders")</h5>
|
<h5 class="card-title">@translator.Translate(userLanguage, "Reminders")</h5>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.PastDueReminderCount</p>
|
<p class="display-7">@vehicle.PastDueReminderCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Past Due")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Past Due")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.VeryUrgentReminderCount</p>
|
<p class="display-7">@vehicle.VeryUrgentReminderCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Very Urgent")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Very Urgent")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.UrgentReminderCount</p>
|
<p class="display-7">@vehicle.UrgentReminderCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Urgent")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Urgent")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.NotUrgentReminderCount</p>
|
<p class="display-7">@vehicle.NotUrgentReminderCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Not Urgent")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Not Urgent")</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
||||||
<h5 class="card-title">@translator.Translate(userLanguage, "Upcoming Reminder")</h5>
|
<h5 class="card-title">@translator.Translate(userLanguage, "Upcoming Reminder")</h5>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-12">
|
||||||
<p class="display-7">@vehicle.NextReminder.Description</p>
|
<p class="display-7">@vehicle.NextReminder.Description</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, StaticHelper.GetTitleCaseReminderUrgency(vehicle.NextReminder.Urgency))</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, StaticHelper.GetTitleCaseReminderUrgency(vehicle.NextReminder.Urgency))</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -92,19 +92,19 @@
|
|||||||
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
<div class="card-body" style="padding-top:0.25rem; padding-bottom:0.25rem;">
|
||||||
<h5 class="card-title">@translator.Translate(userLanguage, "Plans")</h5>
|
<h5 class="card-title">@translator.Translate(userLanguage, "Plans")</h5>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.PlanRecordBackLogCount</p>
|
<p class="display-7">@vehicle.PlanRecordBackLogCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Planned")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Planned")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.PlanRecordInProgressCount</p>
|
<p class="display-7">@vehicle.PlanRecordInProgressCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Doing")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Doing")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.PlanRecordTestingCount</p>
|
<p class="display-7">@vehicle.PlanRecordTestingCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Testing")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Testing")</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 text-center">
|
<div class="col-3 text-center">
|
||||||
<p class="display-7">@vehicle.PlanRecordDoneCount</p>
|
<p class="display-7">@vehicle.PlanRecordDoneCount</p>
|
||||||
<p class="lead text-wrap">@translator.Translate(userLanguage, "Done")</p>
|
<p class="lead text-wrap">@translator.Translate(userLanguage, "Done")</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user