diff --git a/CHANGELOG.md b/CHANGELOG.md index d820ef415..e078601be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Fix a bug: unable to show machine availability slot for admin - Fix a bug: unable to confirm modification of reservation for client +- Fix a bug: unable to show deleted user in reservation slot ## v5.3.9 2022 April 01 diff --git a/app/services/availabilities/status_service.rb b/app/services/availabilities/status_service.rb index 5735466ab..c48ac6d58 100644 --- a/app/services/availabilities/status_service.rb +++ b/app/services/availabilities/status_service.rb @@ -18,7 +18,8 @@ class Availabilities::StatusService slot.id = s.id slot.is_reserved = true - slot.title = "#{slot.machine.name} - #{@show_name ? r.user&.profile&.full_name : I18n.t('availabilities.not_available')}" + user_name = r.user ? r.user&.profile&.full_name : I18n.t('availabilities.deleted_user'); + slot.title = "#{slot.machine.name} - #{@show_name ? user_name : I18n.t('availabilities.deleted_user')}" slot.can_modify = true if %w[admin manager].include?(@current_user_role) slot.reservations.push r diff --git a/config/locales/de.yml b/config/locales/de.yml index 47c7bf63f..d082224cc 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -53,6 +53,7 @@ de: i_ve_reserved: "Ich reservierte" length_must_be_slot_multiple: "muss mindestens %{MIN} Minuten nach dem Startdatum liegen" must_be_associated_with_at_least_1_machine: "muss mindestens einer Maschine zugeordnet sein" + deleted_user: "Deleted user" #members management members: unable_to_change_the_group_while_a_subscription_is_running: "Die Gruppe kann während eines Abonnements nicht geändert werden" diff --git a/config/locales/en.yml b/config/locales/en.yml index 4ad225bab..be7505591 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -53,6 +53,7 @@ en: i_ve_reserved: "I've reserved" length_must_be_slot_multiple: "must be at least %{MIN} minutes after the start date" must_be_associated_with_at_least_1_machine: "must be associated with at least 1 machine" + deleted_user: "Deleted user" #members management members: unable_to_change_the_group_while_a_subscription_is_running: "Unable to change the group while a subscription is running" diff --git a/config/locales/es.yml b/config/locales/es.yml index 4df65c2b5..27bd12a91 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -53,6 +53,7 @@ es: i_ve_reserved: "He reservado" length_must_be_slot_multiple: "Debe ser al menos %{MIN} minutos después de la fecha de inicio" must_be_associated_with_at_least_1_machine: "debe estar asociado con al menos 1 máquina" + deleted_user: "Deleted user" #members management members: unable_to_change_the_group_while_a_subscription_is_running: "No se puede cambiar de grupo mientras haya una suscripción en curso" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 18392c278..3c01a72b6 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -53,6 +53,7 @@ fr: i_ve_reserved: "J'ai réservé" length_must_be_slot_multiple: "doit être au moins %{MIN} minutes après la date de début" must_be_associated_with_at_least_1_machine: "doit être associé avec au moins 1 machine" + deleted_user: "Utilisateur supprimé" #members management members: unable_to_change_the_group_while_a_subscription_is_running: "Impossible de changer le groupe tant qu'un abonnement est en cours" diff --git a/config/locales/no.yml b/config/locales/no.yml index 404366f3f..0e2e2a515 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -53,6 +53,7 @@ i_ve_reserved: "Jeg har reservert" length_must_be_slot_multiple: "må være minst %{MIN} minutter etter startdatoen" must_be_associated_with_at_least_1_machine: "må være tilknyttet minst 1 maskin" + deleted_user: "Deleted user" #members management members: unable_to_change_the_group_while_a_subscription_is_running: "Kan ikke endre gruppen mens et abonnement kjører" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index b0300eb88..be8fc3acc 100755 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -53,6 +53,7 @@ pt: i_ve_reserved: "Eu reservei" length_must_be_slot_multiple: "deve ser pelo menos %{MIN} minutos após a data de início" must_be_associated_with_at_least_1_machine: "deve estar associada a pelo menos uma máquina" + deleted_user: "Deleted user" #members management members: unable_to_change_the_group_while_a_subscription_is_running: "Não é possível alterar o grupo enquanto uma assinatura está sendo executada" diff --git a/config/locales/zu.yml b/config/locales/zu.yml index d798bef18..e4a426e88 100644 --- a/config/locales/zu.yml +++ b/config/locales/zu.yml @@ -53,6 +53,7 @@ zu: i_ve_reserved: "crwdns3269:0crwdne3269:0" length_must_be_slot_multiple: "crwdns3271:0%{MIN}crwdne3271:0" must_be_associated_with_at_least_1_machine: "crwdns3273:0crwdne3273:0" + deleted_user: "Deleted user" #members management members: unable_to_change_the_group_while_a_subscription_is_running: "crwdns3275:0crwdne3275:0"