Make it possible to hide chores/batteries (closes #1069)

This commit is contained in:
Bernd Bestel
2020-12-20 10:19:44 +01:00
parent 31dbb95c58
commit 268b8e87d7
17 changed files with 239 additions and 23 deletions

View File

@@ -53,6 +53,17 @@
placeholder="{{ $__t('Search') }}">
</div>
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<div class="form-check custom-control custom-checkbox">
<input class="form-check-input custom-control-input"
type="checkbox"
id="show-disabled">
<label class="form-check-label custom-control-label"
for="show-disabled">
{{ $__t('Show disabled') }}
</label>
</div>
</div>
<div class="col">
<div class="float-right">
<a id="clear-filter-button"
@@ -89,7 +100,7 @@
</thead>
<tbody class="d-none">
@foreach($batteries as $battery)
<tr>
<tr class="@if($battery->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm permission-MASTER_DATA_EDIT show-as-dialog-link"
href="{{ $U('/battery/') }}{{ $battery->id }}?embedded"

View File

@@ -44,6 +44,19 @@
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
</div>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input @if($mode=='create'
)
checked
@elseif($mode=='edit'
&&
$battery->active == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="active" name="active" value="1">
<label class="form-check-label custom-control-label"
for="active">{{ $__t('Active') }}</label>
</div>
</div>
<div class="form-group">
<label for="description">{{ $__t('Description') }}</label>
<input type="text"

View File

@@ -43,6 +43,19 @@
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
</div>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input @if($mode=='create'
)
checked
@elseif($mode=='edit'
&&
$chore->active == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="active" name="active" value="1">
<label class="form-check-label custom-control-label"
for="active">{{ $__t('Active') }}</label>
</div>
</div>
<div class="form-group">
<label for="description">{{ $__t('Description') }}</label>
<textarea class="form-control"

View File

@@ -53,6 +53,17 @@
placeholder="{{ $__t('Search') }}">
</div>
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<div class="form-check custom-control custom-checkbox">
<input class="form-check-input custom-control-input"
type="checkbox"
id="show-disabled">
<label class="form-check-label custom-control-label"
for="show-disabled">
{{ $__t('Show disabled') }}
</label>
</div>
</div>
<div class="col">
<div class="float-right">
<a id="clear-filter-button"
@@ -89,7 +100,7 @@
</thead>
<tbody class="d-none">
@foreach($chores as $chore)
<tr>
<tr class="@if($chore->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/chore/') }}{{ $chore->id }}"

View File

@@ -75,10 +75,10 @@
<div class="form-check custom-control custom-checkbox">
<input class="form-check-input custom-control-input"
type="checkbox"
id="show-disabled-products">
id="show-disabled">
<label class="form-check-label custom-control-label"
for="show-disabled-products">
{{ $__t('Show disabled products') }}
for="show-disabled">
{{ $__t('Show disabled') }}
</label>
</div>
</div>
@@ -122,7 +122,7 @@
</thead>
<tbody class="d-none">
@foreach($products as $product)
<tr>
<tr class="@if($product->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/product/') }}{{ $product->id }}"