fix Saldo when press refuse coins.
fix Risolvere problema del ritardo quando si fa il primo login...
This commit is contained in:
@@ -36,9 +36,12 @@ export default defineComponent({
|
||||
const title = ref('')
|
||||
const notifdirtype = ref(1)
|
||||
const notifidtype = ref(1)
|
||||
const notifdirtypeTest = ref(1)
|
||||
const notifidtypeTest = ref(1)
|
||||
|
||||
const listnotif = ref(<any>[])
|
||||
const listnotiftype = ref(<any>[])
|
||||
const listnotiftypeTest = ref(<any>[])
|
||||
const { t } = useI18n();
|
||||
|
||||
const listnotifid = computed(() => {
|
||||
@@ -55,6 +58,20 @@ export default defineComponent({
|
||||
return []
|
||||
})
|
||||
|
||||
const listnotifidTest = computed(() => {
|
||||
if (notifdirtypeTest.value) {
|
||||
const mylist: any = shared_consts.TypeNotifs_Test.find((rec: any) => rec.value === notifdirtypeTest.value)
|
||||
if (mylist) {
|
||||
for (const rec of mylist.list) {
|
||||
rec.label = t(rec.labeltrans)
|
||||
}
|
||||
}
|
||||
|
||||
return mylist.list
|
||||
}
|
||||
return []
|
||||
})
|
||||
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
|
||||
@@ -75,6 +92,11 @@ export default defineComponent({
|
||||
rec.label = t(rec.labeltrans)
|
||||
}
|
||||
|
||||
listnotiftypeTest.value = shared_consts.TypeNotifs_Test
|
||||
for (const rec of listnotiftypeTest.value) {
|
||||
rec.label = t(rec.labeltrans)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function changeCol(newval: any) {
|
||||
@@ -120,6 +142,22 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
async function sendNotifToUserTest() {
|
||||
|
||||
if (!!myuser.value) {
|
||||
const notif: INotif = {
|
||||
typedir: notifdirtypeTest.value,
|
||||
typeid: notifidtypeTest.value,
|
||||
sender: userStore.my.username,
|
||||
dest: myuser.value.username,
|
||||
descr: mynotif.value,
|
||||
title: title.value,
|
||||
}
|
||||
await notifStore.SendNotifEvent(notif)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -136,14 +174,19 @@ export default defineComponent({
|
||||
colVisib,
|
||||
exportListaEmail,
|
||||
sendNotifToUser,
|
||||
sendNotifToUserTest,
|
||||
risultato,
|
||||
mynotif,
|
||||
title,
|
||||
notifdirtype,
|
||||
notifidtype,
|
||||
notifdirtypeTest,
|
||||
notifidtypeTest,
|
||||
listnotif,
|
||||
listnotiftype,
|
||||
listnotiftypeTest,
|
||||
listnotifid,
|
||||
listnotifidTest,
|
||||
getMyUsername,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,31 @@
|
||||
<q-btn class="centermydiv q-ma-sm" color="green" :label="`Invia Notifica a ` + myuser.username" @click="sendNotifToUser"></q-btn>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="myuser.username && tools.isManager()"
|
||||
class="q-ma-sm row bordo_stondato" style="min-width: 300px; ">
|
||||
|
||||
<div class="row">
|
||||
<q-select rounded outlined v-model="notifdirtypeTest" :options="listnotiftypeTest" label="Tipo" emit-value map-options>
|
||||
</q-select>
|
||||
|
||||
<q-select rounded outlined v-model="notifidtypeTest" :options="listnotifidTest" label="Notifica" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<q-input
|
||||
v-model="title" label="Titolo TEST"
|
||||
style="width: 300px;"></q-input>
|
||||
<q-input
|
||||
v-model="mynotif" label="Notifica TEST da Inviare"
|
||||
input-class="myinput-area"
|
||||
style="width: 300px;"></q-input>
|
||||
</div>
|
||||
<br>
|
||||
<q-btn class="centermydiv q-ma-sm" color="green" :label="`Invia Notifica TEST a ` + myuser.username" @click="sendNotifToUserTest"></q-btn>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<CCopyBtn title="Copia Dati" :texttocopy="risultato"></CCopyBtn>-->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user