Moved the "Jounral summary" button to the stock journal page

This commit is contained in:
Bernd Bestel 2020-09-06 13:08:00 +02:00
parent 7c7d29ade3
commit 520f2660d1
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 18 additions and 16 deletions

View File

@ -1901,8 +1901,8 @@ msgstr ""
msgid "Default" msgid "Default"
msgstr "" msgstr ""
msgid "Journal-Summary"
msgstr ""
msgid "Stock journal summary" msgid "Stock journal summary"
msgstr "" msgstr ""
msgid "Journal summary"
msgstr ""

View File

@ -5,12 +5,15 @@
@section('viewJsName', 'stockjournal') @section('viewJsName', 'stockjournal')
@section('content') @section('content')
<div class="row"> <div class="title-related-links">
<div class="col"> <h2 class="title">@yield('title')</h2>
<h2 class="title">@yield('title')</h2> <div class="related-links">
<a class="btn btn-outline-dark responsive-button"
href="{{ $U('/stockjournal/summary') }}">
{{ $__t('Journal summary') }}
</a>
</div> </div>
</div> </div>
<hr> <hr>
<div class="row my-3"> <div class="row my-3">
<div class="col-xs-12 col-md-6 col-xl-3"> <div class="col-xs-12 col-md-6 col-xl-3">

View File

@ -19,10 +19,6 @@
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="related-links"> <div class="related-links">
<a class="btn btn-outline-dark responsive-button"
href="{{ $U('/stockjournal/summary') }}">
{{ $__t('Stock journal summary') }}
</a>
<a class="btn btn-outline-dark responsive-button" <a class="btn btn-outline-dark responsive-button"
href="{{ $U('/stockjournal') }}"> href="{{ $U('/stockjournal') }}">
{{ $__t('Journal') }} {{ $__t('Journal') }}
@ -146,7 +142,9 @@
<tbody class="d-none"> <tbody class="d-none">
@foreach($currentStock as $currentStockEntry) @foreach($currentStock as $currentStockEntry)
<tr id="product-{{ $currentStockEntry->product_id }}-row" <tr id="product-{{ $currentStockEntry->product_id }}-row"
class="@if(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING && $currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) table-danger @elseif(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING && $currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("+$nextXDays days")) class="@if(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING && $currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) table-danger @elseif(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING && $currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("
+$nextXDays
days"))
&& &&
$currentStockEntry->amount > 0) table-warning @elseif ($currentStockEntry->product_missing) table-info @endif"> $currentStockEntry->amount > 0) table-warning @elseif ($currentStockEntry->product_missing) table-info @endif">
<td class="fit-content border-right"> <td class="fit-content border-right">
@ -273,9 +271,9 @@
</a> </a>
@endif @endif
<a class="dropdown-item" <a class="dropdown-item"
type="button" type="button"
href="{{ $U('/stockjournal/summary?product_id=') }}{{ $currentStockEntry->product_id }}"> href="{{ $U('/stockjournal/summary?product_id=') }}{{ $currentStockEntry->product_id }}">
<span class="dropdown-item-icon"><i class="fas fa-cocktail"></i></span> <span class="dropdown-item-text">{{ $__t('Journal-Summary') }}</span> <span class="dropdown-item-icon"><i class="fas fa-cocktail"></i></span> <span class="dropdown-item-text">{{ $__t('Journal summary') }}</span>
</a> </a>
</div> </div>
</div> </div>
@ -331,7 +329,8 @@
&& &&
$currentStockEntry->amount > 0) expired @elseif($currentStockEntry->best_before_date < date('Y-m-d $currentStockEntry->amount > 0) expired @elseif($currentStockEntry->best_before_date < date('Y-m-d
23:59:59', 23:59:59',
strtotime("+$nextXDays days")) strtotime("+$nextXDays
days"))
&& &&
$currentStockEntry->amount > 0) expiring @endif @if($currentStockEntry->product_missing) belowminstockamount @endif $currentStockEntry->amount > 0) expiring @endif @if($currentStockEntry->product_missing) belowminstockamount @endif
</td> </td>