Added a button to jump to the journal on the product/chore/battery card

This commit is contained in:
Bernd Bestel
2019-09-27 14:19:06 +02:00
parent 9ba4585143
commit 81f6b58fe4
7 changed files with 16 additions and 0 deletions

View File

@@ -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();