Make it possible to hide locations/stores/QUs/product_groups/task_categories (closes #2222)

This commit is contained in:
Bernd Bestel
2023-05-13 14:24:52 +02:00
parent b5d3e68d68
commit 9cdb0908d6
22 changed files with 323 additions and 58 deletions

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'
&&
$location->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-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">
<button id="clear-filter-button"
@@ -89,7 +100,7 @@
</thead>
<tbody class="d-none">
@foreach($locations as $location)
<tr>
<tr class="@if($location->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/location/') }}{{ $location->id }}?embedded"

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'
&&
$group->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-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">
<button id="clear-filter-button"
@@ -89,7 +100,7 @@
</thead>
<tbody class="d-none">
@foreach($productGroups as $productGroup)
<tr>
<tr class="@if($productGroup->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/productgroup/') }}{{ $productGroup->id }}?embedded"

View File

@@ -69,6 +69,19 @@
</div>
@endif
<div class="form-group">
<div class="custom-control custom-checkbox">
<input @if($mode=='create'
)
checked
@elseif($mode=='edit'
&&
$quantityUnit->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-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">
<button id="clear-filter-button"
@@ -88,7 +99,7 @@
</thead>
<tbody class="d-none">
@foreach($quantityunits as $quantityunit)
<tr>
<tr class="@if($quantityunit->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/quantityunit/') }}{{ $quantityunit->id }}"

View File

@@ -6,7 +6,7 @@
@section('title', $__t('Create store'))
@endif
@section('viewJsName', 'shoppinglocationform')
@section('viewJsName', 'shoppingLocationform')
@section('content')
<div class="row">
@@ -25,7 +25,7 @@
@if($mode == 'edit')
<script>
Grocy.EditObjectId = {{ $shoppinglocation->id }};
Grocy.EditObjectId = {{ $shoppingLocation->id }};
</script>
@endif
@@ -39,16 +39,29 @@
required
id="name"
name="name"
value="@if($mode == 'edit'){{ $shoppinglocation->name }}@endif">
value="@if($mode == 'edit'){{ $shoppingLocation->name }}@endif">
<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'
&&
$shoppingLocation->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"
rows="2"
id="description"
name="description">@if($mode == 'edit'){{ $shoppinglocation->description }}@endif</textarea>
name="description">@if($mode == 'edit'){{ $shoppingLocation->description }}@endif</textarea>
</div>
@include('components.userfieldsform', array(

View File

@@ -53,6 +53,17 @@
placeholder="{{ $__t('Search') }}">
</div>
</div>
<div class="col-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">
<button id="clear-filter-button"
@@ -89,7 +100,7 @@
</thead>
<tbody class="d-none">
@foreach($shoppinglocations as $shoppinglocation)
<tr>
<tr class="@if($shoppinglocation->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/shoppinglocation/') }}{{ $shoppinglocation->id }}?embedded"

View File

@@ -53,6 +53,17 @@
placeholder="{{ $__t('Search') }}">
</div>
</div>
<div class="col-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">
<button id="clear-filter-button"
@@ -89,7 +100,7 @@
</thead>
<tbody class="d-none">
@foreach($taskCategories as $taskCategory)
<tr>
<tr class="@if($taskCategory->active == 0) text-muted @endif">
<td class="fit-content border-right">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/taskcategory/') }}{{ $taskCategory->id }}?embedded"

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'
&&
$category->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"