Show the journal of the product/chore/battery cards in a dialog

This commit is contained in:
Bernd Bestel
2019-09-27 16:54:40 +02:00
parent 81f6b58fe4
commit 2636456461
7 changed files with 30 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ 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-journal-button').attr("href", U("/batteriesjournal?embedded&battery=" + batteryDetails.battery.id.toString()));
$('#batterycard-battery-edit-button').removeClass("disabled");
$('#batterycard-battery-journal-button').removeClass("disabled");

View File

@@ -12,7 +12,7 @@ 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-journal-button').attr("href", U("/choresjournal?embedded&chore=" + choreDetails.chore.id.toString()));
$('#chorecard-chore-edit-button').removeClass("disabled");
$('#chorecard-chore-journal-button').removeClass("disabled");

View File

@@ -71,7 +71,7 @@ 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-journal-button').attr("href", U("/stockjournal?embedded&product=" + productDetails.product.id.toString()));
$('#productcard-product-edit-button').removeClass("disabled");
$('#productcard-product-journal-button').removeClass("disabled");