diff --git a/changelog/60_UNRELEASED_2020-xx-xx.md b/changelog/60_UNRELEASED_2020-xx-xx.md index ffef84ce..1daaaabd 100644 --- a/changelog/60_UNRELEASED_2020-xx-xx.md +++ b/changelog/60_UNRELEASED_2020-xx-xx.md @@ -43,6 +43,8 @@ - When clicking the product name on the shopping list, the product card will now be displayed (like on the stock overview page) (thanks @kriddles) - On the product card there is now also a button to jump directly to the stock entries of the corresponding product (thanks @kriddles) - The product picker workflows can now also be started by `ENTER` (additionally to `TAB`) +- Added a grouped/summarized stock journal (new button "Journal summary" at the top of the stock journal page) (thanks @fipwmaqzufheoxq92ebc) + - Provides an overview of summarized transactions per product, transaction type and user + summarized amount - Fixed that changing the products "Factor purchase to stock quantity unit" not longer messes up historical prices (which results for example in wrong recipe costs) (thanks @kriddles) - Fixed that when adding products through a product picker workflow and when the created products contains special characters, the product was not preselected on the previous page (thanks @Forceu) - Fixed that when editing a product the default store was not visible / always empty regardless if the product had one set (thanks @kriddles) diff --git a/controllers/StockApiController.php b/controllers/StockApiController.php index 3c935d66..7bbd0c51 100644 --- a/controllers/StockApiController.php +++ b/controllers/StockApiController.php @@ -414,35 +414,30 @@ class StockApiController extends BaseApiController } $bestBeforeDate = null; - if (array_key_exists('best_before_date', $requestBody) && IsIsoDate($requestBody['best_before_date'])) { $bestBeforeDate = $requestBody['best_before_date']; } $purchasedDate = null; - if (array_key_exists('purchased_date', $requestBody) && IsIsoDate($requestBody['purchased_date'])) { - $bestBeforeDate = $requestBody['purchased_date']; + $purchasedDate = $requestBody['purchased_date']; } $locationId = null; - if (array_key_exists('location_id', $requestBody) && is_numeric($requestBody['location_id'])) { $locationId = $requestBody['location_id']; } $price = null; - if (array_key_exists('price', $requestBody) && is_numeric($requestBody['price'])) { $price = $requestBody['price']; } $shoppingLocationId = null; - if (array_key_exists('shopping_location_id', $requestBody) && is_numeric($requestBody['shopping_location_id'])) { $shoppingLocationId = $requestBody['shopping_location_id']; diff --git a/grocy.openapi.json b/grocy.openapi.json index af6608b0..737876ce 100644 --- a/grocy.openapi.json +++ b/grocy.openapi.json @@ -1233,7 +1233,7 @@ "price": { "type": "number", "format": "number", - "description": "The price per purchase quantity unit in configured currency" + "description": "The price per stock quantity unit in configured currency" }, "open": { "type": "boolean", @@ -1549,7 +1549,7 @@ "price": { "type": "number", "format": "number", - "description": "The price per purchase quantity unit in configured currency" + "description": "The price per stock quantity unit in configured currency" }, "location_id": { "type": "number", @@ -1977,7 +1977,7 @@ "price": { "type": "number", "format": "number", - "description": "The price per purchase quantity unit in configured currency" + "description": "The price per stock quantity unit in configured currency" }, "location_id": { "type": "number", diff --git a/localization/strings.pot b/localization/strings.pot index a8383021..7260462f 100644 --- a/localization/strings.pot +++ b/localization/strings.pot @@ -394,15 +394,6 @@ msgstr "" msgid "All" msgstr "" -msgid "Track charge cycle of battery %s" -msgstr "" - -msgid "Track execution of chore %s" -msgstr "" - -msgid "Filter by location" -msgstr "" - msgid "Search" msgstr "" @@ -561,9 +552,6 @@ msgstr "" msgid "Unknown" msgstr "" -msgid "Filter by chore" -msgstr "" - msgid "Chores journal" msgstr "" @@ -585,9 +573,6 @@ msgstr "" msgid "Price" msgstr "" -msgid "in %s per purchase quantity unit" -msgstr "" - msgid "The price cannot be lower than %s" msgstr "" @@ -824,9 +809,6 @@ msgstr "" msgid "No picture available" msgstr "" -msgid "Filter by product group" -msgstr "" - msgid "Presets for new products" msgstr "" @@ -854,27 +836,12 @@ msgstr "" msgid "Stock journal" msgstr "" -msgid "Filter by product" -msgstr "" - -msgid "Booking time" -msgstr "" - -msgid "Booking type" -msgstr "" - -msgid "Undo booking" -msgstr "" - msgid "Undone on" msgstr "" msgid "Batteries journal" msgstr "" -msgid "Filter by battery" -msgstr "" - msgid "Undo charge cycle" msgstr "" @@ -1034,21 +1001,6 @@ msgstr "" msgid "The current picture will be deleted when you save the recipe" msgstr "" -msgid "Show product details" -msgstr "" - -msgid "Stock journal for this product" -msgstr "" - -msgid "Show chore details" -msgstr "" - -msgid "Journal for this chore" -msgstr "" - -msgid "Show battery details" -msgstr "" - msgid "Journal for this battery" msgstr "" @@ -1145,9 +1097,6 @@ msgstr "" msgid "Userfields" msgstr "" -msgid "Filter by entity" -msgstr "" - msgid "Entity" msgstr "" @@ -1586,9 +1535,6 @@ msgstr "" msgid "Transfered %1$s of %2$s from %3$s to %4$s" msgstr "" -msgid "Show stock entries" -msgstr "" - msgid "Stock entries" msgstr "" @@ -1945,3 +1891,48 @@ msgstr "" msgid "Hide/view columns" msgstr "" + +msgid "This product is currently on a shopping list" +msgstr "" + +msgid "Undo transaction" +msgstr "" + +msgid "Transaction type" +msgstr "" + +msgid "Transaction time" +msgstr "" + +msgid "Edit this timee" +msgstr "" + +msgid "Delete this tiem" +msgstr "" + +msgid "Chore journal" +msgstr "" + +msgid "Track chore execution" +msgstr "" + +msgid "Mark task as completed" +msgstr "" + +msgid "Track charge cycle" +msgstr "" + +msgid "Battery journal" +msgstr "" + +msgid "This product has a picture" +msgstr "" + +msgid "Consume this stock entry as spoiled" +msgstr "" + +msgid "Configure user permissions" +msgstr "" + +msgid "Show a QR-Code for this API key" +msgstr "" diff --git a/public/js/grocy.js b/public/js/grocy.js index 2be5b6e5..ed57ac90 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -764,6 +764,8 @@ $(window).on("message", function(e) $(".change-table-columns-visibility-button").on("click", function(e) { + e.preventDefault(); + var dataTableSelector = $(e.currentTarget).attr("data-table-selector"); var dataTable = $(dataTableSelector).DataTable(); diff --git a/public/viewjs/choreform.js b/public/viewjs/choreform.js index bbad9f8d..ec054827 100644 --- a/public/viewjs/choreform.js +++ b/public/viewjs/choreform.js @@ -122,12 +122,12 @@ $('.input-group-chore-period-type').on('change', function(e) $(".period-type-input").addClass("d-none"); $(".period-type-" + periodType).removeClass("d-none"); - $('#chore-period-type-info').attr("title", ""); + $('#chore-period-type-info').attr("data-original-title", ""); $("#period_config").val(""); if (periodType === 'manually') { - $('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is not scheduled')); + $('#chore-period-type-info').attr("data-original-title", __t('This means the next execution of this chore is not scheduled')); } else if (periodType === 'dynamic-regular') { @@ -135,32 +135,32 @@ $('.input-group-chore-period-type').on('change', function(e) $("#period_days").attr("min", "0"); $("#period_days").attr("max", "9999"); $("#period_days").parent().find(".invalid-feedback").text(__t('This cannot be negative')); - $('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled %s days after the last execution', periodDays.toString())); + $('#chore-period-type-info').attr("data-original-title", __t('This means the next execution of this chore is scheduled %s days after the last execution', periodDays.toString())); } else if (periodType === 'daily') { - $('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled 1 day after the last execution')); - $('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s days', periodInterval.toString())); + $('#chore-period-type-info').attr("data-original-title", __t('This means the next execution of this chore is scheduled 1 day after the last execution')); + $('#chore-period-interval-info').attr("data-original-title", __t('This means the next execution of this chore should only be scheduled every %s days', periodInterval.toString())); } else if (periodType === 'weekly') { - $('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled 1 day after the last execution, but only for the weekdays selected below')); + $('#chore-period-type-info').attr("data-original-title", __t('This means the next execution of this chore is scheduled 1 day after the last execution, but only for the weekdays selected below')); $("#period_config").val($(".period-type-weekly input:checkbox:checked").map(function() { return this.value; }).get().join(",")); - $('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s weeks', periodInterval.toString())); + $('#chore-period-interval-info').attr("data-original-title", __t('This means the next execution of this chore should only be scheduled every %s weeks', periodInterval.toString())); } else if (periodType === 'monthly') { - $('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled on the below selected day of each month')); + $('#chore-period-type-info').attr("data-original-title", __t('This means the next execution of this chore is scheduled on the below selected day of each month')); $("label[for='period_days']").text(__t("Day of month")); $("#period_days").attr("min", "1"); $("#period_days").attr("max", "31"); $("#period_days").parent().find(".invalid-feedback").text(__t('The amount must be between %1$s and %2$s', "1", "31")); - $('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s months', periodInterval.toString())); + $('#chore-period-interval-info').attr("data-original-title", __t('This means the next execution of this chore should only be scheduled every %s months', periodInterval.toString())); } else if (periodType === 'yearly') { - $('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled 1 year after the last execution')); - $('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s years', periodInterval.toString())); + $('#chore-period-type-info').attr("data-original-title", __t('This means the next execution of this chore is scheduled 1 year after the last execution')); + $('#chore-period-interval-info').attr("data-original-title", __t('This means the next execution of this chore should only be scheduled every %s years', periodInterval.toString())); } Grocy.FrontendHelpers.ValidateForm('chore-form'); @@ -176,23 +176,23 @@ $('.input-group-chore-assignment-type').on('change', function(e) if (assignmentType === 'no-assignment') { - $('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will not be assigned to anyone')); + $('#chore-assignment-type-info').attr("data-original-title", __t('This means the next execution of this chore will not be assigned to anyone')); } else if (assignmentType === 'who-least-did-first') { - $('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will be assigned to the one who executed it least')); + $('#chore-assignment-type-info').attr("data-original-title", __t('This means the next execution of this chore will be assigned to the one who executed it least')); $("#assignment_config").attr("required", ""); $("#assignment_config").removeAttr("disabled"); } else if (assignmentType === 'random') { - $('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will be assigned randomly')); + $('#chore-assignment-type-info').attr("data-original-title", __t('This means the next execution of this chore will be assigned randomly')); $("#assignment_config").attr("required", ""); $("#assignment_config").removeAttr("disabled"); } else if (assignmentType === 'in-alphabetical-order') { - $('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will be assigned to the next one in alphabetical order')); + $('#chore-assignment-type-info').attr("data-original-title", __t('This means the next execution of this chore will be assigned to the next one in alphabetical order')); $("#assignment_config").attr("required", ""); $("#assignment_config").removeAttr("disabled"); } diff --git a/public/viewjs/components/numberpicker.js b/public/viewjs/components/numberpicker.js index d66f870b..bd7afd33 100644 --- a/public/viewjs/components/numberpicker.js +++ b/public/viewjs/components/numberpicker.js @@ -16,7 +16,7 @@ $(".numberpicker-up-button").unbind('click').on("click", function() $(".numberpicker").on("keyup", function() { - if ($(this).data("not-equal") && !$(this).data("not-equal").toString().isEmpty() && $(this).data("not-equal") == $(this).val()) + if ($(this).attr("data-not-equal") && !$(this).attr("data-not-equal").toString().isEmpty() && $(this).attr("data-not-equal") == $(this).val()) { $(this)[0].setCustomValidity("error"); } diff --git a/public/viewjs/components/productamountpicker.js b/public/viewjs/components/productamountpicker.js index 0967443f..9ab43ac0 100644 --- a/public/viewjs/components/productamountpicker.js +++ b/public/viewjs/components/productamountpicker.js @@ -94,7 +94,7 @@ $(".input-group-productamountpicker").on("change", function() var destinationAmount = amount / quFactor; var destinationQuName = __n(destinationAmount, $("#qu_id").attr("data-destination-qu-name"), $("#qu_id").attr("data-destination-qu-name-plural")) - if (destinationQuName == selectedQuName || Grocy.Components.ProductAmountPicker.AllowAnyQuEnabled || amount.toString().isEmpty() || selectedQuName.toString().isEmpty()) + if ($("#qu_id").attr("data-destination-qu-name") == selectedQuName || Grocy.Components.ProductAmountPicker.AllowAnyQuEnabled || amount.toString().isEmpty() || selectedQuName.toString().isEmpty()) { $("#qu-conversion-info").addClass("d-none"); } diff --git a/public/viewjs/inventory.js b/public/viewjs/inventory.js index d41b3379..ca1b3774 100644 --- a/public/viewjs/inventory.js +++ b/public/viewjs/inventory.js @@ -134,7 +134,8 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e) Grocy.Components.ProductAmountPicker.Reload(productDetails.product.id, productDetails.quantity_unit_stock.id); Grocy.Components.ProductAmountPicker.SetQuantityUnit(productDetails.quantity_unit_stock.id); - $('#display_amount').attr('data-not-equal', productDetails.stock_amount); + $('#display_amount').attr("data-stock-amount", productDetails.stock_amount) + $('#display_amount').attr('data-not-equal', productDetails.stock_amount * $("#qu_id option:selected").attr("data-qu-factor")); if (productDetails.product.allow_partial_units_in_stock == 1) { @@ -228,9 +229,12 @@ $('#inventory-form input').keydown(function(event) } }); -$('#display_amount').on('keypress', function(e) + +$('#qu_id').on('change', function(e) { - $('#display_amount').trigger('change'); + $('#display_amount').attr('data-not-equal', parseFloat($('#display_amount').attr('data-stock-amount')) * parseFloat($("#qu_id option:selected").attr("data-qu-factor"))); + $("#display_amount").parent().find(".invalid-feedback").text(__t('The amount cannot be lower than %1$s or equal %2$s', "0." + "0".repeat(parseInt(Grocy.UserSettings.stock_decimal_places_amounts) - 1) + "1", parseFloat($('#display_amount').attr('data-not-equal')).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }))); + Grocy.FrontendHelpers.ValidateForm('inventory-form'); }); Grocy.Components.DateTimePicker.GetInputElement().on('change', function(e) @@ -246,7 +250,7 @@ Grocy.Components.DateTimePicker.GetInputElement().on('keypress', function(e) $('#display_amount').on('keyup', function(e) { var productId = Grocy.Components.ProductPicker.GetValue(); - var newAmount = parseInt($('#display_amount').val()); + var newAmount = parseInt($('#amount').val()); if (productId) { diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 9f9dda22..c9265a6c 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -133,8 +133,8 @@ var calendar = $("#calendar").fullCalendar({
' + fulfillmentIconHtml + " " + fulfillmentInfoHtml + '
\ ' + costsAndCaloriesPerServing + ' \
\ - \ - \ + \ + \ \ \ \ diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js index fffe75c9..bb92a628 100644 --- a/public/viewjs/purchase.js +++ b/public/viewjs/purchase.js @@ -165,6 +165,11 @@ if (Grocy.Components.ProductPicker !== undefined) Grocy.Components.ProductAmountPicker.SetQuantityUnit(productDetails.quantity_unit_purchase.id); $('#display_amount').val(parseFloat(Grocy.UserSettings.stock_default_purchase_amount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts })); + if (GetUriParam("flow") === "shoppinglistitemtostock") + { + $('#display_amount').val(parseFloat(GetUriParam("amount")).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts })); + } + if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) { if (productDetails.last_shopping_location_id != null) @@ -266,23 +271,26 @@ if (Grocy.Components.ProductPicker !== undefined) { var barcode = barcodeResult[0]; - if (barcode.amount != null) + if (barcode != null) { - $("#display_amount").val(barcode.amount); - $("#display_amount").select(); - } + if (barcode.amount != null) + { + $("#display_amount").val(barcode.amount); + $("#display_amount").select(); + } - if (barcode.qu_id != null) - { - Grocy.Components.ProductAmountPicker.SetQuantityUnit(barcode.qu_id); - } + if (barcode.qu_id != null) + { + Grocy.Components.ProductAmountPicker.SetQuantityUnit(barcode.qu_id); + } - if (barcode.shopping_location_id != null) - { - Grocy.Components.ShoppingLocationPicker.SetId(barcode.shopping_location_id); - } + if (barcode.shopping_location_id != null) + { + Grocy.Components.ShoppingLocationPicker.SetId(barcode.shopping_location_id); + } - Grocy.FrontendHelpers.ValidateForm('purchase-form'); + Grocy.FrontendHelpers.ValidateForm('purchase-form'); + } } }, function(xhr) @@ -406,11 +414,6 @@ $('#display_amount').on('change', function(e) Grocy.FrontendHelpers.ValidateForm('purchase-form'); }); -if (GetUriParam("flow") === "shoppinglistitemtostock") -{ - $('#display_amount').val(parseFloat(GetUriParam("amount")).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts })); -} - function refreshPriceHint() { if ($('#amount').val() == 0 || $('#price').val() == 0) diff --git a/views/batteries.blade.php b/views/batteries.blade.php index 9d4e72a2..33f8166d 100644 --- a/views/batteries.blade.php +++ b/views/batteries.blade.php @@ -92,13 +92,17 @@ + href="{{ $U('/battery/') }}{{ $battery->id }}?embedded" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-battery-name="{{ $battery->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/batteriesoverview.blade.php b/views/batteriesoverview.blade.php index 76459d34..67924e29 100644 --- a/views/batteriesoverview.blade.php +++ b/views/batteriesoverview.blade.php @@ -117,7 +117,7 @@ href="#" data-toggle="tooltip" data-placement="left" - title="{{ $__t('Track charge cycle of battery %s', FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->name) }}" + title="{{ $__t('Track charge cycle') }}" data-battery-id="{{ $currentBatteryEntry->battery_id }}" data-battery-name="{{ FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->name }}"> @@ -133,17 +133,17 @@ data-battery-id="{{ $currentBatteryEntry->battery_id }}" type="button" href="#"> - {{ $__t('Show battery details') }} + {{ $__t('Battery overview') }} - {{ $__t('Journal for this battery') }} + {{ $__t('Battery journal') }} - - {{ $__t('Edit battery') }} + href="{{ $U('/battery/') }}{{ $currentBatteryEntry->battery_id }}?embedded"> + {{ $__t('Edit battery') }} diff --git a/views/chores.blade.php b/views/chores.blade.php index 6ab4529e..553103da 100644 --- a/views/chores.blade.php +++ b/views/chores.blade.php @@ -92,13 +92,17 @@ + href="{{ $U('/chore/') }}{{ $chore->id }}" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-chore-name="{{ $chore->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/choresoverview.blade.php b/views/choresoverview.blade.php index b3585ef0..23862475 100644 --- a/views/choresoverview.blade.php +++ b/views/choresoverview.blade.php @@ -144,7 +144,7 @@ href="#" data-toggle="tooltip" data-placement="left" - title="{{ $__t('Track execution of chore %s', FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->name) }}" + title="{{ $__t('Track chore execution') }}" data-chore-id="{{ $curentChoreEntry->chore_id }}" data-chore-name="{{ FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->name }}"> @@ -160,17 +160,17 @@ data-chore-id="{{ $curentChoreEntry->chore_id }}" type="button" href="#"> - {{ $__t('Show chore details') }} + {{ $__t('Chore overview') }} - {{ $__t('Journal for this chore') }} + {{ $__t('Chore journal') }} - {{ $__t('Edit chore') }} + {{ $__t('Edit chore') }} diff --git a/views/components/chorecard.blade.php b/views/components/chorecard.blade.php index bbce8f8d..6b6f2b2e 100644 --- a/views/components/chorecard.blade.php +++ b/views/components/chorecard.blade.php @@ -16,7 +16,7 @@ class="btn btn-sm btn-outline-secondary py-0 mr-1 float-right disabled show-as-dialog-link" href="#" data-toggle="tooltip" - title="{{ $__t('Journal for this chore') }}"> + title="{{ $__t('Chore journal') }}"> diff --git a/views/components/productcard.blade.php b/views/components/productcard.blade.php index e7eb421e..0bec4ea5 100644 --- a/views/components/productcard.blade.php +++ b/views/components/productcard.blade.php @@ -17,14 +17,14 @@ class="btn btn-sm btn-outline-secondary py-0 mr-1 float-right disabled show-as-dialog-link" href="#" data-toggle="tooltip" - title="{{ $__t('Stock journal for this product') }}"> + title="{{ $__t('Stock journal') }}"> + title="{{ $__t('Stock entries') }}"> diff --git a/views/equipment.blade.php b/views/equipment.blade.php index 60d7e8ec..d0a45702 100644 --- a/views/equipment.blade.php +++ b/views/equipment.blade.php @@ -81,13 +81,17 @@ + href="{{ $U('/equipment/') }}{{ $equipmentItem->id }}" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-equipment-name="{{ $equipmentItem->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/inventory.blade.php b/views/inventory.blade.php index 82d73d6f..1486fe72 100644 --- a/views/inventory.blade.php +++ b/views/inventory.blade.php @@ -81,11 +81,11 @@ @if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) @include('components.numberpicker', array( 'id' => 'price', - 'label' => 'Price per stock unit', + 'label' => 'Price', 'min' => 0, 'decimals' => $userSettings['stock_decimal_places_prices'], 'value' => '', - 'hint' => $__t('in %s per purchase quantity unit', GROCY_CURRENCY), + 'hint' => $__t('Per stock quantity unit', GROCY_CURRENCY), 'additionalHtmlContextHelp' => '', diff --git a/views/locations.blade.php b/views/locations.blade.php index 6f4c722c..82f1d26f 100644 --- a/views/locations.blade.php +++ b/views/locations.blade.php @@ -91,13 +91,17 @@ + href="{{ $U('/location/') }}{{ $location->id }}?embedded" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-location-name="{{ $location->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/manageapikeys.blade.php b/views/manageapikeys.blade.php index 18d66aa6..728f1256 100644 --- a/views/manageapikeys.blade.php +++ b/views/manageapikeys.blade.php @@ -97,13 +97,17 @@ + data-apikey-apikey="{{ $apiKey->api_key }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> + data-apikey-type="{{ $apiKey->key_type }}" + data-toggle="tooltip" + title="{{ $__t('Show a QR-Code for this API key') }}"> diff --git a/views/productgroups.blade.php b/views/productgroups.blade.php index 179255fe..229ca7fc 100644 --- a/views/productgroups.blade.php +++ b/views/productgroups.blade.php @@ -91,13 +91,17 @@ + href="{{ $U('/productgroup/') }}{{ $productGroup->id }}?embedded" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-group-name="{{ $productGroup->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/products.blade.php b/views/products.blade.php index fd648cf0..2877e568 100644 --- a/views/products.blade.php +++ b/views/products.blade.php @@ -113,18 +113,24 @@ + href="{{ $U('/product/') }}{{ $product->id }}" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-product-name="{{ $product->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> - @if($product->active == 0) (deactivated) @endif {{ $product->name }}@if(!empty($product->picture_file_name)) @endif + @if($product->active == 0) (deactivated) @endif {{ $product->name }}@if(!empty($product->picture_file_name)) @endif {{ FindObjectInArrayByPropertyValue($locations, 'id', $product->location_id)->name }} diff --git a/views/quantityunits.blade.php b/views/quantityunits.blade.php index 7f3b3f45..7784ca43 100644 --- a/views/quantityunits.blade.php +++ b/views/quantityunits.blade.php @@ -90,13 +90,17 @@ + href="{{ $U('/quantityunit/') }}{{ $quantityunit->id }}" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-quantityunit-name="{{ $quantityunit->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/recipes.blade.php b/views/recipes.blade.php index bccefd3b..dc43fc84 100644 --- a/views/recipes.blade.php +++ b/views/recipes.blade.php @@ -125,13 +125,17 @@ data-recipe-id="{{ $recipe->id }}"> + href="{{ $U('/recipe/') }}{{ $recipe->id }}" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-recipe-name="{{ $recipe->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/recipessettings.blade.php b/views/recipessettings.blade.php index 97844def..9d0e83ff 100644 --- a/views/recipessettings.blade.php +++ b/views/recipessettings.blade.php @@ -17,12 +17,14 @@

{{ $__t('Recipe card') }}

-
-
diff --git a/views/shoppinglistsettings.blade.php b/views/shoppinglistsettings.blade.php index 4f43ffc8..2ec890ff 100644 --- a/views/shoppinglistsettings.blade.php +++ b/views/shoppinglistsettings.blade.php @@ -17,26 +17,28 @@

{{ $__t('Shopping list') }}

-
-

{{ $__t('Shopping list to stock workflow') }}

-
-
diff --git a/views/shoppinglocations.blade.php b/views/shoppinglocations.blade.php index 680d72fa..b1ca455b 100644 --- a/views/shoppinglocations.blade.php +++ b/views/shoppinglocations.blade.php @@ -91,13 +91,17 @@ + href="{{ $U('/shoppinglocation/') }}{{ $shoppinglocation->id }}?embedded" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-shoppinglocation-name="{{ $shoppinglocation->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/stockentries.blade.php b/views/stockentries.blade.php index 0d8aa087..78823d0a 100644 --- a/views/stockentries.blade.php +++ b/views/stockentries.blade.php @@ -139,23 +139,6 @@ {{ $__t('Inventory') }} - - {{ $__t('Show product details') }} - - - {{ $__t('Stock journal for this product') }} - - - {{ $__t('Edit product') }} - - - {{ $__t('Consume %1$s of %2$s as spoiled', '1 ' . FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->name) }} + {{ $__t('Consume this stock entry as spoiled', '1 ' . FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->name) }} @if(GROCY_FEATURE_FLAG_RECIPES) - {{ $__t('Search for recipes containing this product') }} + {{ $__t('Search for recipes containing this product') }} @endif + + + {{ $__t('Product overview') }} + + + {{ $__t('Stock journal') }} + + + {{ $__t('Stock journal summary') }} + + + {{ $__t('Edit product') }} +
diff --git a/views/stockentryform.blade.php b/views/stockentryform.blade.php index f24565f6..edda85a7 100644 --- a/views/stockentryform.blade.php +++ b/views/stockentryform.blade.php @@ -57,7 +57,7 @@ 'id' => 'amount', 'value' => $stockEntry->amount, 'label' => 'Amount', - 'hintId' => 'amount_qu_unit', + 'contextInfoId' => 'amount_qu_unit', 'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'), 'additionalAttributes' => 'data-not-equal="-1"', 'additionalHtmlContextHelp' => '
'Price', 'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices'] - 1) . '1', 'decimals' => $userSettings['stock_decimal_places_prices'], - 'hint' => $__t('in %s per purchase quantity unit', GROCY_CURRENCY), + 'hint' => $__t('Per stock quantity unit'), 'invalidFeedback' => $__t('The price cannot be lower than %s', '0'), 'isRequired' => false )) diff --git a/views/stockjournal.blade.php b/views/stockjournal.blade.php index a2b7316b..0e9d9069 100644 --- a/views/stockjournal.blade.php +++ b/views/stockjournal.blade.php @@ -85,8 +85,8 @@ {{ $__t('Product') }} {{ $__t('Amount') }} - {{ $__t('Booking time') }} - {{ $__t('Booking type') }} + {{ $__t('Transaction time') }} + {{ $__t('Transaction type') }} {{ $__t('Location') }} {{ $__t('Done by') }} @@ -102,7 +102,7 @@ data-booking-id="{{ $stockLogEntry->id }}" data-toggle="tooltip" data-placement="left" - title="{{ $__t('Undo booking') }}"> + title="{{ $__t('Undo transaction') }}"> diff --git a/views/stockjournalsummary.blade.php b/views/stockjournalsummary.blade.php index 65f92a08..166c3e1b 100644 --- a/views/stockjournalsummary.blade.php +++ b/views/stockjournalsummary.blade.php @@ -20,7 +20,7 @@ {{ $__t('Product') }} - {{ $__t('Booking type') }} + {{ $__t('Transaction type') }} {{ $__t('User') }} {{ $__t('Amount') }} diff --git a/views/stockoverview.blade.php b/views/stockoverview.blade.php index 8a699bdb..fb47bb37 100755 --- a/views/stockoverview.blade.php +++ b/views/stockoverview.blade.php @@ -257,34 +257,6 @@ {{ $__t('Inventory') }} - - {{ $__t('Show product details') }} - - - {{ $__t('Show stock entries') }} - - - {{ $__t('Stock journal for this product') }} - - - {{ $__t('Journal summary for this product') }} - - - {{ $__t('Edit product') }} - - - {{ $__t('Consume %1$s of %2$s as spoiled', '1 ' . $currentStockEntry->qu_unit_name, $currentStockEntry->product_name) }} + {{ $__t('Consume %1$s of %2$s as spoiled', '1 ' . $currentStockEntry->qu_unit_name, $currentStockEntry->product_name) }} @if(GROCY_FEATURE_FLAG_RECIPES) - {{ $__t('Search for recipes containing this product') }} + {{ $__t('Search for recipes containing this product') }} @endif + + + {{ $__t('Product overview') }} + + + {{ $__t('Stock entries') }} + + + {{ $__t('Stock journal') }} + + + {{ $__t('Stock journal summary') }} + + + {{ $__t('Edit product') }} +
@@ -326,7 +326,9 @@ @endif @if(boolval($userSettings['show_icon_on_stock_overview_page_when_product_is_on_shopping_list'])) @if($currentStockEntry->on_shopping_list) - + @endif diff --git a/views/stocksettings.blade.php b/views/stocksettings.blade.php index 9f043ffa..705a8380 100644 --- a/views/stocksettings.blade.php +++ b/views/stocksettings.blade.php @@ -68,12 +68,14 @@ ))
-
-
@@ -90,12 +92,14 @@ ))
-
-
diff --git a/views/taskcategories.blade.php b/views/taskcategories.blade.php index 5e26b710..18ca8f90 100644 --- a/views/taskcategories.blade.php +++ b/views/taskcategories.blade.php @@ -91,13 +91,17 @@ + href="{{ $U('/taskcategory/') }}{{ $taskCategory->id }}?embedded" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-category-name="{{ $taskCategory->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/tasks.blade.php b/views/tasks.blade.php index d742cd03..df09744c 100644 --- a/views/tasks.blade.php +++ b/views/tasks.blade.php @@ -136,7 +136,7 @@ href="#" data-toggle="tooltip" data-placement="left" - title="{{ $__t('Mark task "%s" as completed', $task->name) }}" + title="{{ $__t('Mark task as completed') }}" data-task-id="{{ $task->id }}" data-task-name="{{ $task->name }}"> @@ -152,16 +152,20 @@ @endif + + + + data-task-name="{{ $task->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> - - - diff --git a/views/userentities.blade.php b/views/userentities.blade.php index 069c1b0a..7511fa81 100644 --- a/views/userentities.blade.php +++ b/views/userentities.blade.php @@ -82,13 +82,17 @@ + href="{{ $U('/userentity/') }}{{ $userentity->id }}?embedded" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-userentity-name="{{ $userentity->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> + href="{{ $U('/userfield/') }}{{ $userfield->id }}?embedded" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-userfield-name="{{ $userfield->name }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/userobjects.blade.php b/views/userobjects.blade.php index 2492d0ce..789e79e1 100644 --- a/views/userobjects.blade.php +++ b/views/userobjects.blade.php @@ -88,12 +88,16 @@ + href="{{ $U('/userobject/' . $userentity->name . '/') }}{{ $userobject->id }}" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + data-userobject-id="{{ $userobject->id }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}"> diff --git a/views/users.blade.php b/views/users.blade.php index 35e33ddc..a92f8b2b 100644 --- a/views/users.blade.php +++ b/views/users.blade.php @@ -83,17 +83,23 @@ + href="{{ $U('/user/') }}{{ $user->id }}" + data-toggle="tooltip" + title="{{ $__t('Edit this item') }}"> + href="{{ $U('/user/' . $user->id . '/permissions') }}" + data-toggle="tooltip" + title="{{ $__t('Configure user permissions') }}"> + data-user-username="{{ $user->username }}" + data-toggle="tooltip" + title="{{ $__t('Delete this item') }}">