- migliorata la grafica dell'aggiungi elemento.

This commit is contained in:
Surya Paolo
2025-09-08 20:42:36 +02:00
parent ac84755dbb
commit cb3baf3dbb
13 changed files with 871 additions and 470 deletions

View File

@@ -31,11 +31,8 @@ import { useProducts } from '@src/store/Products';
export default defineComponent({
name: 'CMyElemAdd',
components: {
},
emits: [
'AddedNewElem',
],
components: {},
emits: ['AddedNewElem'],
props: {
myelem: {
type: Object as PropType<IMyElem>,
@@ -76,6 +73,16 @@ export default defineComponent({
const catalogStore = useCatalogStore();
const router = useRouter();
const sections = computed(() => [
{ label: 'Principali', icon: 'fas fa-eye', items: shared_consts.TypesElem },
{ label: 'Gestione', icon: 'fas fa-cog', items: shared_consts.TypesElemAdmin },
{
label: 'Avanzati',
icon: 'fas fa-star',
items: shared_consts.TypesElemAdminTools,
},
]);
const { setmeta, getsrcbyimg } = MixinMetaTags();
const { setValDb, getValDb } = MixinBase();
@@ -107,7 +114,6 @@ export default defineComponent({
const selectedClasses = ref(<any>[]);
async function addNewElem(elemsel: any, direz: number) {
// Nascondi la visualizzazione di aggiunta (presumo sia una variabile reattiva)
visuadd.value = false;
@@ -148,7 +154,7 @@ export default defineComponent({
let sectionId = '';
let rowId = '';
console.log('sectionId', sectionId, 'rowId', rowId)
console.log('sectionId', sectionId, 'rowId', rowId);
// Aggiungi un nuovo elemento alla sezione o riga usando il metodo preparato
const newrec = await globalStore.prepareAddNewElem(
@@ -157,7 +163,7 @@ export default defineComponent({
t,
myelem,
props.myElemParent,
newtype.value,
newtype.value
);
// Emitti l'evento per la selezione del nuovo elemento
@@ -167,7 +173,6 @@ export default defineComponent({
// emit('updateAll', newrec);
}
return {
tools,
shared_consts,
@@ -191,6 +196,7 @@ export default defineComponent({
Products,
globalStore,
myel,
sections,
};
},
});