overthesun / simoc-web

This is the web interface to SIMOC
https://ngs.simoc.space/
Other
3 stars 0 forks source link

Factor out subpanel handling #67

Open ezio-melotti opened 3 years ago

ezio-melotti commented 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?).

ezio-melotti commented 6 months ago

Now that we are using Vue 3, we should use the composition API to implement this.