From 22feb48c29e02bc38fd259e7267e44d72cd8ac82 Mon Sep 17 00:00:00 2001 From: Eric Leroy-Terquem Date: Fri, 13 Oct 2023 11:32:15 +0200 Subject: [PATCH] chore(conditions): update views --- .../routing_rules/_update.turbo_stream.haml | 7 +++++++ .../routing_rules/add_row.turbo_stream.haml | 1 + .../routing_rules/change_targeted_champ.turbo_stream.haml | 1 + .../routing_rules/delete_row.turbo_stream.haml | 1 + .../routing_rules/destroy.turbo_stream.haml | 1 + .../{routing => routing_rules}/update.turbo_stream.haml | 0 6 files changed, 11 insertions(+) create mode 100644 app/views/administrateurs/routing_rules/_update.turbo_stream.haml create mode 100644 app/views/administrateurs/routing_rules/add_row.turbo_stream.haml create mode 100644 app/views/administrateurs/routing_rules/change_targeted_champ.turbo_stream.haml create mode 100644 app/views/administrateurs/routing_rules/delete_row.turbo_stream.haml create mode 100644 app/views/administrateurs/routing_rules/destroy.turbo_stream.haml rename app/views/administrateurs/{routing => routing_rules}/update.turbo_stream.haml (100%) diff --git a/app/views/administrateurs/routing_rules/_update.turbo_stream.haml b/app/views/administrateurs/routing_rules/_update.turbo_stream.haml new file mode 100644 index 000000000..7e7275718 --- /dev/null +++ b/app/views/administrateurs/routing_rules/_update.turbo_stream.haml @@ -0,0 +1,7 @@ +- rendered = render @routing_rule_component + +- if rendered.present? + = turbo_stream.replace dom_id(@groupe_instructeur, :routing_rule) do + - rendered +- else + = turbo_stream.remove dom_id(@groupe_instructeur, :routing_rule) diff --git a/app/views/administrateurs/routing_rules/add_row.turbo_stream.haml b/app/views/administrateurs/routing_rules/add_row.turbo_stream.haml new file mode 100644 index 000000000..8f9900e50 --- /dev/null +++ b/app/views/administrateurs/routing_rules/add_row.turbo_stream.haml @@ -0,0 +1 @@ += render partial: 'update' diff --git a/app/views/administrateurs/routing_rules/change_targeted_champ.turbo_stream.haml b/app/views/administrateurs/routing_rules/change_targeted_champ.turbo_stream.haml new file mode 100644 index 000000000..8f9900e50 --- /dev/null +++ b/app/views/administrateurs/routing_rules/change_targeted_champ.turbo_stream.haml @@ -0,0 +1 @@ += render partial: 'update' diff --git a/app/views/administrateurs/routing_rules/delete_row.turbo_stream.haml b/app/views/administrateurs/routing_rules/delete_row.turbo_stream.haml new file mode 100644 index 000000000..8f9900e50 --- /dev/null +++ b/app/views/administrateurs/routing_rules/delete_row.turbo_stream.haml @@ -0,0 +1 @@ += render partial: 'update' diff --git a/app/views/administrateurs/routing_rules/destroy.turbo_stream.haml b/app/views/administrateurs/routing_rules/destroy.turbo_stream.haml new file mode 100644 index 000000000..8f9900e50 --- /dev/null +++ b/app/views/administrateurs/routing_rules/destroy.turbo_stream.haml @@ -0,0 +1 @@ += render partial: 'update' diff --git a/app/views/administrateurs/routing/update.turbo_stream.haml b/app/views/administrateurs/routing_rules/update.turbo_stream.haml similarity index 100% rename from app/views/administrateurs/routing/update.turbo_stream.haml rename to app/views/administrateurs/routing_rules/update.turbo_stream.haml