Open ezio-melotti opened 3 years ago
There are currently a number of panels that have a select box used to select the subpanels.
When a panel layout is changed/loaded/saved, the dashboard must be informed, and the code that does that is currently duplicated in each panel, see e.g.: https://github.com/overthesun/simoc-web/blob/b21ef167c1ec5b8ff11825b50df7ee3624576a7c/src/components/panels/ProductionConsumption.vue#L47-L57 https://github.com/overthesun/simoc-web/blob/b21ef167c1ec5b8ff11825b50df7ee3624576a7c/src/components/panels/StorageRatios.vue#L52-L62
It should be possible to factor it out to avoid the duplication (maybe using a mixin?).
Now that we are using Vue 3, we should use the composition API to implement this.
There are currently a number of panels that have a select box used to select the subpanels.
When a panel layout is changed/loaded/saved, the dashboard must be informed, and the code that does that is currently duplicated in each panel, see e.g.: https://github.com/overthesun/simoc-web/blob/b21ef167c1ec5b8ff11825b50df7ee3624576a7c/src/components/panels/ProductionConsumption.vue#L47-L57 https://github.com/overthesun/simoc-web/blob/b21ef167c1ec5b8ff11825b50df7ee3624576a7c/src/components/panels/StorageRatios.vue#L52-L62
It should be possible to factor it out to avoid the duplication (maybe using a mixin?).