- Nuovo Sistema di Flotte per Tutor.
X - Mettere anche la email del sognatore, per chi è abituato ad inviarla in quel modo... X - Controllare che sul sito compaiano le informazioni del Sognatore...
This commit is contained in:
@@ -393,18 +393,33 @@
|
||||
<div>{{$t('dashboard.sognatore')}}</div>
|
||||
</div>
|
||||
<div class="row items-center justify-between q-ma-xs no-wrap" style="width: 100%;">
|
||||
<q-chip class="glossy q-ma-sm" color="red" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ tools.getrigacolstr(mianave) }}
|
||||
</q-chip>
|
||||
<q-chip class="glossy q-ma-sm" color="green" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ getNaveMediatoreStr(mianave)}}
|
||||
</q-chip>
|
||||
<q-chip class="glossy q-ma-sm" color="purple" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ getNaveSognatoreStr(mianave)}}
|
||||
</q-chip>
|
||||
<div class="justify-center">
|
||||
<q-chip class="glossy q-ma-sm" color="red" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ tools.getrigacolstr(mianave) }}
|
||||
</q-chip>
|
||||
<div class="items-center">
|
||||
<q-icon color="blue" size="md" name="fas fa-gift"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-center">
|
||||
<q-chip class="glossy q-ma-sm" color="green" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ getNaveMediatoreStr(mianave)}}
|
||||
</q-chip>
|
||||
<div class="items-center">
|
||||
<q-icon color="blue" size="md" name="fas fa-user-check"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-center">
|
||||
<q-chip class="glossy q-ma-sm" color="purple" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ getNaveSognatoreStr(mianave)}}
|
||||
</q-chip>
|
||||
<div class="items-center">
|
||||
<q-icon color="blue" size="md" name="fas fa-flag-checkered"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<!--<span v-for="index of 8">{{ getNaveSognatoreStr(mianave, index)}} - </span>-->
|
||||
</div>
|
||||
</div>
|
||||
@@ -416,7 +431,8 @@
|
||||
<q-list dense>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
{{tools.getlastnavestr(dashboard.lastnave) }}
|
||||
<!--{{tools.getlastnavestr(dashboard.lastnave) }} -->
|
||||
{{ tools.getrigacolstr(mianave)}}
|
||||
<q-icon :color="getcolornave(mianave)" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
@@ -435,7 +451,9 @@
|
||||
</q-slider>
|
||||
</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-flag-checkered"></q-icon>
|
||||
<!--{{tools.getlastnavestr(dashboard.lastnave) }} -->
|
||||
{{ getNaveSognatoreStr(mianave)}}
|
||||
<q-icon color="purple" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="mianave.num_tess % 2 !== 0">
|
||||
|
||||
@@ -26,7 +26,7 @@ export default class CMyFieldDb extends MixinBase {
|
||||
@Prop({ required: false, default: false }) public serv: boolean
|
||||
@Prop({ required: false, default: false }) public disable: boolean
|
||||
@Prop({ required: false, default: '' }) public jointable: string
|
||||
@Prop({ required: false, default: '' }) public table: string
|
||||
@Prop({ required: false, default: 'settings' }) public table: string
|
||||
|
||||
public $t
|
||||
public myvalue = ''
|
||||
|
||||
@@ -172,3 +172,11 @@
|
||||
font-size: 1.25rem;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.q-table th, .q-table--dense {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.q-btn {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
@@ -13,11 +13,13 @@ import { CMyChipList } from '../CMyChipList'
|
||||
import { CVideo } from '../CVideo'
|
||||
import { validations } from './CMyFlotta-validate'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import { CMyDashboard } from '../CMyDashboard'
|
||||
import { CDateTime } from '../CDateTime'
|
||||
|
||||
@Component({
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { CTitleBanner, CMyChipList, CVideo }
|
||||
components: { CTitleBanner, CMyChipList, CVideo, CMyDashboard, CDateTime }
|
||||
})
|
||||
|
||||
export default class CMyFlotta extends MixinNave {
|
||||
@@ -30,8 +32,35 @@ export default class CMyFlotta extends MixinNave {
|
||||
public loading: boolean = false
|
||||
public seluser = null
|
||||
public showmsguser: boolean = false
|
||||
public showsostituisci: boolean = false
|
||||
public showdashboard: boolean = false
|
||||
public showtesto: boolean = false
|
||||
public notifBot: boolean = true
|
||||
public deleteUser: boolean = true
|
||||
public AddImbarco: boolean = false
|
||||
public seltesto: string = ''
|
||||
public msg_tosend_user: string = ''
|
||||
public username_sostituire: string = ''
|
||||
public userfreestr: string = ''
|
||||
public tuttiidoni: boolean = false
|
||||
public inviaemail: boolean = false
|
||||
public seldonatore = null
|
||||
public ordinamento: string = 'data'
|
||||
public tabflotta: string = 'flotta'
|
||||
public tabmsg: string = 'donatori'
|
||||
public direzordin: number = -1
|
||||
public tutor1: string = ''
|
||||
public tutor2: string = ''
|
||||
public tutor3: string = ''
|
||||
public tutorslo: string = ''
|
||||
public date_start: Date = null
|
||||
public date_close: Date = null
|
||||
public email_paypal: string = ''
|
||||
public note_payment: string = ''
|
||||
public link_payment: string = ''
|
||||
public link_superchat: string = ''
|
||||
public last_riga_aperto: string = ''
|
||||
public last_col_aperto: string = ''
|
||||
public MyPagination: {
|
||||
sortBy: string,
|
||||
descending: boolean,
|
||||
@@ -65,15 +94,7 @@ export default class CMyFlotta extends MixinNave {
|
||||
]
|
||||
|
||||
public coldonatori: any[] = [
|
||||
{
|
||||
name: 'index',
|
||||
required: true,
|
||||
label: 'Num',
|
||||
align: 'left',
|
||||
field: 'index',
|
||||
sortable: true
|
||||
},
|
||||
{ name: 'rigacol', align: 'center', label: 'Posizione', field: '', sortable: true },
|
||||
{ name: 'nave', align: 'center', label: 'Nave', field: '', sortable: true },
|
||||
{ name: 'name', align: 'center', label: 'Nome', field: 'name', sortable: true },
|
||||
{ name: 'num_tess', align: 'center', label: 'Tessitura', field: 'num_tess', sortable: true },
|
||||
{ name: 'date_made_gift', align: 'center', label: 'Inviato', field: 'date_made_gift', sortable: true },
|
||||
@@ -89,17 +110,49 @@ export default class CMyFlotta extends MixinNave {
|
||||
|
||||
public mounted() {
|
||||
this.flotta = this.flottaprop
|
||||
this.aggiorna()
|
||||
|
||||
if (!!this.flotta) {
|
||||
this.last_riga_aperto = tools.getCookie('flotta_riga', '')
|
||||
this.last_col_aperto = tools.getCookie('flotta_col', '')
|
||||
}
|
||||
|
||||
if (this.isaperto)
|
||||
this.apriflotta()
|
||||
}
|
||||
|
||||
public aggiorna() {
|
||||
|
||||
if (!!this.flotta) {
|
||||
this.tutor1 = this.flotta.tutor1
|
||||
this.tutor2 = this.flotta.tutor2
|
||||
this.tutor3 = this.flotta.tutor3
|
||||
this.tutorslo = this.flotta.tutorslo
|
||||
this.date_start = this.flotta.date_start
|
||||
this.date_close = this.flotta.date_close
|
||||
this.note_payment = this.flotta.note_payment
|
||||
this.email_paypal = this.flotta.email_paypal
|
||||
this.link_payment = this.flotta.link_payment
|
||||
this.link_superchat = this.flotta.link_superchat
|
||||
}
|
||||
}
|
||||
|
||||
public getflottastr() {
|
||||
if (!!this.flotta)
|
||||
return 'Da ' + this.flotta.riga + '.' + this.flotta.col_prima + ' a ' + this.flotta.riga + '.' + this.flotta.col_ultima
|
||||
else
|
||||
if (!!this.flotta) {
|
||||
let mystr = ''
|
||||
if (this.flotta.provvisoria)
|
||||
mystr += ' Provvisoria '
|
||||
mystr += 'Da ' + this.flotta.riga + '.' + Math.ceil(this.flotta.col_prima / 8) + ' a ' + this.flotta.riga + '.' + Math.ceil(this.flotta.col_ultima / 8)
|
||||
|
||||
let perc = 0;
|
||||
if (this.flotta.DoniTotali > 0) {
|
||||
perc = Math.round((this.flotta.DoniConfermati / this.flotta.DoniTotali) * 100)
|
||||
}
|
||||
|
||||
mystr += ' (' + this.flotta.DoniConfermati + '/' + this.flotta.DoniTotali + ') [' + perc + '%]'
|
||||
|
||||
if (!!this.flotta.sognatore_nomecognome)
|
||||
mystr += ' - ' + this.flotta.sognatore_nomecognome
|
||||
return mystr
|
||||
} else
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -107,8 +160,25 @@ export default class CMyFlotta extends MixinNave {
|
||||
return 'Flotta ' + this.getflottastr()
|
||||
}
|
||||
|
||||
get log_attivita() {
|
||||
if (!!this.flotta)
|
||||
return this.flotta.log_attivita
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public getcolorflotta() {
|
||||
return 'bg-blue'
|
||||
if (!!this.flotta) {
|
||||
if (this.flotta.DoniMancanti === 0 && this.flotta.DoniTotali === 0)
|
||||
return 'bg-orange'
|
||||
else if (this.flotta.DoniConfermati === this.flotta.DoniTotali && this.flotta.DoniTotali > 0)
|
||||
return 'bg-green'
|
||||
else if (this.flotta.DoniConfermati <= this.flotta.DoniTotali)
|
||||
return 'bg-blue'
|
||||
else
|
||||
return 'bg-blue'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async apriflotta() {
|
||||
@@ -116,26 +186,97 @@ export default class CMyFlotta extends MixinNave {
|
||||
console.log('apriflotta')
|
||||
|
||||
this.loading = true
|
||||
this.arrdonatori = await GlobalStore.actions.GetFlotta({ riga: this.flotta.riga, col_prima: this.flotta.col_prima, col_ultima: this.flotta.col_ultima })
|
||||
const ris = await GlobalStore.actions.GetFlotta({
|
||||
riga: this.flotta.riga,
|
||||
col_prima: this.flotta.col_prima,
|
||||
col_ultima: this.flotta.col_ultima
|
||||
})
|
||||
|
||||
if (!!ris) {
|
||||
this.arrdonatori = ris.arrdonatori
|
||||
this.flotta = ris.flotta
|
||||
this.flotta.log_attivita = this.flotta.log_attivita.replace(/\n/g, '<br>')
|
||||
|
||||
}
|
||||
|
||||
this.aggiorna()
|
||||
this.loading = false
|
||||
|
||||
if (!!this.flotta) {
|
||||
tools.setCookie('flotta_riga', this.flotta.riga)
|
||||
tools.setCookie('flotta_col', this.flotta.col_prima)
|
||||
}
|
||||
}
|
||||
|
||||
public getnavestr(row) {
|
||||
return tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col)
|
||||
get getnotifBotTxt() {
|
||||
return this.seluser.name + ' (' + this.seluser.surname + ') è stato sostituito con ' + this.username_sostituire
|
||||
}
|
||||
|
||||
public getlinkchat(row) {
|
||||
return row.link_superchat
|
||||
public getnavestr(row, index) {
|
||||
return tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col) + ' D' + (((row.col - 1) % 8) + 1)
|
||||
}
|
||||
|
||||
public HoRicevutoIlDono(rec) {
|
||||
this.seldonatore = rec
|
||||
const msgtitle = this.$t('dashboard.dono_ricevuto_2')
|
||||
const msginvia = this.$t('dashboard.confermi_dono_ricevuto', {
|
||||
donatore: rec.name + ' ' + rec.surname
|
||||
})
|
||||
|
||||
let mymsg = this.$t('dashboard.confermi_dono_ricevuto_msg', {
|
||||
donatore: rec.name + ' ' + rec.surname + ' (' + this.$t('dashboard.posizione') + ' ' + rec.riga + '.' + rec.col + ')'
|
||||
})
|
||||
|
||||
mymsg += ' [' + rec.riga + '.' + rec.col + ']'
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '? (Pos ' + rec.riga + '.' + rec.col + ')', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_RICEVUTO, 0, {
|
||||
param1: {
|
||||
_id: rec._id,
|
||||
made_gift: true,
|
||||
riga: rec.riga,
|
||||
col: rec.col
|
||||
},
|
||||
param2: rec.username,
|
||||
param3: mymsg
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public clickseluser(rec) {
|
||||
this.seluser = rec
|
||||
this.showmsguser = true
|
||||
this.userfreestr = ''
|
||||
}
|
||||
|
||||
public clicksostituisci(rec) {
|
||||
this.seluser = rec
|
||||
this.showsostituisci = true
|
||||
this.username_sostituire = ''
|
||||
this.userfreestr = ''
|
||||
}
|
||||
|
||||
public viewdashboard(rec) {
|
||||
this.seluser = rec
|
||||
this.showdashboard = true
|
||||
}
|
||||
|
||||
public Chiudi() {
|
||||
this.showmsguser = false
|
||||
this.showsostituisci = false
|
||||
this.showtesto = false
|
||||
}
|
||||
|
||||
public async InviaMsgAUserConfirm(msgobj, navemediatore) {
|
||||
|
||||
const msgtitle = translate('dialog.sendmsg')
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msgobj.msgpar1 + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.INVIA_MSG_A_SINGOLO, 0, {
|
||||
param1: msgobj,
|
||||
param2: navemediatore
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
@@ -145,22 +286,198 @@ export default class CMyFlotta extends MixinNave {
|
||||
|
||||
}
|
||||
|
||||
public async InviaMsgAFlotta(inviareale) {
|
||||
public async InviaMsgAFlotta(inviareale, tipomsg, msg) {
|
||||
|
||||
const msgtitle = translate('dialog.sendmsg')
|
||||
const msgtitle = msg
|
||||
|
||||
let msg = 'TEST msg alla Flotta ?';
|
||||
|
||||
if (inviareale) {
|
||||
msg = 'Inviare a Tutta la Flotta il messaggio ?'
|
||||
}
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msg , translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.INVIA_MSG_A_FLOTTA, 0, {
|
||||
tools.askConfirm(this.$q, msgtitle, msg, translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.INVIA_MSG_A_FLOTTA, 0, {
|
||||
param1: this.flotta,
|
||||
param2: inviareale,
|
||||
param3: tools.TipoMsg.SEND_MSG_EFFETTUA_IL_DONO
|
||||
param2: { inviareale, inviaemail: this.inviaemail },
|
||||
param3: tipomsg
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public Callback() {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
public ActionAfterYes(action, item, data) {
|
||||
console.log('ActionAfterYes...')
|
||||
if (action === lists.MenuAction.DONO_RICEVUTO) {
|
||||
if (!!this.seldonatore) {
|
||||
this.seldonatore.made_gift = true
|
||||
}
|
||||
}
|
||||
|
||||
this.apriflotta()
|
||||
}
|
||||
|
||||
get getarr() {
|
||||
if (this.ordinamento === 'data')
|
||||
return this.arrdonatori.sort((a, b) => tools.gettimestampstrDate(a.date_made_gift) - tools.gettimestampstrDate(b.date_made_gift) * (this.direzordin))
|
||||
else if (this.ordinamento === 'num')
|
||||
return this.arrdonatori.sort((a, b) => a.col - b.col * (this.direzordin))
|
||||
|
||||
return this.arrdonatori
|
||||
}
|
||||
|
||||
public setordin(ord) {
|
||||
this.ordinamento = ord
|
||||
if (this.direzordin === 1)
|
||||
this.direzordin = -1
|
||||
else
|
||||
this.direzordin = 1
|
||||
}
|
||||
|
||||
public InviaMsgAUser() {
|
||||
|
||||
if (!this.msg_tosend_user)
|
||||
return
|
||||
|
||||
const msgobj = {
|
||||
tipomsg: tools.TipoMsg.SEND_MSG_SINGOLO,
|
||||
msgpar1: this.msg_tosend_user,
|
||||
username: this.seluser.username,
|
||||
inviareale: true,
|
||||
username_mitt: '',
|
||||
}
|
||||
|
||||
msgobj.username_mitt = UserStore.state.my.username
|
||||
|
||||
const naveuser = this.seluser
|
||||
|
||||
this.InviaMsgAUserConfirm(msgobj, naveuser)
|
||||
}
|
||||
|
||||
get isAdmin() {
|
||||
return UserStore.state.isAdmin
|
||||
}
|
||||
|
||||
get isManager() {
|
||||
return UserStore.state.isManager
|
||||
}
|
||||
|
||||
get isTutor() {
|
||||
return UserStore.state.isTutor
|
||||
}
|
||||
|
||||
get isTratuttrici() {
|
||||
return UserStore.state.isTratuttrici
|
||||
}
|
||||
|
||||
public async SostituisciUtente(user, usernamesost, notifBottxt) {
|
||||
usernamesost = usernamesost.trim()
|
||||
|
||||
await tools.askConfirm(this.$q, 'Sostituisci', notifBottxt + ' ?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.SOSTITUISCI, 0, {
|
||||
param1: user,
|
||||
param2: {
|
||||
username: usernamesost,
|
||||
username_da_sostituire: user.username,
|
||||
riga: user.riga,
|
||||
col: user.col,
|
||||
notifBot: this.notifBot,
|
||||
inviaemail: this.inviaemail,
|
||||
deleteUser: this.deleteUser,
|
||||
AddImbarco: this.AddImbarco,
|
||||
},
|
||||
param3: notifBottxt
|
||||
})
|
||||
}
|
||||
|
||||
public async TrovaUserFree(username) {
|
||||
|
||||
this.ChiamaFunz(null, lists.MenuAction.DAMMI_PRIMO_UTENTE_LIBERO, null)
|
||||
|
||||
}
|
||||
|
||||
public async ChiamaFunz(username, func, data) {
|
||||
|
||||
const mydatatosave = {
|
||||
username,
|
||||
ind_order: -1,
|
||||
myfunc: func,
|
||||
notifBot: null,
|
||||
data: null
|
||||
}
|
||||
|
||||
if (!!data) {
|
||||
mydatatosave.data = data
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
|
||||
GlobalStore.actions.askFunz({ mydata: mydatatosave }).then((ris) => {
|
||||
this.loading = false
|
||||
if (ris) {
|
||||
if (func === lists.MenuAction.DAMMI_PRIMO_UTENTE_LIBERO) {
|
||||
this.userfreestr = ris.username + ' (' + ris.name + ' ' + ris.surname + ')'
|
||||
this.username_sostituire = ris.username
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
public async Mostraplacca(riga, col) {
|
||||
const data = {
|
||||
riga,
|
||||
col
|
||||
}
|
||||
this.showtesto = true
|
||||
this.seltesto = await GlobalStore.actions.GetData({ data })
|
||||
}
|
||||
|
||||
public change_link_payment() {
|
||||
if (this.flotta.link_payment !== this.link_payment) {
|
||||
this.flotta.link_payment = this.link_payment
|
||||
|
||||
const mydata = {
|
||||
link_payment: this.flotta.link_payment
|
||||
}
|
||||
tools.saveFieldToServer(this, 'flotte', this.flotta._id, mydata)
|
||||
}
|
||||
}
|
||||
|
||||
public change_field(fieldname) {
|
||||
console.log('fieldname', this.date_start, this.flotta[fieldname], this[fieldname])
|
||||
if (this.flotta[fieldname] !== this[fieldname]) {
|
||||
this.flotta[fieldname] = this[fieldname]
|
||||
|
||||
const mydata = {
|
||||
[fieldname]: this.flotta[fieldname]
|
||||
}
|
||||
tools.saveFieldToServer(this, 'flotte', this.flotta._id, mydata)
|
||||
}
|
||||
}
|
||||
|
||||
public change_link_superchat() {
|
||||
if (this.flotta.link_superchat !== this.link_superchat) {
|
||||
this.flotta.link_superchat = this.link_superchat
|
||||
const mydata = {
|
||||
link_superchat: this.flotta.link_superchat
|
||||
}
|
||||
tools.saveFieldToServer(this, 'flotte', this.flotta._id, mydata)
|
||||
}
|
||||
}
|
||||
|
||||
get isaperto() {
|
||||
let open = false
|
||||
if (!!this.flotta)
|
||||
open = (this.flotta.riga.toString() === this.last_riga_aperto) && (this.flotta.col_prima.toString() === this.last_col_aperto)
|
||||
|
||||
console.log('isaperto', open, 'lastriga = ', this.last_riga_aperto, this.flotta.riga, 'last_col_aperto', this.last_col_aperto, this.flotta.col_prima)
|
||||
return open
|
||||
|
||||
}
|
||||
|
||||
public async update_nave() {
|
||||
this.Chiudi()
|
||||
this.apriflotta()
|
||||
}
|
||||
|
||||
public async EseguiCallServer() {
|
||||
this.Chiudi()
|
||||
this.loading = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,95 +1,487 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<CTitleBanner class=""
|
||||
<CTitleBanner v-if="!!flotta" class=""
|
||||
:title="gettitoloflotta()"
|
||||
:bgcolor="getcolorflotta()"
|
||||
clcolor="text-white"
|
||||
:visible="false" mystyle="" myclass="myshad" canopen="true" @apri="apriflotta">
|
||||
:visible="isaperto" mystyle="" myclass="myshad" canopen="true" @apri="apriflotta">
|
||||
|
||||
<div>
|
||||
|
||||
<div class="row q-pa-sm q-ma-sm">
|
||||
<div>TEST messaggio Flotta:
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST MESSAGGIO"
|
||||
@click="InviaMsgAFlotta(false)"></q-btn>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
Invia messaggio a TUTTA la Flotta:
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg')"
|
||||
@click="InviaMsgAFlotta(true)"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-table
|
||||
dense
|
||||
color="primary"
|
||||
dense
|
||||
flat
|
||||
table-style="padding: 0px;"
|
||||
:title="$t('dashboard.donatori')"
|
||||
:data="arrdonatori"
|
||||
:columns="getcol"
|
||||
:nodataLabel="$t('grid.nodata')"
|
||||
:Pagination.sync="MyPagination"
|
||||
row-key="index">
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td v-if="!tools.isMobile()" key="index" :props="props">
|
||||
{{ props.row.index }}
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="nave" :props="props">
|
||||
<div style="font-size:1rem;"><a :href="getlinkchat(props.row)" target="_blank">{{
|
||||
getnavestr(props.row)}}</a></div>
|
||||
</q-td>
|
||||
<q-td key="name" :props="props">
|
||||
<q-btn v-if="!!props.row.profile" flat rounded color="blue"
|
||||
:size="tools.getsize()"
|
||||
:label="props.row.name + ' ' + props.row.surname"
|
||||
@click="clickseluser(props.row)">
|
||||
</q-btn>
|
||||
<div v-if="tools.isMobile()">
|
||||
<br>
|
||||
{{'(' + getnavestr(props.row) + ')'}} - {{ tools.getstrshortDateTime(props.row.date_made_gift)
|
||||
}}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="posizione" :props="props">
|
||||
{{ props.row.riga }}.{{ props.row.col }}
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="date_made_gift" :props="props">
|
||||
{{ tools.getstrshortDateTime(props.row.date_made_gift) }}
|
||||
</q-td>
|
||||
<q-td key="made_gift" :props="props">
|
||||
|
||||
<div class="row justify-center">
|
||||
<q-btn v-if="!props.row.made_gift"
|
||||
push
|
||||
rounded
|
||||
color="primary"
|
||||
size="md"
|
||||
:label="$t('dashboard.dono_ricevuto_3', {donatore: props.row.name })"
|
||||
|
||||
@click="HoRicevutoIlDono(props.row)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="props.row.made_gift">
|
||||
<q-chip class="glossy"
|
||||
text-color="white"
|
||||
color="positive"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dialog.ok')
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
<div v-if="loading" class="q-ma-md text-center" style="height: 50px;">
|
||||
<q-spinner-hourglass size="50px" color="primary"></q-spinner-hourglass>
|
||||
</div>
|
||||
|
||||
<p v-if="flotta.provvisoria" class="text-center" style="color:red; font-weight: bold; font-size: 1.5rem;">
|
||||
NAVE <span v-if="flotta.provvisoria">TEMPORANEA</span><span v-else>DEFINITIVA</span>
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<CDateTime
|
||||
label="Data Inizio"
|
||||
class="cursor-pointer"
|
||||
:value.sync="date_close"
|
||||
:readonly="false"
|
||||
:minuteinterval="30"
|
||||
:dense="true"
|
||||
:canEdit="true"
|
||||
@savetoclose="change_field('date_close')">
|
||||
</CDateTime>
|
||||
|
||||
<CDateTime
|
||||
label="Data Fine"
|
||||
class="cursor-pointer"
|
||||
:value.sync="date_start"
|
||||
:readonly="false"
|
||||
:minuteinterval="30"
|
||||
:dense="true"
|
||||
:canEdit="true"
|
||||
@savetoclose="change_field('date_start')">
|
||||
</CDateTime>
|
||||
</div>
|
||||
|
||||
<q-tabs
|
||||
v-model="tabflotta"
|
||||
dense
|
||||
class="text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
align="justify"
|
||||
narrow-indicator
|
||||
>
|
||||
<q-tab name="messaggi" icon="fas fa-comments" label="Messaggi"></q-tab>
|
||||
<q-tab name="flotta" icon="fas fa-ship" label="Flotta"></q-tab>
|
||||
<q-tab name="attivita" icon="fas fa-ship" label="Attività Eseguite"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
|
||||
<q-tab-panels v-model="tabflotta" animated>
|
||||
<q-tab-panel name="messaggi">
|
||||
|
||||
<div class="row q-ma-md">
|
||||
<q-input v-model="tutor1" label="Tutor 1:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutor1')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="tutor2" label="Tutor 2:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutor2')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="tutor3" label="Tutor 3:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutor3')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="tutorslo" label="Tutor per Sloveni:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutorslo')">
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div class="justify-sm-start q-ma-md">
|
||||
<q-input v-model="email_paypal" style="max-width: 300px;" label="Email Paypal:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('email_paypal')">
|
||||
|
||||
</q-input>
|
||||
<q-input standout bottom-slots
|
||||
v-model="link_payment" style="max-width: 400px;" label="Link per Paypal.me:"
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
filled dense
|
||||
@input="change_link_payment">
|
||||
|
||||
<q-btn round dense flat icon="send"
|
||||
type="a" :href="link_payment"
|
||||
target="_blank" color="primary">
|
||||
</q-btn>
|
||||
</q-input>
|
||||
<q-input v-model="note_payment" style="max-width: 400px;" label="Note Aggiuntive Pagamento:"
|
||||
filled dense
|
||||
debounce="1000" dense
|
||||
:readonly="true"
|
||||
autogrow
|
||||
@input="change_field('note_payment')">
|
||||
</q-input>
|
||||
<br>
|
||||
<div class="justify-center" style="max-width: 500px;">
|
||||
<q-input standout bottom-slots
|
||||
filled dense
|
||||
v-model="link_superchat" style="max-width: 400px;" label="Link per Super Chat:"
|
||||
debounce="1000"
|
||||
@input="change_link_superchat">
|
||||
|
||||
<q-btn round dense flat icon="send"
|
||||
type="a" :href="link_superchat"
|
||||
target="_blank" color="primary">
|
||||
</q-btn>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-toggle v-model="inviaemail" label="Invia anche tramite Email"></q-toggle>
|
||||
|
||||
<q-tabs
|
||||
v-model="tabmsg"
|
||||
dense
|
||||
class="text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
align="justify"
|
||||
narrow-indicator
|
||||
>
|
||||
<q-tab name="sognatore" icon="fas fa-ship" label="Sognatore"></q-tab>
|
||||
<q-tab name="mediatore" icon="fas fa-ship" label="Mediatore"></q-tab>
|
||||
<q-tab name="donatori" icon="fas fa-ship" label="Donatori"></q-tab>
|
||||
<q-tab name="donatori_nodono" icon="fas fa-ship" label="Donatori che non hanno fatto il Dono"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabmsg" animated>
|
||||
<q-tab-panel name="sognatore">
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio a Sognatore"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_A_SOGNATORE, 'TEST: Inviare al Sognatore?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Sognatore`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_A_SOGNATORE, 'Inviare al Sognatore?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="mediatore">
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio Mediatori"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_A_MEDIATORI, 'TEST: Inviare ai Mediatori?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Tutti Donatori`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_A_MEDIATORI, 'Inviare ai Mediatori?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="donatori">
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio Donatori"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_EFFETTUA_IL_DONO, 'TEST: Inviare a tutti i Donatori?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Tutti i Donatori`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_EFFETTUA_IL_DONO, 'Inviare a tutti i Donatori?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="donatori_nodono">
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio Donatori No Dono"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_SOLLECITO_DONATORI_NO_DONO, 'TEST: Inviare a tutti i Donatori che non hanno fatto il dono, il msg del Sollecito?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Tutti i Donatori No Dono`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_SOLLECITO_DONATORI_NO_DONO, 'Inviare a tutti i Donatori che non hanno fatto il dono, il msg del Sollecito?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<q-field rounded outlined bg-color="orange-3" dense>
|
||||
<div class="justify-evenly" style="max-width: 300px;">
|
||||
<strong>Legenda dei codici speciali da inserire nei messaggi: </strong>
|
||||
<div>{link_paypalme}</div>
|
||||
<div>{link_superchat}</div>
|
||||
<div>{tutor1}</div>
|
||||
<div>{tutor2}</div>
|
||||
<div>{tutor3}</div>
|
||||
<div>{tutorslo}</div>
|
||||
<div>{sognatore}</div>
|
||||
</div>
|
||||
</q-field>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="flotta">
|
||||
<div>
|
||||
|
||||
<q-toggle v-model="tuttiidoni"
|
||||
label="Mostra Tutti i Doni">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<div v-if="!!flotta" class="text-evidente bordo_stondato justify-between q-pa-xs-sm">
|
||||
<div class="">
|
||||
<q-btn rounded color="blue"
|
||||
:label="flotta.sognatore_nomecognome + ' ' + ' (' + flotta.sognatore + ')'"
|
||||
@click="viewdashboard({username: flotta.sognatore })">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<div>
|
||||
{{$t('dashboard.doni_ricevuti')}}:
|
||||
<span class="ricevuti dati">{{flotta.DoniConfermati}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="inviati">
|
||||
{{$t('dashboard.doni_inviati_da_confermare')}}:
|
||||
<span class="inviati dati">{{flotta.DoniAttesaDiConferma}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="">
|
||||
{{$t('dashboard.doni_mancanti')}}:
|
||||
<span class="mancanti dati">{{flotta.DoniMancanti}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row justify-center q-px-xs content-center">
|
||||
<div style="width: 40px;">
|
||||
<q-btn
|
||||
flat
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Num"
|
||||
@click="setordin('num')">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div style="width: 100px;">
|
||||
<q-btn
|
||||
flat
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Ora Invio"
|
||||
|
||||
@click="setordin('data')">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<div style="width: 80px;">
|
||||
Esegui
|
||||
</div>
|
||||
<div style="width: 40px;">
|
||||
Nave
|
||||
</div>
|
||||
<div style="width: 250px;">
|
||||
Nome Cognome (Username)
|
||||
</div>
|
||||
<div style="width: 40px;">
|
||||
Tess
|
||||
</div>
|
||||
<div style="width: 40px;">
|
||||
Msg
|
||||
</div>
|
||||
<div style="width: 60px;">
|
||||
Sostituisci
|
||||
</div>
|
||||
<div style="width: 100px;">
|
||||
Commenti
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" v-for="(rec, index) of getarr">
|
||||
|
||||
<div class="row justify-center q-px-xs content-center"
|
||||
v-if="(!tuttiidoni && !rec.made_gift) || (tuttiidoni)">
|
||||
<div class="row items-center q-mx-md justify-between" style="padding: 2px;">
|
||||
<div style="width: 40px;">
|
||||
{{index + 1}}
|
||||
|
||||
</div>
|
||||
<div v-if="!tools.isMobile()" style="width: 100px;">
|
||||
{{ tools.getstrshortDateTime(rec.date_made_gift) }}
|
||||
</div>
|
||||
<div>
|
||||
<div class="row justify-center">
|
||||
<q-btn v-if="!rec.made_gift"
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
:label="$t('dashboard.dono_ricevuto_3', {donatore: rec.name })"
|
||||
|
||||
@click="HoRicevutoIlDono(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="rec.made_gift">
|
||||
<q-chip class="glossy"
|
||||
size="sm"
|
||||
text-color="white"
|
||||
color="positive"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dialog.ok')
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: blue; width: 60px;">
|
||||
<q-btn rounded color="blue"
|
||||
flat
|
||||
dense
|
||||
size="md"
|
||||
:label="getnavestr(rec)"
|
||||
@click="Mostraplacca(tools.getRiganave(rec.riga), tools.getColnave(rec.col))">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div style="color: blue; width: 250px;">
|
||||
<q-btn v-if="!!rec.profile" flat rounded dense color="blue"
|
||||
:size="tools.getsizesmall()"
|
||||
:label="rec.name + ' ' + rec.surname + ' (' + rec.username + ')'"
|
||||
@click="viewdashboard(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="!tools.isMobile()">
|
||||
({{ rec.num_tess }})
|
||||
</div>
|
||||
<div style="color: blue; width: 40px;">
|
||||
<q-btn color="blue"
|
||||
dense
|
||||
size="md"
|
||||
label="Msg"
|
||||
@click="clickseluser(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div style="color: blue; width: 70px;">
|
||||
<q-btn color="red"
|
||||
dense
|
||||
size="md"
|
||||
label="Sostituisci"
|
||||
@click="clicksostituisci(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!!rec.commento_al_sognatore" class="wrap">
|
||||
{{ rec.commento_al_sognatore }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--<q-table
|
||||
v-if="false"
|
||||
dense
|
||||
color="primary"
|
||||
dense
|
||||
flat
|
||||
table-style="padding: 0;"
|
||||
:title="$t('dashboard.donatori')"
|
||||
:data="arrdonatori"
|
||||
:columns="getcol"
|
||||
:nodataLabel="$t('grid.nodata')"
|
||||
:Pagination.sync="MyPagination"
|
||||
row-key="index">
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td v-if="!tools.isMobile()" key="nave" :props="props">
|
||||
<div style="font-size:1rem;"><a :href="getlinkchat(props.row)" target="_blank">{{
|
||||
getnavestr(props.row)}}</a></div>
|
||||
</q-td>
|
||||
<q-td key="name" :props="props">
|
||||
<q-btn v-if="!!props.row.profile" flat rounded dense color="blue"
|
||||
:size="tools.getsizesmall()"
|
||||
:label="props.row.name + ' ' + props.row.surname"
|
||||
@click="clickseluser(props.row)">
|
||||
</q-btn>
|
||||
<div v-if="tools.isMobile()">
|
||||
<br>
|
||||
{{'(' + getnavestr(props.row) + ')'}} - {{ tools.getstrshortDateTime(props.row.date_made_gift)
|
||||
}}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="num_tess" :props="props">
|
||||
{{ props.row.num_tess }}
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="date_made_gift" :props="props">
|
||||
{{ tools.getstrshortDateTime(props.row.date_made_gift) }}
|
||||
</q-td>
|
||||
<q-td key="made_gift" :props="props">
|
||||
|
||||
<div class="row justify-center">
|
||||
<q-btn v-if="!props.row.made_gift"
|
||||
push
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="sm"
|
||||
:label="$t('dashboard.dono_ricevuto_3', {donatore: props.row.name })"
|
||||
|
||||
@click="HoRicevutoIlDono(props.row)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="props.row.made_gift">
|
||||
<q-chip class="glossy"
|
||||
size="sm"
|
||||
text-color="white"
|
||||
color="positive"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dialog.ok')
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>-->
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="attivita">
|
||||
<div class="text-left" v-html="log_attivita"></div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<q-dialog v-model="showdashboard">
|
||||
<q-card v-if="seluser" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
<div v-if="!!seluser">
|
||||
{{ seluser.name }} {{ seluser.surname }}
|
||||
</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup clickable
|
||||
@click="Chiudi"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<CMyDashboard :username="seluser.username">
|
||||
|
||||
</CMyDashboard>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="showmsguser">
|
||||
<q-card v-if="seluser" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
@@ -137,12 +529,29 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="showsostituisci">
|
||||
<q-card v-if="seluser" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
<div v-if="!!seluser">
|
||||
{{ seluser.name }} {{ seluser.surname }}
|
||||
</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup clickable
|
||||
@click="Chiudi"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div>
|
||||
<div v-if="isManager || isTutor">
|
||||
<CTitleBanner class="shadow-2 rounded-borders" title="Sostituisci"
|
||||
bgcolor="bg-positive"
|
||||
clcolor="text-white"
|
||||
:visible="false"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<div class="column q-gutter-sm justify-center text-center">
|
||||
@@ -185,7 +594,7 @@
|
||||
<q-toggle v-model="AddImbarco"
|
||||
label="Aggiungi Destinatario (senza spostarlo da altre Navi)"></q-toggle>
|
||||
<q-toggle v-model="notifBot" :label="$t('dashboard.sendnotification')"></q-toggle>
|
||||
|
||||
<q-toggle v-model="inviaemail" label="Invia anche tramite Email"></q-toggle>
|
||||
|
||||
<q-btn class="q-ma-sm" rounded color="positive" text-color="white"
|
||||
icon="fas fa-gift"
|
||||
@@ -200,6 +609,30 @@
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="showtesto">
|
||||
<q-card v-if="seltesto" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
Testo:
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup clickable @click="Chiudi"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<div class="">
|
||||
<div>
|
||||
<pre>{{ seltesto }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-inner-loading id="spinner" :showing="loading">
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em">
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
|
||||
@@ -42,6 +42,7 @@ export default class CMyNave extends MixinNave {
|
||||
public coldoni: number = 1
|
||||
public mediatore: any = null
|
||||
public donatore: any = {}
|
||||
public flotta: any = null
|
||||
public donatore_navepers: any = {}
|
||||
public mediatore_navepers: any = {}
|
||||
public iodonatore: any = {}
|
||||
@@ -60,6 +61,7 @@ export default class CMyNave extends MixinNave {
|
||||
public msg_tosend_user: string = ''
|
||||
public username_sostituire: string = ''
|
||||
public userfreestr: string = ''
|
||||
public commento_al_sognatore: string = ''
|
||||
public MyPagination: {
|
||||
sortBy: string,
|
||||
descending: boolean,
|
||||
@@ -98,6 +100,7 @@ export default class CMyNave extends MixinNave {
|
||||
{ name: 'date_made_gift', align: 'center', label: 'Inviato', field: 'date_made_gift', sortable: true },
|
||||
// { name: 'tel', align: 'center', label: 'Tel', field: 'tel', sortable: true },
|
||||
{ name: 'made_gift', align: 'center', label: 'Conferm.', field: 'made_gift', sortable: true },
|
||||
{ name: 'commento_al_sognatore', align: 'center', label: 'Commento', field: 'commento_al_sognatore', sortable: true },
|
||||
]
|
||||
|
||||
public tragitto = [
|
||||
@@ -175,6 +178,8 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
if (!!this.nave) {
|
||||
if (!!this.nave.rec) {
|
||||
if (!!this.nave.rec.donatore.flotta)
|
||||
this.flotta = this.nave.rec.donatore.flotta
|
||||
if (!!this.nave.rec.donatore)
|
||||
this.donatore_navepers = this.nave.rec.donatore.navepersistente
|
||||
if (!!this.nave.rec.mediatore) {
|
||||
@@ -325,6 +330,12 @@ export default class CMyNave extends MixinNave {
|
||||
return false
|
||||
}
|
||||
|
||||
get getsuperchat(){
|
||||
if (!!this.flotta) {
|
||||
return this.flotta.link_superchat
|
||||
}
|
||||
}
|
||||
|
||||
get FattoDono() {
|
||||
if (!!this.iodonatore) {
|
||||
return this.iodonatore.made_gift
|
||||
@@ -378,7 +389,7 @@ export default class CMyNave extends MixinNave {
|
||||
donatore: rec.name + ' ' + rec.surname
|
||||
})
|
||||
|
||||
const mymsg = this.$t('dashboard.confermi_dono_ricevuto_msg', {
|
||||
let mymsg = this.$t('dashboard.confermi_dono_ricevuto_msg', {
|
||||
donatore: rec.name + ' ' + rec.surname + ' (' + this.$t('dashboard.posizione') + ' ' + rec.riga + '.' + rec.col + ')'
|
||||
})
|
||||
|
||||
@@ -407,7 +418,8 @@ export default class CMyNave extends MixinNave {
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_INVIATO, 0, {
|
||||
param1: {
|
||||
_id: this.iodonatore._id,
|
||||
date_made_gift: tools.getDateNow()
|
||||
date_made_gift: tools.getDateNow(),
|
||||
commento_al_sognatore: this.commento_al_sognatore,
|
||||
},
|
||||
param2: this.sognatoredelDono().username,
|
||||
param3: mymsg
|
||||
@@ -454,6 +466,24 @@ export default class CMyNave extends MixinNave {
|
||||
return ''
|
||||
}
|
||||
|
||||
public getpaypalmePagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.link_payment
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getnoteaggiuntivePagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.note_payment
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
get getDonoInviato() {
|
||||
if (!!this.iodonatore) {
|
||||
return !!this.iodonatore.date_made_gift
|
||||
@@ -847,6 +877,15 @@ export default class CMyNave extends MixinNave {
|
||||
this.aggiorna()
|
||||
}
|
||||
|
||||
public async EseguiCallServer() {
|
||||
this.Chiudi()
|
||||
this.loading = true
|
||||
}
|
||||
|
||||
public Callback() {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
public getstrinpartenza() {
|
||||
if (this.GiornoDelDonoArrivato) {
|
||||
return this.$t('dashboard.nave_partita')
|
||||
@@ -976,7 +1015,7 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
get getnotifBotTxt() {
|
||||
return this.seluser.name + ' ' + this.seluser.surname + ' è stato sostituito con ' + this.username_sostituire
|
||||
return this.seluser.name + ' (' + this.seluser.surname + ') è stato sostituito con ' + this.username_sostituire
|
||||
}
|
||||
|
||||
public async SostituisciUtente(user, usernamesost, notifBottxt) {
|
||||
|
||||
@@ -114,49 +114,69 @@
|
||||
{{$t('dashboard.importo')}}: <strong>33€</strong>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<CTitleBanner class="q-pa-xs"
|
||||
:title="$t('dashboard.come_inviare_regalo_con_paypal')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="5rp_XEV6Mzg">
|
||||
|
||||
</CVideo>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner class="q-pa-xs"
|
||||
:title="$t('dashboard.come_inviare_regalo_con_paypal') + '.me'"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="VzCy4BxQKhM">
|
||||
|
||||
</CVideo>
|
||||
|
||||
https://youtu.be/VzCy4BxQKhM
|
||||
</CTitleBanner>
|
||||
|
||||
</div>
|
||||
<div class="text-evidente2 bordo_stondato_blu2">
|
||||
|
||||
<div v-if="GiornoDelDonoArrivato && !donatore_navepers.provvisoria">
|
||||
<div v-if="!FattoDono"
|
||||
|
||||
<q-img src="statics/images/regalo.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="regalo">
|
||||
</q-img>
|
||||
|
||||
<div v-if="!FattoDono && !donoinviato"
|
||||
v-html="$t('dashboard.effettua_il_dono', {email: getemailPagamentoSognatore() })">
|
||||
</div>
|
||||
<CTitleBanner v-if="!FattoDono && !donoinviato" class="q-pa-xs"
|
||||
:title="$t('dashboard.come_inviare_regalo_con_paypal')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="5rp_XEV6Mzg">
|
||||
|
||||
</CVideo>
|
||||
|
||||
</CTitleBanner>
|
||||
<div v-if="!FattoDono && !!getpaypalmePagamentoSognatore() && !donoinviato"
|
||||
v-html="$t('dashboard.paypal_me', {link_payment: getpaypalmePagamentoSognatore() })">
|
||||
</div>
|
||||
<CTitleBanner v-if="!FattoDono && !!getpaypalmePagamentoSognatore() && !donoinviato"
|
||||
class="q-pa-xs"
|
||||
:title="$t('dashboard.come_inviare_regalo_con_paypal') + '.me'"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="VzCy4BxQKhM">
|
||||
|
||||
</CVideo>
|
||||
|
||||
</CTitleBanner>
|
||||
<div v-if="!FattoDono && !!getnoteaggiuntivePagamentoSognatore() && !donoinviato"
|
||||
v-html="getnoteaggiuntivePagamentoSognatore()">
|
||||
</div>
|
||||
<div v-if="!FattoDono">
|
||||
<br/>
|
||||
<div v-if="!donoinviato">
|
||||
{{$t('dashboard.clicca_conferma_dono')}}:<br>
|
||||
|
||||
|
||||
<q-input type="textarea"
|
||||
input-class="myinput-area"
|
||||
v-model="commento_al_sognatore"
|
||||
autogrow
|
||||
:label="$t('dashboard.commento_al_sognatore')"
|
||||
>
|
||||
</q-input>
|
||||
|
||||
|
||||
<div class="row justify-center q-ma-sm">
|
||||
<q-btn push
|
||||
rounded
|
||||
color="positive"
|
||||
size="md"
|
||||
size="lg"
|
||||
:label="$t('dashboard.ho_effettuato_il_dono')"
|
||||
icon="fas fa-gift"
|
||||
@click="HoEffettuatoIlDono">
|
||||
@@ -187,7 +207,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!!getsuperchat && !FattoDono"
|
||||
class="text-evidente bordo_stondato"
|
||||
v-html="$t('dashboard.superchat', {link_superchat: getsuperchat })">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<div class="column justify-center items-center q-gutter-md tutor">
|
||||
@@ -231,7 +258,7 @@
|
||||
<div v-for="(terra, index) in nave.rec.donatore.arrterra" :key="index">
|
||||
<div v-if="terra" :class="`cont_donatore text-small ` + getclassSelect(terra)">
|
||||
{{ terra.name }} {{ terra.surname }} ({{ terra.username }}) - {{
|
||||
terra.riga}}.{{terra.col}}<br>
|
||||
terra.riga}}.{{terra.col}} <br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -253,7 +280,8 @@
|
||||
{{ getindex(donatore, index + 1) }} - {{ donatore.name }} {{
|
||||
donatore.surname }} ({{
|
||||
donatore.username }}) - {{
|
||||
donatore.riga}}.{{donatore.col}}<br>
|
||||
donatore.riga}}.{{donatore.col}} <span
|
||||
v-if="isAdmin"> [ord:{{ donatore.ind_order }}]</span><br>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
@@ -469,6 +497,9 @@
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="commento_al_sognatore" :props="props">
|
||||
{{ props.row.commento_al_sognatore }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
@@ -577,13 +608,13 @@
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
<q-toggle v-model="deleteUser" :label="'Elimina ' + seluser.name + ' ' + seluser.surname"></q-toggle>
|
||||
<q-toggle v-model="AddImbarco" label="Aggiungi Destinatario (senza spostarlo da altre Navi)"></q-toggle>
|
||||
<q-toggle v-model="deleteUser"
|
||||
:label="'Elimina ' + seluser.name + ' ' + seluser.surname"></q-toggle>
|
||||
<q-toggle v-model="AddImbarco"
|
||||
label="Aggiungi Destinatario (senza spostarlo da altre Navi)"></q-toggle>
|
||||
<q-toggle v-model="notifBot" :label="$t('dashboard.sendnotification')"></q-toggle>
|
||||
|
||||
|
||||
|
||||
|
||||
<q-btn class="q-ma-sm" rounded color="positive" text-color="white"
|
||||
icon="fas fa-gift"
|
||||
label="Sostituisci"
|
||||
|
||||
Reference in New Issue
Block a user