Pagina con i link dei Canali territoriali di RISO
Lista Tabelle "Aggiungi" da errore userId... Aggiunto "Servizi" e alcune sue sottocategorie Aggiunto anche la conversione della foto piccola alla Foto Profilo
This commit is contained in:
@@ -32,6 +32,7 @@ export default defineComponent({
|
||||
|
||||
const inputfile = ref('')
|
||||
const risultato = ref('')
|
||||
const risraw = ref('')
|
||||
|
||||
const caricaDatiToggle = ref(false)
|
||||
|
||||
@@ -395,6 +396,32 @@ export default defineComponent({
|
||||
userStore.importToServerCmd($q, t, cosafare.value, null)
|
||||
}
|
||||
|
||||
function createProvLink() {
|
||||
let str = ''
|
||||
|
||||
const arr = globalStore.provinces
|
||||
|
||||
let regione = ''
|
||||
let regid = ''
|
||||
|
||||
for (const prov of arr) {
|
||||
if (prov.link_grp) {
|
||||
if (prov.reg !== regid) {
|
||||
const myreg = shared_consts.Regions.find((rec: any) => rec.value === prov.reg)
|
||||
if (myreg) {
|
||||
regid = myreg.value
|
||||
regione = myreg.label
|
||||
str += '<br><div class="text-subtitle1">' + regione + '</div>'
|
||||
}
|
||||
}
|
||||
str += '<a class="prov" href="' + prov.link_grp + '" target="_blank">' + prov.descr + '</a><br>'
|
||||
}
|
||||
}
|
||||
|
||||
risultato.value = str
|
||||
risraw.value = str
|
||||
}
|
||||
|
||||
onMounted(created)
|
||||
|
||||
return {
|
||||
@@ -407,6 +434,8 @@ export default defineComponent({
|
||||
eseguiCmd,
|
||||
caricaDatiToggle,
|
||||
caricadati,
|
||||
createProvLink,
|
||||
risraw,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -20,8 +20,15 @@
|
||||
label="Esegui"
|
||||
@click="eseguiCmd"></q-btn>
|
||||
|
||||
<br>
|
||||
<q-btn
|
||||
label="Genera HTML Province Territoriali"
|
||||
@click="createProvLink"></q-btn>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
<div>{{ risraw }}</div>
|
||||
|
||||
<div v-html="risultato"></div>
|
||||
<br>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { CMyPage } from '../../../components/CMyPage/index'
|
||||
import { CMyEditor } from '../../../components/CMyEditor/index'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
import { defineComponent, ref, onMounted } from 'vue'
|
||||
import { defineComponent, ref, onMounted, watch } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
@@ -12,7 +13,7 @@ import { IMsgGlobParam } from 'model'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Sendpushnotif',
|
||||
components: { CMyPage },
|
||||
components: { CMyPage, CMyEditor },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
@@ -29,13 +30,68 @@ export default defineComponent({
|
||||
const opz2= ref('')
|
||||
const tag= ref('')
|
||||
const actiontype = ref(shared_consts.TypeMsg_Actions.NORMAL)
|
||||
const destination = ref(shared_consts.TypeMsg.SEND_TO_ALL)
|
||||
const whatMsg = ref(shared_consts.whatMsgToSend.MSG_TEXT)
|
||||
const destination = ref(shared_consts.TypeMsg.SEND_TO_MYSELF)
|
||||
const sendreally = ref(false)
|
||||
const templmsgid = ref(0)
|
||||
const mytempl = ref(<any>null)
|
||||
|
||||
const mytab = ref('telegram')
|
||||
const arrTemplate = ref(<any>[])
|
||||
const recMsgTempl = ref(<any>[])
|
||||
const mymsg = ref('')
|
||||
const msgold = ref('')
|
||||
|
||||
watch(() => whatMsg.value, (newval: any, oldval) => {
|
||||
|
||||
if (whatMsg.value !== shared_consts.whatMsgToSend.MSG_TEXT) {
|
||||
msgold.value = mymsg.value
|
||||
} else {
|
||||
mymsg.value = msgold.value
|
||||
}
|
||||
|
||||
load()
|
||||
|
||||
})
|
||||
|
||||
watch(() => templmsgid.value, (newval: any, oldval) => {
|
||||
|
||||
if (newval && recMsgTempl.value.length > 0) {
|
||||
mytempl.value = recMsgTempl.value.find((rec: any) => rec._id === newval)
|
||||
mymsg.value = mytempl.value.msg_it
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
async function load() {
|
||||
if (whatMsg.value === shared_consts.whatMsgToSend.MSG_OF_TEMPLATE) {
|
||||
recMsgTempl.value = await globalStore.GetMsgTemplates()
|
||||
|
||||
for (const rec of recMsgTempl.value) {
|
||||
arrTemplate.value.push({id: rec._id, value: rec._id, label: rec.title})
|
||||
}
|
||||
|
||||
if (templmsgid.value) {
|
||||
if (recMsgTempl.value.length > 0) {
|
||||
templmsgid.value = recMsgTempl.value[0]._id;
|
||||
}
|
||||
}
|
||||
if (templmsgid.value) {
|
||||
mytempl.value = recMsgTempl.value.find((rec: any) => rec._id === templmsgid.value)
|
||||
mymsg.value = ''
|
||||
mymsg.value = mytempl.value.msg_it
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function created() {
|
||||
title.value = t('ws.sitename')
|
||||
openUrl.value = '/'
|
||||
openUrl2.value = ''
|
||||
tag.value = 'msg'
|
||||
|
||||
load()
|
||||
}
|
||||
|
||||
function SendMsg(params: any) {
|
||||
@@ -66,7 +122,7 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
function SendMsgToParam(typemsg: any) {
|
||||
function SendMsgToParam(typemsg: any, typesend: number = shared_consts.TypeSend.PUSH_NOTIFICATION, sendreally: any = false) {
|
||||
|
||||
let param: IMsgGlobParam = {
|
||||
typemsg,
|
||||
@@ -76,9 +132,15 @@ export default defineComponent({
|
||||
openUrl2: openUrl2.value,
|
||||
tag: tag.value,
|
||||
actions: [],
|
||||
typesend: shared_consts.TypeSend.PUSH_NOTIFICATION
|
||||
typesend,
|
||||
sendreally
|
||||
}
|
||||
|
||||
if (typesend === shared_consts.TypeSend.TELEGRAM) {
|
||||
param.content = mymsg.value
|
||||
}
|
||||
|
||||
|
||||
param.actions = []
|
||||
|
||||
if (actiontype.value === shared_consts.TypeMsg_Actions.YESNO) {
|
||||
@@ -100,9 +162,9 @@ export default defineComponent({
|
||||
return SendMsg(param)
|
||||
}
|
||||
|
||||
function SendMsgToAll() {
|
||||
function SendMsgToAll(typesend: number) {
|
||||
|
||||
SendMsgToParam(destination.value)
|
||||
SendMsgToParam(destination.value, typesend, sendreally.value)
|
||||
}
|
||||
|
||||
onMounted(created)
|
||||
@@ -113,13 +175,20 @@ export default defineComponent({
|
||||
openUrl,
|
||||
openUrl2,
|
||||
actiontype,
|
||||
whatMsg,
|
||||
destination,
|
||||
sendreally,
|
||||
SendMsgToAll,
|
||||
opz1,
|
||||
opz2,
|
||||
content,
|
||||
shared_consts,
|
||||
incaricamento,
|
||||
mytab,
|
||||
templmsgid,
|
||||
arrTemplate,
|
||||
mytempl,
|
||||
mymsg,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,47 +1,130 @@
|
||||
<template>
|
||||
<CMyPage img="" title="Invio Push Notifiche" keywords="" description="">
|
||||
<div class="q-ma-sm">
|
||||
<div class="row center_img clBorderSteps" style="max-width: 600px;">
|
||||
<div class="row">
|
||||
<q-input v-model="title" autofocus label="Titolo" style="width: 300px;"></q-input>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input
|
||||
v-model="content" type="textarea" autofocus label="Contenuto"
|
||||
input-class="myinput-area"
|
||||
style="height: 100px; width: 500px;"></q-input>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input v-model="openUrl" autofocus label="openUrl" style="width: 200px;"></q-input>
|
||||
<q-input v-model="openUrl2" autofocus label="openUrl2" style="width: 200px;"></q-input>
|
||||
<q-input v-model="tag" autofocus label="tag" style="width: 100px;"></q-input>
|
||||
</div>
|
||||
<q-select
|
||||
rounded outlined v-model="actiontype"
|
||||
:options="shared_consts.selectActions"
|
||||
label="Tipo Msg" emit-value map-options>
|
||||
</q-select>
|
||||
<q-select
|
||||
rounded outlined v-model="destination"
|
||||
:options="shared_consts.selectDestination"
|
||||
label="Destinazione" emit-value map-options>
|
||||
</q-select>
|
||||
<div v-if="actiontype === shared_consts.TypeMsg_Actions.OPZ1_2" class="row">
|
||||
<q-input v-model="opz1" autofocus label="Opzione 1" style="width: 100px;"></q-input>
|
||||
<q-input v-model="opz2" autofocus label="Opzione 2" style="width: 100px;"></q-input>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="">
|
||||
<q-btn label="Invia Msg" color="primary" @click="SendMsgToAll()"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<q-inner-loading id="spinner" :showing="incaricamento">
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em">
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
<q-tabs v-model="mytab" class="text-teal">
|
||||
<q-tab label="Telegram" name="telegram"></q-tab>
|
||||
<q-tab label="Notifiche Push" name="push"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-separator></q-separator>
|
||||
|
||||
<q-tab-panels v-model="mytab" animated>
|
||||
<q-tab-panel name="telegram">
|
||||
<div class="row center_img clBorderSteps" style="max-width: 600px;">
|
||||
<q-select
|
||||
rounded outlined v-model="whatMsg"
|
||||
:options="shared_consts.selectwhatMsgToSend"
|
||||
label="Quale Messaggio" emit-value map-options>
|
||||
</q-select>
|
||||
<div v-if="whatMsg === shared_consts.whatMsgToSend.MSG_TEXT"
|
||||
class="row">
|
||||
<q-input
|
||||
v-model="mymsg" type="textarea" autofocus label="Messaggio"
|
||||
input-class="myinput-area"
|
||||
style="height: 100px; width: 500px;"></q-input>
|
||||
</div>
|
||||
<div v-if="whatMsg === shared_consts.whatMsgToSend.MSG_OF_TEMPLATE">
|
||||
<q-select
|
||||
rounded outlined v-model="templmsgid"
|
||||
:options="arrTemplate"
|
||||
label="Scegli il Template di Msg da inviare" emit-value map-options>
|
||||
</q-select>
|
||||
|
||||
<CMyEditor v-if="mymsg"
|
||||
v-model:value="mymsg" :showButtons="false" :canModify="true">
|
||||
|
||||
</CMyEditor>
|
||||
|
||||
</div>
|
||||
<div class="q-ma-xs q-pa-xs" style="border-color: darkred; border-width: 3px;">
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="bg-positive text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<template v-slot:avatar>
|
||||
<q-icon name="fas fa-bullhorn" color="yellow" size="xs" />
|
||||
</template>
|
||||
<span class="mybanner">MESSAGGIO DA INVIARE:</span>
|
||||
</q-banner>
|
||||
<div v-html="mymsg"></div>
|
||||
</div>
|
||||
<q-select
|
||||
rounded outlined v-model="destination"
|
||||
:options="shared_consts.selectDestination"
|
||||
label="Destinazione" emit-value map-options>
|
||||
</q-select>
|
||||
<q-select
|
||||
rounded outlined v-model="sendreally"
|
||||
:options="shared_consts.selectSendReally"
|
||||
label="Destinazione" emit-value map-options>
|
||||
</q-select>
|
||||
<br/>
|
||||
<div class="">
|
||||
<q-btn label="Invia Msg" color="primary" @click="SendMsgToAll(shared_consts.TypeSend.TELEGRAM)"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<q-inner-loading id="spinner" :showing="incaricamento">
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em">
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="push">
|
||||
<div class="row center_img clBorderSteps" style="max-width: 600px;">
|
||||
<div class="row">
|
||||
<q-input v-model="title" autofocus label="Titolo" style="width: 300px;"></q-input>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input
|
||||
v-model="content" type="textarea" autofocus label="Contenuto"
|
||||
input-class="myinput-area"
|
||||
style="height: 100px; width: 500px;"></q-input>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input v-model="openUrl" autofocus label="openUrl" style="width: 200px;"></q-input>
|
||||
<q-input v-model="openUrl2" autofocus label="openUrl2" style="width: 200px;"></q-input>
|
||||
<q-input v-model="tag" autofocus label="tag" style="width: 100px;"></q-input>
|
||||
</div>
|
||||
<q-select
|
||||
rounded outlined v-model="actiontype"
|
||||
:options="shared_consts.selectActions"
|
||||
label="Tipo Msg" emit-value map-options>
|
||||
</q-select>
|
||||
<q-select
|
||||
rounded outlined v-model="destination"
|
||||
:options="shared_consts.selectDestination"
|
||||
label="Destinazione" emit-value map-options>
|
||||
</q-select>
|
||||
<q-select
|
||||
rounded outlined v-model="sendreally"
|
||||
:options="shared_consts.selectSendReally"
|
||||
label="Destinazione" emit-value map-options>
|
||||
</q-select>
|
||||
<div v-if="actiontype === shared_consts.TypeMsg_Actions.OPZ1_2" class="row">
|
||||
<q-input v-model="opz1" autofocus label="Opzione 1" style="width: 100px;"></q-input>
|
||||
<q-input v-model="opz2" autofocus label="Opzione 2" style="width: 100px;"></q-input>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="">
|
||||
<q-btn label="Invia Msg" color="primary" @click="SendMsgToAll(shared_consts.TypeSend.PUSH_NOTIFICATION)"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<q-inner-loading id="spinner2" :showing="incaricamento">
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em">
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./sendpushnotif.ts">
|
||||
|
||||
@@ -31,7 +31,7 @@ export default defineComponent({
|
||||
value: shared_consts.FILTER_USER_NO_INVITANTE
|
||||
},
|
||||
{
|
||||
label: 'Non sono stati Approvati dall\'Invitante',
|
||||
label: 'No Approv. Invitante',
|
||||
value: shared_consts.FILTER_USER_NO_VERIFIED_APORTADOR
|
||||
},
|
||||
{
|
||||
@@ -39,7 +39,15 @@ export default defineComponent({
|
||||
value: shared_consts.FILTER_USER_NO_TELEGRAM_ID
|
||||
},
|
||||
{
|
||||
label: 'Verifica Telegram interrotta',
|
||||
label: 'SI Telegram ID',
|
||||
value: shared_consts.FILTER_USER_SI_TELEGRAM_ID
|
||||
},
|
||||
{
|
||||
label: 'NO Username Teleg',
|
||||
value: shared_consts.FILTER_USER_WITHOUT_USERNAME_TELEGRAM
|
||||
},
|
||||
{
|
||||
label: 'Verifica Teleg interrotta',
|
||||
value: shared_consts.FILTER_USER_CODICE_AUTH_TELEGRAM
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user