diff --git a/public/viewjs/components/batterycard.js b/public/viewjs/components/batterycard.js index 67d2d3b8..3a059e6a 100644 --- a/public/viewjs/components/batterycard.js +++ b/public/viewjs/components/batterycard.js @@ -10,6 +10,9 @@ Grocy.Components.BatteryCard.Refresh = function(batteryId) $('#batterycard-battery-last-charged').text((batteryDetails.last_charged || L('never'))); $('#batterycard-battery-last-charged-timeago').text($.timeago(batteryDetails.last_charged || '')); $('#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').removeClass("disabled"); EmptyElementWhenMatches('#batterycard-battery-last-charged-timeago', L('timeago_nan')); }, diff --git a/public/viewjs/components/chorecard.js b/public/viewjs/components/chorecard.js index 5df62cd2..09069bc8 100644 --- a/public/viewjs/components/chorecard.js +++ b/public/viewjs/components/chorecard.js @@ -10,6 +10,9 @@ Grocy.Components.ChoreCard.Refresh = function(choreId) $('#chorecard-chore-last-tracked-timeago').text($.timeago(choreDetails.last_tracked || '')); $('#chorecard-chore-tracked-count').text((choreDetails.tracked_count || '0')); $('#chorecard-chore-last-done-by').text((choreDetails.last_done_by.display_name || L('Unknown'))); + + $('#chorecard-chore-edit-button').attr("href", U("/chore/" + choreDetails.chore.id.toString())); + $('#chorecard-chore-edit-button').removeClass("disabled"); EmptyElementWhenMatches('#chorecard-chore-last-tracked-timeago', L('timeago_nan')); }, diff --git a/public/viewjs/components/productcard.js b/public/viewjs/components/productcard.js index 787f5b95..2d55bdc8 100644 --- a/public/viewjs/components/productcard.js +++ b/public/viewjs/components/productcard.js @@ -15,6 +15,9 @@ Grocy.Components.ProductCard.Refresh = function(productId) $('#productcard-product-last-used').text((productDetails.last_used || L('never')).substring(0, 10)); $('#productcard-product-last-used-timeago').text($.timeago(productDetails.last_used || '')); + $('#productcard-product-edit-button').attr("href", U("/product/" + productDetails.product.id.toString())); + $('#productcard-product-edit-button').removeClass("disabled"); + if (productDetails.last_price !== null) { $('#productcard-product-last-price').text(Number.parseFloat(productDetails.last_price).toLocaleString() + ' ' + Grocy.Currency); diff --git a/views/components/batterycard.blade.php b/views/components/batterycard.blade.php index fbd346a8..8aa60132 100644 --- a/views/components/batterycard.blade.php +++ b/views/components/batterycard.blade.php @@ -5,6 +5,9 @@
{{ $L('Battery overview') }} + + +

diff --git a/views/components/chorecard.blade.php b/views/components/chorecard.blade.php index ee7afdb3..7b10ff24 100644 --- a/views/components/chorecard.blade.php +++ b/views/components/chorecard.blade.php @@ -4,7 +4,10 @@
- {{ $L('Chore overview') }} + {{ $L('Chore overview') }} + + +

diff --git a/views/components/productcard.blade.php b/views/components/productcard.blade.php index 32ea4d4a..8c9fd6d9 100644 --- a/views/components/productcard.blade.php +++ b/views/components/productcard.blade.php @@ -6,6 +6,9 @@
{{ $L('Product overview') }} + + +