WIP: panel management uix

This commit is contained in:
Jesse Malotaux 2025-04-05 23:23:51 +02:00
parent 0d3fb09310
commit 58de6eb976
5 changed files with 276 additions and 3 deletions

24
fe/src/stores/panel.js Normal file
View file

@ -0,0 +1,24 @@
import { appUrl } from '@/services/ApiService'
import axios from 'axios'
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const usePanelStore = defineStore('panel', () => {
const list = ref([])
const getPanels = async () => {
console.log(list.value.length)
if (list.value.length > 0) return list.value
const resp = await axios.post(appUrl() + '/panel/list')
list.value = resp.data.data
return list.value
}
return {
list,
getPanels,
}
})