fixed hiding styles.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-01-30 21:26:21 -07:00
parent 40f01ad100
commit 6eafa5e036
3 changed files with 49 additions and 11 deletions

View File

@@ -3,6 +3,7 @@
@{
var enableCsvImports = config.GetUserConfig(User).EnableCsvImports;
var hideZero = config.GetUserConfig(User).HideZero;
var recordTags = Model.SelectMany(x => x.Tags).Distinct();
}
@model List<ServiceRecord>
<div class="row">
@@ -10,6 +11,10 @@
<div class="d-flex align-items-center flex-wrap">
<span class="ms-2 badge bg-success">@($"# of Service Records: {Model.Count()}")</span>
<span class="ms-2 badge bg-primary">@($"Total: {Model.Sum(x => x.Cost).ToString("C")}")</span>
@foreach(string recordTag in recordTags)
{
<span onclick="filterTable('servicerecord-tab-pane', this)" class="ms-2 rounded-pill badge bg-secondary tagfilter" style="cursor:pointer;">@recordTag</span>
}
</div>
<div>
@if (enableCsvImports)
@@ -54,7 +59,7 @@
<tbody>
@foreach (ServiceRecord serviceRecord in Model)
{
<tr class="d-flex" style="cursor:pointer;" onclick="showEditServiceRecordModal(@serviceRecord.Id)">
<tr class="d-flex" style="cursor:pointer;" onclick="showEditServiceRecordModal(@serviceRecord.Id)" data-tags='@string.Join(",",serviceRecord.Tags)'>
<td class="col-2 col-xl-1">@serviceRecord.Date.ToShortDateString()</td>
<td class="col-2">@serviceRecord.Mileage</td>
<td class="col-3 col-xl-4">@serviceRecord.Description</td>