- aggiornamento Cataloghi
- Gestione delle versioni del prodotto ("Nuovi","Usati","Epub", ecc..)
This commit is contained in:
1
src/components/CContainerCatalogoCard/CContainerCatalogoCard.scss
Executable file
1
src/components/CContainerCatalogoCard/CContainerCatalogoCard.scss
Executable file
@@ -0,0 +1 @@
|
||||
|
||||
94
src/components/CContainerCatalogoCard/CContainerCatalogoCard.ts
Executable file
94
src/components/CContainerCatalogoCard/CContainerCatalogoCard.ts
Executable file
@@ -0,0 +1,94 @@
|
||||
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 } 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: [],
|
||||
}),
|
||||
},
|
||||
},
|
||||
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,
|
||||
}
|
||||
}
|
||||
})
|
||||
49
src/components/CContainerCatalogoCard/CContainerCatalogoCard.vue
Executable file
49
src/components/CContainerCatalogoCard/CContainerCatalogoCard.vue
Executable file
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div>
|
||||
<CCatalogoCard
|
||||
:id="id"
|
||||
:complete="complete"
|
||||
:cosa="cosa"
|
||||
:options="options"
|
||||
@selauthor="selauthor"
|
||||
@opendetail="opendetail"
|
||||
:optcatalogo="optcatalogo"
|
||||
>
|
||||
</CCatalogoCard>
|
||||
</div>
|
||||
<q-dialog
|
||||
v-model="opendetailbool"
|
||||
position="top"
|
||||
:maximized="true"
|
||||
class="q-pt-none"
|
||||
>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="row justify-center">
|
||||
<CCatalogoCard
|
||||
:id="id"
|
||||
:complete="true"
|
||||
:cosa="cosa"
|
||||
:options="{
|
||||
show_short_descr: true,
|
||||
show_price: true,
|
||||
show_cat: true,
|
||||
quante_col: 'c1',
|
||||
in_3d: true,
|
||||
}"
|
||||
:optcatalogo="optcatalogo"
|
||||
@selauthor="selauthor"
|
||||
>
|
||||
</CCatalogoCard>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CContainerCatalogoCard.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CContainerCatalogoCard.scss';
|
||||
</style>
|
||||
1
src/components/CContainerCatalogoCard/index.ts
Executable file
1
src/components/CContainerCatalogoCard/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CContainerCatalogoCard} from './CContainerCatalogoCard.vue'
|
||||
Reference in New Issue
Block a user