]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(web): fetch templates on dialog open via layout composable (#1837) (#1839)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 7 May 2026 21:33:27 +0000 (23:33 +0200)
committerGitHub <noreply@github.com>
Thu, 7 May 2026 21:33:27 +0000 (23:33 +0200)
commit608d7962dbdde0f3b3261badca05ab6dad36d84b
treebf966cbdf7de2eb31d978393fa6603c729220702
parent43ea60fc26a00281295219f2f0203c7672613eb3
fix(web): fetch templates on dialog open via layout composable (#1837) (#1839)

Expose getTemplates from useLayoutData instead of duplicating the fetch
in useAddStationsForm. Each layout triggers the refresh at the right
moment:

- Modern skin: watch showAddDialog → getTemplates() on open
- Classic skin: watch route → getTemplates() on ADD_CHARGING_STATIONS

The templatesEqual guard in useAddStationsForm prevents resetting the
user's selection when the refetch returns an identical list.

Co-authored-by: Jérôme Benoit <jerome.benoit@sap.com>
ui/web/src/shared/composables/useAddStationsForm.ts
ui/web/src/shared/composables/useLayoutData.ts
ui/web/src/skins/classic/ClassicLayout.vue
ui/web/src/skins/modern/ModernLayout.vue
ui/web/tests/unit/shared/composables/useAddStationsForm.test.ts
ui/web/tests/unit/skins/modern/Dialogs.test.ts