From 7b02fa9353c1532e747dd43d1a9c0835d5cd59da Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Sat, 2 Jul 2022 16:27:45 +0200 Subject: [PATCH] typeDeChampIdValue -> typeDeChampStableIdValue --- app/components/types_de_champ_editor/champ_component.rb | 2 +- .../controllers/type_de_champ_editor_controller.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/types_de_champ_editor/champ_component.rb b/app/components/types_de_champ_editor/champ_component.rb index 1c23a50dd..b3ec07096 100644 --- a/app/components/types_de_champ_editor/champ_component.rb +++ b/app/components/types_de_champ_editor/champ_component.rb @@ -28,7 +28,7 @@ class TypesDeChampEditor::ChampComponent < ApplicationComponent type_de_champ_editor_move_url_value: move_admin_procedure_type_de_champ_path(procedure, type_de_champ.stable_id), type_de_champ_editor_move_up_url_value: move_up_admin_procedure_type_de_champ_path(procedure, type_de_champ.stable_id), type_de_champ_editor_move_down_url_value: move_down_admin_procedure_type_de_champ_path(procedure, type_de_champ.stable_id), - type_de_champ_editor_type_de_champ_id_value: coordinate.stable_id + type_de_champ_editor_type_de_champ_stable_id_value: type_de_champ.stable_id } } end diff --git a/app/javascript/controllers/type_de_champ_editor_controller.ts b/app/javascript/controllers/type_de_champ_editor_controller.ts index 84e5144bd..dd821ae19 100644 --- a/app/javascript/controllers/type_de_champ_editor_controller.ts +++ b/app/javascript/controllers/type_de_champ_editor_controller.ts @@ -7,7 +7,7 @@ import { ApplicationController } from './application_controller'; export class TypeDeChampEditorController extends ApplicationController { static values = { - typeDeChampId: String, + typeDeChampStableId: String, moveUrl: String, moveUpUrl: String, moveDownUrl: String @@ -16,7 +16,7 @@ export class TypeDeChampEditorController extends ApplicationController { declare readonly moveUrlValue: string; declare readonly moveUpUrlValue: string; declare readonly moveDownUrlValue: string; - declare readonly typeDeChampIdValue: string; + declare readonly typeDeChampStableIdValue: string; declare readonly isVisible: boolean; #latestPromise = Promise.resolve(); @@ -142,7 +142,7 @@ export class TypeDeChampEditorController extends ApplicationController { `${selector} ${AFTER_STABLE_ID_INPUT_SELECTOR}` ); if (input) { - input.value = this.typeDeChampIdValue; + input.value = this.typeDeChampStableIdValue; } } }