diff --git a/VERSION b/VERSION index 24ba9a38..860487ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.7.0 +2.7.1 diff --git a/assets/controllers/elements/datatables/datatables_controller.js b/assets/controllers/elements/datatables/datatables_controller.js index 5a50623d..9ac23483 100644 --- a/assets/controllers/elements/datatables/datatables_controller.js +++ b/assets/controllers/elements/datatables/datatables_controller.js @@ -108,11 +108,19 @@ export default class extends Controller { const raw_order = saved_state.order; settings.initial_order = raw_order.map((order) => { + //Skip if direction is empty, as this is the default, otherwise datatables server is confused when the order is sent in the request, but the initial order is set to an empty direction + if (order[1] === '') { + return null; + } + return { column: order[0], dir: order[1] } }); + + //Remove null values from the initial_order array + settings.initial_order = settings.initial_order.filter(order => order !== null); } let options = { diff --git a/src/Form/Part/PartLotType.php b/src/Form/Part/PartLotType.php index ae86fb61..fc330bb1 100644 --- a/src/Form/Part/PartLotType.php +++ b/src/Form/Part/PartLotType.php @@ -117,7 +117,6 @@ class PartLotType extends AbstractType 'widget' => 'single_text', 'disabled' => !$this->security->isGranted('@parts_stock.stocktake'), 'required' => false, - 'empty_data' => null, ]); } diff --git a/templates/parts/info/_part_lots.html.twig b/templates/parts/info/_part_lots.html.twig index cfb7190b..70e5dc4e 100644 --- a/templates/parts/info/_part_lots.html.twig +++ b/templates/parts/info/_part_lots.html.twig @@ -41,35 +41,37 @@ {{ lot.amount | format_amount(part.partUnit, {'decimals': 5}) }} {% endif %} - - {% if lot.owner %} - + +
+ {% if lot.owner %} + {{ helper.user_icon_link(lot.owner) }} - {% endif %} - {% if lot.expirationDate %} - + {% endif %} + {% if lot.expirationDate %} + {{ lot.expirationDate | format_date() }}
- {% endif %} - {% if lot.expired %} - + {% endif %} + {% if lot.expired %} + {% trans %}part_lots.is_expired{% endtrans %} - {% endif %} - {% if lot.needsRefill %} - + {% endif %} + {% if lot.needsRefill %} + {% trans %}part_lots.need_refill{% endtrans %} - {% endif %} - {% if lot.lastStocktakeAt %} - + {% endif %} + {% if lot.lastStocktakeAt %} + {{ lot.lastStocktakeAt | format_datetime("short") }} - {% endif %} + {% endif %} +
diff --git a/translations/messages.de.xlf b/translations/messages.de.xlf index c20e8152..a9674614 100644 --- a/translations/messages.de.xlf +++ b/translations/messages.de.xlf @@ -11832,7 +11832,7 @@ Buerklin-API-Authentication-Server: update_manager.latest_release - update_manager.latest_release + Neueste Version @@ -12078,25 +12078,25 @@ Buerklin-API-Authentication-Server: update_manager.run_command_to_update - update_manager.run_command_to_update + Führen Sie den folgenden Befehl in Ihrem Terminal aus, um auf diese Version zu aktualisieren: update_manager.log_viewer - update_manager.log_viewer + Protokollanzeige update_manager.update_log - update_manager.update_log + Update-Protokoll update_manager.bytes - update_manager.bytes + Bytes @@ -12108,43 +12108,43 @@ Buerklin-API-Authentication-Server: update_manager.create_backup - update_manager.create_backup + Erstelle vor dem Update ein Backup (empfohlen) update_manager.confirm_update - update_manager.confirm_update + Sind Sie sicher, dass Sie Part-DB aktualisieren möchten? Vor dem Update wird ein Backup erstellt. update_manager.already_up_to_date - update_manager.already_up_to_date + Sie verwenden bereits die neueste Version von Part-DB. update_manager.progress.title - update_manager.progress.title + Update-Fortschritt update_manager.progress.updating - update_manager.progress.updating + Part-DB wird aktualisiert... update_manager.progress.completed - update_manager.progress.completed + Update abgeschlossen! update_manager.progress.failed - update_manager.progress.failed + Update fehlgeschlagen