From 08b072e33c6d74573287976473ccfa50536b0e41 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 5 Apr 2022 14:11:46 +0200 Subject: [PATCH 1/8] Fix a bug: unable to show machine availability slot for admin --- CHANGELOG.md | 2 ++ app/frontend/src/javascript/directives/cart.js | 7 ++++++- app/frontend/templates/admin/calendar/calendar.html | 3 ++- .../templates/shared/confirm_modify_slot_modal.html | 4 ++-- app/views/api/availabilities/machine.json.jbuilder | 4 ++-- app/views/api/availabilities/spaces.json.jbuilder | 4 ++-- app/views/api/reservations/_reservation.json.jbuilder | 2 +- config/locales/app.admin.de.yml | 1 + config/locales/app.admin.en.yml | 1 + config/locales/app.admin.es.yml | 1 + config/locales/app.admin.fr.yml | 1 + config/locales/app.admin.no.yml | 1 + config/locales/app.admin.pt.yml | 1 + config/locales/app.admin.zu.yml | 1 + config/locales/app.shared.de.yml | 1 + config/locales/app.shared.en.yml | 1 + config/locales/app.shared.es.yml | 1 + config/locales/app.shared.fr.yml | 1 + config/locales/app.shared.no.yml | 1 + config/locales/app.shared.pt.yml | 1 + config/locales/app.shared.zu.yml | 1 + 21 files changed, 31 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 475f4995b..08a63c734 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Fix a bug: unable to show machine availability slot for admin + ## v5.3.9 2022 April 01 - Optimise sql query, avoid to N+1 diff --git a/app/frontend/src/javascript/directives/cart.js b/app/frontend/src/javascript/directives/cart.js index da8865547..968b169e7 100644 --- a/app/frontend/src/javascript/directives/cart.js +++ b/app/frontend/src/javascript/directives/cart.js @@ -564,7 +564,12 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs', return dialogs.confirm({ templateUrl: '/shared/confirm_modify_slot_modal.html', resolve: { - object () { return $scope.slot; } + object () { + if ($scope.slot.user && !$scope.slot.user.name) { + $scope.slot.user.name = _t('app.shared.confirm_modify_slot_modal.deleted_user'); + } + return $scope.slot; + } } } , function (type) { diff --git a/app/frontend/templates/admin/calendar/calendar.html b/app/frontend/templates/admin/calendar/calendar.html index c760602ef..637579fca 100644 --- a/app/frontend/templates/admin/calendar/calendar.html +++ b/app/frontend/templates/admin/calendar/calendar.html @@ -80,7 +80,8 @@
diff --git a/app/frontend/templates/admin/trainings/modal_edit.html b/app/frontend/templates/admin/trainings/modal_edit.html index 0d3969227..a4171f2f1 100644 --- a/app/frontend/templates/admin/trainings/modal_edit.html +++ b/app/frontend/templates/admin/trainings/modal_edit.html @@ -4,7 +4,7 @@ diff --git a/config/locales/app.admin.de.yml b/config/locales/app.admin.de.yml index e4ee36203..73bd82fef 100644 --- a/config/locales/app.admin.de.yml +++ b/config/locales/app.admin.de.yml @@ -509,6 +509,7 @@ de: important_notes: "Wichtige Hinweise" address_and_legal_information: "Adresse und rechtliche Informationen" invoice_reference: "Rechnungsbezug" + invoice_reference_is_required: "Invoice reference is required." text: "Text" year: "Jahr" month: "Monat" diff --git a/config/locales/app.admin.en.yml b/config/locales/app.admin.en.yml index 3efdde47f..e4cc9de5a 100644 --- a/config/locales/app.admin.en.yml +++ b/config/locales/app.admin.en.yml @@ -509,6 +509,7 @@ en: important_notes: "Important notes" address_and_legal_information: "Address and legal information" invoice_reference: "Invoice reference" + invoice_reference_is_required: "Invoice reference is required." text: "text" year: "Year" month: "Month" diff --git a/config/locales/app.admin.es.yml b/config/locales/app.admin.es.yml index b95da21ba..5d87d0d5e 100644 --- a/config/locales/app.admin.es.yml +++ b/config/locales/app.admin.es.yml @@ -509,6 +509,7 @@ es: important_notes: "Notas importantes" address_and_legal_information: "Dirección e información legal" invoice_reference: "Referencia de factura" + invoice_reference_is_required: "Invoice reference is required." text: "text" year: "Año" month: "Mes" diff --git a/config/locales/app.admin.fr.yml b/config/locales/app.admin.fr.yml index 1d21da59a..47de2256d 100644 --- a/config/locales/app.admin.fr.yml +++ b/config/locales/app.admin.fr.yml @@ -509,6 +509,7 @@ fr: important_notes: "Informations importantes" address_and_legal_information: "Adresse et informations légales" invoice_reference: "Référence facture" + invoice_reference_is_required: "La référence facture est requis." text: "texte" year: "Année" month: "Mois" diff --git a/config/locales/app.admin.no.yml b/config/locales/app.admin.no.yml index 3100001f7..a2f390b65 100644 --- a/config/locales/app.admin.no.yml +++ b/config/locales/app.admin.no.yml @@ -509,6 +509,7 @@ important_notes: "Viktige merknader" address_and_legal_information: "Adresse og juridisk informasjon" invoice_reference: "Fakturareferanse" + invoice_reference_is_required: "Invoice reference is required." text: "tekst" year: "År" month: "Måned" diff --git a/config/locales/app.admin.pt.yml b/config/locales/app.admin.pt.yml index 469f9c2a8..9ef64f1d7 100755 --- a/config/locales/app.admin.pt.yml +++ b/config/locales/app.admin.pt.yml @@ -509,6 +509,7 @@ pt: important_notes: "Notas importantes" address_and_legal_information: "Endereço e informações legais" invoice_reference: "Referencia de fatura" + invoice_reference_is_required: "Invoice reference is required." text: "texto" year: "Ano" month: "Mês" diff --git a/config/locales/app.admin.zu.yml b/config/locales/app.admin.zu.yml index 67541d8e0..d95f24c31 100644 --- a/config/locales/app.admin.zu.yml +++ b/config/locales/app.admin.zu.yml @@ -509,6 +509,7 @@ zu: important_notes: "crwdns7385:0crwdne7385:0" address_and_legal_information: "crwdns7387:0crwdne7387:0" invoice_reference: "crwdns7389:0crwdne7389:0" + invoice_reference_is_required: "Invoice reference is required." text: "crwdns21060:0crwdne21060:0" year: "crwdns7391:0crwdne7391:0" month: "crwdns7393:0crwdne7393:0" From 63a25e4cf4e02595c0cb2b95054fdb9928520355 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 12 Apr 2022 17:45:33 +0200 Subject: [PATCH 8/8] Version 5.3.10 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37e1ebd73..079a5adec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +## v5.3.10 2022 April 12 + - Updated generate invoice reference method - Set invoice reference is required - Fix a bug: unable to show machine availability slot for admin diff --git a/package.json b/package.json index 774cf2f8d..a9fccb548 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fab-manager", - "version": "5.3.9", + "version": "5.3.10", "description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.", "keywords": [ "fablab",