Aggiunte opzioni per il Gestore: richiede che l'invitante confermi la Reg, Notifica sul BOT , Notifica all'Admin la Reg.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.12"
|
||||
APP_VERSION="0.2.13"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.12"
|
||||
APP_VERSION="0.2.13"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="1"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.12"
|
||||
APP_VERSION="0.2.13"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.12"
|
||||
APP_VERSION="0.2.13"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="12"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -768,6 +768,13 @@ export const shared_consts = {
|
||||
},
|
||||
],
|
||||
|
||||
ConfSite: {
|
||||
Notif_Reg_Bot: 1,
|
||||
Notif_Reg_Push_Admin: 2,
|
||||
Need_Aportador_On_DataReg_To_Verify_Reg: 4,
|
||||
},
|
||||
|
||||
|
||||
getStatusStr(status: number) {
|
||||
const trovatorec = this.OrderStatusStr.find((rec) => rec.value === status)
|
||||
return (trovatorec) ? trovatorec.label : ''
|
||||
|
||||
@@ -141,7 +141,7 @@ export default defineComponent({
|
||||
console.log('showandsel CMyFieldDb', row, col, newval)
|
||||
|
||||
if (newval !== valinitial)
|
||||
setValDb($q, mykey.value, newval, col.value.fieldtype, false, props.table, mysubkey.value, props.id, props.indrec, mysubsubkey.value)
|
||||
setValDb($q, mykey.value, newval, col.fieldtype, false, props.table, mysubkey.value, props.id, props.indrec, mysubsubkey.value)
|
||||
}
|
||||
|
||||
function withBorder() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div v-if="visuElem()" :class="mytitle ? `row items-center justify-center q-ma-xs text-center` : ``">
|
||||
|
||||
<div v-if="mytitle" class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
|
||||
@@ -285,6 +285,20 @@ const routes_manager: IListRoutes[] = [
|
||||
onlyManager: true,
|
||||
onlyEditor: true
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 30,
|
||||
path: '/admin/confsite',
|
||||
materialIcon: 'fas fa-file-alt',
|
||||
name: 'otherpages.admin.confsite',
|
||||
component: () => import('@/rootgen/admin/confsite/confsite.vue'),
|
||||
inmenu: true,
|
||||
submenu: true,
|
||||
level_parent: 0,
|
||||
level_child: 0.5,
|
||||
onlyManager: true,
|
||||
onlyEditor: true
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
path: '/admin/newsletter',
|
||||
|
||||
@@ -518,6 +518,7 @@ export interface IParamsQuery {
|
||||
lookup3?: IParLookup
|
||||
lookup4?: IParLookup
|
||||
options?: number
|
||||
extrapar?: string
|
||||
}
|
||||
|
||||
export interface IColGridTable {
|
||||
|
||||
0
src/rootgen/admin/confsite/confsite.scss
Executable file
0
src/rootgen/admin/confsite/confsite.scss
Executable file
33
src/rootgen/admin/confsite/confsite.ts
Executable file
33
src/rootgen/admin/confsite/confsite.ts
Executable file
@@ -0,0 +1,33 @@
|
||||
import { defineComponent, ref, onMounted } from 'vue'
|
||||
|
||||
import { CImgText } from '../../../components/CImgText/index'
|
||||
import { CCard } from '@/components/CCard'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
|
||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
import { IMyBot } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Confsite',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CMyFieldRec },
|
||||
setup() {
|
||||
|
||||
const mysite = ref(null)
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
async function mounted() {
|
||||
mysite.value = await globalStore.caricaTabella('sites', process.env.APP_ID!)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
mysite,
|
||||
}
|
||||
}
|
||||
})
|
||||
37
src/rootgen/admin/confsite/confsite.vue
Executable file
37
src/rootgen/admin/confsite/confsite.vue
Executable file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<CMyPage title="Configura Sito" imgbackground="images/calendario_eventi.jpg" sizes="max-height: 120px">
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
|
||||
<div v-if="mysite">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<p class="mybanner">{{mysite.name}}</p>
|
||||
</q-banner>
|
||||
|
||||
|
||||
<CMyFieldRec
|
||||
title="Opzioni Sito"
|
||||
table="sites"
|
||||
:id="mysite._id"
|
||||
:rec="mysite"
|
||||
field="confsite.options"
|
||||
:canEdit="true"
|
||||
:canModify="true">
|
||||
</CMyFieldRec>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./confsite.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'confsite.scss';
|
||||
</style>
|
||||
@@ -58,6 +58,7 @@ const msg_it = {
|
||||
gallery: 'Gallerie',
|
||||
listaflotte: 'Flotte',
|
||||
bot: 'Bot',
|
||||
confsite: 'Configura Sito',
|
||||
},
|
||||
manage: {
|
||||
menu: 'Segreteria',
|
||||
@@ -515,6 +516,7 @@ const msg_it = {
|
||||
image: 'Immagine',
|
||||
date: 'Data',
|
||||
date_created: 'Creato il',
|
||||
options: 'Opzioni',
|
||||
err: {
|
||||
required: 'è richiesto',
|
||||
email: 'inserire una email valida',
|
||||
|
||||
@@ -1106,6 +1106,9 @@ export const colTableSites = [
|
||||
AddCol({ name: 'domain_provider', label_trans: 'sites.domain_provider', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'domain_expiring', label_trans: 'reg.domain_expiring', fieldtype: costanti.FieldType.onlydate }),
|
||||
AddCol({ name: 'next_payment', label_trans: 'reg.next_payment', fieldtype: costanti.FieldType.onlydate }),
|
||||
// Configuration
|
||||
// AddCol({ name: 'confsite.notif_reg', field: 'confsite', subfield: 'notif_reg', label_trans: 'reg.notif_reg', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'confsite.options', field: 'confsite', subfield: 'options', label_trans: 'reg.options', fieldtype: costanti.FieldType.binary, jointable: 'confsite_opt', }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
@@ -2402,6 +2405,15 @@ export const fieldsTable = {
|
||||
colicon: 'icon',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'sites',
|
||||
label: 'Siti',
|
||||
columns: colTableSites,
|
||||
colkey: '_id',
|
||||
collabel: 'name',
|
||||
colicon: 'icon',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'bottype',
|
||||
label: 'Tipo di Bot',
|
||||
@@ -2411,6 +2423,15 @@ export const fieldsTable = {
|
||||
colicon: 'icon',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'confsite_opt',
|
||||
label: 'Configura Opzioni Sito',
|
||||
columns: colTableGeneric,
|
||||
colkey: 'value',
|
||||
collabel: 'label',
|
||||
colicon: 'icon',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'users',
|
||||
label: 'Utenti',
|
||||
|
||||
@@ -241,6 +241,22 @@ export const tools = {
|
||||
},
|
||||
],
|
||||
|
||||
ConfSiteOpt: [
|
||||
{
|
||||
label: 'Richiede che Invitante confermi la Reg',
|
||||
value: shared_consts.ConfSite.Need_Aportador_On_DataReg_To_Verify_Reg,
|
||||
},
|
||||
{
|
||||
label: 'Notif Reg sul BOT (all\'Invitante)',
|
||||
value: shared_consts.ConfSite.Notif_Reg_Bot,
|
||||
},
|
||||
{
|
||||
label: 'Notif Reg Push (Admin)',
|
||||
value: shared_consts.ConfSite.Notif_Reg_Push_Admin,
|
||||
},
|
||||
|
||||
],
|
||||
|
||||
SelectMetodiPagamento: [
|
||||
{
|
||||
id: 0,
|
||||
@@ -5044,6 +5060,10 @@ export const tools = {
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
//if (tools.isTest() && (userStore.isAdmin || userStore.isManager))
|
||||
if ((userStore.isAdmin || userStore.isManager))
|
||||
return true
|
||||
|
||||
if (tablesel === toolsext.TABMYGROUPS) {
|
||||
// is Admin ?
|
||||
if (rec.admins) {
|
||||
@@ -5065,8 +5085,6 @@ export const tools = {
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
// if (userStore.isAdmin || userStore.isManager)
|
||||
// return true
|
||||
},
|
||||
|
||||
getToByCol(col: IColGridTable, table: string, rec: any) {
|
||||
|
||||
@@ -809,6 +809,40 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
})
|
||||
},
|
||||
|
||||
async caricaTabella(table: string, extrapar: string) {
|
||||
|
||||
let myarr = []
|
||||
const sortBy = 'descr'
|
||||
const descending = 1
|
||||
const myobj: any = {}
|
||||
if (descending)
|
||||
myobj[sortBy] = -1
|
||||
else
|
||||
myobj[sortBy] = 1
|
||||
|
||||
const params: IParamsQuery = {
|
||||
table: '',
|
||||
startRow: 0,
|
||||
endRow: 10000,
|
||||
filter: '',
|
||||
filterand: '',
|
||||
filtersearch: '',
|
||||
filtersearch2: '',
|
||||
filtercustom: '',
|
||||
sortBy: myobj,
|
||||
descending,
|
||||
userId: '',
|
||||
extrapar
|
||||
}
|
||||
|
||||
params.table = table
|
||||
return this.loadTable(params).then((data) => {
|
||||
return data
|
||||
}).catch((e) => {
|
||||
return []
|
||||
})
|
||||
},
|
||||
|
||||
async loadPage(path: string) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -1482,6 +1516,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'accepted') myarr = [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
|
||||
else if (table === 'fieldstype') myarr = costanti.FieldTypeArr
|
||||
else if (table === 'metodo_pagamento') myarr = tools.SelectMetodiPagamento
|
||||
else if (table === 'confsite_opt') myarr = tools.ConfSiteOpt
|
||||
else if (table === 'bottype') myarr = shared_consts.BotType
|
||||
else if (table === 'visibility') myarr = shared_consts.Visibility
|
||||
else if (table === 'visibilGroup') myarr = shared_consts.VisibilGroup
|
||||
|
||||
Reference in New Issue
Block a user