mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Added a button to jump to the journal on the product/chore/battery card
This commit is contained in:
@@ -12,7 +12,9 @@ Grocy.Components.BatteryCard.Refresh = function(batteryId)
|
||||
$('#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-journal-button').attr("href", U("/batteriesjournal?battery=" + batteryDetails.battery.id.toString()));
|
||||
$('#batterycard-battery-edit-button').removeClass("disabled");
|
||||
$('#batterycard-battery-journal-button').removeClass("disabled");
|
||||
|
||||
EmptyElementWhenMatches('#batterycard-battery-last-charged-timeago', __t('timeago_nan'));
|
||||
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-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-journal-button').removeClass("disabled");
|
||||
|
||||
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-journal-button').attr("href", U("/stockjournal?product=" + productDetails.product.id.toString()));
|
||||
$('#productcard-product-edit-button').removeClass("disabled");
|
||||
$('#productcard-product-journal-button').removeClass("disabled");
|
||||
|
||||
if (productDetails.last_price !== null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user