add element rich text

This commit is contained in:
Yisroel Baum 2026-05-27 20:02:31 +03:00
parent 827abde41b
commit 457dbbb7de
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
12 changed files with 63 additions and 5 deletions

View file

@ -1,22 +1,26 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export interface Element {
export interface ChildElement {
id: number
title: string
description: string
}
export interface Element extends ChildElement {
richText: string
}
interface ElementResponse {
element: Element
childElements: Element[]
childElements: ChildElement[]
}
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL as string
export const useElementsStore = defineStore('elements', () => {
const element = ref<Element | null>(null)
const childElements = ref<Element[]>([])
const childElements = ref<ChildElement[]>([])
const isLoading = ref(false)
const error = ref<string | null>(null)