mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Added a button to jump to the journal on the product/chore/battery card
This commit is contained in:
parent
9ba4585143
commit
81f6b58fe4
@ -27,6 +27,7 @@
|
|||||||
- Fixed that the browser barcode scanner button was not clickable on iOS Safari & other small styles fixes/improvements for iOS Safari (thanks @DeeeeLAN)
|
- Fixed that the browser barcode scanner button was not clickable on iOS Safari & other small styles fixes/improvements for iOS Safari (thanks @DeeeeLAN)
|
||||||
- It's now also possible to set the meal plan page as the default/entry page (`config.php` setting `ENTRY_PAGE`) (thanks @lwis)
|
- It's now also possible to set the meal plan page as the default/entry page (`config.php` setting `ENTRY_PAGE`) (thanks @lwis)
|
||||||
- Some UI detail-refinements
|
- Some UI detail-refinements
|
||||||
|
- In the header of the product-/chore-/battery-card there is now also a button to directly jump to the journal of the current product/chore/battery
|
||||||
|
|
||||||
### API improvements/fixes
|
### API improvements/fixes
|
||||||
- The API Endpoint `GET /files/{group}/{fileName}` now also returns a `Cache-Control` header (defaults fixed to 30 days) to further increase page load times
|
- The API Endpoint `GET /files/{group}/{fileName}` now also returns a `Cache-Control` header (defaults fixed to 30 days) to further increase page load times
|
||||||
|
@ -12,7 +12,9 @@ Grocy.Components.BatteryCard.Refresh = function(batteryId)
|
|||||||
$('#batterycard-battery-charge-cycles-count').text((batteryDetails.charge_cycles_count || '0'));
|
$('#batterycard-battery-charge-cycles-count').text((batteryDetails.charge_cycles_count || '0'));
|
||||||
|
|
||||||
$('#batterycard-battery-edit-button').attr("href", U("/battery/" + batteryDetails.battery.id.toString()));
|
$('#batterycard-battery-edit-button').attr("href", U("/battery/" + batteryDetails.battery.id.toString()));
|
||||||
|
$('#batterycard-battery-journal-button').attr("href", U("/batteriesjournal?battery=" + batteryDetails.battery.id.toString()));
|
||||||
$('#batterycard-battery-edit-button').removeClass("disabled");
|
$('#batterycard-battery-edit-button').removeClass("disabled");
|
||||||
|
$('#batterycard-battery-journal-button').removeClass("disabled");
|
||||||
|
|
||||||
EmptyElementWhenMatches('#batterycard-battery-last-charged-timeago', __t('timeago_nan'));
|
EmptyElementWhenMatches('#batterycard-battery-last-charged-timeago', __t('timeago_nan'));
|
||||||
RefreshContextualTimeago();
|
RefreshContextualTimeago();
|
||||||
|
@ -12,7 +12,9 @@ Grocy.Components.ChoreCard.Refresh = function(choreId)
|
|||||||
$('#chorecard-chore-last-done-by').text((choreDetails.last_done_by.display_name || __t('Unknown')));
|
$('#chorecard-chore-last-done-by').text((choreDetails.last_done_by.display_name || __t('Unknown')));
|
||||||
|
|
||||||
$('#chorecard-chore-edit-button').attr("href", U("/chore/" + choreDetails.chore.id.toString()));
|
$('#chorecard-chore-edit-button').attr("href", U("/chore/" + choreDetails.chore.id.toString()));
|
||||||
|
$('#chorecard-chore-journal-button').attr("href", U("/choresjournal?chore=" + choreDetails.chore.id.toString()));
|
||||||
$('#chorecard-chore-edit-button').removeClass("disabled");
|
$('#chorecard-chore-edit-button').removeClass("disabled");
|
||||||
|
$('#chorecard-chore-journal-button').removeClass("disabled");
|
||||||
|
|
||||||
if (choreDetails.chore.track_date_only == 1)
|
if (choreDetails.chore.track_date_only == 1)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,9 @@ Grocy.Components.ProductCard.Refresh = function(productId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('#productcard-product-edit-button').attr("href", U("/product/" + productDetails.product.id.toString() + '?' + 'returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative)));
|
$('#productcard-product-edit-button').attr("href", U("/product/" + productDetails.product.id.toString() + '?' + 'returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative)));
|
||||||
|
$('#productcard-product-journal-button').attr("href", U("/stockjournal?product=" + productDetails.product.id.toString()));
|
||||||
$('#productcard-product-edit-button').removeClass("disabled");
|
$('#productcard-product-edit-button').removeClass("disabled");
|
||||||
|
$('#productcard-product-journal-button').removeClass("disabled");
|
||||||
|
|
||||||
if (productDetails.last_price !== null)
|
if (productDetails.last_price !== null)
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
<a id="batterycard-battery-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit battery') }}">
|
<a id="batterycard-battery-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit battery') }}">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a id="batterycard-battery-journal-button" class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Journal for this battery') }}">
|
||||||
|
<i class="fas fa-file-alt"></i>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3><span id="batterycard-battery-name"></span></h3>
|
<h3><span id="batterycard-battery-name"></span></h3>
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
<a id="chorecard-chore-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit chore') }}">
|
<a id="chorecard-chore-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit chore') }}">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a id="chorecard-chore-journal-button" class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Journal for this chore') }}">
|
||||||
|
<i class="fas fa-file-alt"></i>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3><span id="chorecard-chore-name"></span></h3>
|
<h3><span id="chorecard-chore-name"></span></h3>
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
<a id="productcard-product-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit product') }}">
|
<a id="productcard-product-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit product') }}">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a id="productcard-product-journal-button" class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Stock journal for this product') }}">
|
||||||
|
<i class="fas fa-file-alt"></i>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3><span id="productcard-product-name"></span></h3>
|
<h3><span id="productcard-product-name"></span></h3>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user