PCB lista categorie
This commit is contained in:
@@ -208,7 +208,6 @@
|
||||
:maxlength="col.maxlength ? col.maxlength : undefined"
|
||||
:disable="disable"
|
||||
:readonly="disable"
|
||||
:hint="hint"
|
||||
:type="
|
||||
col.fieldtype === costanti.FieldType.crypted
|
||||
? `password`
|
||||
|
||||
@@ -5,14 +5,6 @@ const msg_website_it = {
|
||||
description: '',
|
||||
keywords: '',
|
||||
},
|
||||
products: {
|
||||
quantity: 'Quantità',
|
||||
quantityAvailable: 'Disponibili',
|
||||
weight: 'Peso',
|
||||
stars: 'Voto',
|
||||
color: 'Colore',
|
||||
theme: 'Tema',
|
||||
},
|
||||
hours: {
|
||||
descr: 'Descrizione',
|
||||
date: 'Data',
|
||||
@@ -40,6 +32,7 @@ const msg_website_it = {
|
||||
products: 'Prodotti',
|
||||
productslist: 'Lista Prodotti',
|
||||
collabora: 'Collabora',
|
||||
categories: 'Categorie',
|
||||
storehouses: 'Magazzino',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export interface ICategory {
|
||||
id?: number,
|
||||
descr_it?: string
|
||||
descr_en?: string
|
||||
descr_es?: string
|
||||
campo2bool: boolean
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { IAction } from '@src/model/Projects'
|
||||
import { IFriends, IGroupShort, IMyGroup, IPaymentType } from '@src/model/UserStore'
|
||||
import {
|
||||
IDepartment, IProducer, IShareWithUs, IStorehouse,
|
||||
IDepartment, IProducer, IShareWithUs, IStorehouse, ICategory
|
||||
} from '@src/model/Products'
|
||||
|
||||
import { IUserFields, IUserProfile } from '@src/model/UserStore'
|
||||
@@ -434,6 +434,7 @@ export interface IGlobalState {
|
||||
producers: IProducer[],
|
||||
storehouses: IStorehouse[],
|
||||
departments: IDepartment[],
|
||||
categories: ICategory[],
|
||||
sharewithus: IShareWithUs[],
|
||||
groups: IGroup[],
|
||||
resps: IResp[],
|
||||
|
||||
@@ -80,6 +80,12 @@ export interface IDepartment {
|
||||
username?: string,
|
||||
}
|
||||
|
||||
export interface ICategory {
|
||||
_id?: any
|
||||
name: string,
|
||||
img?: string,
|
||||
}
|
||||
|
||||
export interface IStorehouse {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
|
||||
@@ -6,7 +6,6 @@ export * from './signup-option'
|
||||
export * from './key-value'
|
||||
// export * from './payload'
|
||||
|
||||
export * from './Categories'
|
||||
export * from './Todos'
|
||||
export * from './Projects'
|
||||
|
||||
|
||||
0
src/rootgen/admin/categories/categories.scss
Executable file
0
src/rootgen/admin/categories/categories.scss
Executable file
34
src/rootgen/admin/categories/categories.ts
Executable file
34
src/rootgen/admin/categories/categories.ts
Executable file
@@ -0,0 +1,34 @@
|
||||
|
||||
import { colTablecategories } from '@src/store/Modules/fieldsTable'
|
||||
|
||||
import { CImgText } from '../../../components/CImgText/index'
|
||||
|
||||
import { defineComponent } from 'vue'
|
||||
import { CCard } from '@/components/CCard'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
|
||||
import MixinMetaTags from '../../../mixins/mixin-metatags'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CategoriesPage',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
const pagination = {
|
||||
sortBy: 'name',
|
||||
descending: false,
|
||||
page: 2,
|
||||
rowsPerPage: 5
|
||||
// rowsNumber: xx if getting data from a server
|
||||
}
|
||||
|
||||
const { setmeta } = MixinMetaTags()
|
||||
|
||||
return {
|
||||
colTablecategories,
|
||||
setmeta,
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
31
src/rootgen/admin/categories/categories.vue
Executable file
31
src/rootgen/admin/categories/categories.vue
Executable file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<CMyPage title="Categorie" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: 'Categorie',
|
||||
description: '',
|
||||
keywords: '',
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CTitleBanner title="Categorie"></CTitleBanner>
|
||||
<CGridTableRec
|
||||
prop_mytable="categorys"
|
||||
prop_mytitle="Categorie"
|
||||
:prop_mycolumns="colTablecategories"
|
||||
prop_colkey="name"
|
||||
nodataLabel="Nessuna Categoria"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./categories.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'categories.scss';
|
||||
</style>
|
||||
@@ -114,6 +114,34 @@ function getRoutesAd(site: ISites) {
|
||||
onlyManager: true,
|
||||
onlyEditor: true
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 31,
|
||||
path: '/admin/ecommerce/orders',
|
||||
materialIcon: 'fas fa-file-alt',
|
||||
name: 'pages.orders',
|
||||
component: () => import('@/rootgen/admin/orders/orders.vue'),
|
||||
inmenu: true,
|
||||
submenu: true,
|
||||
level_parent: 0,
|
||||
level_child: 0.5,
|
||||
onlyManager: true,
|
||||
onlyEditor: true
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 32,
|
||||
path: '/admin/ecommerce/categories',
|
||||
materialIcon: 'fas fa-file-alt',
|
||||
name: 'pages.categories',
|
||||
component: () => import('@/rootgen/admin/categories/categories.vue'),
|
||||
inmenu: true,
|
||||
submenu: true,
|
||||
level_parent: 0,
|
||||
level_child: 0.5,
|
||||
onlyManager: true,
|
||||
onlyEditor: true
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
@@ -160,6 +188,14 @@ function getRoutesAd(site: ISites) {
|
||||
component: () => import('@/rootgen/admin/orders/orders.vue'),
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 36,
|
||||
path: '/admin/ecommerce/categories',
|
||||
name: 'pages.categories',
|
||||
component: () => import('@/rootgen/admin/categories/categories.vue'),
|
||||
infooter: false,
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
|
||||
@@ -43,6 +43,29 @@ const msg_it = {
|
||||
aportador_him: 'Invitato da',
|
||||
myactivities: 'Attività',
|
||||
},
|
||||
products: {
|
||||
name: 'Nome',
|
||||
active: 'Attivo',
|
||||
code: 'Codice',
|
||||
description: 'Descrizione',
|
||||
icon: 'Icona',
|
||||
img: 'Img',
|
||||
department: 'Ufficio',
|
||||
producer: 'Produttore',
|
||||
category: 'Categorie',
|
||||
price: 'Prezzo',
|
||||
after_price: 'Dopo il Prezzo',
|
||||
size: 'Dimensioni',
|
||||
canBeShipped: 'Può essere spedito',
|
||||
canBeBuyOnline: 'Acquistabile On Line',
|
||||
date: 'Data',
|
||||
quantity: 'Quantità',
|
||||
quantityAvailable: 'Disponibili',
|
||||
weight: 'Peso',
|
||||
stars: 'Voto',
|
||||
color: 'Colore',
|
||||
theme: 'Tema',
|
||||
},
|
||||
otherpages: {
|
||||
myactivities: 'Attività',
|
||||
myactivities2: 'Mie Attività',
|
||||
@@ -365,7 +388,7 @@ const msg_it = {
|
||||
sonomediatore: 'Quando sei MEDIATORE verrai contattato dai <strong>FACILITATORE AYNI</strong> tramite un messaggio sulla Chat <strong>AYNI BOT</strong> !',
|
||||
superchat: 'Nota Bene: Non inviarci la ricevuta, non ci occorre. Attendi il messaggio di conferma da parte del Sognatore (sulla Chat AYNI BOT).<br>SOLO se hai problemi di PAGAMENTO, o ti manca la conferma del SOGNATORE (dopo aver atteso almeno 12 ore) o se vuoi essere SOSTITUITO, due Facilitatore ti aspettano per aiutarti sulla Chat:<br><a href="{link_superchat}" target="_blank">Entra nella Gift Chat</a>',
|
||||
sonodonatore: '<ol class="lista"><li>Quando sei in questa posizione, verrai invitato (tramite un messaggio su <strong>AYNI BOT</strong>) ad effettuare il Dono. Non sarà più necessario entrare in una Chat.</li>'
|
||||
+ '<li><strong>Avrai tempo 3 giorni per fare il Regalo</strong> (poi verrai sostituito), nella modalità di pagamento che troverai scritto sul messaggio in <strong>AYNI BOT</strong> .<br></ol>',
|
||||
+ '<li><strong>Avrai tempo 3 giorni per fare il Regalo</strong> (poi verrai sostituito), nella modalità di pagamento che troverai scritto sul messaggio in <strong>AYNI BOT</strong> .<br></ol>',
|
||||
sonodonatore_seconda_tessitura: '<ol class="lista"><li>Qui tu sei Mediatore e anche Donatore, ma essendo la seconda Tessitura (il Ritorno), non avrai bisogno di effettuare nuovamente il dono<br></ol>',
|
||||
controlla_donatori: 'Controlla Lista Donatori',
|
||||
link_chat: 'Link della Gift Chat Telegram',
|
||||
@@ -393,15 +416,15 @@ const msg_it = {
|
||||
metodi_disponibili: 'Metodi Disponibili',
|
||||
importo: 'Importo',
|
||||
effettua_il_dono: 'E\' arrivato il momento di Effettuare il proprio Dono al Sognatore<br><strong>👉 {sognatore} 👈</strong> !<br><br>'
|
||||
+ 'Inviare tramite <a href="https://www.paypal.com/" target="_blank">PayPal</a> a: <strong>{email}</strong><br>'
|
||||
+ 'Aggiungere come messaggio la dicitura: <strong>Regalo</strong><br>'
|
||||
+ '<strong><span style="color:red">ATTENZIONE IMPORTANTE:</span> Scegliere l\'opzione</strong><BR>"INVIO DI DENARO A UN AMICO"<br>Cosi non pagherai delle commissioni extra!',
|
||||
+ 'Inviare tramite <a href="https://www.paypal.com/" target="_blank">PayPal</a> a: <strong>{email}</strong><br>'
|
||||
+ 'Aggiungere come messaggio la dicitura: <strong>Regalo</strong><br>'
|
||||
+ '<strong><span style="color:red">ATTENZIONE IMPORTANTE:</span> Scegliere l\'opzione</strong><BR>"INVIO DI DENARO A UN AMICO"<br>Cosi non pagherai delle commissioni extra!',
|
||||
paypal_me: '<br>2) Metodo Semplificato<br><a href="{link_payment}" target="_blank">Cliccare direttamente qui</a><br>'
|
||||
+ 'si aprirà PayPal con l\'importo e il destinatario gia impostato.<br>'
|
||||
+ 'Aggiungere come messaggio la dicitura: <strong>Regalo</strong><br>'
|
||||
+ '<strong><span style="color:red">ATTENZIONE IMPORTANTE:</span> TOGLIERE LA SPUNTA SU</strong>: Devi pagare beni o servizi? ... (Protezione acquisti Paypal)<br>Altrimenti pagherai inutilmente delle commissioni extra.<br>'
|
||||
+ 'Se hai dubbi, guarda il video qui sotto per vedere come fare:<br>'
|
||||
+ 'infine Clicca su “Invia Denaro ora”.',
|
||||
+ 'si aprirà PayPal con l\'importo e il destinatario gia impostato.<br>'
|
||||
+ 'Aggiungere come messaggio la dicitura: <strong>Regalo</strong><br>'
|
||||
+ '<strong><span style="color:red">ATTENZIONE IMPORTANTE:</span> TOGLIERE LA SPUNTA SU</strong>: Devi pagare beni o servizi? ... (Protezione acquisti Paypal)<br>Altrimenti pagherai inutilmente delle commissioni extra.<br>'
|
||||
+ 'Se hai dubbi, guarda il video qui sotto per vedere come fare:<br>'
|
||||
+ 'infine Clicca su “Invia Denaro ora”.',
|
||||
commento_al_sognatore: 'Scrivi qui un commento per il Sognatore:',
|
||||
qui_compariranno_le_info: 'Nel giorno della partenza della Nave, compariranno le informazioni del Sognatore',
|
||||
posizione: 'Posizione',
|
||||
@@ -960,7 +983,7 @@ const msg_it = {
|
||||
contribstr: 'Contributo (esempio: 5€ + 5 RIS)',
|
||||
contact_phone: 'Telefono per info',
|
||||
contact_telegram: 'Username Telegram',
|
||||
},
|
||||
},
|
||||
disc: {
|
||||
typol_code: 'Codice Tipologia',
|
||||
order: 'Ordinamento',
|
||||
@@ -1225,7 +1248,7 @@ const msg_it = {
|
||||
invia_msg_dest: 'Invia la richiesta a {name}',
|
||||
non_hai_circuito_nazionale: 'Per poter inviare dei RIS ad una persona di un altro territorio, è necessario entrare sul "Circuito RIS Italia"',
|
||||
destin_non_ha_circuito_naz: 'Il tuo Destinatario non è ancora dentro al Circuito RIS Italia',
|
||||
|
||||
|
||||
beforeentertolocalcircuit: 'Prima di entrare nel Circuito Nazionale occorre accedere in quello della tua Provincia',
|
||||
non_entrato: 'Per far parte di questo Circuito devi chiedere di Entrare!',
|
||||
link_chat: 'Chat {name}',
|
||||
|
||||
@@ -396,6 +396,13 @@ export const colTabledepartments = [
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
|
||||
export const colTablecategories = [
|
||||
AddCol({ name: 'name', label_trans: 'categories.name' }),
|
||||
AddCol({ name: 'img', label_trans: 'categories.img' }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
|
||||
export const colTableStorehouse = [
|
||||
AddCol({ name: 'name', label_trans: 'store.name' }),
|
||||
AddCol({ name: 'description', label_trans: 'store.description' }),
|
||||
@@ -1458,47 +1465,47 @@ export const colmyBachecas = [
|
||||
icon: 'fas fa-calendar-day',
|
||||
sortable: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idCity',
|
||||
label_trans: 'skill.city',
|
||||
fieldtype: costanti.FieldType.multiselect_by_server,
|
||||
jointable: 'cities',
|
||||
tablesel: 'cities',
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-map-marker-alt',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
remote_table: 'mycities',
|
||||
remote_key: '_id',
|
||||
remote_field: 'comune',
|
||||
sortable: false,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSector',
|
||||
label_trans: 'sectors.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
required: true,
|
||||
jointable: toolsext.TABSECTORS,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
visible: true,
|
||||
icon: 'category',
|
||||
sortable: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSkill',
|
||||
label_trans: 'skill.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'skills',
|
||||
addnone: true,
|
||||
filter_table: toolsext.TABSECTORS,
|
||||
filter_field: 'idSector',
|
||||
noshowlabel: true,
|
||||
icon: 'engineering',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
|
||||
allowNewValue: false,
|
||||
required: false,
|
||||
sortable: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idCity',
|
||||
label_trans: 'skill.city',
|
||||
fieldtype: costanti.FieldType.multiselect_by_server,
|
||||
jointable: 'cities',
|
||||
tablesel: 'cities',
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-map-marker-alt',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
remote_table: 'mycities',
|
||||
remote_key: '_id',
|
||||
remote_field: 'comune',
|
||||
sortable: false,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSector',
|
||||
label_trans: 'sectors.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
required: true,
|
||||
jointable: toolsext.TABSECTORS,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
visible: true,
|
||||
icon: 'category',
|
||||
sortable: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSkill',
|
||||
label_trans: 'skill.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'skills',
|
||||
addnone: true,
|
||||
filter_table: toolsext.TABSECTORS,
|
||||
filter_field: 'idSector',
|
||||
noshowlabel: true,
|
||||
icon: 'engineering',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
|
||||
allowNewValue: false,
|
||||
required: false,
|
||||
sortable: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
@@ -1924,7 +1931,12 @@ export const colTableProducts = [
|
||||
jointable: 'departments',
|
||||
}),
|
||||
// AddCol({ name: 'department', label_trans: 'products.department' }),
|
||||
AddCol({ name: 'category', label_trans: 'products.category' }),
|
||||
AddCol({
|
||||
name: 'category',
|
||||
label_trans: 'products.category',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'categorys',
|
||||
}),
|
||||
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'after_price', label_trans: 'products.after_price' }),
|
||||
AddCol({ name: 'color', label_trans: 'products.color' }),
|
||||
@@ -3466,6 +3478,13 @@ export const fieldsTable = {
|
||||
colkey: 'username',
|
||||
collabel: 'name',
|
||||
},
|
||||
{
|
||||
value: 'categorys',
|
||||
label: 'Categorie',
|
||||
columns: colTablecategories,
|
||||
colkey: '_id',
|
||||
collabel: 'name',
|
||||
},
|
||||
{
|
||||
value: 'storehouses',
|
||||
label: 'Magazzini',
|
||||
|
||||
@@ -120,6 +120,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
workers: [],
|
||||
storehouses: [],
|
||||
departments: [],
|
||||
categories: [],
|
||||
sharewithus: [],
|
||||
TIMER: null,
|
||||
TIMEOUT: null,
|
||||
@@ -300,6 +301,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'resps') ris = state.resps
|
||||
else if (table === 'workers') ris = state.workers
|
||||
else if (table === 'departments') ris = state.departments
|
||||
else if (table === 'categorys') ris = state.categories
|
||||
else if (table === 'sharewithus') ris = state.sharewithus
|
||||
else if (table === 'paymenttypes') ris = state.paymenttypes
|
||||
else if (table === 'circuits') ris = circuitStore.listcircuits
|
||||
@@ -1512,6 +1514,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.resps = (res.data.resps) ? [...res.data.resps] : []
|
||||
this.workers = (res.data.workers) ? [...res.data.workers] : []
|
||||
this.departments = (res.data.departments) ? [...res.data.departments] : []
|
||||
this.categories = (res.data.categories) ? [...res.data.categories] : []
|
||||
this.levels = (res.data.levels) ? [...res.data.levels] : []
|
||||
this.skills = (res.data.skills) ? [...res.data.skills] : []
|
||||
this.goods = (res.data.goods) ? [...res.data.goods] : []
|
||||
|
||||
@@ -43,7 +43,7 @@ export default defineComponent({
|
||||
return cart.items || null
|
||||
}
|
||||
|
||||
function getNumItems() {
|
||||
function getNumItems(): number {
|
||||
const cart = productStore.getCart()
|
||||
if (!!cart.items)
|
||||
return cart.items.length || 0
|
||||
@@ -51,7 +51,7 @@ export default defineComponent({
|
||||
return 0
|
||||
}
|
||||
|
||||
function getCart() {
|
||||
function getCart(): ICart {
|
||||
return productStore.getCart()
|
||||
}
|
||||
|
||||
@@ -70,21 +70,21 @@ export default defineComponent({
|
||||
|
||||
const aggiorna = fieldname !== 'status'
|
||||
tools.saveFieldToServer($q, 'carts', mycart.value._id, mydata, aggiorna)
|
||||
myrec.value = oldrec.value
|
||||
oldrec.value[fieldname] = myrec.value[fieldname]
|
||||
}
|
||||
}
|
||||
|
||||
function myTotalPrice() {
|
||||
function myTotalPrice(): string {
|
||||
if (productStore.cart && productStore.cart.totalPrice) {
|
||||
return productStore.cart.totalPrice.toFixed(2)
|
||||
} else {
|
||||
return 0
|
||||
return '0'
|
||||
}
|
||||
}
|
||||
|
||||
function myTotalQty() {
|
||||
function myTotalQty(): number {
|
||||
if (productStore.cart) {
|
||||
return productStore.cart.totalQty
|
||||
return productStore.cart.totalQty!
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
@@ -93,6 +93,7 @@ export default defineComponent({
|
||||
async function load() {
|
||||
mycart.value = getCart()
|
||||
myrec.value = Object.keys(mycart)
|
||||
oldrec.value = myrec.value
|
||||
note.value = mycart.value.note!
|
||||
|
||||
if (mycart.value)
|
||||
|
||||
Reference in New Issue
Block a user