Add step number to dropodown [SCI-12037]

This commit is contained in:
Anton 2025-06-26 11:02:57 +02:00
parent 3290348860
commit 99c2b626a7
2 changed files with 5 additions and 1 deletions

View file

@ -285,7 +285,7 @@ class StepsController < ApplicationController
render json: {
paginated: true,
next_page: steps.next_page,
data: steps.map { |step| [step.id, step.name] }
data: steps.map { |step| [step.id, step.name, { position: step.position }] }
}
end

View file

@ -22,6 +22,7 @@
:value="selectedSteps"
:searchable="true"
@change="changeSteps"
:option-renderer="stepRenderer"
:multiple="true"
:withCheckboxes="true"
:placeholder="i18n.t('my_modules.results.modals.link_steps.placeholder')" />
@ -137,6 +138,9 @@ export default {
.then((response) => {
this.steps = response.data;
});
},
stepRenderer(option) {
return `${option[2].position + 1}. ${option[1]}`;
}
}
};