Files
myprojplanet_vite/src/components/CContainerCatalogoCard/CContainerCatalogoCard.ts
Surya Paolo 1c63b5346b - cataloghi...
- fix: condividi su Telegram non funzionava errore sull'immagine
2024-11-02 18:06:27 +01:00

104 lines
2.2 KiB
TypeScript
Executable File

import { defineComponent, ref, toRef, computed, PropType, watch, onMounted, reactive, onBeforeUnmount } from 'vue'
import { useI18n } from '@src/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useQuasar } from 'quasar'
import { CCatalogoCard } from '../CCatalogoCard'
import { func_tools, toolsext } from '@store/Modules/toolsext'
import { tools } from '@store/Modules/tools'
import { useProducts } from '@store/Products'
import { shared_consts } from '@src/common/shared_vuejs'
import { useRouter } from 'vue-router'
import { costanti } from '@costanti'
import { ICatalogo, IMyScheda } from '@src/model'
export default defineComponent({
name: 'CContainerCatalogoCard',
emits: ['selauthor'],
props: {
id: {
type: String,
required: false,
default: '',
},
cosa: {
type: Number,
required: false,
default: 0,
},
complete: {
type: Boolean,
required: false,
default: false,
},
options: {
type: Object,
required: false,
default: () => { }
},
optcatalogo: {
type: Object as PropType<ICatalogo>,
required: false,
default: () => ({
//++AddCATALOGO_FIELDS
productTypes: [0],
excludeproductTypes: [],
formato: [],
Categoria: [],
Editore: [],
pdf: false,
backgroundimage: '',
}),
},
scheda: {
type: Object as PropType<IMyScheda>,
required: false,
default: () => ({
}),
},
},
components: { CCatalogoCard },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const userStore = useUserStore()
const globalStore = useGlobalStore()
const opendetailbool = ref(false)
function selauthor(id: any, autore: any) {
emit('selauthor', id, autore)
}
function opendetail() {
opendetailbool.value = true
}
function mounted() {
//
}
onMounted(mounted)
return {
tools,
t,
func_tools,
toolsext,
shared_consts,
globalStore,
costanti,
selauthor,
opendetail,
opendetailbool,
}
}
})