diff --git a/src/boot/vue-i18n.ts b/src/boot/vue-i18n.ts index 2488b3c..1c1cbe9 100755 --- a/src/boot/vue-i18n.ts +++ b/src/boot/vue-i18n.ts @@ -11,9 +11,11 @@ export default ({ app, store, Vue }) => { let mylang = tools.getItemLS(tools.localStorage.lang) console.log(`LANG LocalStorage ${mylang}`) - if ((navigator) && (mylang === '')) { - mylang = navigator.language - console.log(`LANG NAVIGATOR ${mylang}`) + if ((navigator)) { + const mylangnav = navigator.language + console.log(`LANG NAVIGATOR ${mylangnav}`) + if (mylang === '') + mylang = mylangnav } mylang = tools.checkLangPassed(mylang) diff --git a/src/components/CGuidelines/CGuidelines.vue b/src/components/CGuidelines/CGuidelines.vue index 50036da..0faa232 100755 --- a/src/components/CGuidelines/CGuidelines.vue +++ b/src/components/CGuidelines/CGuidelines.vue @@ -71,13 +71,8 @@ Cuore desidera ardentemente?
  • Attivare almeno 2 metodi di pagamento. - PayPal è obbligatorio (occorrono 2 minuti per attivarlo). - Ti consente trasferimenti gratuiti in area Euro e puoi collegarci carte e conti - correnti. I tuoi dati sono al sicuro e non condivisi con il ricevente. - Sono consigliati il conto Revolut o N26 come seconda opzione e - Western - Union, Xoom o TransferWise nei casi di - regali extraeuropei. + Revolut è quello maggiormente consigliato.
    + Come seconda scelta c'è Paypal, ma ultimamente stiamo avendo problemi perchè tendono a bloccare i soldi sul conto per 6 mesi per controlli, quindi da utilizzare solo se impossiblitati ad aprire un conto con Revolut.
  • diff --git a/src/components/CMyDashboard/CMyDashboard.vue b/src/components/CMyDashboard/CMyDashboard.vue index e5e6d98..28458e3 100755 --- a/src/components/CMyDashboard/CMyDashboard.vue +++ b/src/components/CMyDashboard/CMyDashboard.vue @@ -342,6 +342,11 @@ + + + {{ getNaveSognatoreStr(mianave)}} + + diff --git a/src/components/CMyFlotta/CMyFlotta.ts b/src/components/CMyFlotta/CMyFlotta.ts index ec76a90..38d1aa6 100755 --- a/src/components/CMyFlotta/CMyFlotta.ts +++ b/src/components/CMyFlotta/CMyFlotta.ts @@ -29,6 +29,7 @@ export default class CMyFlotta extends MixinNave { public flotta: any = null public flotta_completa: any = null public arrdonatori: any[] = [] + public arrmediatori: any[] = [] public loading: boolean = false public seluser = null public showmsguser: boolean = false @@ -43,6 +44,9 @@ export default class CMyFlotta extends MixinNave { public username_sostituire: string = '' public userfreestr: string = '' public tuttiidoni: boolean = false + public showcommenti: boolean = true + public showcolmodifica: boolean = false + public showcoldati: boolean = false public inviaemail: boolean = false public seldonatore = null public ordinamento: string = 'data' @@ -55,6 +59,7 @@ export default class CMyFlotta extends MixinNave { public tutorslo: string = '' public date_start: Date = null public date_close: Date = null + public revolut: string = '' public email_paypal: string = '' public note_payment: string = '' public link_payment: string = '' @@ -129,12 +134,19 @@ export default class CMyFlotta extends MixinNave { this.date_start = this.flotta.date_start this.date_close = this.flotta.date_close this.note_payment = this.flotta.note_payment + this.revolut = this.flotta.revolut this.email_paypal = this.flotta.email_paypal this.link_payment = this.flotta.link_payment this.link_superchat = this.flotta.link_superchat } } + public addstrnaveseprovv() { + if (this.flotta.provvisoria) + return ' (La FLOTTA è ancora Provvisoria !) ' + return '' + } + public getflottastr() { if (!!this.flotta) { let mystr = '' @@ -142,12 +154,24 @@ export default class CMyFlotta extends MixinNave { 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) + let perc = 0 + let conf = 0 + let tot = 0 + + if (this.arrdonatori.length > 0) { + tot = this.getDoniTotali() + conf = this.getDoniConfermati() + } else { + tot = this.flotta.DoniTotali + conf = this.flotta.DoniConfermati } - mystr += ' (' + this.flotta.DoniConfermati + '/' + this.flotta.DoniTotali + ') [' + perc + '%]' + if (tot > 0) { + perc = Math.round((conf / tot) * 100) + } + + mystr += ' (' + conf + '/' + tot + ') [' + perc + '%]' + if (!!this.flotta.sognatore_nomecognome) mystr += ' - ' + this.flotta.sognatore_nomecognome @@ -174,7 +198,7 @@ export default class CMyFlotta extends MixinNave { 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' + return 'bg-red' else return 'bg-blue' } @@ -194,6 +218,7 @@ export default class CMyFlotta extends MixinNave { if (!!ris) { this.arrdonatori = ris.arrdonatori + this.arrmediatori = ris.arrmediatori this.flotta = ris.flotta this.flotta.log_attivita = this.flotta.log_attivita.replace(/\n/g, '
    ') @@ -212,27 +237,49 @@ export default class CMyFlotta extends MixinNave { return this.seluser.name + ' (' + this.seluser.surname + ') è stato sostituito con ' + this.username_sostituire } - public getnavestr(row, index) { - return tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col) + ' D' + (((row.col - 1) % 8) + 1) + public getnave(row) { + return tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col) } - public HoRicevutoIlDono(rec) { + public getnavestr(row, index) { + let flottastr = tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col) + ' D' + (((row.col - 1) % 8) + 1) + + if (this.showcoldati) { + flottastr += ' ' + row.riga + '.' + row.col + } + + return flottastr + } + + public getwidthpos() { + return (this.showcoldati) ? '80' : '60' + } + + public HoRicevutoIlDono(rec, annulla) { 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 + ']' + let msgtitle = '' + let msginvia = '' + let mymsg = '' + if (annulla) { + msgtitle = 'Annulla la ricezione del dono' + msginvia = `Confermi di annullare il Dono da parte di ${rec.name} ${rec.surname} (${rec.username})'` + mymsg = '' + } else { + msgtitle = this.$t('dashboard.dono_ricevuto_2') + msginvia = this.$t('dashboard.confermi_dono_ricevuto', { + donatore: rec.name + ' ' + rec.surname + }) + 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, + made_gift: !annulla, + annulla, riga: rec.riga, col: rec.col }, @@ -288,6 +335,9 @@ export default class CMyFlotta extends MixinNave { public async InviaMsgAFlotta(inviareale, tipomsg, msg) { + if ((tipomsg === tools.TipoMsg.SEND_MSG_EFFETTUA_IL_DONO) || (tipomsg === tools.TipoMsg.SEND_MSG_SOLLECITO_DONATORI_NO_DONO)) { + msg = this.addstrnaveseprovv() + msg + } const msgtitle = msg tools.askConfirm(this.$q, msgtitle, msg, translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.INVIA_MSG_A_FLOTTA, 0, { @@ -314,12 +364,97 @@ export default class CMyFlotta extends MixinNave { } get getarr() { + let myarr = [] if (this.ordinamento === 'data') - return this.arrdonatori.sort((a, b) => tools.gettimestampstrDate(a.date_made_gift) - tools.gettimestampstrDate(b.date_made_gift) * (this.direzordin)) + myarr = 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)) + myarr = this.arrdonatori.sort((a, b) => a.col - b.col * (this.direzordin)) + else if (this.ordinamento === 'nationality') + myarr = this.arrdonatori.sort((a, b) => ('' + a.profile.nationality).localeCompare(b.profile.nationality) * (this.direzordin)) + else + myarr = this.arrdonatori - return this.arrdonatori + return myarr.filter((rec) => ((!this.tuttiidoni && !rec.made_gift) || (this.tuttiidoni))) + } + + public exportLista() { + let mystr = '' + let nave = '' + for (const rec of this.getarr) { + if (this.getnave(rec) !== nave) { + nave = this.getnave(rec) + mystr += '\n' + nave + ': ' + '\n' + } + + if (rec.made_gift) { + mystr += '✅🎁' + } else { + if (!rec.date_made_gift) { + mystr += ' 👉🏻 ' + } else { + mystr += ' 🎁 ' + } + } + + if (rec.profile.nationality === 'IT') + mystr += '🇮🇹' + else if (rec.profile.nationality === 'SI') + mystr += '🇸🇮' + else if (rec.profile.nationality === 'HR') + mystr += '🇭🇷' + else if (rec.profile.nationality === 'FR') + mystr += '🇫🇷' + else if (rec.profile.nationality === 'ES') + mystr += '🇪🇸' + else if (rec.profile.nationality === 'PT') + mystr += '🇵🇹' + else if (rec.profile.nationality === 'DE') + mystr += '🇩🇪' + else if (rec.profile.nationality === 'UK') + mystr += '🇬🇧' + else if (rec.profile.nationality === 'GB') + mystr += '🇬🇧' + else if (rec.profile.nationality === 'IE') + mystr += '🇮🇪' + else if (rec.profile.nationality === 'KE') + mystr += '🇰🇪' + else if (rec.profile.nationality === 'AU') + mystr += '🇦🇺' + else if (rec.profile.nationality === 'CM') + mystr += '🇨🇲' + else if (rec.profile.nationality === 'CO') + mystr += '🇨🇴' + else if (rec.profile.nationality === 'BR') + mystr += '🇧🇷' + else if (rec.profile.nationality === 'PL') + mystr += '🇵🇱' + else if (rec.profile.nationality === 'VE') + mystr += '🇻🇪' + else + mystr += '(' + rec.profile.nationality + ')' + + mystr += ' ' + rec.name + ' ' + rec.surname + ' (' + rec.username + ')' + + mystr += '\n' + } + + tools.copyStringToClipboard(this, mystr, false) + } + + public getDoniAttesaDiConferma() { + return this.arrdonatori.filter((rec) => (!!rec.date_made_gift && !rec.made_gift)).reduce((sum, item) => sum + 1, 0) + } + + public getDoniTotali() { + return this.arrdonatori.filter((rec) => (!!rec)).reduce((sum, item) => sum + 1, 0) + } + + public getDoniConfermati() { + return this.arrdonatori.filter((rec) => rec.made_gift).reduce((sum, item) => sum + 1, 0) + } + + public getDoniMancanti() { + return this.arrdonatori.filter((rec) => (!rec.made_gift && !rec.date_made_gift)).reduce((sum, item) => sum + 1, 0) } public setordin(ord) { @@ -465,7 +600,7 @@ export default class CMyFlotta extends MixinNave { 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) + // 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 } @@ -480,4 +615,19 @@ export default class CMyFlotta extends MixinNave { this.loading = true } + public getnamebyrec(rec) { + let mystr = rec.name + ' ' + rec.surname + if (this.showcoldati) + mystr += ' (' + rec.username + ')' + + return mystr + } + + public getwidthnome() { + if (this.showcoldati) + return 'width: 250px; ' + else + return 'width: 200px; ' + } + } diff --git a/src/components/CMyFlotta/CMyFlotta.vue b/src/components/CMyFlotta/CMyFlotta.vue index 6e8d44d..ab7a913 100755 --- a/src/components/CMyFlotta/CMyFlotta.vue +++ b/src/components/CMyFlotta/CMyFlotta.vue @@ -18,17 +18,6 @@ - - - + + + + + + @@ -162,6 +169,34 @@ + +
    + MEDIATORI: +
    +
    +
    +
    + {{index + 1}} +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    @@ -211,18 +246,22 @@ - -
    - Legenda dei codici speciali da inserire nei messaggi: -
    {link_paypalme}
    -
    {link_superchat}
    -
    {tutor1}
    -
    {tutor2}
    -
    {tutor3}
    -
    {tutorslo}
    -
    {sognatore}
    -
    -
    +
    + +
    + Legenda dei codici speciali da inserire nei messaggi: +
    {link_paypalme}
    +
    {link_superchat}
    +
    {tutor1}
    +
    {tutor2}
    +
    {tutor3}
    +
    {tutorslo}
    +
    {date_start}
    +
    {date_close}
    +
    {sognatore}
    +
    +
    +
    @@ -233,9 +272,23 @@ + + + + + + + + + +
    - @@ -244,24 +297,34 @@
    {{$t('dashboard.doni_ricevuti')}}: - {{flotta.DoniConfermati}} + {{getDoniConfermati()}}
    {{$t('dashboard.doni_inviati_da_confermare')}}: - {{flotta.DoniAttesaDiConferma}} + {{getDoniAttesaDiConferma()}}
    {{$t('dashboard.doni_mancanti')}}: - {{flotta.DoniMancanti}} + {{getDoniMancanti()}}
    + + +
    @@ -291,22 +354,40 @@
    Esegui
    -
    +
    + Annulla +
    +
    + Nave Posiz +
    +
    Nave
    -
    - Nome Cognome (Username) +
    + +
    -
    +
    + Nome Cognome +
    +
    Tess
    -
    +
    Msg
    -
    +
    Sostituisci
    -
    +
    Commenti
    @@ -315,8 +396,7 @@
    -
    +
    {{index + 1}} @@ -334,7 +414,7 @@ size="md" :label="$t('dashboard.dono_ricevuto_3', {donatore: rec.name })" - @click="HoRicevutoIlDono(rec)"> + @click="HoRicevutoIlDono(rec, false)">
    @@ -348,7 +428,17 @@
    -
    +
    + + +
    +
    -
    +
    + + +
    +
    -
    +
    ({{ rec.num_tess }})
    -
    +
    -
    +
    -
    +
    {{ rec.commento_al_sognatore }}
    +
    + ({{ rec.ind_order }}) +
    diff --git a/src/components/CMyNave/CMyNave.ts b/src/components/CMyNave/CMyNave.ts index b6a7c16..7d9e5ba 100755 --- a/src/components/CMyNave/CMyNave.ts +++ b/src/components/CMyNave/CMyNave.ts @@ -13,11 +13,12 @@ import { CMyChipList } from '../CMyChipList' import { CVideo } from '../CVideo' import { validations } from './CMyNave-validate' import { validationMixin } from 'vuelidate' +import { CCopyBtn } from '../CCopyBtn' @Component({ mixins: [validationMixin], validations, - components: { CTitleBanner, CMyChipList, CVideo } + components: { CTitleBanner, CMyChipList, CVideo, CCopyBtn } }) export default class CMyNave extends MixinNave { @@ -62,6 +63,7 @@ export default class CMyNave extends MixinNave { public username_sostituire: string = '' public userfreestr: string = '' public commento_al_sognatore: string = '' + public tabpagam: string = 'paypal' public MyPagination: { sortBy: string, descending: boolean, @@ -100,7 +102,13 @@ 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 }, + { + name: 'commento_al_sognatore', + align: 'center', + label: 'Commento', + field: 'commento_al_sognatore', + sortable: true + }, ] public tragitto = [ @@ -211,6 +219,10 @@ export default class CMyNave extends MixinNave { } else if (this.sonoSognatore()) { this.tabnave = 'sognatore' } + + if (!!this.getRevolutPagamentoSognatore()) { + this.tabpagam = 'revolut' + } } public getListaDonatoriDaConfermare() { @@ -330,7 +342,7 @@ export default class CMyNave extends MixinNave { return false } - get getsuperchat(){ + get getsuperchat() { if (!!this.flotta) { return this.flotta.link_superchat } @@ -412,14 +424,17 @@ export default class CMyNave extends MixinNave { const mymsg = this.$t('dashboard.msg_bot_conferma', { donatore: this.iodonatore.name + ' ' + this.iodonatore.surname, - sognatore: this.sognatoredelDono().name + ' ' + this.sognatoredelDono().surname + sognatore: this.sognatoredelDono().name + ' ' + this.sognatoredelDono().surname, + commento: this.commento_al_sognatore + ' (' + this.tabpagam + ')', }) tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_INVIATO, 0, { param1: { + riga: this.posiz.riga, + col: this.posiz.col, _id: this.iodonatore._id, date_made_gift: tools.getDateNow(), - commento_al_sognatore: this.commento_al_sognatore, + commento_al_sognatore: this.commento_al_sognatore + ' (' + this.tabpagam + ')', }, param2: this.sognatoredelDono().username, param3: mymsg @@ -466,6 +481,24 @@ export default class CMyNave extends MixinNave { return '' } + public getlinkRevolutSognatore() { + const rec = this.sognatoredelDono() + if (!!rec) { + if (!!rec.profile) + return rec.profile.revolut + } + return '' + } + + public getRevolutPagamentoSognatore() { + const rec = this.sognatoredelDono() + if (!!rec) { + if (!!rec.profile) + return rec.profile.revolut + } + return '' + } + public getpaypalmePagamentoSognatore() { const rec = this.sognatoredelDono() if (!!rec) { @@ -484,6 +517,14 @@ export default class CMyNave extends MixinNave { return '' } + public getnomesognatore() { + const rec = this.sognatoredelDono() + if (!!rec) { + return rec.name + ' ' + rec.surname + } + return '' + } + get getDonoInviato() { if (!!this.iodonatore) { return !!this.iodonatore.date_made_gift @@ -1128,4 +1169,13 @@ export default class CMyNave extends MixinNave { return !this.FattoDono && !this.sonoSecondaTessituraDonatore() && !this.listanavi } + get getImgPaypal() { + if (!!this.iodonatore) { + if (tools.getlang() === 'it') + return 'statics/images/send_to_a_friend-it.jpg' + } + + return 'statics/images/send_to_a_friend.jpg' + } + } diff --git a/src/components/CMyNave/CMyNave.vue b/src/components/CMyNave/CMyNave.vue index d1dd008..508807f 100755 --- a/src/components/CMyNave/CMyNave.vue +++ b/src/components/CMyNave/CMyNave.vue @@ -115,45 +115,114 @@

    + +
    - - + + + + -
    -
    - + + +
    + + + + - - + - -
    -
    - +
    - +
    + +
    + + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + +
    + + + + +
    +
    + {{ getlinkRevolutSognatore() }} + +
    +
    - -
    @@ -466,6 +535,7 @@
    {{'(' + getnavestr(props.row) + ')'}} - {{ tools.getstrshortDateTime(props.row.date_made_gift) }} + - {{ props.row.commento_al_sognatore }}
    diff --git a/src/components/CNextZoom/CNextZoom.ts b/src/components/CNextZoom/CNextZoom.ts index 085dc66..48f6843 100755 --- a/src/components/CNextZoom/CNextZoom.ts +++ b/src/components/CNextZoom/CNextZoom.ts @@ -44,4 +44,28 @@ export default class CNextZoom extends MixinBase { } return false } + + public getlinkzoom(rec) { + if (rec === null) { + rec = { + typeconf: tools.TYPECONF_ZOOM, + id_conf_zoom: '' + } + } + let typeconf = rec.typeconf + if (typeconf === '') + typeconf = tools.TYPECONF_ZOOM + + let mylink = 'https://zoom.us/j/' + if (typeconf === tools.TYPECONF_JITSI) + mylink = 'https://meet.jit.si/' + + if (rec.id_conf_zoom === '') { + rec.id_conf_zoom = '6668882000' + } + + return mylink + rec.id_conf_zoom + + } + } diff --git a/src/components/CNextZoom/CNextZoom.vue b/src/components/CNextZoom/CNextZoom.vue index 96fca9b..12e528a 100755 --- a/src/components/CNextZoom/CNextZoom.vue +++ b/src/components/CNextZoom/CNextZoom.vue @@ -1,65 +1,69 @@ diff --git a/src/components/CStatus/CStatus.ts b/src/components/CStatus/CStatus.ts index c3d5b35..858e342 100755 --- a/src/components/CStatus/CStatus.ts +++ b/src/components/CStatus/CStatus.ts @@ -464,6 +464,19 @@ export default class CStatus extends MixinBase { return false } + } + get isselectRevolut() { + if (UserStore.state.my.profile) { + // console.log('pay', UserStore.state.my.profile.paymenttypes) + if (UserStore.state.my.profile.paymenttypes) { + if (UserStore.state.my.profile.paymenttypes.includes('revolut')) { + return true + } + } + + return false + } + } public geticonstep(mystep) { diff --git a/src/components/CStatus/CStatus.vue b/src/components/CStatus/CStatus.vue index c1a668e..0ab48fa 100755 --- a/src/components/CStatus/CStatus.vue +++ b/src/components/CStatus/CStatus.vue @@ -104,6 +104,22 @@
    + + + + + + + + + + + + - - - - - - - - - - -
    + +