Compare commits
15 Commits
master
...
9828f4818a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9828f4818a | ||
|
|
a9c4b09062 | ||
|
|
3b0a39673a | ||
|
|
f94186be75 | ||
|
|
25dcde96df | ||
|
|
570340d645 | ||
|
|
e526231576 | ||
|
|
2fc89ebc82 | ||
|
|
bd6ccad236 | ||
|
|
3fb1de9b70 | ||
|
|
d2bf9eb202 | ||
|
|
9dffc92d22 | ||
|
|
e4570fc393 | ||
|
|
33cc721ceb | ||
|
|
67b8e592c0 |
6087
package-lock.json
generated
6087
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
7
src/.directory
Executable file
7
src/.directory
Executable file
@@ -0,0 +1,7 @@
|
||||
[Dolphin]
|
||||
Timestamp=2019,4,26,20,5,48
|
||||
Version=4
|
||||
ViewMode=1
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
||||
@@ -9,10 +9,13 @@ export default ({ app, store, Vue }) => {
|
||||
// Vue.config.lang = process.env.LANG_DEFAULT;
|
||||
|
||||
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)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { translation } from '@src/store/Modules/translation'
|
||||
import { Privacy } from '@src/model'
|
||||
|
||||
export const shared_consts = {
|
||||
|
||||
Accepted: {
|
||||
@@ -28,6 +31,11 @@ export const shared_consts = {
|
||||
FILTER_USER_NO_DREAM: 256,
|
||||
FILTER_EXTRALIST_DELETED: 512,
|
||||
FILTER_USER_TELEGRAM_BLOCKED: 1024,
|
||||
FILTER_ATTIVI: 2048,
|
||||
FILTER_NASCOSTI: 4096,
|
||||
FILTER_NAVI_NON_PRESENTI: 8192,
|
||||
FILTER_QUALIFIED: 16384,
|
||||
FILTER_ASK_ZOOM_VISTO: 32768,
|
||||
|
||||
Permissions: {
|
||||
Admin: {
|
||||
@@ -52,7 +60,19 @@ export const shared_consts = {
|
||||
value: 8,
|
||||
label: 'dashboard.tutor',
|
||||
icon: 'fas fa-user-tie',
|
||||
color: 'blue'
|
||||
color: 'fuchsia'
|
||||
},
|
||||
Traduttrici: {
|
||||
value: 16,
|
||||
label: 'dashboard.traduttrici',
|
||||
icon: 'fas fa-user-tie',
|
||||
color: 'orange'
|
||||
},
|
||||
Zoomeri: {
|
||||
value: 32,
|
||||
label: 'dashboard.zoomeri',
|
||||
icon: 'fas fa-user-tie',
|
||||
color: 'yellow'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -61,6 +81,34 @@ export const shared_consts = {
|
||||
Notify_ByPushNotification: 4
|
||||
},
|
||||
|
||||
TypeMsg: {
|
||||
SEND_TO_ALL: 1,
|
||||
},
|
||||
|
||||
TypeMsg_Actions: {
|
||||
NORMAL: 0,
|
||||
YESNO: 1,
|
||||
OPZ1_2: 2,
|
||||
},
|
||||
|
||||
selectActions: [
|
||||
{
|
||||
id: 0,
|
||||
label: 'Normale',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
label: 'Si / No',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Opzione 1 / Opzione 2',
|
||||
value: 2
|
||||
}
|
||||
],
|
||||
|
||||
fieldsUserToChange() {
|
||||
return ['_id', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IOperators } from '../../model/GlobalStore'
|
||||
import { IOperators } from '../../model'
|
||||
|
||||
@Component({
|
||||
name: 'CBook',
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IOperators } from '../../model/GlobalStore'
|
||||
import { IOperators } from '../../model'
|
||||
|
||||
@Component({
|
||||
name: 'CCard',
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-card class="my-card text-center">
|
||||
|
||||
<q-img :src="`statics/images/` + myop.img" class="myimg">
|
||||
<div class="absolute-bottom text-spacetrans text-shadow">
|
||||
<div class="text-h6 text-trans">{{ myop.name }} {{ myop.surname }}</div>
|
||||
@@ -9,7 +11,7 @@
|
||||
|
||||
<q-tabs v-model="tab" class="text-teal">
|
||||
<q-tab label="Info" name="one"></q-tab>
|
||||
<q-tab label="Biografia" name="two"></q-tab>
|
||||
<q-tab v-if="myop.intro" label="Biografia" name="two"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-separator></q-separator>
|
||||
@@ -55,19 +57,15 @@
|
||||
|
||||
|
||||
<div class="op__storia" v-html="myop.intro"></div>
|
||||
<q-btn rounded size="sm" color="secondary" @click="clicca()">Continua ...</q-btn>
|
||||
<q-btn v-if="myop.intro" rounded size="sm" color="secondary" @click="clicca()">Continua ...</q-btn>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="two">
|
||||
<div class="op__storia" v-html="myop.info"></div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<!--<q-card-section>-->
|
||||
<!--<div class="text-subtitle3">{{myop.disciplines}}</div>-->
|
||||
<!--{{myop.info}}-->
|
||||
<!--</q-card-section>-->
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCard.ts">
|
||||
|
||||
@@ -31,31 +31,12 @@ $grayshadow: #555;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.my-card-shadow {
|
||||
width: 100%;
|
||||
max-width: 350px;
|
||||
min-width: 300px;
|
||||
padding-bottom: 20px;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
border-radius: 30px;
|
||||
|
||||
transition: transform .2s ease-out;
|
||||
}
|
||||
|
||||
.yes_shadow {
|
||||
-webkit-box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.16);
|
||||
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
|
||||
.my-card-shadow:hover {
|
||||
transition: transform .2s ease-in;
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
.disc {
|
||||
text-align: center !important;
|
||||
font-size: 1rem;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="row justify-between q-pa-xs-sm">
|
||||
<div style="font-size:1rem; padding-right: 8px;">
|
||||
<div :style="' padding-right: 8px;'">
|
||||
{{mytext}}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -10,8 +10,8 @@ import MixinBase from '@src/mixins/mixin-base'
|
||||
})
|
||||
|
||||
export default class CCardState extends MixinBase {
|
||||
@Prop({ required: true, default: '' }) public mytext
|
||||
@Prop({ required: true, default: 0 }) public myval
|
||||
@Prop({ required: false, default: '' }) public mytext
|
||||
@Prop({ required: false, default: 0 }) public myval
|
||||
@Prop({ required: true, default: 0 }) public myperc
|
||||
@Prop({ required: false, default: '' }) public imgsrc
|
||||
@Prop({ required: false, default: false }) public isperc
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<div>
|
||||
{{ mytext }}
|
||||
</div>
|
||||
<div class="mlvalue text-h5 text-blue boldhigh text-h5-short"> {{ myval }} {{ textadd }}
|
||||
<div v-if="myval" class="mlvalue text-h5 text-blue boldhigh text-h5-short"> {{ myval }} {{ textadd }}
|
||||
</div>
|
||||
<div v-if="isperc" class="cltexth4">
|
||||
({{ myperc.toFixed(1) }} %)
|
||||
<div v-if="isperc" class="cltexth5" >
|
||||
{{ myperc.toFixed(1) }}%
|
||||
</div>
|
||||
</div>
|
||||
</q-circular-progress>
|
||||
|
||||
0
src/components/CECommerce/CECommerce.scss
Executable file
0
src/components/CECommerce/CECommerce.scss
Executable file
18
src/components/CECommerce/CECommerce.ts
Executable file
18
src/components/CECommerce/CECommerce.ts
Executable file
@@ -0,0 +1,18 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
import { ProductsList } from '@src/views/ecommerce'
|
||||
|
||||
|
||||
@Component({
|
||||
mixins: [validationMixin],
|
||||
components: { ProductsList }
|
||||
})
|
||||
|
||||
export default class CECommerce extends MixinBase {
|
||||
public $v
|
||||
public $t: any
|
||||
|
||||
|
||||
}
|
||||
14
src/components/CECommerce/CECommerce.vue
Executable file
14
src/components/CECommerce/CECommerce.vue
Executable file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<ProductsList>
|
||||
|
||||
</ProductsList>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CECommerce.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CECommerce.scss';
|
||||
</style>
|
||||
1
src/components/CECommerce/index.ts
Executable file
1
src/components/CECommerce/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CECommerce} from './CECommerce.vue'
|
||||
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IGallery, IImgGallery } from '../../model/GlobalStore'
|
||||
import { IGallery, IImgGallery } from '../../model'
|
||||
import { CMyPage } from '../CMyPage'
|
||||
import GlobalModule from '../../store/Modules/GlobalStore'
|
||||
import { GlobalStore } from '../../store/Modules'
|
||||
|
||||
@@ -7,3 +7,10 @@
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.tdclass, .trclass{
|
||||
height: 20px !important;
|
||||
}
|
||||
|
||||
.q-table td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,34 @@ export default class CGridTableRec extends Vue {
|
||||
|
||||
public selected = []
|
||||
|
||||
get isAdmin() {
|
||||
return UserStore.state.isAdmin
|
||||
}
|
||||
|
||||
get isManager() {
|
||||
return UserStore.state.isManager
|
||||
}
|
||||
|
||||
get isTutor() {
|
||||
return UserStore.state.isTutor
|
||||
}
|
||||
|
||||
get isZoomeri() {
|
||||
return UserStore.state.isZoomeri
|
||||
}
|
||||
|
||||
get isTratuttrici() {
|
||||
return UserStore.state.isTratuttrici
|
||||
}
|
||||
|
||||
get disabilita() {
|
||||
if ((this.mytable === 'users') && (this.isTutor)) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
get lists() {
|
||||
return lists
|
||||
}
|
||||
@@ -121,6 +149,12 @@ export default class CGridTableRec extends Vue {
|
||||
this.colsel = col
|
||||
this.idsel = row._id
|
||||
this.SaveValue(newval, valinitial)
|
||||
|
||||
// this.rowclicksel = null
|
||||
}
|
||||
|
||||
public annulla(val) {
|
||||
// this.rowclicksel = null
|
||||
}
|
||||
|
||||
public SaveValue(newVal, valinitial) {
|
||||
@@ -374,6 +408,7 @@ export default class CGridTableRec extends Vue {
|
||||
this.canEdit = tools.getCookie(tools.CAN_EDIT, this.canEdit) === 'true'
|
||||
this.tablesel = tools.getCookie('tablesel', this.tablesel)
|
||||
}
|
||||
console.log('this.tablesel', this.tablesel)
|
||||
|
||||
if (this.tablesel === '') {
|
||||
if (!!this.tablesList)
|
||||
@@ -382,6 +417,8 @@ export default class CGridTableRec extends Vue {
|
||||
this.tablesel = this.mytable
|
||||
}
|
||||
|
||||
console.log('2) this.tablesel', this.tablesel)
|
||||
|
||||
this.changeTable(false)
|
||||
|
||||
}
|
||||
@@ -442,8 +479,11 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public changeCol(newval) {
|
||||
console.log('changecol', this.mytable)
|
||||
if (!!this.mytable) {
|
||||
tools.setCookie(this.mytable, this.colVisib.join('|'))
|
||||
}
|
||||
}
|
||||
|
||||
public changeTable(mysel) {
|
||||
if (this.tablesel === undefined || this.tablesel === '')
|
||||
@@ -489,7 +529,9 @@ export default class CGridTableRec extends Vue {
|
||||
this.mytable = mytab.value
|
||||
}
|
||||
|
||||
if (!!this.tablesList) {
|
||||
tools.setCookie('tablesel', this.tablesel)
|
||||
}
|
||||
|
||||
this.updatedcol()
|
||||
|
||||
@@ -521,8 +563,10 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public changefuncAct(newval) {
|
||||
if (!this.disabilita) {
|
||||
tools.setCookie(tools.CAN_EDIT, newval)
|
||||
}
|
||||
}
|
||||
|
||||
public clickrowcol(row, col) {
|
||||
if (!this.canEdit) {
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
<q-btn v-if="mytable" label="" color="primary" @click="refresh" icon="search"></q-btn>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-toggle v-if="mytable" v-model="canEdit" :val="lists.MenuAction.CAN_EDIT_TABLE" class="q-mx-sm"
|
||||
<q-toggle v-if="mytable" v-model="canEdit" :disable="disabilita" :val="lists.MenuAction.CAN_EDIT_TABLE"
|
||||
class="q-mx-sm"
|
||||
:label="$t('grid.editvalues')" @input="changefuncAct"
|
||||
></q-toggle>
|
||||
|
||||
@@ -101,7 +102,8 @@
|
||||
</q-inner-loading>
|
||||
|
||||
<div class="row">
|
||||
<q-toggle v-for="(filter, index) of arrfilters" :key="index" v-model="myfilterand" :val="filter.value" :label="filter.label"></q-toggle>
|
||||
<q-toggle v-for="(filter, index) of arrfilters" :key="index" v-model="myfilterand" :val="filter.value"
|
||||
:label="filter.label"></q-toggle>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -109,14 +111,15 @@
|
||||
|
||||
<template v-slot:body="props">
|
||||
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-tr :props="props" class="trclass">
|
||||
<q-td auto-width class="tdclass">
|
||||
<q-checkbox dense v-model="props.selected"></q-checkbox>
|
||||
</q-td>
|
||||
<q-td v-for="col in mycolumns" :key="col.name" :props="props"
|
||||
v-if="colVisib.includes(col.field + col.subfield)">
|
||||
v-if="colVisib.includes(col.field + col.subfield)" class="tdclass">
|
||||
<div :class="getclrow(props.row)">
|
||||
<CMyPopupEdit :canEdit="canEdit"
|
||||
:disable="disabilita"
|
||||
:col="col"
|
||||
:row.sync="props.row"
|
||||
:field="col.field"
|
||||
@@ -129,7 +132,8 @@
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td v-for="col in mycolumns" :key="col.name" :props="props" v-if="colExtra.includes(col.name)">
|
||||
<q-td v-for="col in mycolumns" :key="col.name" :props="props" v-if="colExtra.includes(col.name)"
|
||||
class="tdclass">
|
||||
<div v-if="col.action && visCol(col)">
|
||||
<q-btn flat round color="red" :icon="col.icon" size="sm"
|
||||
@click="clickFunz(props.row, col)"></q-btn>
|
||||
@@ -172,6 +176,7 @@
|
||||
<div class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb"
|
||||
@click="colclicksel = mycol">
|
||||
<CMyPopupEdit :canEdit="true"
|
||||
:disable="disabilita"
|
||||
view="field"
|
||||
:col="mycol"
|
||||
:showall="true"
|
||||
@@ -180,7 +185,8 @@
|
||||
:subfield="mycol.subfield"
|
||||
@save="SaveValdb"
|
||||
@show="selItem(rowclicksel, mycol)"
|
||||
@showandsave="showandsel">
|
||||
@showandsave="showandsel"
|
||||
@annulla="annulla">
|
||||
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
<ul class="lista text-center">
|
||||
<li>Cellulare e/o computer</li>
|
||||
<li>App Telegram</li>
|
||||
<li>App Zoom (per Video Conferenze)</li>
|
||||
</ul>
|
||||
<p class="cltexth3 text-red q-ma-lg">Cosa devi fare per poter entrare in <strong>Ayni</strong>?</p>
|
||||
<p class="cltexth3 text-blue q-ma-lg">Fase 1: Accoglienza</p>
|
||||
@@ -62,22 +61,8 @@
|
||||
<p class="cltexth3 text-blue q-ma-lg">Fase 2: Completamento dei requisiti richiesti</p>
|
||||
<ol class="lista">
|
||||
<li>Leggere ed accettare le nostre Linee Guida e Guardare i Video Introduttivi al Movimento.</li>
|
||||
<li>Assistere ad uno <strong>Zoom di Benvenuto</strong> (Video-Conferenza) in cui potrai conoscere
|
||||
il
|
||||
movimento, parlare direttamente con i membri dello Staff, risolvere e chiarire eventuali dubbi.
|
||||
</li>
|
||||
<li>Scrivere <strong>il tuo Sogno</strong>: qual è la cosa o il progetto che vorresti realizzare e
|
||||
che il tuo
|
||||
Cuore desidera ardentemente?
|
||||
</li>
|
||||
<li>Attivare almeno <strong>2 metodi di pagamento</strong>.
|
||||
<strong>PayPal</strong> è 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 <strong>Revolut</strong> o <strong>N26</strong> come seconda opzione e
|
||||
<strong>Western
|
||||
Union</strong>, Xoom o TransferWise nei casi di
|
||||
regali extraeuropei.
|
||||
<strong>Revolut, Payeer e Paypal (tramite MoneyBox)</strong> sono quelli maggiormente consigliati.<br>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
@@ -133,8 +118,8 @@
|
||||
|
||||
Il mio compito è quello di assicurarmi che tutti i Donatori facciano il Dono al Sognatore.
|
||||
Il sistema invierà in automatico le istruzioni per fare il Dono, il Mediatore (io) verificherà e
|
||||
accompagnerà il processo.<br>
|
||||
Il passo 2, di norma, è attivato 4 giorni dopo il passo 1.</p>
|
||||
accompagnerà il processo.
|
||||
</p>
|
||||
|
||||
<div class="text-center">
|
||||
<q-img src="statics/images/passo_3.jpg" class="img"></q-img>
|
||||
@@ -146,7 +131,7 @@
|
||||
Il mio compito è quello di aprirmi a ricevere i Doni da ciascun Donatore, completarmi e
|
||||
celebrare
|
||||
l’Abbondanza.<br>
|
||||
Il passo 3, di norma, è attivato 4 giorni dopo il passo 2.<br><br>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</CTitleBanner>
|
||||
@@ -183,7 +168,6 @@
|
||||
<ul class="lista text-center">
|
||||
<li>Mobilni telefon in / ali računalnik</li>
|
||||
<li>Aplikacijo Telegram</li>
|
||||
<li>Aplikacijo Zoom (za video konference)</li>
|
||||
</ul>
|
||||
<p class="cltexth3 text-red q-ma-lg">Kaj morate storiti, da lahko vstopite v Ayni?</p>
|
||||
<p class="cltexth3 text-blue q-ma-lg">1. Faza: sprejem</p>
|
||||
@@ -208,15 +192,9 @@
|
||||
</p>
|
||||
<ol class="lista">
|
||||
<li>Preberite in sprejmite naše smernice ter si pogledate uvodne video posnetke gibanja.</li>
|
||||
<li>Obiščite dobrodošli zoom (video-konferenco), kjer se lahko seznanite z gibanjem, neposredno
|
||||
pogovorite s člani osebja, razrešite in razjasnite vse dvome.
|
||||
</li>
|
||||
<li>Pisanje svojih sanj: kaj je tisto, kar bi želeli doseči, in po čem vaše srce hrepeni?
|
||||
</li>
|
||||
<li>Aktivirajte vsaj 2 načina plačila. PayPal je obvezen (za aktiviranje potrebujete 2 minuti).
|
||||
Omogoča vam brezplačne prenose v evro območju in nanj lahko povežete kartice in preverjate
|
||||
račune. Vaši podatki so varni in se ne delijo s prejemnikom. Račun Revolut ali N26 se priporoča
|
||||
kot druga možnost, Western Union, Xoom ali TransferWise pa v primeru neevropskih daril.
|
||||
<li>Aktivirajte vsaj 2 načina plačila.
|
||||
<strong>Revolut, Payeer in Paypal (preko MoneyBoxa)</strong> so najbolj priporočljivi.<br>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
@@ -265,8 +243,7 @@
|
||||
<p>Klepet sestavlja 8 donatorjev (ki jim bom pomagal vstopiti v klepet) tako jaz, kot posrednik.<br>
|
||||
Moja naloga je, da poskrbim, da bodo vsi donatorji sanjaču vplačali darilo. Sistem bo samodejno
|
||||
poslal navodila za način vplačila, Posrednik (jaz) bo postopek preveril in spremljal.
|
||||
<br>
|
||||
Korak 2 se običajno aktivira 4 dni po koraku 1.</p>
|
||||
</p>
|
||||
|
||||
<div class="text-center">
|
||||
<q-img src="statics/images/passo_3.jpg" class="img"></q-img>
|
||||
@@ -275,9 +252,7 @@
|
||||
<p>Klepet, kjer sem sanjač, je enak in z istimi ljudmi odprt v koraku 2 (kjer sem bil Mediator) in
|
||||
tudi tukaj se vloge spreminjajo, torej je zdaj 8 mediatorjev in jaz, sanjač.
|
||||
Moja naloga je, da se odprem, da sprejmem vplačila od vsakega donatorja, se dopolnim in
|
||||
proslavim obilje.<br>
|
||||
Korak 3 se običajno aktivira 4 dni po koraku 2.<br><br>
|
||||
|
||||
proslavim obilje.
|
||||
</p>
|
||||
|
||||
</CTitleBanner>
|
||||
@@ -317,7 +292,6 @@
|
||||
<ul class="text-center lista">
|
||||
<li>Teléfono móvil y/o ordenador</li>
|
||||
<li>Telegram de aplicación</li>
|
||||
<li>App Zoom (para video conferencias)</li>
|
||||
</ul>
|
||||
<p class="cltexth3 text-red q-ma-lg">¿Qué tienes que hacer para entrar en <strong>Ayni</strong>?</p>
|
||||
<p class="cltexth3 text-blue q-ma-lg">Paso 1: Recepción</p>
|
||||
@@ -342,20 +316,9 @@
|
||||
<p class="cltexth3 text-blue q-ma-lg">Paso 2: Cumplimiento de los requisitos</p>.
|
||||
<ol class="lista">
|
||||
<li>Lee y acepta nuestras directrices y ve los vídeos de introducción al movimiento.
|
||||
<li>Asistencia a una Bienvenida Zoom (Video-Conferencia) donde se puede aprender acerca del
|
||||
movimiento, hablar directamente con los miembros del personal, resolver y aclarar cualquier
|
||||
duda.
|
||||
</li>
|
||||
<li>Escribe <strong>tu Sueño</strong>: ¿cuál es la cosa o proyecto que te gustaría realizar y que tu
|
||||
deseas de corazón?
|
||||
</li>
|
||||
<li>Activar por lo menos <strong>2 métodos de pago</strong>.
|
||||
<strong>PayPal</strong> es obligatorio (toma 2 minutos activarlo). Te permite hacer
|
||||
transferencias gratuitas en la zona euro y puedes conectar tarjetas y cuenta corriente a ella.
|
||||
Tus datos están seguros y no se comparten con el receptor. Recomendamos la cuenta <strong>Revolut</strong>
|
||||
o <strong>N26</strong>
|
||||
como segunda opción y <strong>Western Union, Xoom o TransferWise</strong> en casos de regalos
|
||||
extra-europeos.
|
||||
<strong>Revolut, Payeer y Paypal (a través de MoneyBox)</strong> son los más recomendados.<br>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
@@ -410,7 +373,6 @@
|
||||
Mi trabajo es asegurarme de que todos los donantes le den el regalo al Soñador.
|
||||
El sistema enviará automáticamente instrucciones para hacer el Regalo, el Mediador
|
||||
verificará y acompañará el proceso.
|
||||
El paso 2 se activa normalmente 4 días después del paso 1.
|
||||
|
||||
<div class="text-center">
|
||||
<q-img src="statics/images/passo_3.jpg" class="img"></q-img>
|
||||
@@ -471,7 +433,6 @@
|
||||
<ul class="text-center lista">
|
||||
<li>Móvel telefone e/ou computador</li>
|
||||
<li>Telegrama de aplicação</li>
|
||||
<li>App Zoom (para Videoconferências)</li>
|
||||
</ul>
|
||||
<p class="cltexth3 text-red q-ma-lg">O que você precisa fazer para entrar em <strong>Ayni</strong>?</p>
|
||||
<p class="cltexth3 text-blue q-ma-lg">Passo 1: Recepção</p>
|
||||
@@ -502,22 +463,9 @@
|
||||
<p class="cltexth3 text-blue q-ma-lg">Passo 2: Conclusão dos requisitos</p>.
|
||||
<ol class="lista">
|
||||
<li>Ler e aceitar nossas Diretrizes e Assistir os Vídeos Introdutórios ao Movimento.
|
||||
<li>Assistência a um <strong>Welcome Zoom</strong> (Video-Conferência) onde você pode aprender sobre
|
||||
o
|
||||
falar diretamente com os funcionários, resolver e esclarecer quaisquer dúvidas.
|
||||
</li>
|
||||
<li>escreve <strong>sua Sonho</strong>: qual é a coisa ou projeto que você gostaria de realizar e
|
||||
que o seu
|
||||
Anseio do coração?
|
||||
</li>
|
||||
<li>Ativar pelo menos <strong>2 formas de pagamento</strong>.
|
||||
<strong>PayPal</strong> é obrigatório (demora 2 minutos a activá-lo).
|
||||
Permite-lhe transferências gratuitas na zona Euro e pode ligar-lhe cartões e contas.
|
||||
correntes. Os seus dados estão seguros e não são partilhados com o receptor.
|
||||
Recomendamos o <strong>Revolução</strong> ou <strong>N26</strong> conta como segunda opção e
|
||||
<strong>Ocidente
|
||||
Union</strong>, Xoom ou TransferWise em casos de
|
||||
presentes extra-europeus.
|
||||
<strong>Revolut, Payeer e Paypal (via MoneyBox)</strong> são os mais recomendados.<br>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
<p class="cltexth3 text-blue q-ma-lg">Passo 3: Programação e ativação do Navio</p>.
|
||||
@@ -570,7 +518,6 @@
|
||||
O sistema enviará automaticamente instruções para fazer o Presente, o Mediador (I) irá verificar
|
||||
e
|
||||
irá acompanhar o processo.<br>
|
||||
O passo 2 é normalmente activado 4 dias após o passo 1.
|
||||
|
||||
<div class="text-center">
|
||||
<q-img src="statics/images/passi_3.jpg" class="img"></q-img>
|
||||
@@ -581,7 +528,6 @@
|
||||
e mesmo aqui os papéis mudam, ou seja, agora há 8 mediadores e eu, o Sonhador.<br>
|
||||
Minha tarefa é abrir-me para receber os Presentes de cada Doador, completar-me e celebrar
|
||||
a Abundância.<br>
|
||||
O passo 3 é normalmente activado 4 dias após o passo 2.<br>
|
||||
</p>
|
||||
|
||||
</CTitleBanner>
|
||||
@@ -620,7 +566,6 @@
|
||||
<ul class="text-center lista">
|
||||
<li>Téléphone portable et/ou ordinateur</li>
|
||||
<li>App Telegram</li>
|
||||
<li>App Zoom (pour les vidéoconférences)</li>
|
||||
</ul>
|
||||
<p class="cltexth3 text-red q-ma-lg">Qu'est-ce qu'il faut faire pour entrer dans <strong>Ayni</strong>?
|
||||
</p>
|
||||
@@ -646,21 +591,8 @@
|
||||
<p class="cltexth3 text-blue q-ma-lg">Étape 2: COMPLÉTER LES REQUIS DEMANDĒS</p>.
|
||||
<ol class="lista">
|
||||
<li>Lisez et acceptez nos lignes directrices et regardez les vidéos d'introduction au mouvement.
|
||||
<li>Assister à un Zoom de Bienvenue (vidéoconférence) où vous pouvez vous renseigner sur le
|
||||
mouvement, parler directement avec les membres du Staff, résoudre et clarifier les doutes
|
||||
éventuels.
|
||||
</li>
|
||||
<li>Ecrivez <strong>Votre Rêve</strong>: quelle est la chose ou le projet que vous aimeriez réaliser
|
||||
et que votre coeur désire ardemment ?
|
||||
</li>
|
||||
<li>Activer au moins 2 <strong>moyens de paiement</strong>. <strong>PayPal</strong> est obligatoire
|
||||
(il faut 2 minutes pour
|
||||
l'activer). Il vous permet d'effectuer des transferts gratuits dans la zone Euro et vous pouvez
|
||||
y relier cartes bancaires et comptes courants. Vos données personnelles sont en sécurité et ne
|
||||
sont pas partagées avec le destinataire. Nous recommandons le compte <strong>Revolut</strong> ou
|
||||
<strong>N26</strong> comme
|
||||
deuxième option et <strong>Western Union, Xoom ou TransferWise</strong> pour les dons
|
||||
extra-européens.
|
||||
<li>Activer au moins 2 <strong>moyens de paiement</strong>
|
||||
<strong>Revolut, Payeer et Paypal (via MoneyBox)</strong> sont les plus recommandés.<br>
|
||||
</li>
|
||||
</ol>
|
||||
<p class="cltexth3 text-blue q-ma-lg">Etape 3: PROGRAMMATION ET ACTIVATION DE DES NAVIRES</p>.
|
||||
@@ -716,7 +648,6 @@
|
||||
Mon rôle consiste à m'assurer que tous les Donateurs fassent le Don au Rêveur. Le système
|
||||
enverra automatiquement les instructions pour faire le Don, le Médiateur (moi) vérifiera et
|
||||
accompagnera le processus.<br>
|
||||
L'étape 2 est normalement activée 4 jours après l'étape 1.
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
@@ -728,7 +659,6 @@
|
||||
moi, le Rêveur.<br>
|
||||
Ma tâche est de m'ouvrir pour recevoir les Dons de chaque Donateur, de compléter et de célébrer
|
||||
l'Abondance.<br>
|
||||
L'étape 3 est normalement activée 4 jours après l'étape 2.<br><br>.
|
||||
</p>
|
||||
|
||||
</CTitleBanner>
|
||||
@@ -737,20 +667,8 @@
|
||||
automatique AYNI BOT m'enverra toutes les instructions nécessaires que je devrai réaliser au moment
|
||||
opportun !
|
||||
|
||||
|
||||
<p class="cltexth2 text-green-8 q-ma-lg"><span class="boldhigh">Bien... Mettez-vous à l'aise, votre voyage a commencé<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html></span>
|
||||
<p class="cltexth2 text-green-8 q-ma-lg"><span class="boldhigh">Bien... Mettez-vous à l'aise, votre voyage a commencé
|
||||
</span>
|
||||
</p>
|
||||
|
||||
</CImgText>
|
||||
@@ -778,7 +696,6 @@
|
||||
<ul class="lista center_img">
|
||||
<li>Mobile phone and/or computer</li>
|
||||
<li>App Telegram</li>
|
||||
<li>App Zoom (for Video Conferences)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p class="cltexth3 text-red q-ma-lg">What do you have to do to get into <strong>Ayni</strong>?</p>
|
||||
@@ -803,19 +720,8 @@
|
||||
<p class="cltexth3 text-blue q-ma-lg">Step 2: Completion of requirements</p>
|
||||
<ol class="lista">
|
||||
<li>Read and accept our Guidelines and Watch the Introductory Videos to the Movement.
|
||||
<li>Assistance to a <strong>Welcome Zoom</strong> (Video-Conference) where you can learn about the
|
||||
movement, speak directly with staff members, resolve and clarify any doubts.
|
||||
</li>
|
||||
<li>Write <strong>your Dream</strong>: what is the thing or project you would like to realize and
|
||||
that your Heart is longing?
|
||||
</li>
|
||||
<li>Activate at least <strong>2 payment methods</strong> (is recommended).
|
||||
<strong>PayPal</strong> is mandatory (it takes 2 minutes to activate it).
|
||||
It allows you free transfers in the Euro area and you can connect cards and accounts to it.
|
||||
Your data is safe and not shared with the receiver.
|
||||
We recommend the <strong>Revolut</strong> or <strong>N26</strong> account as the second option
|
||||
and <strong>Western Union</strong>, Xoom or TransferWise in cases of
|
||||
extra-European gifts.
|
||||
<strong>Revolut, Payeer and Paypal (via MoneyBox)</strong> are the most recommended.<br>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
@@ -864,7 +770,6 @@
|
||||
My job is to make sure that all the Donors give the Gift to the Dreamer. The system will
|
||||
automatically send instructions to make the Gift, the Mediator (me) will verify and will
|
||||
accompany the process.<br>
|
||||
Step 2 is normally activated 4 days after step 1.
|
||||
|
||||
<div class="text-center">
|
||||
<q-img src="statics/images/passo_3.jpg" class="img"></q-img>
|
||||
@@ -874,7 +779,6 @@
|
||||
Mediator) and here the roles change, there are now 8 mediators and me, the Dreamer.
|
||||
My task is to open myself to receive the Gifts from each Donor, complete myself and celebrate
|
||||
the Abundance.<br>
|
||||
Step 3 is normally activated 4 days after step 2.
|
||||
<br><br>.
|
||||
</p>
|
||||
|
||||
@@ -910,14 +814,6 @@
|
||||
scaduti i 14 giorni del diritto di recesso, è a fondo perduto</strong>
|
||||
</li>
|
||||
|
||||
<li>dichiaro di aver ben compreso che devo <strong>partecipare almeno ad uno ZOOM</strong>
|
||||
(Video-Conferenza On Line)
|
||||
</li>
|
||||
|
||||
<li>dichiaro di aver ben compreso che per la mia sicurezza devo aprire un <strong>conto
|
||||
Paypal</strong>
|
||||
per consegnare il regalo.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else-if="toolsext.isLang('si')">
|
||||
@@ -938,14 +834,6 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li>Izjavljam, da popolnoma razumem, da moram sodelovati na vsaj enem ZOOM-u (spletna
|
||||
video-konferenca)
|
||||
|
||||
</li>
|
||||
|
||||
<li>Izjavljam, da razumem, da moram zaradi svoje varnosti odpreti <strong>Paypal</strong> račun za
|
||||
dostavo darila.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else-if="toolsext.isLang('es')">
|
||||
@@ -960,15 +848,6 @@
|
||||
<li>Declaro que he comprendido bien que el <strong>no es un fondo de inversión y que mi regalo, una
|
||||
vez que los 14 días del derecho de retiro hayan expirado, es no reembolsable</strong>.
|
||||
</li>
|
||||
|
||||
<li>Declaro que he comprendido bien que debo <strong>participar al menos en una Zoom</strong> (Video
|
||||
Conferencia En-línea).
|
||||
</li>
|
||||
|
||||
<li>Declaro haber entendido bien que por mi seguridad tengo que abrir una <strong>cuenta de
|
||||
Paypal</strong> para hacer el regalo.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Puedo ejercer mi derecho de retirada dentro de los 14 días siguientes al envío del regalo si no
|
||||
deseo continuar mi viaje.
|
||||
@@ -990,15 +869,6 @@
|
||||
reembolsável</strong>
|
||||
</li>
|
||||
|
||||
<li>Declaro que compreendi que devo <strong>participar em pelo menos um Zoom</strong>
|
||||
(Videoconferência On Line)
|
||||
</li>
|
||||
|
||||
<li>Eu declaro que compreendi bem que para minha segurança tenho que abrir uma <strong>conta
|
||||
Paypal</strong>.
|
||||
para entregar o presente.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Posso exercer o meu direito de retirada no prazo de 14 dias após o envio do presente se não
|
||||
quiser mais
|
||||
@@ -1021,14 +891,6 @@
|
||||
après 14 jours de la possibilité de rétraction, n’est plus remboursable
|
||||
</li>
|
||||
|
||||
<li>Je déclare avoir bien compris que je dois participer à au moins un ZOOM (vidéoconférence en
|
||||
ligne);
|
||||
</li>
|
||||
|
||||
<li>Je déclare avoir bien compris que pour ma sécurité, je dois ouvrir un compte Paypal pour verser
|
||||
le Don;
|
||||
</li>
|
||||
|
||||
<li>Je peux exercer mon droit de rétractation dans les 14 jours suivant l'envoi du cadeau si je ne
|
||||
souhaite plus poursuivre mon voyage.
|
||||
</li>
|
||||
@@ -1049,15 +911,6 @@
|
||||
permanent donation</strong>
|
||||
</li>
|
||||
|
||||
<li>I declare that I have well understood that I must <strong>participate at least in one
|
||||
ZOOM</strong>
|
||||
(Video-Conference On Line)
|
||||
</li>
|
||||
|
||||
<li>I declare to have well understood that for my safety I have to open a <strong>Paypal</strong>
|
||||
account to deliver the gift.
|
||||
</li>
|
||||
|
||||
<li>I can exercise my right of withdrawal within 14 days of sending the gift if I no longer wish to
|
||||
continue my trip.
|
||||
</li>
|
||||
|
||||
@@ -30,4 +30,17 @@ export default class CImgText extends Vue {
|
||||
@Prop({ required: false, default: '' }) public style1: string
|
||||
@Prop({ required: false, default: 'image' }) public alt1: string
|
||||
@Prop({ required: false, default: 'image' }) public alt2: string
|
||||
|
||||
get clrowcol() {
|
||||
let mycl = 'row'
|
||||
if (tools.isMobile())
|
||||
mycl = 'column'
|
||||
|
||||
return mycl
|
||||
}
|
||||
|
||||
get myclass() {
|
||||
|
||||
return this.clrowcol + ' items-start q-col-gutter-xs imgtext '
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="padding_testo bg-white text-grey-10 text-justify"> <!-- v-scroll-reveal.reset -->
|
||||
<div class="row items-start q-col-gutter-xs imgtext">
|
||||
<div class="row q-px-xs">
|
||||
<div :class="myclass">
|
||||
<div :class="clrowcol + ` q-px-xs`">
|
||||
<q-img v-if="src" :src="src" class="" :style="style1" :alt="alt1"></q-img>
|
||||
<q-img v-if="src2" :src="src2" class="" :style="style1" :alt="alt2"></q-img>
|
||||
<div class="section_text">
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
.flag_icon{
|
||||
max-height: 40px;
|
||||
max-height: 20px;
|
||||
}
|
||||
|
||||
.label_count{
|
||||
font-size: 1.15rem;
|
||||
font-size: 1.00rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.clitemnat{
|
||||
height: 40px;
|
||||
padding: 2px 2px !important;
|
||||
.q-avatar {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.q-item {
|
||||
min-height: 17px;
|
||||
}
|
||||
.clitemnat{
|
||||
height: 15px;
|
||||
padding: 0px 0px !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(nat, index) in mydata" :key="nat._id" class="clitemnat">
|
||||
<q-item-section avatar>
|
||||
<q-item-section avatar class="clitemnat">
|
||||
<q-avatar v-if="tools.geticon(nat._id)"
|
||||
:class="tools.geticon(nat._id)" class="flag_icon">
|
||||
|
||||
</q-avatar>
|
||||
<q-avatar v-else color="primary" text-color="white" class="text-center">
|
||||
<q-avatar v-else color="primary" text-color="white" class="text-center clitemnat">
|
||||
{{ tools.capitalize(nat._id) }}
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
18
src/components/CMyCart/CMyCart.scss
Executable file
18
src/components/CMyCart/CMyCart.scss
Executable file
@@ -0,0 +1,18 @@
|
||||
.card .product-image {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.text-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.centeritems{
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
47
src/components/CMyCart/CMyCart.ts
Executable file
47
src/components/CMyCart/CMyCart.ts
Executable file
@@ -0,0 +1,47 @@
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { CTitleBanner } from '@components'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
|
||||
import { IOrder, IProduct } from '@src/model'
|
||||
import { Products, UserStore } from '@store'
|
||||
import { CSingleCart } from '../../components/CSingleCart'
|
||||
import MixinUsers from '@src/mixins/mixin-users'
|
||||
|
||||
@Component({
|
||||
name: 'CMyCart',
|
||||
components: { CTitleBanner, CCardState, CCopyBtn, CSingleCart }
|
||||
})
|
||||
|
||||
export default class CMyCart extends MixinUsers {
|
||||
public $t
|
||||
|
||||
get myCart() {
|
||||
return Products.state.cart
|
||||
}
|
||||
|
||||
get myTotalPrice() {
|
||||
if (Products.state.cart) {
|
||||
return Products.state.cart.totalPrice
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
get ordersCart() {
|
||||
if (!!Products.state.cart) {
|
||||
return Products.state.cart.items
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
get numOrders() {
|
||||
if (!!Products.state.cart) {
|
||||
return Products.state.cart.items.length
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
46
src/components/CMyCart/CMyCart.vue
Executable file
46
src/components/CMyCart/CMyCart.vue
Executable file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="mycontainer">
|
||||
<div class="myheader row justify-between">
|
||||
<div class="col-6">
|
||||
<q-btn class="q-mx-xs" round dense flat icon="fas fa-shopping-cart">
|
||||
|
||||
<q-badge v-if="getnumItemsCart > 0" color="red" floating transparent>
|
||||
{{ getnumItemsCart }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right">
|
||||
<span class="text-grey q-mr-xs">Totale:</span> <span
|
||||
class="text-subtitle1 q-mr-sm ">€ {{ myTotalPrice.toFixed(2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator></q-separator>
|
||||
<div id="mybody">
|
||||
<div v-for="(rec, index) in ordersCart" :key="index" class="col">
|
||||
|
||||
<CSingleCart
|
||||
:order="rec.order"
|
||||
:showall="false">
|
||||
</CSingleCart>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="numOrders === 0" style="text-align: center" class="text-grey">
|
||||
Il Carrello è Vuoto
|
||||
</div>
|
||||
<div v-else style="text-align: center">
|
||||
<q-btn rounded icon="fas fa-shopping-cart" color="green" label="Vai alla Cassa" class="q-mb-sm" to="/checkout"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyCart.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyCart.scss';
|
||||
</style>
|
||||
1
src/components/CMyCart/index.ts
Executable file
1
src/components/CMyCart/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMyCart} from './CMyCart.vue'
|
||||
12
src/components/CMyDashboard/CMyDashboard-validate.ts
Executable file
12
src/components/CMyDashboard/CMyDashboard-validate.ts
Executable file
@@ -0,0 +1,12 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
|
||||
invitante_username: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
.title-nave {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.titlenave{
|
||||
width: 100px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cont_pos {
|
||||
border: solid 2px #4198ef;
|
||||
padding: 2px 8px;
|
||||
margin: 2px 4px;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.cont_pos, .cont_pos_intest{
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
border-radius: 64px !important;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.cont_pos_intest {
|
||||
width: 37px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.extra{
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.passo{
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.posizione_imbarco {
|
||||
font-weight: bold;
|
||||
font-size: 0.75rem;
|
||||
color: blue;
|
||||
text-align: -webkit-center;
|
||||
}
|
||||
|
||||
.ins_invitante{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.q-tab-panel {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { CMyFieldDb } from '../CMyFieldDb'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CUserBadge } from '../CUserBadge'
|
||||
import { CLegenda } from '../CLegenda'
|
||||
import { IDashboard, IUserProfile } from '../../model'
|
||||
import { IDashboard, IDownline, IUserProfile } from '../../model'
|
||||
import { IUserFields } from '../../model/UserStore'
|
||||
import { CRequisito } from '../CRequisito'
|
||||
import translate from '../../globalroutines/util'
|
||||
@@ -21,35 +21,73 @@ import { CMyRequirement } from '../CMyRequirement'
|
||||
import { CRequisiti } from '../CRequisiti'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { CMyNave } from '../CMyNave'
|
||||
import { validations } from './CMyDashboard-validate'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
|
||||
@Component({
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CCopyBtn, CUserBadge, CLegenda, CRequisito, CMyRequirement, CRequisiti, CCardState, CMyNave }
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: {
|
||||
CProfile,
|
||||
CTitleBanner,
|
||||
CMyFieldDb,
|
||||
CCopyBtn,
|
||||
CUserBadge,
|
||||
CLegenda,
|
||||
CRequisito,
|
||||
CMyRequirement,
|
||||
CRequisiti,
|
||||
CCardState,
|
||||
CMyNave
|
||||
},
|
||||
})
|
||||
|
||||
export default class CMyDashboard extends MixinUsers {
|
||||
public $v
|
||||
public $q
|
||||
public myusername: string = ''
|
||||
public tab: string = 'requisiti'
|
||||
public tabcosa: string = ''
|
||||
public showuserinfo: boolean = false
|
||||
public shownuovoviaggio: boolean = false
|
||||
public notifBot: boolean = true
|
||||
public loading: boolean = false
|
||||
public loading_invitati: boolean = false
|
||||
public seluser: IUserFields = null
|
||||
public aportador_solidario: string = ''
|
||||
public invitante_username: string = ''
|
||||
public showregalainv: boolean = false
|
||||
public id_listaingr: number = -1
|
||||
public ind_order_ingr: number = -1
|
||||
public myrigaattuale: number = 0
|
||||
public mycolattuale: number = 0
|
||||
public upgrade_graduatorie: boolean = false
|
||||
public dashboard: IDashboard = {
|
||||
myself: DefaultUser,
|
||||
aportador: DefaultUser,
|
||||
numpeople_aportador: 0,
|
||||
arrimbarchi: [],
|
||||
arrposizioni: [],
|
||||
navi_partenza: [],
|
||||
lastnave: {},
|
||||
arrusers: [],
|
||||
}
|
||||
|
||||
public downline: IDownline = {
|
||||
downline: [],
|
||||
downnotreg: [],
|
||||
downbyuser: [],
|
||||
arrposizioni: []
|
||||
downbyuser: []
|
||||
}
|
||||
|
||||
@Prop({ required: true }) public username
|
||||
|
||||
@Watch('UserStore.state.my.dashboard')
|
||||
public changedash() {
|
||||
console.log('changedash')
|
||||
// console.log('changedash')
|
||||
this.dashboard = UserStore.state.my.dashboard
|
||||
if (!!this.dashboard)
|
||||
this.invitante_username = this.dashboard.myself.username
|
||||
|
||||
}
|
||||
|
||||
get mythis() {
|
||||
@@ -57,25 +95,80 @@ export default class CMyDashboard extends MixinUsers {
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (!!tools.getCookie(tools.TABBED_DASHBOARD)) {
|
||||
this.tab = tools.getCookie(tools.TABBED_DASHBOARD)
|
||||
}
|
||||
this.update_username()
|
||||
}
|
||||
|
||||
public changetab(val) {
|
||||
tools.setCookie(tools.TABBED_DASHBOARD, val)
|
||||
if (this.tab === 'invitati') {
|
||||
if (this.downline.downline.length <= 0) {
|
||||
this.loading_invitati = true
|
||||
UserStore.actions.getDownline({ username: this.myusername }).then((ris) => {
|
||||
this.downline = ris
|
||||
this.loading_invitati = false
|
||||
})
|
||||
}
|
||||
}
|
||||
// console.log('setcook', val)
|
||||
}
|
||||
|
||||
@Watch('this.username')
|
||||
public changeusername() {
|
||||
this.update_username()
|
||||
|
||||
}
|
||||
|
||||
public aggiorna() {
|
||||
this.dashboard = null
|
||||
this.update_username()
|
||||
this.showuserinfo = false
|
||||
}
|
||||
|
||||
public async update_username() {
|
||||
// console.log('update_username')
|
||||
this.loading = true
|
||||
if (this.username === '')
|
||||
this.myusername = this.getMyUsername()
|
||||
else
|
||||
this.myusername = this.username
|
||||
|
||||
await UserStore.actions.getDashboard({ username: this.myusername }).then((ris) => {
|
||||
this.loading = true
|
||||
|
||||
this.upgrade_graduatorie = tools.getValDb('UPDATE_GRAD', false, false)
|
||||
|
||||
UserStore.actions.getDashboard({ username: this.myusername })
|
||||
.then((ris) => {
|
||||
this.dashboard = ris
|
||||
|
||||
if (!!this.dashboard)
|
||||
this.invitante_username = this.dashboard.myself.username
|
||||
|
||||
this.myrigaattuale = this.dashboard.lastnave.riga
|
||||
this.mycolattuale = this.dashboard.lastnave.col + 8
|
||||
|
||||
this.loading = false
|
||||
})
|
||||
.catch((e) => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
if (this.tab === 'invitati') {
|
||||
this.loading_invitati = true
|
||||
UserStore.actions.getDownline({ username: this.myusername })
|
||||
.then((ris2) => {
|
||||
this.downline = ris2
|
||||
this.loading_invitati = false
|
||||
})
|
||||
.catch((e) => {
|
||||
this.loading_invitati = false
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
this.showuserinfo = false
|
||||
}
|
||||
|
||||
get getRefLink() {
|
||||
@@ -83,29 +176,370 @@ export default class CMyDashboard extends MixinUsers {
|
||||
}
|
||||
|
||||
get invitatinotreg() {
|
||||
if (this.dashboard)
|
||||
if (this.dashboard.downnotreg)
|
||||
return this.dashboard.downnotreg.length > 0
|
||||
if (this.downline)
|
||||
if (this.downline.downnotreg)
|
||||
return this.downline.downnotreg.length > 0
|
||||
return false
|
||||
}
|
||||
|
||||
public selectclick(user) {
|
||||
public selectclick(user, showregalainv, ind_order_ingr, id_listaingr, disabled) {
|
||||
if (!disabled) {
|
||||
this.showuserinfo = true
|
||||
this.seluser = user
|
||||
this.showregalainv = showregalainv
|
||||
this.ind_order_ingr = ind_order_ingr
|
||||
this.id_listaingr = id_listaingr
|
||||
}
|
||||
}
|
||||
|
||||
get Completato7Req() {
|
||||
// return tools.Is7ReqOk(this.dashboard.myself)
|
||||
if (!!this.dashboard.myself)
|
||||
return this.dashboard.myself.qualified
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
get Completato9Req() {
|
||||
// return tools.Is9ReqOk(this.dashboard.myself)
|
||||
if (!!this.dashboard.myself)
|
||||
return this.dashboard.myself.qualified && (this.dashboard.myself.numinvitatiattivi >= 2)
|
||||
return false
|
||||
}
|
||||
|
||||
public HasNave() {
|
||||
get HasNave() {
|
||||
if (!!this.dashboard.arrposizioni)
|
||||
return this.dashboard.arrposizioni.length > 0
|
||||
else
|
||||
return false
|
||||
}
|
||||
|
||||
public getnavePartenzaByRigaCol(riga, col) {
|
||||
for (const mynave of this.dashboard.navi_partenza) {
|
||||
if (!!mynave) {
|
||||
if ((mynave.riga === riga) && (mynave.col === col)) {
|
||||
return mynave
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
public datanave(mianave) {
|
||||
// const mynavepart = this.getnavePartenzaByRigaCol(tools.getRiganave(mianave.riga), tools.getColnave(mianave.col))
|
||||
if (!!mianave.nave_partenza) {
|
||||
if (!!mianave.nave_partenza.date_start)
|
||||
return tools.getstrDate(mianave.nave_partenza.date_start)
|
||||
}
|
||||
return ' --/-- '
|
||||
}
|
||||
|
||||
public datagiftchat(mianave) {
|
||||
// const mynavepart = this.getnavePartenzaByRigaCol(tools.getRiganave(mianave.riga), tools.getColnave(mianave.col))
|
||||
if (!!mianave.nave_partenza) {
|
||||
if (!!mianave.nave_partenza.date_gift_chat_open)
|
||||
return tools.getstrDate(mianave.nave_partenza.date_gift_chat_open)
|
||||
}
|
||||
return ' --/-- '
|
||||
}
|
||||
|
||||
public geticon(mianave) {
|
||||
if (!mianave)
|
||||
return ''
|
||||
|
||||
if (mianave.made_gift) {
|
||||
return 'fas fa-gift'
|
||||
}
|
||||
}
|
||||
|
||||
public colordono(mianave) {
|
||||
if (mianave.made_gift)
|
||||
return 'green'
|
||||
else if (!!mianave.date_made_gift)
|
||||
return 'blue'
|
||||
else
|
||||
return 'grey'
|
||||
|
||||
}
|
||||
|
||||
public getposizioneattuale(mianave, totali) {
|
||||
const mynavedest = tools.getfirstnaveSognatore(mianave.riga, mianave.col)
|
||||
const ris = tools.getnumnavi_finoa(mianave, mynavedest, this.dashboard.lastnave)
|
||||
if (totali)
|
||||
return mianave.riga + '.' + mianave.col + ' ' + ris.contaattuale + '/' + ris.totale
|
||||
else
|
||||
return ris.perc
|
||||
}
|
||||
|
||||
public async NuovoImbarco(username, invitante_username) {
|
||||
|
||||
await tools.askConfirm(this.$q, translate('steps.nuovo_imbarco'), translate('dialog.continue') + ' ?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.AGGIUNGI_NUOVO_IMBARCO, 0, {
|
||||
param1: { username, invitante_username }
|
||||
})
|
||||
this.shownuovoviaggio = false
|
||||
}
|
||||
|
||||
public addNuovoImbarco() {
|
||||
this.NuovoImbarco(this.dashboard.myself.username, this.invitante_username)
|
||||
}
|
||||
|
||||
public async cancellaImbarco(imbarco) {
|
||||
await tools.askConfirm(this.$q, translate('dashboard.attenzione'), translate('steps.vuoi_cancellare_imbarco'), translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.CANCELLA_IMBARCO, 0, {
|
||||
param1: { ind_order: imbarco.ind_order, username: imbarco.username },
|
||||
param2: { num_tess: imbarco.num_tess, rec: imbarco }
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public getnuminvperc(index, myrec) {
|
||||
|
||||
let val1 = Math.round((myrec.numinvitatiattiviTot - myrec.numNaviEntrato * 2) - (myrec.indimbarco - 1) * 2)
|
||||
if (val1 < 0)
|
||||
val1 = 0
|
||||
|
||||
let valmax = val1
|
||||
if (valmax < 2)
|
||||
valmax = 2
|
||||
|
||||
return val1 / valmax * 100
|
||||
}
|
||||
|
||||
public getcolorinvitati(index, myrec) {
|
||||
|
||||
if (myrec.invattivi === 1)
|
||||
return 'blue'
|
||||
if (myrec.invattivi === 2)
|
||||
return 'green'
|
||||
if (myrec.inv === 1)
|
||||
return 'orange'
|
||||
}
|
||||
|
||||
public getnumtessstr(num_tess, index) {
|
||||
|
||||
let str = index + 1 + '°'
|
||||
|
||||
if (num_tess % 2 === 0) {
|
||||
str += ' (' + this.$t('dashboard.ritorno') + ')'
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
public errorMsg(cosa: string, item: any) {
|
||||
try {
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
|
||||
if (item.required !== undefined) {
|
||||
if (!item.required) {
|
||||
return this.$t('reg.err.required')
|
||||
}
|
||||
|
||||
} else if (cosa === 'invitante_username') {
|
||||
// console.log(item);
|
||||
if (!item.aportadorexist) {
|
||||
// console.log('!item.aportadorexist !')
|
||||
return this.$t('reg.err.invitante_username_not_exist')
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
} catch (error) {
|
||||
// console.log("ERR : " + error);
|
||||
}
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
// error = error || (this.invitante_username === this.dashboard.myself.username)
|
||||
|
||||
return !error
|
||||
|
||||
}
|
||||
|
||||
public imbarchipresenti() {
|
||||
let presente = false
|
||||
for (const rec of this.dashboard.arrimbarchi) {
|
||||
if (!rec.added)
|
||||
presente = true
|
||||
}
|
||||
return presente
|
||||
}
|
||||
|
||||
public getvalstrinv(posiz) {
|
||||
let val1 = Math.round((posiz.numinvitatiattiviTot - posiz.numNaviEntrato * 2) - (posiz.indimbarco - 1) * 2)
|
||||
let val2 = Math.round((posiz.numinvitatiTot - posiz.numNaviEntrato * 2) - (posiz.indimbarco - 1) * 2)
|
||||
if (val1 < 0)
|
||||
val1 = 0
|
||||
if (val2 < 0)
|
||||
val2 = 0
|
||||
|
||||
return val1 + '/' + val2
|
||||
}
|
||||
|
||||
public isprovvisoria(mianave) {
|
||||
if (!!mianave && mianave.nave_partenza)
|
||||
return mianave.nave_partenza.provvisoria
|
||||
return false
|
||||
}
|
||||
|
||||
public getcolorbynave(mianave) {
|
||||
if (!!mianave.nave_partenza)
|
||||
return mianave.nave_partenza.provvisoria ? 'gray' : 'green'
|
||||
else
|
||||
return 'green'
|
||||
}
|
||||
|
||||
public change_mynote(mianave) {
|
||||
|
||||
const mydata = {
|
||||
note: mianave.note
|
||||
}
|
||||
tools.saveFieldToServer(this, 'navi', mianave._id, mydata)
|
||||
}
|
||||
|
||||
public change_mynote_imbarco(mioimbarco) {
|
||||
|
||||
const mydata = {
|
||||
note: mioimbarco.note
|
||||
}
|
||||
tools.saveFieldToServer(this, 'listaingressos', mioimbarco._id, mydata)
|
||||
}
|
||||
|
||||
public getNaveSognatoreStr(mianave) {
|
||||
const mynavedest = tools.getfirstnaveSognatore(mianave.riga, mianave.col)
|
||||
const ris = mynavedest.riga + '.' + mynavedest.col
|
||||
// console.log('ris', ris)
|
||||
return ris
|
||||
}
|
||||
|
||||
public getNaveMediatoreStr(mianave) {
|
||||
return mianave.riga + '.' + mianave.col
|
||||
}
|
||||
|
||||
get getstrinvitati() {
|
||||
if (!!this.dashboard && !!this.dashboard.myself)
|
||||
if (!!this.dashboard.myself.numinvitati)
|
||||
return this.dashboard.myself.numinvitati + ` ` + this.$t('dashboard.downline')
|
||||
|
||||
if (this.loading_invitati)
|
||||
return ` (...) ` + this.$t('dashboard.downline')
|
||||
else
|
||||
return this.$t('dashboard.downline')
|
||||
}
|
||||
|
||||
public getmyrigaattuale(mianave) {
|
||||
const rigamin = tools.getRiganave(mianave.riga)
|
||||
const colmin = tools.getColnave(mianave.col)
|
||||
|
||||
const mynavedest = tools.getfirstnaveSognatore(mianave.riga, mianave.col)
|
||||
|
||||
let riga = this.myrigaattuale
|
||||
let col = this.mycolattuale
|
||||
|
||||
let colvera = colmin
|
||||
if (rigamin > 1) {
|
||||
for (let index = rigamin; index < riga; index++) {
|
||||
colvera = colvera * 2
|
||||
}
|
||||
} else {
|
||||
colvera = 7
|
||||
}
|
||||
|
||||
if (riga === mynavedest.riga) {
|
||||
colvera = mynavedest.col
|
||||
}
|
||||
|
||||
// colvera = mynavedest.col
|
||||
|
||||
if (col < colvera) {
|
||||
riga = riga - 1
|
||||
}
|
||||
|
||||
console.log('[' + rigamin + '.' + colmin + ']', 'riga', riga, 'col', col, 'colvera', colvera)
|
||||
|
||||
if (riga > rigamin + 6)
|
||||
riga = rigamin + 6
|
||||
|
||||
if (riga < rigamin)
|
||||
riga = 0
|
||||
|
||||
return riga
|
||||
}
|
||||
|
||||
public getval7(mianave) {
|
||||
let val = this.getmyrigaattuale(mianave)
|
||||
if (val === 0)
|
||||
return ''
|
||||
else
|
||||
return val - tools.getRiganave(mianave.riga) + 1
|
||||
}
|
||||
|
||||
public getposiz(posiz) {
|
||||
|
||||
if (posiz.posiz === 100000) {
|
||||
return '-----'
|
||||
} else {
|
||||
return posiz.posiz + ' su ' + posiz.totposiz + '°'
|
||||
}
|
||||
}
|
||||
|
||||
public getcolornave(mianave) {
|
||||
if (this.isprovvisoria(mianave)) {
|
||||
return 'grey'
|
||||
}
|
||||
if (mianave.num_tess % 2 !== 0)
|
||||
return 'blue'
|
||||
else
|
||||
return 'red'
|
||||
}
|
||||
|
||||
public getcolorbyval(mianave) {
|
||||
let val = this.getval7(mianave)
|
||||
|
||||
if (val === 7)
|
||||
return 'purple'
|
||||
else if (val === 6)
|
||||
return 'indigo'
|
||||
else if (val === 5)
|
||||
return 'blue'
|
||||
else if (val === 4)
|
||||
return 'green'
|
||||
else if (val === 3)
|
||||
return 'yellow'
|
||||
else if (val === 2)
|
||||
return 'orange'
|
||||
else if (val === 1)
|
||||
return 'red'
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
public gettextcolor(mianave) {
|
||||
return this.getval7(mianave) === 3 ? 'black' : 'white'
|
||||
}
|
||||
|
||||
public getifdisableInvitante(imbarco, index) {
|
||||
if ((index === 0) && (this.dashboard.arrposizioni.length <= 0)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
}
|
||||
|
||||
public getIfregalareInvitati(seluser, showregalainv) {
|
||||
if (!showregalainv)
|
||||
return false
|
||||
|
||||
let stato = true
|
||||
|
||||
if (!!this.dashboard.myself) {
|
||||
|
||||
if ((this.dashboard.myself.numNaviEntrato * 2) < this.dashboard.myself.numinvitati)
|
||||
stato = true
|
||||
}
|
||||
|
||||
return stato
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +1,49 @@
|
||||
<template>
|
||||
<div class="q-my-xs q-gutter-xs q-py-xs" v-if="myusername !== ''">
|
||||
<CTitleBanner class="q-pa-xs text-center" :title="$t('pages.statoattuale')" bgcolor="bg-red" clcolor="text-white"
|
||||
mystyle=" " myclass="myshad">
|
||||
<div v-if="!!dashboard.myself.name">
|
||||
<div class="q-gutter-xs" v-if="myusername !== ''">
|
||||
<div>
|
||||
<q-tabs
|
||||
v-model="tab"
|
||||
dense
|
||||
class="bg-blue text-white shadow-2"
|
||||
indicator-color="white"
|
||||
align="center"
|
||||
narrow-indicator
|
||||
@input="changetab"
|
||||
>
|
||||
<q-tab name="requisiti" icon="fas fa-check" :label="$t('reg.requirement')"></q-tab>
|
||||
<q-tab name="invitati" icon="fas fa-users" :label="$t('dashboard.downline')"></q-tab>
|
||||
<q-tab name="navi" icon="fas fa-ship" :label="$t('otherpages.admin.navi')"></q-tab>
|
||||
|
||||
<div v-if="!Completato9Req && !HasNave">
|
||||
<CTitleBanner icon="person" :canopen="true" class="q-pa-xs text-center"
|
||||
:title="$t('pages.posizione_in_programmazione')" bgcolor="bg-blue"
|
||||
clcolor="text-white" mystyle=" " myclass="myshad">
|
||||
<CRequisiti :statebool="Completato7Req" :msgTrue="$t('steps.enter_prog_requisiti_ok')"
|
||||
:msgFalse="$t('steps.enter_prog_completa_requisiti')">
|
||||
</CRequisiti>
|
||||
</CTitleBanner>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="requisiti">
|
||||
|
||||
<div v-if="loading" class="q-ma-md text-center" style="height: 50px;">
|
||||
<q-spinner-gears size="50px" color="primary"/>
|
||||
</div>
|
||||
|
||||
<CTitleBanner icon="fas fa-gift" :canopen="true" class="q-pa-xs text-center"
|
||||
:title="$t('pages.posizione_in_nave')" bgcolor="bg-green"
|
||||
clcolor="text-white" mystyle=" " myclass="myshad">
|
||||
|
||||
<div v-if="!HasNave">
|
||||
<CRequisiti :statebool="Completato9Req" :msgTrue="$t('steps.enter_nave_9req_ok')"
|
||||
:color_ko="true"
|
||||
:msgFalse="$t('steps.enter_nave_9req_ko')">
|
||||
</CRequisiti>
|
||||
</div>
|
||||
|
||||
<CMyNave v-for="(mianave, index) in dashboard.arrposizioni" :posizprop="mianave" :key="index"
|
||||
:navi_partenzaprop="dashboard.navi_partenza" :listanavi="false">
|
||||
|
||||
</CMyNave>
|
||||
</CTitleBanner>
|
||||
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.dashboard')" bgcolor="bg-info" clcolor="text-white"
|
||||
mystyle=" " myclass="myshad">
|
||||
|
||||
<div v-if="!!dashboard && !!dashboard.myself">
|
||||
<div v-if="!!dashboard.myself.name">
|
||||
|
||||
|
||||
<CMyRequirement :myseluser="dashboard.myself" :mydashboard="dashboard">
|
||||
<CMyRequirement :myseluser="dashboard.myself" :mydashboard="dashboard" :mydownline="downline"
|
||||
@aggiorna="aggiorna"
|
||||
>
|
||||
|
||||
</CMyRequirement>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="invitati">
|
||||
|
||||
<CTitleBanner class="shadow-2" :title="$t('reg.aportador_solidario')" bgcolor="bg-accent"
|
||||
clcolor="text-white"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<CUserBadge v-if="!!dashboard.aportador" :user="dashboard.aportador" :index="0"
|
||||
:numpeople="dashboard.numpeople_aportador"
|
||||
:showregalainv="false"
|
||||
mycolor="accent" @myclick="selectclick">
|
||||
|
||||
</CUserBadge>
|
||||
@@ -64,38 +57,47 @@
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<CUserBadge v-if="!!dashboard.myself" :user="dashboard.myself" :index="0"
|
||||
:numpeople="dashboard.downline.length"
|
||||
:showregalainv="false"
|
||||
@myclick="selectclick"
|
||||
mycolor="blue">
|
||||
|
||||
</CUserBadge>
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('dashboard.downline')" bgcolor="bg-positive"
|
||||
<CTitleBanner class="shadow-2 rounded-borders" :title="getstrinvitati" bgcolor="bg-positive"
|
||||
clcolor="text-white"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<q-list bordered v-if="!!dashboard.downline && dashboard.downline.length > 0" class="rounded-borders">
|
||||
<div v-for="(user, index) in dashboard.downline" :key="index">
|
||||
<div v-if="loading_invitati" class="q-ma-md text-center" style="height: 50px;">
|
||||
<q-spinner-hourglass size="50px" color="primary"/>
|
||||
</div>
|
||||
|
||||
<q-list bordered v-if="!!downline.downline && downline.downline.length > 0" class="rounded-borders">
|
||||
<div v-for="(user, index) in downline.downline" :key="index">
|
||||
<CUserBadge :yourinvite="true" :user="user" mycolor="positive" :index="index"
|
||||
:numpeople="dashboard.downbyuser[user.username].length"
|
||||
:showregalainv="false"
|
||||
@myclick="selectclick"
|
||||
>
|
||||
|
||||
</CUserBadge>
|
||||
<div style="margin-left:10px;" v-for="(user2, index2) in dashboard.downbyuser[user.username]" :key="index2">
|
||||
<div v-if="user.username !== dashboard.myself.username">
|
||||
<div style="margin-left:10px;" v-for="(user2, index2) in downline.downbyuser[user.username]"
|
||||
:key="index2">
|
||||
<CUserBadge :yourinvite="false" :user="user2" mycolor="orange" :index="index2"
|
||||
:numpeople="dashboard.downbyuser[user2.username].length"
|
||||
:showregalainv="false"
|
||||
@myclick="selectclick"
|
||||
>
|
||||
|
||||
</CUserBadge>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-list>
|
||||
<div v-else class="q-pa-sm text-center">
|
||||
<div v-if="!loading_invitati">
|
||||
{{ $t('dashboard.nessun_invitato')}}
|
||||
</div>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
<div class="row justify-center q-ma-sm">
|
||||
@@ -109,23 +111,479 @@
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<!--<CTitleBanner v-if="invitatinotreg" class="shadow-2 rounded-borders" :title="$t('dashboard.downnotreg')"
|
||||
bgcolor="bg-grey"
|
||||
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('reg.legenda')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<q-list bordered v-if="!!dashboard.downnotreg" class="rounded-borders">
|
||||
<div v-for="(user, index) in dashboard.downnotreg" :key="index">
|
||||
<CUserBadge :yourinvite="true" :user="user" mycolor="grey" :index="index" :numpeople="user.num_invitati"
|
||||
@myclick="selectclick">
|
||||
|
||||
</CUserBadge>
|
||||
<p class="q-ml-sm">{{ $t('dashboard.legenda_title')}}</p>
|
||||
<q-list bordered class="rounded-borders justify-center q-pa-sm">
|
||||
<div class="row items-center q-pa-xs">
|
||||
<CCardState :mytext="$t('pages.statusreg.req')" :myval="5" :myperc="(5 / 7) * 100" size="50px"
|
||||
size_mob="40px"
|
||||
fontsize="0.75rem" myclass="my-card-small-stat" mycolor="orange">
|
||||
</CCardState>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('pages.statusreg.req7')}}</div>
|
||||
</div>
|
||||
<div class="row items-center q-pa-xs">
|
||||
<CCardState :mytext="$t('pages.statusreg.req')" :myval="7" :myperc="100" size="50px" size_mob="40px"
|
||||
fontsize="0.75rem" myclass="my-card-small-stat" mycolor="green"></CCardState>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('pages.statusreg.req9', {sitename:
|
||||
$t('ws.sitename')})}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items-center q-pa-xs">
|
||||
<CCardState :mytext="$t('pages.statusreg.people')" :myval="2" :myperc="100" size="50px"
|
||||
size_mob="40px"
|
||||
fontsize="0.75rem" myclass="my-card-small-stat" mycolor="green"></CCardState>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('pages.statusreg.peoplelegend')}}</div>
|
||||
</div>
|
||||
<!--<CLegenda icon="fab fa-telegram" :text="`Telegram ` + $t('pages.statusreg.verified')"></CLegenda>
|
||||
<CLegenda icon="fas fa-video" :text="$t('stat.zoom')"></CLegenda>
|
||||
<CLegenda icon="fas fa-user-friends" :text="$t('dashboard.numinvitati')"></CLegenda>-->
|
||||
<div class="row items-center q-pa-xs q-ml-sm">
|
||||
<q-btn
|
||||
fab-mini
|
||||
icon="fab fa-whatsapp"
|
||||
color="white" text-color="green"
|
||||
size="sm">
|
||||
</q-btn>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('dashboard.telefono_wa')}}</div>
|
||||
</div>
|
||||
</q-list>
|
||||
</CTitleBanner>-->
|
||||
</CTitleBanner>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="navi">
|
||||
|
||||
<div v-if="loading" class="q-ma-md text-center" style="height: 50px;">
|
||||
<q-spinner-gears size="50px" color="primary"/>
|
||||
</div>
|
||||
|
||||
<div v-if="upgrade_graduatorie">
|
||||
<CRequisiti :statebool="false"
|
||||
msgTrue=""
|
||||
msgFalse="Aggiornamento in Corso - Updating in Progress - Reload Page Please">
|
||||
</CRequisiti>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="!!dashboard && dashboard.myself && !loading & !upgrade_graduatorie">
|
||||
<div>
|
||||
<div v-if="!Completato9Req && !HasNave">
|
||||
<CTitleBanner icon="person" :canopen="true" class="q-pa-xs text-center"
|
||||
:title="$t('pages.posizione_in_programmazione')" bgcolor="bg-blue"
|
||||
clcolor="text-white" mystyle=" " myclass="myshad">
|
||||
<CRequisiti :statebool="Completato7Req"
|
||||
:msgTrue="$t('steps.enter_prog_requisiti_ok') + $t('steps.enter_prog_msg')"
|
||||
:msgFalse="$t('steps.enter_prog_completa_requisiti')">
|
||||
</CRequisiti>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="dashboard.myself.qualified">
|
||||
|
||||
<CTitleBanner class=""
|
||||
v-if="imbarchipresenti()"
|
||||
:title="$t('pages.posizione_in_programmazione')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
<div class="row justify-between items-center" style="text-align: center;">
|
||||
<div class="col-2 ">
|
||||
{{ $t('dashboard.posizione') }}
|
||||
</div>
|
||||
<div class="col-1 ">
|
||||
<q-icon color="blue" name="fas fa-ship"></q-icon>
|
||||
</div>
|
||||
<div class="col-2 ">
|
||||
{{ $t('dashboard.data_rich') }}
|
||||
</div>
|
||||
<div class="col-3 ">
|
||||
{{ $t('dashboard.invitante') }}
|
||||
</div>
|
||||
<div class="col-2 ">
|
||||
{{ $t('dashboard.downline') }}
|
||||
</div>
|
||||
<div class="col-2">
|
||||
{{ $t('dialog.delete') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-for="(mioimbarco, index) in dashboard.arrimbarchi" :key="index">
|
||||
<div v-if="!mioimbarco.added" class="row justify-between items-center ">
|
||||
<!--<div class="col-2">
|
||||
<div class="posizione_imbarco">{{ index }}</div>
|
||||
</div>-->
|
||||
<div class="col-2">
|
||||
<div class="posizione_imbarco">{{getposiz(mioimbarco.posiz) }}</div>
|
||||
</div>
|
||||
<div class="col-1 text-center">
|
||||
<div class="boldhigh">{{ mioimbarco.navestr }}</div>
|
||||
</div>
|
||||
<div class="col-2 text-center">
|
||||
<div>{{ tools.getstrshortDate(mioimbarco.date_added) }}</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="posizione_imbarco">
|
||||
<CUserBadge :yourinvite="false" :showsteps="false" :showregalainv="true"
|
||||
:user="dashboard.arrusers[mioimbarco.invitante_username]" mycolor="orange"
|
||||
:ind_order_ingr="mioimbarco.ind_order"
|
||||
:id_listaingr="mioimbarco._id"
|
||||
:index="index"
|
||||
:mydisabled="getifdisableInvitante(mioimbarco, index)"
|
||||
@myclick="selectclick">
|
||||
</CUserBadge>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="posizione_imbarco">
|
||||
<CCardState :mytext="$t('pages.statusreg.people')"
|
||||
:myval="getvalstrinv(mioimbarco.posiz)"
|
||||
:myperc="getnuminvperc(index, mioimbarco.posiz)" size="50px"
|
||||
size_mob="40px"
|
||||
fontsize="0.85rem" myclass="my-card-small-stat"
|
||||
:mycolor="getcolorinvitati(index, mioimbarco.posiz)"></CCardState>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-2">
|
||||
<div class="posizione_imbarco">33 €</div>
|
||||
</div>-->
|
||||
<div class="col-2">
|
||||
<div class="posizione_imbarco">
|
||||
<q-btn flat round color="red" icon="fas fa-trash-alt" size="sm"
|
||||
@click="cancellaImbarco(mioimbarco)"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="full-width">
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon size="sm" name="fas fa-heart" color="red"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
|
||||
<q-input v-model="mioimbarco.note" :label="$t('reg.my_dream')"
|
||||
rounded outlined
|
||||
debounce="1000"
|
||||
autogrow
|
||||
dense
|
||||
style="font-size:0.75rem;"
|
||||
@input="change_mynote_imbarco(mioimbarco)">
|
||||
</q-input>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="centermydiv">
|
||||
<CRequisiti :statebool="true"
|
||||
:msgTrue="$t('steps.enter_prog_msg') + '<br><strong>' + $t('steps.enter_prog_msg_2') + '</strong>'"
|
||||
msgFalse="">
|
||||
</CRequisiti>
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<div v-if="!!dashboard.myself" class="q-pa-xs text-center">
|
||||
|
||||
<div v-if="!!dashboard.myself.name">
|
||||
<div v-if="!HasNave">
|
||||
<CRequisiti :statebool="Completato9Req" :msgTrue="$t('steps.enter_nave_9req_ok', {sitename:
|
||||
$t('ws.sitename')})"
|
||||
:color_ko="true"
|
||||
:msgFalse="$t('steps.enter_nave_9req_ko')">
|
||||
</CRequisiti>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn class="q-ma-md" rounded size="md"
|
||||
icon="fas fa-ship"
|
||||
color="positive" @click="shownuovoviaggio=true"
|
||||
:label="$t('steps.nuovo_imbarco')">
|
||||
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
|
||||
<q-card class="my-card-shadow yes_shadow">
|
||||
<q-img
|
||||
src="statics/images/listanavi.jpg"
|
||||
style="width: 100%;"
|
||||
native-context-menu>
|
||||
<div class="absolute-bottom text-subtitle1 text-center">
|
||||
{{$t('pages.posizione_in_nave')}}
|
||||
</div>
|
||||
</q-img>
|
||||
<div class="q-ma-xs"> </div>
|
||||
<div v-for="(mianave, index) in dashboard.arrposizioni" :key="index">
|
||||
<q-list dense>
|
||||
<q-item>
|
||||
<q-item-section avatar style="width: 70px; font-size: 0.75rem;">
|
||||
{{ getnumtessstr(1, index) }}
|
||||
- {{ tools.getrigacolstr(mianave)}}
|
||||
<q-icon :color="getcolornave(mianave)" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-slider
|
||||
:value="getmyrigaattuale(mianave)"
|
||||
:label-text-color="gettextcolor(mianave)"
|
||||
:label-value="getval7(mianave) + '/7'"
|
||||
:color="getcolorbyval(mianave)"
|
||||
markers
|
||||
dense
|
||||
label
|
||||
label-always
|
||||
readonly
|
||||
:min="tools.getRiganave(mianave.riga)"
|
||||
:max="tools.getRiganave(mianave.riga)+6">
|
||||
|
||||
</q-slider>
|
||||
</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<!--{{tools.getlastnavestr(dashboard.lastnave) }} -->
|
||||
{{ getNaveSognatoreStr(mianave)}}
|
||||
<q-icon color="purple" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-flag-checkered"></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<div v-for="(mianave, index) in dashboard.arrposizioni" :key="index"
|
||||
class="q-pa-sm row items-start q-gutter-sm">
|
||||
|
||||
<q-card class="my-card-shadow yes_shadow">
|
||||
<q-img
|
||||
:src="`statics/images/nave${index+1}.jpg`"
|
||||
style="width: 100%"
|
||||
native-context-menu>
|
||||
<div class="absolute-bottom text-subtitle1 text-center text-sobig">
|
||||
{{ getnumtessstr(mianave.num_tess, index) }} - {{$t('dashboard.nave') + ' ' +
|
||||
tools.getrigacolstr(mianave)}}
|
||||
</div>
|
||||
</q-img>
|
||||
<div class="row justify-sm-start items-center rounded-borders">
|
||||
|
||||
<div class="row items-center justify-center q-ma-xs" style="width: 100%">
|
||||
<q-chip class="glossy q-mx-md" :color="getcolorbynave(mianave)" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ $t('dashboard.nave_in_partenza') + ' ' + datagiftchat(mianave) }}
|
||||
</q-chip>
|
||||
<q-chip v-if="datagiftchat(mianave) !== datanave(mianave)" class="glossy q-mx-md" color="blue"
|
||||
text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ $t('dashboard.nave_in_chiusura') + ' ' + datanave(mianave) }}
|
||||
</q-chip>
|
||||
</div>
|
||||
|
||||
<div v-if="isprovvisoria(mianave)" class="text-center centermydiv">
|
||||
<CRequisiti :statebool="true"
|
||||
:msgTrue="$t('dashboard.nave_provvisoria') + `<br><strong>` + $t('steps.enter_prog_msg') + `</strong>`"
|
||||
msgFalse="">
|
||||
</CRequisiti>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row items-center justify-between q-ma-xs" style="width: 100%;">
|
||||
<div class="row items-center justify-between q-ma-xs no-wrap"
|
||||
style="width: 100%; font-weight: bold; font-size: 1rem">
|
||||
<div>{{$t('dashboard.donatore')}}</div>
|
||||
<div>{{$t('dashboard.mediatore')}}</div>
|
||||
<div>{{$t('dashboard.sognatore')}}</div>
|
||||
</div>
|
||||
<div class="row items-center justify-between q-ma-xs no-wrap" style="width: 100%;">
|
||||
<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>
|
||||
|
||||
<div class="q-pa-md" style="width: 100%;">
|
||||
<!--<q-badge color="primary">
|
||||
{{$t('dashboard.nave')}} {{ myrigaattuale }}.{{ mycolattuale }}
|
||||
</q-badge>-->
|
||||
<q-list dense>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<!--{{tools.getlastnavestr(dashboard.lastnave) }} -->
|
||||
{{ tools.getrigacolstr(mianave)}}
|
||||
<q-icon :color="getcolornave(mianave)" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-slider
|
||||
:value="getmyrigaattuale(mianave)"
|
||||
:label-text-color="gettextcolor(mianave)"
|
||||
:label-value="getval7(mianave) + '/7'"
|
||||
:color="getcolorbyval(mianave)"
|
||||
markers
|
||||
label
|
||||
label-always
|
||||
readonly
|
||||
:min="tools.getRiganave(mianave.riga)"
|
||||
:max="tools.getRiganave(mianave.riga)+6">
|
||||
|
||||
</q-slider>
|
||||
</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<!--{{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">
|
||||
<q-item-section avatar>
|
||||
<q-icon :color="colordono(mianave)" inverted size="sm" name="fas fa-gift"
|
||||
class="gift"></q-icon>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<div v-if="mianave.made_gift">
|
||||
<q-chip class="glossy"
|
||||
size="md"
|
||||
color="green"
|
||||
text-color="white"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('steps.dono') + ' ' + $t('dashboard.dono_ricevuto_2') }} !
|
||||
</q-chip>
|
||||
</div>
|
||||
<div v-else-if="!!mianave.date_made_gift">
|
||||
<q-chip class=""
|
||||
size="md"
|
||||
text-color="blue"
|
||||
color="white"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dashboard.ho_effettuato_il_dono') }}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="(mianave.num_tess % 2 !== 0) && !isprovvisoria(mianave)">
|
||||
<q-item-section avatar>
|
||||
<q-icon size="sm" name="fas fa-heart" color="red"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
|
||||
<q-input v-model="mianave.note" :label="$t('reg.my_dream')"
|
||||
rounded outlined
|
||||
debounce="1000"
|
||||
autogrow
|
||||
dense
|
||||
style="width: 100%; font-size:0.75rem;"
|
||||
@input="change_mynote(mianave)">
|
||||
</q-input>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="mianave.num_tess % 2 !== 0">
|
||||
<q-item-section avatar>
|
||||
<q-icon size="sm" name="fas fa-user" color="blue"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-input v-model="mianave.invitante_username" :label="$t('dashboard.invitante')"
|
||||
rounded outlined
|
||||
readonly
|
||||
dense
|
||||
style="width: 100%; font-size:0.75rem;">
|
||||
</q-input>
|
||||
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<CMyNave :posizprop="mianave" :key="index"
|
||||
:navi_partenzaprop="dashboard.navi_partenza" :listanavi="false" :dashboard="dashboard">
|
||||
|
||||
</CMyNave>
|
||||
</div>
|
||||
|
||||
<!--<q-card-actions>
|
||||
<q-btn flat>Action 1</q-btn>
|
||||
<q-btn flat>Action 2</q-btn>
|
||||
</q-card-actions>-->
|
||||
</q-card>
|
||||
<!--<div class="col-3">
|
||||
<div>
|
||||
<CCardState :isperc="true" size="50px" size_mob="40px" fontsize="0.75rem"
|
||||
:myperc="getposizioneattuale(mianave)"></CCardState>
|
||||
</div>
|
||||
</div>-->
|
||||
<!--<div class="col-1">
|
||||
<div>
|
||||
{{ getposizioneattuale(mianave, true) }}
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
|
||||
<div v-if="!!dashboard.myself">
|
||||
<div v-if="!!dashboard.myself.name">
|
||||
<div v-if="dashboard.myself.deleted">
|
||||
<span style="color: red;"> <h2><strong>UTENTE CANCELLATO (Nascosto: true) !</strong></h2></span>
|
||||
</div>
|
||||
|
||||
<div v-if="dashboard.myself.sospeso">
|
||||
<span style="color: blue;"> <h2><strong>UTENTE SOSPESO !</strong></h2></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!--
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('text.dashboard.madegift')" bgcolor="bg-info" clcolor="text-white"
|
||||
mystyle=" " myclass="myshad">
|
||||
@@ -144,46 +602,6 @@
|
||||
</CTitleBanner>
|
||||
-->
|
||||
|
||||
<CCopyBtn :title="$t('reg.reflink')" :texttocopy="getRefLink">
|
||||
|
||||
</CCopyBtn>
|
||||
|
||||
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('reg.legenda')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
<p class="q-ml-sm">{{ $t('dashboard.legenda_title')}}</p>
|
||||
<q-list bordered class="rounded-borders justify-center q-pa-sm">
|
||||
<div class="row items-center q-pa-xs">
|
||||
<CCardState :mytext="$t('pages.statusreg.req')" :myval="7" :myperc="(7 / 9) * 100" size="50px" size_mob="40px"
|
||||
fontsize="0.75rem" myclass="my-card-small-stat" mycolor="orange">
|
||||
</CCardState>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('pages.statusreg.req7')}}</div>
|
||||
</div>
|
||||
<div class="row items-center q-pa-xs">
|
||||
<CCardState :mytext="$t('pages.statusreg.req')" :myval="9" :myperc="100" size="50px" size_mob="40px"
|
||||
fontsize="0.75rem" myclass="my-card-small-stat" mycolor="green"></CCardState>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('pages.statusreg.req9', {sitename: $t('ws.sitename')})}}</div>
|
||||
</div>
|
||||
<div class="row items-center q-pa-xs">
|
||||
<CCardState :mytext="$t('pages.statusreg.people')" :myval="2" :myperc="100" size="50px" size_mob="40px"
|
||||
fontsize="0.75rem" myclass="my-card-small-stat" mycolor="green"></CCardState>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('pages.statusreg.peoplelegend')}}</div>
|
||||
</div>
|
||||
<!--<CLegenda icon="fab fa-telegram" :text="`Telegram ` + $t('pages.statusreg.verified')"></CLegenda>
|
||||
<CLegenda icon="fas fa-video" :text="$t('stat.zoom')"></CLegenda>
|
||||
<CLegenda icon="fas fa-user-friends" :text="$t('dashboard.numinvitati')"></CLegenda>-->
|
||||
<div class="row items-center q-pa-xs q-ml-sm">
|
||||
<q-btn
|
||||
fab-mini
|
||||
icon="fab fa-whatsapp"
|
||||
color="white" text-color="green"
|
||||
size="sm">
|
||||
</q-btn>
|
||||
<div class="bg-blue text-white clBorderxs q-ml-sm">{{$t('dashboard.telefono_wa')}}</div>
|
||||
</div>
|
||||
</q-list>
|
||||
</CTitleBanner>
|
||||
<br>
|
||||
|
||||
<q-dialog v-model="showuserinfo">
|
||||
@@ -195,12 +613,70 @@
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<CMyRequirement :myseluser="seluser" :mydashboard="dashboard" :notitle="false">
|
||||
<CMyRequirement :id_listaingr="id_listaingr" :myseluser="seluser"
|
||||
:showregalainv="getIfregalareInvitati(seluser, showregalainv)"
|
||||
:mydashboard="dashboard" :mydownline="downline" :notitle="false" @aggiorna="aggiorna"
|
||||
:ind_order_ingr="ind_order_ingr">
|
||||
|
||||
</CMyRequirement>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="shownuovoviaggio">
|
||||
<q-card v-if="shownuovoviaggio" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
{{ $t('steps.nuovo_imbarco') }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup @click="shownuovoviaggio=false"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
|
||||
<div class="q-pa-sm">
|
||||
<div v-html="$t('steps.vuoi_entrare_nuova_nave')">
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<!--<div v-html="$t('steps.inserisci_invitante')" class="ins_invitante">
|
||||
|
||||
</div>-->
|
||||
<br>
|
||||
|
||||
|
||||
<!--
|
||||
<div class="column q-gutter-sm justify-center text-center">
|
||||
<q-input
|
||||
bg-color="lightblue"
|
||||
v-model="invitante_username"
|
||||
rounded outlined
|
||||
@blur="$v.invitante_username.$touch"
|
||||
:error="$v.invitante_username.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
:error-message="errorMsg('invitante_username', $v.invitante_username)"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
:label="$t('reg.username_regala_invitato')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-toggle v-model="notifBot" :label="$t('dashboard.sendnotification')"/>
|
||||
-->
|
||||
|
||||
<q-btn class="q-ma-md" rounded size="md"
|
||||
icon="fas fa-ship"
|
||||
:disabled='!allowSubmit'
|
||||
color="positive" @click="addNuovoImbarco"
|
||||
:label="$t('steps.nuovo_imbarco')">
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ export default class CMyEditor extends Vue {
|
||||
public myvalue = ''
|
||||
public mycolor = ''
|
||||
|
||||
public showeditor: boolean = true
|
||||
|
||||
public myfonts = {
|
||||
arial: 'Arial',
|
||||
arial_black: 'Arial Black',
|
||||
@@ -98,6 +100,20 @@ export default class CMyEditor extends Vue {
|
||||
this.$emit('update:value', newval)
|
||||
}
|
||||
|
||||
public annulla() {
|
||||
this.$emit('annulla', true)
|
||||
}
|
||||
public saveval() {
|
||||
// Converti i <b> in <strong>
|
||||
|
||||
this.myvalue = tools.convertiTagHTMLPerBOT(this.myvalue)
|
||||
|
||||
console.log('saveval', this.myvalue)
|
||||
this.$emit('showandsave', this.myvalue)
|
||||
// this.$emit('update:value', this.myvalue)
|
||||
this.showeditor = false
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.myvalue = this.value
|
||||
this.editor = this.$refs.editor_ref
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-dialog v-model="showeditor">
|
||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
Editor
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup @click="showeditor=false"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
|
||||
<CTitleBanner :title="title"></CTitleBanner>
|
||||
<form
|
||||
autocorrect="off"
|
||||
@@ -28,6 +38,13 @@
|
||||
v-model="myvalue">
|
||||
</q-editor>
|
||||
</form>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn flat :label="$t('dialog.ok')" color="primary" @click="saveval"></q-btn>
|
||||
<q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup @click="annulla"></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { CMySelect } from '../CMySelect'
|
||||
import { GlobalStore, UserStore } from '../../store/Modules'
|
||||
import { CMyChipList } from '../CMyChipList'
|
||||
import { CMyToggleList } from '../CMyToggleList'
|
||||
import translate from '@src/globalroutines/util'
|
||||
|
||||
@Component({
|
||||
name: 'CMyFieldDb',
|
||||
@@ -26,7 +27,8 @@ 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
|
||||
@Prop({ required: false, default: '' }) public myimg: string
|
||||
|
||||
public $t
|
||||
public myvalue = ''
|
||||
@@ -90,9 +92,9 @@ export default class CMyFieldDb extends MixinBase {
|
||||
return '***************'
|
||||
} else {
|
||||
if (val === undefined)
|
||||
return '-'
|
||||
return ' <span class="text-grey">(' + translate('reg.select') + ')</span> '
|
||||
else if (val === '') {
|
||||
return '-'
|
||||
return ' <span class="text-grey">(' + translate('reg.select') + ')</span> '
|
||||
} else {
|
||||
let mystr = tools.firstchars(val, 5000)
|
||||
if (val) {
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="orange-3" dense style="min-width:110px;">
|
||||
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="centermydiv">
|
||||
<div v-if="myimg" class="text-center">
|
||||
<q-img
|
||||
:src="myimg"
|
||||
class="text-center"
|
||||
style="height: 50px; width: 50px;"
|
||||
:alt="title">
|
||||
</q-img>
|
||||
</div>
|
||||
<div class="self-center full-width no-outline text-center" tabindex="0">{{ title }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
@@ -56,7 +67,7 @@
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.intcode">
|
||||
|
||||
{{ myvalprinted }}
|
||||
<div v-html="myvalprinted"></div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="((type === tools.FieldType.multiselect) || (type === tools.FieldType.multioption))">
|
||||
@@ -88,7 +99,7 @@
|
||||
@input="savefieldboolean"></q-toggle>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ myvalprinted }}
|
||||
<div v-html="myvalprinted"></div>
|
||||
</div>
|
||||
|
||||
<q-popup-edit
|
||||
@@ -103,7 +114,8 @@
|
||||
<div v-if="type === tools.FieldType.boolean">
|
||||
<q-checkbox v-model="myvalue" :label="col.title">
|
||||
</q-checkbox>
|
||||
{{ visuValByType(myvalue) }}
|
||||
<div v-html="visuValByType(myvalue)">
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.string">
|
||||
<q-input v-model="myvalue"
|
||||
|
||||
12
src/components/CMyFlotta/CMyFlotta-validate.ts
Executable file
12
src/components/CMyFlotta/CMyFlotta-validate.ts
Executable file
@@ -0,0 +1,12 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
|
||||
username_sostituire: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
182
src/components/CMyFlotta/CMyFlotta.scss
Executable file
182
src/components/CMyFlotta/CMyFlotta.scss
Executable file
@@ -0,0 +1,182 @@
|
||||
|
||||
.title-nave {
|
||||
padding: 2px 4px;
|
||||
margin: 2px 4px;
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.donatore, .mediatore, .sognatore, .intermedio1, .intermedio2, .intermedio4, .intermedio5{
|
||||
color: white;
|
||||
background-color: lightblue;
|
||||
padding: 1px 2px;
|
||||
margin: 1px 2px;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 32px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
max-width: 200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.intermedio1{
|
||||
background-color: indigo;
|
||||
}
|
||||
.intermedio2{
|
||||
background-color: blue;
|
||||
}
|
||||
.intermedio4{
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
}
|
||||
.intermedio5{
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.tutor{
|
||||
|
||||
}
|
||||
|
||||
.selezione:hover {
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
.donatore {
|
||||
background-color: red;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.mediatore {
|
||||
background-color: green;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sognatore {
|
||||
background-color: purple;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
.cont_donatore, .cont_sognatore, .cont_mediatore, .cont_tragitto, .cont_pos, .cont_intestaz, .cont_pos_intest, .cont_intestaz_small {
|
||||
border: solid 2px #4198ef;
|
||||
padding: 2px 8px;
|
||||
margin: 2px 4px;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.cont_donatore {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.you {
|
||||
background-color: yellow;
|
||||
}
|
||||
.issognatore {
|
||||
background-color: orangered;
|
||||
color: white;
|
||||
font-size: 1.10rem;
|
||||
border-radius: 64px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cont_tragitto{
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.cont_pos, .cont_pos_intest{
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
border-radius: 64px !important;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.cont_pos_intest {
|
||||
width: 37px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.extra{
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.passo{
|
||||
font-weight: bold;
|
||||
width: 110px;
|
||||
}
|
||||
.passoint{
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.gift{
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.cont_intestaz, .cont_intestaz_small{
|
||||
font-size: 0.75rem;
|
||||
margin: 4px;
|
||||
border-radius: 16px !important;
|
||||
|
||||
}
|
||||
|
||||
.cont_intestaz_small{
|
||||
margin: 0;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.title-nave {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.titlenave{
|
||||
width: 75px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.datanave{
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.datanave_int{
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dati {
|
||||
color: blue;
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mancanti {
|
||||
color: red;
|
||||
|
||||
}
|
||||
.inviati {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.pan_sognatore {
|
||||
padding: 0px 0px;
|
||||
}
|
||||
|
||||
.ricevuti{
|
||||
color: green;
|
||||
}
|
||||
|
||||
.title-nave {
|
||||
font-size: 1.25rem;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.q-table th, .q-table--dense {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.q-btn {
|
||||
text-transform: none;
|
||||
}
|
||||
637
src/components/CMyFlotta/CMyFlotta.ts
Executable file
637
src/components/CMyFlotta/CMyFlotta.ts
Executable file
@@ -0,0 +1,637 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import MixinNave from '../../mixins/mixin-nave'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { GlobalStore, UserStore } from '../../store/Modules'
|
||||
import { lists } from '../../store/Modules/lists'
|
||||
import translate from '../../globalroutines/util'
|
||||
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, CMyDashboard, CDateTime }
|
||||
})
|
||||
|
||||
export default class CMyFlotta extends MixinNave {
|
||||
@Prop({ required: false, default: null }) public flottaprop
|
||||
public $t
|
||||
public $v
|
||||
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
|
||||
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 showcommenti: boolean = true
|
||||
public showcolmodifica: boolean = false
|
||||
public showcoldati: 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 revolut: string = ''
|
||||
public email_paypal: string = ''
|
||||
public payeer_id: string = ''
|
||||
public advcash_id: 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,
|
||||
page: number,
|
||||
rowsNumber: number, // specifying this determines pagination is server-side
|
||||
rowsPerPage: number
|
||||
} = { sortBy: 'index', descending: false, page: 1, rowsNumber: 10, rowsPerPage: 10 }
|
||||
public colflotte: any[] = [
|
||||
{
|
||||
name: 'index',
|
||||
required: true,
|
||||
label: 'Num',
|
||||
align: 'left',
|
||||
field: '',
|
||||
sortable: true
|
||||
},
|
||||
{ name: 'flotta', align: 'center', label: 'Flotta', field: 'flotta', sortable: true }, // da 8.1 a 8.8
|
||||
{
|
||||
name: 'date_gift_chat_open', align: 'center',
|
||||
label: '⏰ Gift Chat', field: 'date_gift_chat_open', sortable: true
|
||||
},
|
||||
{ name: 'date_start', align: 'center', label: '⏰ Chiusura', field: 'date_start', sortable: true }, // 4/6/2020
|
||||
{ name: 'sognatore', align: 'center', label: 'Sognatore', field: 'sognatore_nomecognome', sortable: true }, // Username Sognatore
|
||||
{ name: 'provvisoria', align: 'center', label: 'Temp.', field: 'provvisoria', sortable: true }, // Flotta Provvisoria
|
||||
// { name: 'tutor', align: 'left', label: 'Tutor', field: 'tutor', sortable: true },
|
||||
// { name: 'mediatore', align: 'center', label: '🌀 Mediatore', field: '', sortable: true },
|
||||
{ name: 'DoniConfermati', align: 'center', label: '🎁 OK', field: 'DoniConfermati', sortable: true },
|
||||
{ name: 'DoniAttesaDiConferma', align: 'center', label: '🎁 Wait', field: 'DoniAttesaDiConferma', sortable: true },
|
||||
{ name: 'DoniMancanti', align: 'center', label: '🎁 Miss', field: 'DoniMancanti', sortable: true },
|
||||
{ name: 'msg_inviato', align: 'center', label: 'Msg Sent', field: 'msg_inviato', sortable: true },
|
||||
]
|
||||
|
||||
public coldonatori: any[] = [
|
||||
{ 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 },
|
||||
{ name: 'made_gift', align: 'center', label: 'Dono', field: 'made_gift', sortable: true },
|
||||
]
|
||||
|
||||
get getcol() {
|
||||
// if (tools.isMobile())
|
||||
// return this.coldonatori_cell
|
||||
// else
|
||||
return this.coldonatori
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.flotta = this.flottaprop
|
||||
|
||||
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.revolut = this.flotta.revolut
|
||||
this.email_paypal = this.flotta.email_paypal
|
||||
this.payeer_id = this.flotta.payeer_id
|
||||
this.advcash_id = this.flotta.advcash_id
|
||||
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 = ''
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
if (tot > 0) {
|
||||
perc = Math.round((conf / tot) * 100)
|
||||
}
|
||||
|
||||
mystr += ' (' + conf + '/' + tot + ') [' + perc + '%]'
|
||||
|
||||
|
||||
if (!!this.flotta.sognatore_nomecognome)
|
||||
mystr += ' - ' + this.flotta.sognatore_nomecognome
|
||||
return mystr
|
||||
} else
|
||||
return ''
|
||||
}
|
||||
|
||||
public gettitoloflotta() {
|
||||
return 'Flotta ' + this.getflottastr()
|
||||
}
|
||||
|
||||
get log_attivita() {
|
||||
if (!!this.flotta)
|
||||
return this.flotta.log_attivita
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public getcolorflotta() {
|
||||
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-red'
|
||||
else
|
||||
return 'bg-blue'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async apriflotta() {
|
||||
|
||||
console.log('apriflotta')
|
||||
|
||||
this.loading = true
|
||||
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.arrmediatori = ris.arrmediatori
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
get getnotifBotTxt() {
|
||||
return this.seluser.name + ' (' + this.seluser.surname + ') è stato sostituito con ' + this.username_sostituire
|
||||
}
|
||||
|
||||
public getnave(row) {
|
||||
return tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col)
|
||||
}
|
||||
|
||||
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
|
||||
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: !annulla,
|
||||
annulla,
|
||||
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
|
||||
|
||||
error = error || (this.username_sostituire === this.seluser.username_sostituire)
|
||||
|
||||
return !error
|
||||
|
||||
}
|
||||
|
||||
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, {
|
||||
param1: this.flotta,
|
||||
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() {
|
||||
let myarr = []
|
||||
if (this.ordinamento === 'data')
|
||||
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')
|
||||
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 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) {
|
||||
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
|
||||
}
|
||||
|
||||
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; '
|
||||
}
|
||||
|
||||
}
|
||||
761
src/components/CMyFlotta/CMyFlotta.vue
Executable file
761
src/components/CMyFlotta/CMyFlotta.vue
Executable file
@@ -0,0 +1,761 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<CTitleBanner v-if="!!flotta" class=""
|
||||
:title="gettitoloflotta()"
|
||||
:bgcolor="getcolorflotta()"
|
||||
clcolor="text-white"
|
||||
:visible="isaperto" mystyle="" myclass="myshad" canopen="true" @apri="apriflotta">
|
||||
|
||||
<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_start"
|
||||
:readonly="false"
|
||||
:minuteinterval="30"
|
||||
:dense="true"
|
||||
:canEdit="true"
|
||||
@savetoclose="change_field('date_start')">
|
||||
</CDateTime>
|
||||
|
||||
<CDateTime
|
||||
label="Data Fine"
|
||||
class="cursor-pointer"
|
||||
:value.sync="date_close"
|
||||
:readonly="false"
|
||||
:minuteinterval="30"
|
||||
:dense="true"
|
||||
:canEdit="true"
|
||||
@savetoclose="change_field('date_close')">
|
||||
</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="payeer_id" style="max-width: 300px;" label="ID Payeer:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('payeer_id')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="advcash_id" style="max-width: 300px;" label="ID Advanced Cash:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('advcash_id')">
|
||||
|
||||
</q-input>
|
||||
<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 v-model="revolut" style="max-width: 300px;" label="Revolut:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('revolut')">
|
||||
|
||||
</q-input>
|
||||
<q-input standout bottom-slots
|
||||
v-model="link_payment" style="max-width: 400px;" label="Link MoneyBox PayPal:"
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
filled dense
|
||||
@input="change_link_payment">
|
||||
|
||||
<q-btn round dense flat icon="send"
|
||||
type="a" :href="tools.getlinkstd(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>
|
||||
<strong>MEDIATORI:</strong>
|
||||
<br>
|
||||
<div v-for="(rec, index) of arrmediatori">
|
||||
<div class="row justify-center q-px-xs content-center" style="max-width: 350px;">
|
||||
<div style="width: 30px;">
|
||||
{{index + 1}}
|
||||
</div>
|
||||
<div :style="`color: blue; ` + getwidthnome()">
|
||||
<q-btn v-if="!!rec.profile" flat rounded dense color="blue"
|
||||
:size="tools.getsizesmall()"
|
||||
:label=getnamebyrec(rec)
|
||||
@click="viewdashboard(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div style="color: blue; width: 40px;">
|
||||
<q-btn color="blue"
|
||||
dense
|
||||
size="md"
|
||||
label="Msg"
|
||||
@click="clickseluser(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 Mediatori`"
|
||||
@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>
|
||||
|
||||
<div v-if="tools.isAdmin()">
|
||||
<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>{payeer_id}</div>
|
||||
<div>{advcash_id}</div>
|
||||
<div>{link_superchat}</div>
|
||||
<div>{tutor1}</div>
|
||||
<div>{tutor2}</div>
|
||||
<div>{tutor3}</div>
|
||||
<div>{tutorslo}</div>
|
||||
<div>{date_start}</div>
|
||||
<div>{date_close}</div>
|
||||
<div>{sognatore}</div>
|
||||
</div>
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="flotta">
|
||||
<div>
|
||||
|
||||
<q-toggle v-model="tuttiidoni"
|
||||
label="Mostra Tutti i Doni">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle v-model="showcommenti"
|
||||
label="Mostra i Commenti">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle v-model="showcolmodifica"
|
||||
label="Modifica">
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle v-model="showcoldati"
|
||||
label="Mostra Dati Extra">
|
||||
</q-toggle>
|
||||
|
||||
<div v-if="!!flotta" class="text-evidente bordo_stondato justify-between q-pa-xs-sm">
|
||||
<div class="">
|
||||
SOGNATORE:
|
||||
<q-btn rounded color="green"
|
||||
: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">{{getDoniConfermati()}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="inviati">
|
||||
{{$t('dashboard.doni_inviati_da_confermare')}}:
|
||||
<span class="inviati dati">{{getDoniAttesaDiConferma()}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="">
|
||||
{{$t('dashboard.doni_mancanti')}}:
|
||||
<span class="mancanti dati">{{getDoniMancanti()}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Copia questa Lista negli appunti"
|
||||
|
||||
@click="exportLista()">
|
||||
</q-btn>
|
||||
|
||||
<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 v-if="showcolmodifica" style="width: 80px;">
|
||||
Annulla
|
||||
</div>
|
||||
<div v-if="showcoldati" style="width: 70px;">
|
||||
Nave Posiz
|
||||
</div>
|
||||
<div v-else style="width: 40px;">
|
||||
Nave
|
||||
</div>
|
||||
<div style="width: 30px;">
|
||||
<q-btn
|
||||
flat
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Nat"
|
||||
|
||||
@click="setordin('nationality')">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div :style="getwidthnome()">
|
||||
Nome Cognome
|
||||
</div>
|
||||
<div v-if="showcoldati" style="width: 40px;">
|
||||
Tess
|
||||
</div>
|
||||
<div v-if="showcoldati" style="width: 40px;">
|
||||
Msg
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="width: 60px;">
|
||||
Sostituisci
|
||||
</div>
|
||||
<div v-if="showcommenti" 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">
|
||||
<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, false)">
|
||||
</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 v-if="showcolmodifica" style="width: 80px;">
|
||||
<q-btn v-if="rec.made_gift || rec.date_made_gift"
|
||||
rounded
|
||||
dense
|
||||
color="negative"
|
||||
size="md"
|
||||
label="Annulla"
|
||||
@click="HoRicevutoIlDono(rec, true)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div :style="`color: blue; width: ` + getwidthpos() + `;`">
|
||||
<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 v-if="!!rec.profile" style="width: 30px;">
|
||||
|
||||
<q-avatar v-if="tools.geticon(rec.profile.nationality)" :class="tools.geticon(rec.profile.nationality)"
|
||||
size="sm">
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div :style="`color: blue; ` + getwidthnome()">
|
||||
<q-btn v-if="!!rec.profile" flat rounded dense color="blue"
|
||||
:size="tools.getsizesmall()"
|
||||
:label=getnamebyrec(rec)
|
||||
@click="viewdashboard(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="showcoldati && !tools.isMobile()">
|
||||
({{ rec.num_tess }})
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="color: blue; width: 40px;">
|
||||
<q-btn color="blue"
|
||||
dense
|
||||
size="md"
|
||||
label="Msg"
|
||||
@click="clickseluser(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="color: blue; width: 70px;">
|
||||
<q-btn color="red"
|
||||
dense
|
||||
size="md"
|
||||
label="Sostituisci"
|
||||
@click="clicksostituisci(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showcommenti && !!rec.commento_al_sognatore" class="wrap">
|
||||
{{ rec.commento_al_sognatore }}
|
||||
</div>
|
||||
<div v-if="showcoldati && !!rec.ind_order" class="wrap">
|
||||
({{ rec.ind_order }})
|
||||
</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;">
|
||||
<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="!!seluser.profile">
|
||||
<div v-if="!!seluser.profile.cell" class="q-ma-sm text-center clBorderWarning">
|
||||
Whatsapp: {{seluser.profile.cell}}
|
||||
<q-btn
|
||||
|
||||
fab-mini
|
||||
icon="fab fa-whatsapp"
|
||||
color="white" text-color="green" type="a"
|
||||
size="sm"
|
||||
:href="tools.getHttpForWhatsapp(seluser.profile.cell)"
|
||||
target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-ma-sm text-center clBorderSteps">
|
||||
<div>TELEGRAM {{$t('ws.sitename')}} BOT {{$t('dialog.sendmsg')}} ->
|
||||
{{seluser.name }} {{ seluser.surname }}:
|
||||
</div>
|
||||
<q-input type="textarea"
|
||||
autogrow
|
||||
v-model="msg_tosend_user" :label="$t('cal.msgbooking')"
|
||||
input-class="myinput-area">
|
||||
|
||||
</q-input>
|
||||
|
||||
<div class="row justify-center centermydiv q-gutter-sm"
|
||||
style="max-width: 420px;">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` -> ` + seluser.name + ` ` + seluser.surname"
|
||||
@click="InviaMsgAUser()"></q-btn>
|
||||
|
||||
</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"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<div class="column q-gutter-sm justify-center text-center">
|
||||
<q-input
|
||||
bg-color="lightblue"
|
||||
v-model="username_sostituire"
|
||||
rounded outlined
|
||||
@blur="$v.username_sostituire.$touch"
|
||||
:error="$v.username_sostituire.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
label="Username Nuova Persona:">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-btn rounded color="warning" icon="fab fa-find"
|
||||
text-color="black"
|
||||
label="Cerca il primo Disponibile"
|
||||
@click="TrovaUserFree()"></q-btn>
|
||||
<div v-if="!!userfreestr">
|
||||
<q-field
|
||||
stack-label
|
||||
dense
|
||||
>
|
||||
<template v-slot:control>
|
||||
<div class="text-center" tabindex="0">{{userfreestr}}</div>
|
||||
</template>
|
||||
|
||||
</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="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"
|
||||
label="Sostituisci"
|
||||
:disabled='!allowSubmit'
|
||||
@click="SostituisciUtente(seluser, username_sostituire, getnotifBotTxt)"></q-btn>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyFlotta.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyFlotta.scss';
|
||||
</style>
|
||||
1
src/components/CMyFlotta/index.ts
Executable file
1
src/components/CMyFlotta/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMyFlotta} from './CMyFlotta.vue'
|
||||
12
src/components/CMyNave/CMyNave-validate.ts
Executable file
12
src/components/CMyNave/CMyNave-validate.ts
Executable file
@@ -0,0 +1,12 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
|
||||
username_sostituire: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
.donatore, .mediatore, .sognatore, .title-nave, .intermedio2, .intermedio3 {
|
||||
|
||||
.title-nave {
|
||||
padding: 2px 4px;
|
||||
margin: 2px 4px;
|
||||
color: white;
|
||||
@@ -6,6 +7,33 @@
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.donatore, .mediatore, .sognatore, .intermedio1, .intermedio2, .intermedio4, .intermedio5{
|
||||
color: white;
|
||||
background-color: lightblue;
|
||||
padding: 1px 2px;
|
||||
margin: 1px 2px;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 32px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
max-width: 200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.intermedio1{
|
||||
background-color: indigo;
|
||||
}
|
||||
.intermedio2{
|
||||
background-color: blue;
|
||||
}
|
||||
.intermedio4{
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
}
|
||||
.intermedio5{
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.tutor{
|
||||
|
||||
@@ -17,24 +45,19 @@
|
||||
|
||||
.donatore {
|
||||
background-color: red;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.mediatore {
|
||||
background-color: green;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sognatore {
|
||||
background-color: purple;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.intermedio2{
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.intermedio3{
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.cont_donatore, .cont_sognatore, .cont_mediatore, .cont_tragitto, .cont_pos, .cont_intestaz, .cont_pos_intest, .cont_intestaz_small {
|
||||
border: solid 2px #4198ef;
|
||||
@@ -51,6 +74,13 @@
|
||||
.you {
|
||||
background-color: yellow;
|
||||
}
|
||||
.issognatore {
|
||||
background-color: orangered;
|
||||
color: white;
|
||||
font-size: 1.10rem;
|
||||
border-radius: 64px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cont_tragitto{
|
||||
color: blue;
|
||||
@@ -74,10 +104,10 @@
|
||||
|
||||
.passo{
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
width: 110px;
|
||||
}
|
||||
.passoint{
|
||||
width: 90px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.gift{
|
||||
@@ -102,7 +132,7 @@
|
||||
}
|
||||
|
||||
.titlenave{
|
||||
width: 55px;
|
||||
width: 75px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,14 @@ import { lists } from '../../store/Modules/lists'
|
||||
import translate from '../../globalroutines/util'
|
||||
import { CMyChipList } from '../CMyChipList'
|
||||
import { CVideo } from '../CVideo'
|
||||
import { validations } from './CMyNave-validate'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
|
||||
@Component({
|
||||
components: { CTitleBanner, CMyChipList, CVideo }
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { CTitleBanner, CMyChipList, CVideo, CCopyBtn }
|
||||
})
|
||||
|
||||
export default class CMyNave extends MixinNave {
|
||||
@@ -21,9 +26,12 @@ export default class CMyNave extends MixinNave {
|
||||
@Prop({ required: false, default: null }) public posizprop
|
||||
@Prop({ required: true }) public navi_partenzaprop: any[]
|
||||
@Prop({ required: true }) public listanavi: boolean
|
||||
@Prop({ required: false, default: null }) public dashboard: any
|
||||
public navi_partenza: any[]
|
||||
public $t
|
||||
public $v
|
||||
public link_chat: string = ''
|
||||
public tabnave: string = 'donatore'
|
||||
public cosa: string = 'tragitto'
|
||||
public cosa2: string = 'donatore'
|
||||
public nave: any = null
|
||||
@@ -35,6 +43,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 = {}
|
||||
@@ -45,7 +54,16 @@ export default class CMyNave extends MixinNave {
|
||||
public loading: boolean = false
|
||||
public showmsguser: boolean = false
|
||||
public seluser = null
|
||||
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 commento_al_sognatore: string = ''
|
||||
public tabpagam: string = 'paypal'
|
||||
public MyPagination: {
|
||||
sortBy: string,
|
||||
descending: boolean,
|
||||
@@ -53,7 +71,7 @@ export default class CMyNave extends MixinNave {
|
||||
rowsNumber: number, // specifying this determines pagination is server-side
|
||||
rowsPerPage: number
|
||||
} = { sortBy: 'index', descending: false, page: 1, rowsNumber: 10, rowsPerPage: 10 }
|
||||
public coldonatori: any[] = [
|
||||
public coldonatori_cell: any[] = [
|
||||
/*{
|
||||
name: 'index',
|
||||
required: true,
|
||||
@@ -63,11 +81,34 @@ export default class CMyNave extends MixinNave {
|
||||
sortable: true
|
||||
},*/
|
||||
{ name: 'name', align: 'center', label: translate('reg.name'), field: 'name', sortable: true },
|
||||
{ name: 'surname', align: 'center', label: translate('reg.surname'), field: 'surname', sortable: true },
|
||||
{ name: 'posizione', align: 'center', label: 'Posizione', field: 'riga', sortable: true },
|
||||
{ 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: 'Confermato', field: 'made_gift', sortable: true },
|
||||
// { name: 'surname', align: 'center', label: translate('reg.surname'), field: 'surname', sortable: true },
|
||||
// { 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 },
|
||||
]
|
||||
|
||||
public coldonatori: any[] = [
|
||||
{
|
||||
name: 'index',
|
||||
required: true,
|
||||
label: 'Num',
|
||||
align: 'left',
|
||||
field: 'index',
|
||||
sortable: true
|
||||
},
|
||||
{ name: 'nave', align: 'center', label: 'Gift Chat', field: 'nave', sortable: true },
|
||||
{ name: 'name', align: 'center', label: translate('reg.name_complete'), field: 'name', sortable: true },
|
||||
{ name: 'posizione', align: 'center', label: translate('dashboard.posizione'), field: 'posizione', sortable: true },
|
||||
{ name: 'date_made_gift', align: 'center', label: translate('dashboard.inviato'), field: 'date_made_gift', sortable: true },
|
||||
// { name: 'tel', align: 'center', label: 'Tel', field: 'tel', sortable: true },
|
||||
{ name: 'made_gift', align: 'center', label: translate('dashboard.azione'), field: 'made_gift', sortable: true },
|
||||
{
|
||||
name: 'commento_al_sognatore',
|
||||
align: 'center',
|
||||
label: translate('dashboard.commento'),
|
||||
field: 'commento_al_sognatore',
|
||||
sortable: true
|
||||
},
|
||||
]
|
||||
|
||||
public tragitto = [
|
||||
@@ -125,6 +166,17 @@ export default class CMyNave extends MixinNave {
|
||||
this.aggiorna()
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (!!tools.getCookie(tools.TABBED_NAVE)) {
|
||||
this.tabnave = tools.getCookie(tools.TABBED_NAVE)
|
||||
}
|
||||
}
|
||||
|
||||
public changetab(val) {
|
||||
tools.setCookie(tools.TABBED_NAVE, val)
|
||||
// console.log('setcook', val)
|
||||
}
|
||||
|
||||
public aggiorna() {
|
||||
|
||||
this.riga = tools.getValDb('riga', false, 1)
|
||||
@@ -134,6 +186,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) {
|
||||
@@ -157,6 +211,24 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.sonoDonatore()) {
|
||||
this.tabnave = 'donatore'
|
||||
} else if (this.sonoMediatore()) {
|
||||
this.tabnave = 'mediatore'
|
||||
} else if (this.sonoSognatore()) {
|
||||
this.tabnave = 'sognatore'
|
||||
}
|
||||
|
||||
if (!!this.getRevolutPagamentoSognatore()) {
|
||||
this.tabpagam = 'revolut'
|
||||
}
|
||||
if (!!this.getAdvCashPagamentoSognatore()) {
|
||||
this.tabpagam = 'advcash'
|
||||
}
|
||||
if (!!this.getPayeerPagamentoSognatore()) {
|
||||
this.tabpagam = 'payeer'
|
||||
}
|
||||
}
|
||||
|
||||
public getListaDonatoriDaConfermare() {
|
||||
@@ -227,6 +299,12 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
public sonoMediatore() {
|
||||
if (!this.nave)
|
||||
return false
|
||||
|
||||
if (!this.nave.rec.donatore.recmediatore)
|
||||
return false
|
||||
|
||||
if (!!this.nave) {
|
||||
if (!!this.nave.rec.donatore)
|
||||
return this.nave.rec.donatore.recmediatore.ind_order === this.myindorder
|
||||
@@ -240,6 +318,15 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
public partenza_primo_donatore() {
|
||||
if (!!this.nave) {
|
||||
if (!!this.mediatore_navepers) {
|
||||
return this.mediatore_navepers.date_gift_chat_open
|
||||
}
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public fine_doni() {
|
||||
if (!!this.nave) {
|
||||
if (!!this.mediatore_navepers) {
|
||||
return this.mediatore_navepers.date_start
|
||||
@@ -250,17 +337,23 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
public getGiornoDelDono() {
|
||||
if (!!this.nave) {
|
||||
return tools.getstrDate(this.donatore_navepers.date_start)
|
||||
return tools.getstrDate(this.donatore_navepers.date_gift_chat_open)
|
||||
}
|
||||
}
|
||||
|
||||
get GiornoDelDonoArrivato() {
|
||||
if (!!this.nave) {
|
||||
return tools.isDateArrived(this.donatore_navepers.date_start)
|
||||
return tools.isDateArrived(this.donatore_navepers.date_gift_chat_open)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
get getsuperchat() {
|
||||
if (!!this.flotta) {
|
||||
return this.flotta.link_superchat
|
||||
}
|
||||
}
|
||||
|
||||
get FattoDono() {
|
||||
if (!!this.iodonatore) {
|
||||
return this.iodonatore.made_gift
|
||||
@@ -314,14 +407,16 @@ 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 + ')'
|
||||
})
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_RICEVUTO, 0, {
|
||||
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: true,
|
||||
riga: rec.riga,
|
||||
col: rec.col,
|
||||
},
|
||||
param2: rec.username,
|
||||
param3: mymsg
|
||||
@@ -329,19 +424,27 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
}
|
||||
|
||||
public getIdPagam() {
|
||||
|
||||
}
|
||||
|
||||
public HoEffettuatoIlDono() {
|
||||
const msgtitle = translate('dashboard.confermi_dono')
|
||||
const msginvia = msgtitle
|
||||
|
||||
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()
|
||||
date_made_gift: tools.getDateNow(),
|
||||
commento_al_sognatore: this.commento_al_sognatore + ' (' + this.tabpagam + ')' + this.getIdPagam(),
|
||||
},
|
||||
param2: this.sognatoredelDono().username,
|
||||
param3: mymsg
|
||||
@@ -388,6 +491,85 @@ 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 getPayeerPagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.payeer_id
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getAdvCashPagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.advcash_id
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getLinkPayeerPagamentoSognatore() {
|
||||
const payeerid = this.getPayeerPagamentoSognatore()
|
||||
if (!!payeerid) {
|
||||
return 'https://payeer.com/en/account/send/'
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
public getLinkAdvCashPagamentoSognatore() {
|
||||
const advcash = this.getAdvCashPagamentoSognatore()
|
||||
if (!!advcash) {
|
||||
return 'https://wallet.advcash.com/pages/transfer/wallet'
|
||||
}
|
||||
|
||||
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 ''
|
||||
}
|
||||
|
||||
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
|
||||
@@ -401,7 +583,10 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
public sonoSecondaTessituraDonatore() {
|
||||
if (!!this.nave) {
|
||||
const mediatore = this.getmediatore()
|
||||
if (!!this.nave.rec.donatore && !!mediatore) {
|
||||
if (!!this.nave.rec.donatore.arrdonatori) {
|
||||
for (const rec of this.nave.rec.donatore.arrdonatori) {
|
||||
if (!!rec) {
|
||||
if (mediatore) {
|
||||
@@ -410,6 +595,9 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
@@ -419,8 +607,10 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
public getmediatore() {
|
||||
if (!!this.nave) {
|
||||
if (!!this.nave.rec.mediatore)
|
||||
return this.nave.rec.mediatore.recmediatore
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -448,7 +638,10 @@ export default class CMyNave extends MixinNave {
|
||||
return this.donatore_navepers.link_chat
|
||||
}
|
||||
|
||||
public getclassSelect(rec) {
|
||||
public getclassSelect(rec, sognatore, index) {
|
||||
if (sognatore && index === 0) {
|
||||
return ' issognatore'
|
||||
}
|
||||
if (rec.ind_order === this.myindorder)
|
||||
return ' you'
|
||||
}
|
||||
@@ -460,24 +653,24 @@ export default class CMyNave extends MixinNave {
|
||||
else {
|
||||
ris = (this.getrigaNaveByInd(ind)) + '.' + this.getcolNaveByInd(ind)
|
||||
}
|
||||
let add = ''
|
||||
// for (let index = 0; index < (4 - ris.length); index++) {
|
||||
// add += ' '
|
||||
// }
|
||||
|
||||
ris = add + ris
|
||||
return ris
|
||||
}
|
||||
|
||||
public getdatanave(rec) {
|
||||
if (!this.nave)
|
||||
return ''
|
||||
|
||||
if (this.sonoDonatore()) {
|
||||
if (rec.ind === 1) {
|
||||
return tools.getstrshortDate(this.nave.date_start) // Donatore
|
||||
return tools.getstrshortDate(this.nave.date_gift_chat_open) // Donatore
|
||||
}
|
||||
}
|
||||
if (this.sonoMediatore()) {
|
||||
if (!rec)
|
||||
return false
|
||||
|
||||
if (rec.ind === 4) {
|
||||
return tools.getstrshortDate(this.nave.date_start) // Mediatore
|
||||
return tools.getstrshortDate(this.nave.date_gift_chat_open) // Mediatore
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,13 +678,24 @@ export default class CMyNave extends MixinNave {
|
||||
const col = this.getcolNaveByInd(rec.ind)
|
||||
const mynavepart = this.getnavePartenzaByRigaCol(riga, col)
|
||||
if (!!mynavepart) {
|
||||
if (!!mynavepart.date_start)
|
||||
return tools.getstrshortDate(mynavepart.date_start)
|
||||
if (!!mynavepart.date_gift_chat_open)
|
||||
return tools.getstrshortDate(mynavepart.date_gift_chat_open)
|
||||
}
|
||||
return ' --/-- '
|
||||
// return this.getNavePartByInd(rec.ind)
|
||||
}
|
||||
|
||||
public getlinkchat(row) {
|
||||
const riga = tools.getRiganave(row.riga)
|
||||
const col = tools.getColnave(row.col)
|
||||
|
||||
const mynavepart = this.getnavePartenzaByRigaCol(riga, col)
|
||||
if (!!mynavepart) {
|
||||
if (!!mynavepart.link_chat)
|
||||
return mynavepart.link_chat
|
||||
}
|
||||
}
|
||||
|
||||
public getTutor(rec) {
|
||||
const mynavepart = this.getnavePartenzaByRigaCol(rec.riga, rec.col)
|
||||
if (!!mynavepart)
|
||||
@@ -544,12 +748,14 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
public getclpos(rec) {
|
||||
if (this.NaveeseguitabyInd(this.getrigaNaveByInd(rec.ind))) {
|
||||
if (!!this.dashboard) {
|
||||
if (this.dashboard.lastnave.riga >= this.getrigaNaveByInd(rec.ind)) {
|
||||
return 'you'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public geticon(rec) {
|
||||
if (!rec)
|
||||
@@ -594,7 +800,8 @@ export default class CMyNave extends MixinNave {
|
||||
const navemediatore = {
|
||||
id: this.mediatore._id,
|
||||
riga: this.mediatore.riga,
|
||||
col: this.mediatore.col
|
||||
col: this.mediatore.col,
|
||||
username: this.mediatore.username
|
||||
}
|
||||
|
||||
this.InviaMsgANave(msgobj, navemediatore)
|
||||
@@ -627,16 +834,27 @@ export default class CMyNave extends MixinNave {
|
||||
return tools.getstrshortDate(mydata)
|
||||
}
|
||||
|
||||
public gettitlemediatore() {
|
||||
return this.getdatastr(this.partenza_primo_donatore()) + ' ' + this.$t('dashboard.nave') + ' ' + this.getisProvvisoriaMediatoreStr() + this.mediatore.riga + '.' + this.mediatore.col + ' ' + '🎁' + this.$t('ws.sitename')
|
||||
public datefromto() {
|
||||
if (this.partenza_primo_donatore() !== this.fine_doni())
|
||||
// return this.$t('words.da') + ' ' + this.getdatastr(this.partenza_primo_donatore()) + ' ' + this.$t('words.a') + ' ' + this.getdatastr(this.fine_doni())
|
||||
return this.getdatastr(this.partenza_primo_donatore()) + ' - ' + this.getdatastr(this.fine_doni())
|
||||
else
|
||||
return this.getdatastr(this.fine_doni())
|
||||
}
|
||||
|
||||
public gettitlemediatore(acapo) {
|
||||
let add = ' - '
|
||||
if (acapo)
|
||||
add = ' '
|
||||
return this.datefromto() + add + this.$t('dashboard.nave') + ' ' + this.getisProvvisoriaMediatoreStr() + this.mediatore.riga + '.' + this.mediatore.col + ' ' + '🎁' + this.$t('ws.sitename')
|
||||
}
|
||||
|
||||
public gettitledonatore() {
|
||||
return this.getdatastr(this.donatore_navepers.date_start) + ' ' + this.$t('dashboard.nave') + ' ' + this.getisProvvisoriaStr() + this.donatore_navepers.riga + '.' + this.donatore_navepers.col + ' ' + '🎁' + this.$t('ws.sitename')
|
||||
return this.getdatastr(this.donatore_navepers.date_gift_chat_open) + ' ' + this.$t('dashboard.nave') + ' ' + this.getisProvvisoriaStr() + this.donatore_navepers.riga + '.' + this.donatore_navepers.col + ' ' + '🎁' + this.$t('ws.sitename')
|
||||
}
|
||||
|
||||
public gettesto() {
|
||||
return this.$t('dashboard.sonomediatore', { nomenave: this.gettitlemediatore() })
|
||||
return this.$t('dashboard.sonomediatore', { nomenave: this.gettitlemediatore(false) })
|
||||
}
|
||||
|
||||
public getisProvvisoriaStr() {
|
||||
@@ -709,7 +927,7 @@ export default class CMyNave extends MixinNave {
|
||||
let col = 0
|
||||
let riga1don = 1
|
||||
let col1don = 1
|
||||
let ind_order = -1;
|
||||
let ind_order = -1
|
||||
if (this.listanavi) {
|
||||
riga = this.nave.riga
|
||||
col = this.nave.col
|
||||
@@ -739,6 +957,21 @@ export default class CMyNave extends MixinNave {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
public async update_nave() {
|
||||
this.showmsguser = false
|
||||
this.apri()
|
||||
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')
|
||||
@@ -748,15 +981,17 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
public getpartenza() {
|
||||
let myrec = null
|
||||
if (this.listanavi)
|
||||
if (this.listanavi) {
|
||||
if (!!this.nave)
|
||||
myrec = this.nave.rec
|
||||
else {
|
||||
} else {
|
||||
if (!!this.posiz)
|
||||
myrec = this.posiz.rec
|
||||
}
|
||||
|
||||
if (!!myrec)
|
||||
return tools.getstrDate(myrec.donatore.navepersistente.date_start)
|
||||
if (!!myrec.donatore.navepersistente)
|
||||
return tools.getstrDate(myrec.donatore.navepersistente.date_gift_chat_open)
|
||||
|
||||
return ''
|
||||
}
|
||||
@@ -797,6 +1032,8 @@ export default class CMyNave extends MixinNave {
|
||||
public clickseluser(rec) {
|
||||
this.seluser = rec
|
||||
this.showmsguser = true
|
||||
this.username_sostituire = ''
|
||||
this.userfreestr = ''
|
||||
}
|
||||
|
||||
public async InviaMsgAUserConfirm(msgobj, navemediatore) {
|
||||
@@ -812,6 +1049,7 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
public Chiudi() {
|
||||
this.showmsguser = false
|
||||
this.showtesto = false
|
||||
}
|
||||
|
||||
public InviaMsgAUser() {
|
||||
@@ -837,4 +1075,152 @@ export default class CMyNave extends MixinNave {
|
||||
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
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
error = error || (this.username_sostituire === this.seluser.username_sostituire)
|
||||
|
||||
return !error
|
||||
|
||||
}
|
||||
|
||||
get getnotifBotTxt() {
|
||||
return this.seluser.name + ' (' + this.seluser.surname + ') è stato sostituito con ' + this.username_sostituire
|
||||
}
|
||||
|
||||
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,
|
||||
deleteUser: this.deleteUser,
|
||||
AddImbarco: this.AddImbarco,
|
||||
},
|
||||
param3: notifBottxt
|
||||
})
|
||||
}
|
||||
|
||||
public getnavestr(row) {
|
||||
return tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col)
|
||||
}
|
||||
|
||||
get gettitolonave() {
|
||||
if (this.listanavi)
|
||||
return this.titolonave()
|
||||
else
|
||||
return this.$t('dashboard.tragitto')
|
||||
}
|
||||
|
||||
get getcol() {
|
||||
if (tools.isMobile())
|
||||
return this.coldonatori_cell
|
||||
else
|
||||
return this.coldonatori
|
||||
}
|
||||
|
||||
public getlivellostr(index) {
|
||||
|
||||
let str = ''
|
||||
str += (7 - index) + '° - '
|
||||
if (index === 0)
|
||||
str += this.$t('dashboard.sognatore')
|
||||
else if ((index === 1) || (index === 2) || (index === 4) || (index === 5))
|
||||
str += this.$t('dashboard.intermedio')
|
||||
else if (index === 3)
|
||||
str += this.$t('dashboard.mediatore')
|
||||
else if (index === 6)
|
||||
str += this.$t('dashboard.donatori')
|
||||
|
||||
return str
|
||||
|
||||
}
|
||||
|
||||
public getclasselivello(index) {
|
||||
if (index === 0)
|
||||
return 'sognatore'
|
||||
else if (index === 3)
|
||||
return 'mediatore'
|
||||
else if (index === 6)
|
||||
return 'donatore'
|
||||
else
|
||||
return 'intermedio' + index
|
||||
}
|
||||
|
||||
public async Mostraplacca(riga, col) {
|
||||
const data = {
|
||||
riga,
|
||||
col
|
||||
}
|
||||
this.showtesto = true
|
||||
this.seltesto = await GlobalStore.actions.GetData({ data })
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
get rendivisibile() {
|
||||
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'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<CTitleBanner v-if="true" class=""
|
||||
:title="titolonave()"
|
||||
<div v-if="!!nave" class="text-center">
|
||||
|
||||
<CTitleBanner v-if="!!getpartenza()" class=""
|
||||
:title="gettitolonave"
|
||||
:bgcolor="getcolortitle()"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true" :visible="!listanavi" @apri="apri">
|
||||
|
||||
<q-inner-loading :showing="loading">
|
||||
<q-spinner-tail size="2em" color="primary"/>
|
||||
</q-inner-loading>
|
||||
|
||||
<div v-if="mediatore" class="flex flex-center column justify-center">
|
||||
:visible="rendivisibile"
|
||||
mystyle="" myclass="myshad" canopen="true" @apri="apri">
|
||||
<div class="">
|
||||
<!--IndPrimario: {{ nave.indprimario }} - IndOrder: {{ nave.ind_order }} -->
|
||||
</div>
|
||||
|
||||
<CTitleBanner v-if="nave" class=""
|
||||
:title="$t('dashboard.tragitto')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
<q-chip class="glossy q-ma-sm" color="orange" text-color="white" icon="star">
|
||||
{{getposizione()}}
|
||||
</q-chip>
|
||||
<div class="row justify-between no-wrap">
|
||||
<div class="row items-center justify-evenly no-wrap">
|
||||
<div class="cont_pos_intest">N</div>
|
||||
|
||||
<div class="cont_intestaz q-mx-sm passoint"
|
||||
@@ -35,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
<div v-for="rec in tragitto" :key="rec.ind">
|
||||
<div :class="`row items-center ` + rec.extracl">
|
||||
<div :class="`row items-center justify-evenly ` + rec.extracl">
|
||||
<div :class="`cont_pos ` + getclpos(rec)">
|
||||
{{ rec.ind }}
|
||||
</div>
|
||||
@@ -47,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="titlenave">
|
||||
<q-chip class="glossy" :color="rec.color" text-color="white">
|
||||
<q-chip class="glossy text-small" :color="rec.color" text-color="white">
|
||||
<div class="" v-html="gettitlenave(rec.ind)"></div>
|
||||
</q-chip>
|
||||
</div>
|
||||
@@ -59,88 +47,31 @@
|
||||
<q-icon color="green" inverted size="sm" :name="geticon(rec)" class="gift"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner v-if="nave" class=""
|
||||
:title="$t('dashboard.donatore')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
|
||||
<br />
|
||||
<div class="q-ma-sm">
|
||||
<div class="column justify-center items-center q-gutter-md tutor">
|
||||
<div class="title-nave clBorderSteps">{{gettitledonatore()}}</div>
|
||||
<div v-if="getTutor(donatore)" class="clBorderTutor q-ma-sm selezione cursor-pointer"
|
||||
@click="clickseluser({name: getTutor(donatore), surname: '', username: getTutor_username(donatore), profile: { cell: '' } })">
|
||||
{{ $t('dashboard.tutor') }}: {{getTutor(donatore)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div v-if="nave.rec.donatore.recsognatori">
|
||||
<div class="sognatore">{{$t('dashboard.sognatori')}}:</div>
|
||||
<div v-for="(sognatore, index) in nave.rec.donatore.recsognatori"
|
||||
:key="10+index">
|
||||
<div v-if="sognatore"
|
||||
:class="`cont_sognatore ` + getclassSelect(sognatore)">
|
||||
A{{3 - index}} - {{ sognatore.name }} {{ sognatore.surname }}
|
||||
({{sognatore.username }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="mediatore text-uppercase">{{$t('dashboard.mediatore')}}:</div>
|
||||
<div :class="`cont_mediatore cursor-pointer selezione ` + getclassSelect(nave.rec.donatore.recmediatore)"
|
||||
@click="clickseluser(nave.rec.donatore.recmediatore)">
|
||||
{{ nave.rec.donatore.recmediatore.name }} {{
|
||||
nave.rec.donatore.recmediatore.surname }} ({{
|
||||
nave.rec.donatore.recmediatore.username }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="intermedio3">{{$t('dashboard.intermedio')}}3:</div>
|
||||
<div v-for="(terra, index) in nave.rec.donatore.arrterra" :key="index">
|
||||
<div v-if="terra" :class="`cont_donatore ` + getclassSelect(terra)">
|
||||
B{{index + 1}} - {{ terra.name }} {{ terra.surname }} ({{
|
||||
terra.username
|
||||
}}) - {{
|
||||
terra.riga}}.{{terra.col}}<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="intermedio2">{{$t('dashboard.intermedio')}}2:</div>
|
||||
<div v-for="(aria, index) in nave.rec.donatore.arraria" :key="index">
|
||||
<div v-if="aria" :class="`cont_donatore ` + getclassSelect(aria)">
|
||||
C{{index + 1}} - {{ aria.name }} {{ aria.surname }} ({{
|
||||
aria.username
|
||||
}}) - {{
|
||||
aria.riga}}.{{aria.col}}<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="donatore text-uppercase">{{$t('dashboard.donatori')}}:</div>
|
||||
<div v-for="(donatore, index) in nave.rec.donatore.arrdonatori" :key="index">
|
||||
<div v-if="donatore"
|
||||
:class="`cont_donatore row ` + getclassSelect(donatore)">
|
||||
<div>
|
||||
{{ getindex(donatore, index + 1) }} - {{ donatore.name }} {{
|
||||
donatore.surname }} ({{
|
||||
donatore.username }}) - {{
|
||||
donatore.riga}}.{{donatore.col}}<br>
|
||||
<br>
|
||||
<div style="margin-bottom: 8px;"></div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<q-icon v-if="donatore.made_gift" color="green" inverted size="sm"
|
||||
name="fas fa-gift" class="gift"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<q-tabs
|
||||
v-model="tabnave"
|
||||
dense
|
||||
class="bg-blue text-white shadow-2"
|
||||
indicator-color="white"
|
||||
align="center"
|
||||
narrow-indicator
|
||||
@input="changetab">
|
||||
<q-tab name="donatore" icon="fas fa-gift" :label="$t('dashboard.donatore')"></q-tab>
|
||||
<q-tab name="mediatore" icon="fas fa-comments" :label="$t('dashboard.mediatore')"></q-tab>
|
||||
<q-tab name="sognatore" icon="fas fa-gifts" :label="$t('dashboard.sognatore')"></q-tab>
|
||||
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabnave" animated>
|
||||
<q-tab-panel name="donatore">
|
||||
|
||||
<div v-if="mediatore" class="">
|
||||
<div class="q-my-sm">
|
||||
|
||||
<div class="q-ma-md q-butter-sm" v-if="!!linkchatopen">
|
||||
{{$t('dashboard.gift_chat')}}:<br>
|
||||
@@ -162,7 +93,7 @@
|
||||
<div v-if="!FattoDono" v-html="$t('dashboard.sonodonatore')">
|
||||
</div>
|
||||
|
||||
<div v-if="!FattoDono" class="text-evidente bordo_stondato">
|
||||
<div v-if="!FattoDono && !donatore_navepers.provvisoria" class="text-evidente bordo_stondato">
|
||||
|
||||
<div>{{$t('dashboard.quando_eff_il_tuo_dono')}}: <strong>{{ getGiornoDelDono()
|
||||
}}</strong><br>
|
||||
@@ -183,8 +114,135 @@
|
||||
{{$t('dashboard.importo')}}: <strong>33€</strong>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<CTitleBanner class="q-pa-xs"
|
||||
|
||||
<div class="text-evidente2 bordo_stondato_blu2">
|
||||
|
||||
<div v-if="GiornoDelDonoArrivato && !donatore_navepers.provvisoria">
|
||||
|
||||
<q-tabs
|
||||
v-model="tabpagam"
|
||||
dense
|
||||
class="bg-blue text-white shadow-2"
|
||||
indicator-color="white"
|
||||
align="center"
|
||||
narrow-indicator
|
||||
@input="changetab"
|
||||
>
|
||||
<q-tab v-if="!!getPayeerPagamentoSognatore()" name="payeer" icon="img:statics/images/payeer.jpg"
|
||||
label="payeer"></q-tab>
|
||||
<q-tab v-if="!!getAdvCashPagamentoSognatore()" name="advcash"
|
||||
icon="img:statics/images/advcash.jpg"
|
||||
label="advcash"></q-tab>
|
||||
<q-tab v-if="!!getlinkRevolutSognatore()" name="revolut" icon="img:statics/images/revolut.jpg"
|
||||
label="revolut"></q-tab>
|
||||
<q-tab v-if="!!getemailPagamentoSognatore()" name="paypal" icon="img:statics/images/paypal.jpg"
|
||||
label="paypal"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabpagam" animated>
|
||||
<q-tab-panel name="payeer">
|
||||
<q-img src="../../statics/images/regalo.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="regalo">
|
||||
</q-img>
|
||||
<q-img src="../../statics/images/payeer.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="Payeer">
|
||||
</q-img>
|
||||
<br><br>
|
||||
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
icon="fas fa-gift"
|
||||
color="primary"
|
||||
type="a"
|
||||
size="md"
|
||||
label="Payeer"
|
||||
:href="getLinkPayeerPagamentoSognatore()"
|
||||
target="__blank">
|
||||
</q-btn>
|
||||
<br>
|
||||
<br>
|
||||
<a :href="getLinkPayeerPagamentoSognatore()" target="_blank">{{
|
||||
getLinkPayeerPagamentoSognatore() }}</a>
|
||||
<div class="text-center text-h4">
|
||||
<CCopyBtn title="Advanced Cash Email" :texttocopy="getPayeerPagamentoSognatore()">
|
||||
|
||||
</CCopyBtn>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="advcash">
|
||||
<q-img src="../../statics/images/regalo.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="regalo">
|
||||
</q-img>
|
||||
<q-img src="../../statics/images/advcash.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="AdvCash">
|
||||
</q-img>
|
||||
<br><br>
|
||||
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
icon="fas fa-gift"
|
||||
color="primary"
|
||||
type="a"
|
||||
size="md"
|
||||
label="AdvCash"
|
||||
:href="getLinkAdvCashPagamentoSognatore()"
|
||||
target="__blank">
|
||||
</q-btn>
|
||||
<br>
|
||||
<br>
|
||||
<a :href="getLinkAdvCashPagamentoSognatore()" target="_blank">{{
|
||||
getLinkAdvCashPagamentoSognatore() }}</a>
|
||||
|
||||
<div class="text-center text-h4">
|
||||
<CCopyBtn title="Advanced Cash Email" :texttocopy="getAdvCashPagamentoSognatore()">
|
||||
|
||||
</CCopyBtn>
|
||||
</div>
|
||||
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="paypal">
|
||||
<div>
|
||||
<q-img src="../../statics/images/regalo.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="regalo">
|
||||
</q-img>
|
||||
<q-img src="../../statics/images/paypal.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="regalo">
|
||||
</q-img>
|
||||
|
||||
|
||||
<CCopyBtn v-if="!FattoDono && !donoinviato"
|
||||
title="Email Paypal" :texttocopy="getemailPagamentoSognatore()">
|
||||
|
||||
</CCopyBtn>
|
||||
|
||||
<div v-if="!FattoDono && !donoinviato"
|
||||
v-html="$t('dashboard.effettua_il_dono', {email: getemailPagamentoSognatore(), sognatore: getnomesognatore() })">
|
||||
|
||||
</div>
|
||||
<q-img v-if="!FattoDono && !donoinviato"
|
||||
:src="getImgPaypal"
|
||||
style="width: 366px; height: 254px;"
|
||||
alt="sending to a friend">
|
||||
</q-img>
|
||||
<CTitleBanner v-if="!FattoDono && !donoinviato" class="q-pa-xs"
|
||||
:title="$t('dashboard.come_inviare_regalo_con_paypal')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
@@ -193,26 +251,81 @@
|
||||
<CVideo myvideokey="5rp_XEV6Mzg">
|
||||
|
||||
</CVideo>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<div v-if="!FattoDono && !!getpaypalmePagamentoSognatore() && !donoinviato"
|
||||
v-html="$t('dashboard.paypal_me', {link_payment: tools.getlinkstd(getpaypalmePagamentoSognatore()) })">
|
||||
</div>
|
||||
<div class="text-evidente bordo_stondato_blu">
|
||||
<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">
|
||||
|
||||
<div v-if="GiornoDelDonoArrivato">
|
||||
<div v-if="!FattoDono"
|
||||
v-html="$t('dashboard.effettua_il_dono', {email: getemailPagamentoSognatore() })">
|
||||
<CVideo myvideokey="VzCy4BxQKhM">
|
||||
|
||||
</CVideo>
|
||||
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="revolut">
|
||||
<q-img src="../../statics/images/regalo.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="regalo">
|
||||
</q-img>
|
||||
<q-img src="../../statics/images/revolut.jpg"
|
||||
class=""
|
||||
style="height: 150px; width: 150px;"
|
||||
alt="regalo">
|
||||
</q-img>
|
||||
<br>
|
||||
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
icon="fas fa-gift"
|
||||
color="primary"
|
||||
type="a"
|
||||
size="md"
|
||||
label="Link Revolut"
|
||||
:href="getlinkRevolutSognatore()"
|
||||
target="__blank">
|
||||
</q-btn>
|
||||
<br>
|
||||
<br>
|
||||
<a :href="getlinkRevolutSognatore()" target="_blank">{{ getlinkRevolutSognatore() }}</a>
|
||||
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
|
||||
<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"
|
||||
:label="$t('dashboard.ho_effettuato_il_dono')"
|
||||
size="lg"
|
||||
:label="$t('dashboard.ho_effettuato_il_dono') + ' (' + tabpagam + ')'"
|
||||
icon="fas fa-gift"
|
||||
@click="HoEffettuatoIlDono">
|
||||
</q-btn>
|
||||
@@ -221,18 +334,18 @@
|
||||
<div v-else>
|
||||
<div class="row justify-center q-ma-sm">
|
||||
<q-chip class="glossy"
|
||||
text-color="white"
|
||||
color="positive"
|
||||
text-color="green"
|
||||
color="white"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dashboard.ho_effettuato_il_dono') }}
|
||||
{{ $t('dashboard.ho_effettuato_il_dono') + ' (' + tabpagam + ')' }}
|
||||
</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="FattoDono">
|
||||
<q-chip class="glossy"
|
||||
color="positive"
|
||||
text-color="white"
|
||||
<q-chip class=""
|
||||
color="white"
|
||||
text-color="green"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dashboard.dono_ricevuto') }}
|
||||
</q-chip>
|
||||
@@ -242,82 +355,84 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!!getsuperchat && !FattoDono"
|
||||
class="text-evidente bordo_stondato"
|
||||
v-html="$t('dashboard.superchat', {link_superchat: getsuperchat })">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner v-if="nave" class=""
|
||||
:title="$t('dashboard.mediatore')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<br />
|
||||
<div class="q-ma-sm">
|
||||
<br>
|
||||
<div class="column justify-center items-center q-gutter-md tutor">
|
||||
<div class="title-nave clBorderSteps">{{gettitlemediatore()}}</div>
|
||||
<div v-if="getTutor(mediatore)" class=" clBorderTutor q-ma-sm selezione cursor-pointer"
|
||||
@click="clickseluser({name: getTutor(mediatore), surname: '', username: getTutor_username(mediatore), profile: { cell: '' } })">
|
||||
{{ $t('dashboard.tutor') }}: {{getTutor(mediatore)}}
|
||||
<q-btn rounded color="blue"
|
||||
class="title-nave"
|
||||
:label="gettitledonatore(true)"
|
||||
@click="Mostraplacca(donatore.riga, donatore.col)">
|
||||
</q-btn>
|
||||
|
||||
<!--<div class="title-nave clBorderSteps">{{gettitledonatore()}}</div>-->
|
||||
<div v-if="getTutor(donatore)" class="clBorderTutor q-ma-sm selezione cursor-pointer"
|
||||
@click="clickseluser({name: getTutor(donatore), surname: '', username: getTutor_username(donatore), profile: { cell: '' } })">
|
||||
{{ $t('dashboard.tutor') }}: {{getTutor(donatore)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div v-if="nave.rec.mediatore.recsognatori">
|
||||
<div class="sognatore">{{$t('dashboard.sognatori')}}:</div>
|
||||
<div v-for="(sognatore, index) in nave.rec.mediatore.recsognatori"
|
||||
<div v-if="nave.rec.donatore.recsognatori">
|
||||
<div v-for="(sognatore, index) in nave.rec.donatore.recsognatori"
|
||||
:key="10+index">
|
||||
<div :class="getclasselivello(index)">{{ getlivellostr(index, false)}}:</div>
|
||||
<div v-if="sognatore"
|
||||
:class="`cont_sognatore selezione cursor-pointer ` + getclassSelect(sognatore)"
|
||||
@click="clickseluser(sognatore)">
|
||||
A{{3 - index}} - {{ sognatore.name }} {{ sognatore.surname }}
|
||||
:class="`cont_sognatore ` + getclassSelect(sognatore, true, index)">
|
||||
{{ sognatore.name }} {{ sognatore.surname }}
|
||||
({{sognatore.username }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="mediatore text-uppercase">{{$t('dashboard.mediatore')}}:</div>
|
||||
<div :class="`cont_mediatore ` + getclassSelect(nave.rec.mediatore.recmediatore)">
|
||||
{{ nave.rec.mediatore.recmediatore.name }} {{
|
||||
nave.rec.mediatore.recmediatore.surname }} ({{
|
||||
nave.rec.mediatore.recmediatore.username }})
|
||||
<div :class="getclasselivello(3)">{{ getlivellostr(3, false)}}:</div>
|
||||
<div
|
||||
:class="`cont_mediatore cursor-pointer selezione ` + getclassSelect(nave.rec.donatore.recmediatore)"
|
||||
@click="clickseluser(nave.rec.donatore.recmediatore)">
|
||||
{{ nave.rec.donatore.recmediatore.name }} {{
|
||||
nave.rec.donatore.recmediatore.surname }} ({{
|
||||
nave.rec.donatore.recmediatore.username }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="intermedio3">{{$t('dashboard.intermedio')}}3:</div>
|
||||
<div v-for="(terra, index) in nave.rec.mediatore.arrterra" :key="index">
|
||||
<div v-if="terra" :class="`cont_donatore ` + getclassSelect(terra)">
|
||||
B{{index + 1}} - {{ terra.name }} {{ terra.surname }} ({{
|
||||
terra.username
|
||||
}})
|
||||
- {{
|
||||
<div :class="getclasselivello(4)">{{ getlivellostr(4, true)}}:</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="intermedio2">{{$t('dashboard.intermedio')}}2:</div>
|
||||
<div v-for="(aria, index) in nave.rec.mediatore.arraria" :key="index">
|
||||
<div v-if="aria" :class="`cont_donatore ` + getclassSelect(aria)">
|
||||
C{{index + 1}} - {{ aria.name }} {{ aria.surname }} ({{
|
||||
aria.username
|
||||
}}) -
|
||||
{{
|
||||
aria.riga}}.{{aria.col}}<br>
|
||||
<div :class="getclasselivello(5)">{{ getlivellostr(5, false)}}:</div>
|
||||
<div v-for="(aria, index) in nave.rec.donatore.arraria" :key="index">
|
||||
<div v-if="aria" :class="`cont_donatore text-small ` + getclassSelect(aria)">
|
||||
{{ aria.name }} {{ aria.surname }} ({{aria.username }}) - {{aria.riga}}.{{aria.col}}<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="donatore text-uppercase">{{$t('dashboard.donatori')}}:</div>
|
||||
<div v-for="(donatore, index) in nave.rec.mediatore.arrdonatori" :key="index">
|
||||
<div v-if="donatore"
|
||||
:class="`cont_donatore row selezione cursor-pointer ` + getclassSelect(donatore)"
|
||||
@click="clickseluser(donatore)">
|
||||
<div :class="getclasselivello(6)">{{ getlivellostr(6)}}:</div>
|
||||
<div v-for="(donatore, index) in nave.rec.donatore.arrdonatori" :key="index">
|
||||
|
||||
<div v-if="donatore"
|
||||
:class="`cont_donatore text-small row ` + getclassSelect(donatore)"
|
||||
@click="clickseluser(donatore)">
|
||||
<div>
|
||||
{{ getindex(donatore, index + 1) }} - {{ donatore.name }} {{
|
||||
donatore.surname }}
|
||||
({{ donatore.username }}) - {{ donatore.riga}}.{{donatore.col}}
|
||||
donatore.surname }} ({{
|
||||
donatore.username }}) - {{
|
||||
donatore.riga}}.{{donatore.col}} <span
|
||||
v-if="isAdmin"> [ord:{{ donatore.ind_order }}]</span><br>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<q-icon v-if="donatore.made_gift" color="green" inverted size="sm"
|
||||
name="fas fa-gift" class="gift"></q-icon>
|
||||
</div>
|
||||
@@ -325,10 +440,32 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="mediatore">
|
||||
<div v-if="mediatore" class="">
|
||||
<div class="q-ma-sm">
|
||||
<div class="column justify-center items-center q-gutter-md tutor">
|
||||
<q-btn rounded color="blue"
|
||||
class="title-nave"
|
||||
:label="gettitlemediatore(true)"
|
||||
@click="Mostraplacca(donatore.riga, donatore.col)">
|
||||
</q-btn>
|
||||
|
||||
<!--<div class="title-nave clBorderSteps" v-html="gettitlemediatore(true)"></div>-->
|
||||
<div v-if="getTutor(mediatore)" class=" clBorderTutor q-ma-sm selezione cursor-pointer"
|
||||
@click="clickseluser({name: getTutor(mediatore), surname: '', username: getTutor_username(mediatore), profile: { cell: '' } })">
|
||||
{{ $t('dashboard.tutor') }}: {{getTutor(mediatore)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="isDefinitivaMediatore()" class="q-my-md">
|
||||
<div class="text-left" v-html="gettesto()"></div>
|
||||
|
||||
<!--
|
||||
<div>
|
||||
<q-input v-model="link_chat" :label="$t('dashboard.link_chat')"
|
||||
debounce="1000"
|
||||
@@ -348,21 +485,83 @@
|
||||
@click="InviaLinkChatADonatori(true)"></q-btn>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div v-if="nave.rec.mediatore.recsognatori">
|
||||
<div v-for="(sognatore, index) in nave.rec.mediatore.recsognatori"
|
||||
:key="10+index">
|
||||
<div :class="getclasselivello(index)">{{ getlivellostr(index, false)}}:</div>
|
||||
<div v-if="sognatore"
|
||||
:class="`cont_sognatore ` + getclassSelect(sognatore, true, index)">
|
||||
{{ sognatore.name }} {{ sognatore.surname }}
|
||||
({{sognatore.username }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div :class="getclasselivello(3)">{{ getlivellostr(3, false)}}:</div>
|
||||
<div
|
||||
:class="`cont_mediatore cursor-pointer selezione ` + getclassSelect(nave.rec.mediatore.recmediatore)"
|
||||
@click="clickseluser(nave.rec.mediatore.recmediatore)">
|
||||
{{ nave.rec.mediatore.recmediatore.name }} {{
|
||||
nave.rec.mediatore.recmediatore.surname }} ({{
|
||||
nave.rec.mediatore.recmediatore.username }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div :class="getclasselivello(4)">{{ getlivellostr(4, true)}}:</div>
|
||||
<div v-for="(terra, index) in nave.rec.mediatore.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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div :class="getclasselivello(5)">{{ getlivellostr(5, false)}}:</div>
|
||||
<div v-for="(aria, index) in nave.rec.mediatore.arraria" :key="index">
|
||||
<div v-if="aria" :class="`cont_donatore text-small ` + getclassSelect(aria)">
|
||||
{{ aria.name }} {{ aria.surname }} ({{
|
||||
aria.username
|
||||
}}) - {{
|
||||
aria.riga}}.{{aria.col}}<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="getclasselivello(6)">{{ getlivellostr(6)}}:</div>
|
||||
<div v-for="(donatore, index) in nave.rec.mediatore.arrdonatori" :key="index">
|
||||
|
||||
<div v-if="donatore"
|
||||
:class="`cont_donatore text-small row ` + getclassSelect(donatore)"
|
||||
@click="clickseluser(donatore)">
|
||||
<div>
|
||||
{{ getindex(donatore, index + 1) }} - {{ donatore.name }} {{
|
||||
donatore.surname }} ({{
|
||||
donatore.username }}) - {{
|
||||
donatore.riga}}.{{donatore.col}}<br>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<q-icon v-if="donatore.made_gift" color="green" inverted size="sm"
|
||||
name="fas fa-gift" class="gift"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CTitleBanner v-if="nave" class=""
|
||||
:title="$t('dashboard.sognatore')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="sognatore">
|
||||
<div v-if="mediatore" class="">
|
||||
<div v-if="sonoSognatore" class="q-ma-sm">
|
||||
<div class="text-evidente bordo_stondato justify-between q-pa-xs-sm">
|
||||
<div class="">
|
||||
@@ -385,36 +584,43 @@
|
||||
</div>
|
||||
</div>
|
||||
<q-table
|
||||
dense
|
||||
color="primary"
|
||||
dense
|
||||
flat
|
||||
table-style="padding: 0px;"
|
||||
:title="$t('dashboard.donatori')"
|
||||
:data="arrdonatori"
|
||||
:columns="coldonatori"
|
||||
:columns="getcol"
|
||||
:nodataLabel="$t('grid.nodata')"
|
||||
:Pagination.sync="MyPagination"
|
||||
row-key="index">
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<!--<q-td key="index" :props="props">
|
||||
<q-td v-if="!tools.isMobile()" key="index" :props="props">
|
||||
{{ props.row.index }}
|
||||
</q-td>-->
|
||||
</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">
|
||||
{{ props.row.name }}
|
||||
</q-td>
|
||||
<q-td key="surname" :props="props">
|
||||
{{ props.row.surname }}
|
||||
</q-td>
|
||||
<q-td key="posizione" :props="props">
|
||||
{{ props.row.riga }}.{{ props.row.col }}
|
||||
</q-td>
|
||||
<q-td key="date_made_gift" :props="props">
|
||||
{{ tools.getstrshortDateTime(props.row.date_made_gift) }}
|
||||
</q-td>
|
||||
<q-td key="tel" :props="props">
|
||||
<q-btn flat rounded color="blue"
|
||||
:label="props.row.profile.cell"
|
||||
<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)
|
||||
}}
|
||||
- {{ props.row.commento_al_sognatore }}
|
||||
</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">
|
||||
|
||||
@@ -434,16 +640,30 @@
|
||||
text-color="white"
|
||||
color="positive"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dashboard.dono_ricevuto_2', {donatore: props.row.name })
|
||||
{{ $t('dialog.ok')
|
||||
}}
|
||||
</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>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<!--<CTitleBanner v-if="!!getpartenza()" class=""
|
||||
:title="titolonave()"
|
||||
:bgcolor="getcolortitle()"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true" :visible="false" @apri="apri">-->
|
||||
|
||||
|
||||
<div v-if="mediatore" class="flex flex-center column justify-center">
|
||||
|
||||
|
||||
<q-dialog v-model="showmsguser">
|
||||
@@ -460,9 +680,11 @@
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div>
|
||||
<div v-if="!!seluser.profile">
|
||||
<div v-if="!!seluser.profile.cell" class="q-ma-sm text-center clBorderWarning">
|
||||
Whatsapp: {{seluser.profile.cell}}
|
||||
<q-btn
|
||||
|
||||
fab-mini
|
||||
icon="fab fa-whatsapp"
|
||||
color="white" text-color="green" type="a"
|
||||
@@ -471,9 +693,10 @@
|
||||
target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-ma-sm text-center clBorderSteps">
|
||||
<div>TELEGRAM {{$t('ws.sitename')}} BOT {{$t('dialog.sendmsg')}} -> {{seluser.name }} {{
|
||||
seluser.surname }}:
|
||||
<div>TELEGRAM {{$t('ws.sitename')}} BOT {{$t('dialog.sendmsg')}} ->
|
||||
{{seluser.name }} {{ seluser.surname }}:
|
||||
</div>
|
||||
<q-input type="textarea"
|
||||
autogrow
|
||||
@@ -490,11 +713,87 @@
|
||||
|
||||
</div>
|
||||
</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">
|
||||
<q-input
|
||||
bg-color="lightblue"
|
||||
v-model="username_sostituire"
|
||||
rounded outlined
|
||||
@blur="$v.username_sostituire.$touch"
|
||||
:error="$v.username_sostituire.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
label="Username Nuova Persona:">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-btn rounded color="warning" icon="fab fa-find"
|
||||
text-color="black"
|
||||
label="Cerca il primo Disponibile"
|
||||
@click="TrovaUserFree()"></q-btn>
|
||||
<div v-if="!!userfreestr">
|
||||
<q-field
|
||||
stack-label
|
||||
dense
|
||||
>
|
||||
<template v-slot:control>
|
||||
<div class="text-center" tabindex="0">{{userfreestr}}</div>
|
||||
</template>
|
||||
|
||||
</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="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"
|
||||
:disabled='!allowSubmit'
|
||||
@click="SostituisciUtente(seluser, username_sostituire, getnotifBotTxt)"></q-btn>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
|
||||
@@ -26,10 +26,12 @@ export default class CMyPopupEdit extends Vue {
|
||||
@Prop({ required: false, default: false }) public showall
|
||||
@Prop({ required: false, default: 'row' }) public view
|
||||
@Prop({ required: false, default: '5' }) public minuteinterval
|
||||
@Prop({ required: false, default: false }) public disable
|
||||
|
||||
public myvalue = ''
|
||||
public myvalueprec = 'false'
|
||||
public countryname = ''
|
||||
public visueditor : boolean = false
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
@@ -44,6 +46,7 @@ export default class CMyPopupEdit extends Vue {
|
||||
}
|
||||
|
||||
public changeval(newval) {
|
||||
console.log('changeval update:row', newval)
|
||||
this.$emit('update:row', newval)
|
||||
}
|
||||
|
||||
@@ -116,6 +119,10 @@ export default class CMyPopupEdit extends Vue {
|
||||
this.$emit('save', newVal, valinitial)
|
||||
}
|
||||
|
||||
public annulla(val) {
|
||||
this.$emit('annulla', true)
|
||||
}
|
||||
|
||||
public Savedb(newVal, valinitial) {
|
||||
|
||||
if (this.col.fieldtype === tools.FieldType.boolean) {
|
||||
@@ -131,6 +138,7 @@ export default class CMyPopupEdit extends Vue {
|
||||
// console.log('Savedb', newVal)
|
||||
|
||||
this.$emit('showandsave', this.row, this.col, newVal, valinitial)
|
||||
this.visueditor = false
|
||||
}
|
||||
|
||||
public visuValByType(val, col: IColGridTable, row) {
|
||||
|
||||
@@ -70,19 +70,27 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.boolean">
|
||||
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
||||
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
|
||||
@input="Savedb"></q-toggle>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.html">
|
||||
<div v-html="visuValByType(myvalue, col, row)">
|
||||
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ visuValByType(myvalue, col, row) }}
|
||||
</div>
|
||||
|
||||
<div v-if="col.fieldtype === tools.FieldType.html">
|
||||
|
||||
<CMyEditor v-if="visueditor" :value.sync="myvalue" :title="col.title" @keyup.enter.stop
|
||||
@showandsave="Savedb" @annulla="visueditor=false">
|
||||
|
||||
</CMyEditor>
|
||||
</div>
|
||||
<q-popup-edit
|
||||
v-if="canEdit"
|
||||
v-if="canEdit && col.fieldtype !== tools.FieldType.html"
|
||||
v-model="myvalue"
|
||||
:disable="col.disable"
|
||||
:title="col.title"
|
||||
@@ -126,15 +134,6 @@
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)">
|
||||
</CMyToggleList>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.html">
|
||||
<CMyEditor :value.sync="myvalue" :title="col.title" @keyup.enter.stop>
|
||||
|
||||
</CMyEditor>
|
||||
<!--<q-input v-model="myvalue"-->
|
||||
<!--autofocus-->
|
||||
<!--@keyup.enter.stop-->
|
||||
<!--type="textarea"></q-input>-->
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.select">
|
||||
<CMySelect :label="col.title"
|
||||
:value.sync="myvalue"
|
||||
@@ -209,6 +208,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyPopupEdit.ts">
|
||||
|
||||
@@ -10,7 +10,7 @@ import { CMyFieldDb } from '../CMyFieldDb'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CUserBadge } from '../CUserBadge'
|
||||
import { CLegenda } from '../CLegenda'
|
||||
import { IDashboard, IUserProfile } from '../../model'
|
||||
import { IDashboard, IDownline, IUserProfile } from '../../model'
|
||||
import { IUserFields } from '../../model/UserStore'
|
||||
import { CRequisito } from '../CRequisito'
|
||||
import translate from '../../globalroutines/util'
|
||||
@@ -28,8 +28,12 @@ import { shared_consts } from '../../common/shared_vuejs'
|
||||
|
||||
export default class CMyRequirement extends MixinUsers {
|
||||
@Prop({ required: true }) public myseluser
|
||||
@Prop({ required: false, default: -1 }) public ind_order_ingr: number
|
||||
@Prop({ required: false, default: -1 }) public id_listaingr: number
|
||||
@Prop({ required: true }) public mydashboard
|
||||
@Prop({ required: true }) public mydownline
|
||||
@Prop({ required: false, default: false }) public notitle
|
||||
@Prop({ required: false, default: false }) public showregalainv
|
||||
public $t
|
||||
public $v
|
||||
public $q
|
||||
@@ -39,7 +43,10 @@ export default class CMyRequirement extends MixinUsers {
|
||||
public dashboard: IDashboard = {
|
||||
myself: DefaultUser,
|
||||
aportador: DefaultUser,
|
||||
numpeople_aportador: 0,
|
||||
numpeople_aportador: 0
|
||||
}
|
||||
|
||||
public downline: IDownline = {
|
||||
downline: [],
|
||||
downnotreg: [],
|
||||
downbyuser: []
|
||||
@@ -51,6 +58,12 @@ export default class CMyRequirement extends MixinUsers {
|
||||
this.dashboard = this.mydashboard
|
||||
}
|
||||
|
||||
@Watch('mydownline')
|
||||
public changedl() {
|
||||
console.log('changedl')
|
||||
this.downline = this.mydownline
|
||||
}
|
||||
|
||||
@Watch('myusersel')
|
||||
public changemyusersel() {
|
||||
console.log('myseluser')
|
||||
@@ -115,7 +128,7 @@ export default class CMyRequirement extends MixinUsers {
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
{
|
||||
/*{
|
||||
icon: 'fas fa-video',
|
||||
textlang: 'steps.zoom',
|
||||
textadd(user) {
|
||||
@@ -143,7 +156,7 @@ export default class CMyRequirement extends MixinUsers {
|
||||
return false
|
||||
},
|
||||
info: '',
|
||||
},
|
||||
},*/
|
||||
{
|
||||
icon: 'far fa-credit-card',
|
||||
textlang: 'steps.paymenttype',
|
||||
@@ -151,20 +164,9 @@ export default class CMyRequirement extends MixinUsers {
|
||||
return ''
|
||||
},
|
||||
isok(user) {
|
||||
let ispaypal = false
|
||||
if (user) {
|
||||
if (!!user.profile.paymenttypes) {
|
||||
if (user.profile.paymenttypes.includes('paypal')) {
|
||||
if (user.profile.email_paypal) {
|
||||
ispaypal = true
|
||||
}
|
||||
}
|
||||
if (!!user.profile)
|
||||
if (!!user.profile.paymenttypes) {
|
||||
const ris = (user.profile.paymenttypes.length >= 1) && ispaypal
|
||||
return ris
|
||||
}
|
||||
|
||||
return UserStore.state.my.profile.paymenttypes.length > 1
|
||||
}
|
||||
}
|
||||
return false
|
||||
@@ -208,20 +210,35 @@ export default class CMyRequirement extends MixinUsers {
|
||||
|
||||
public created() {
|
||||
this.dashboard = this.mydashboard
|
||||
this.downline = this.mydownline
|
||||
this.seluser = this.myseluser
|
||||
|
||||
}
|
||||
|
||||
public async update_username() {
|
||||
|
||||
await UserStore.actions.getDashboard({ username: this.dashboard.myself.username }).then((ris) => {
|
||||
this.dashboard = ris
|
||||
|
||||
UserStore.actions.getDownline({ username: this.dashboard.myself.username }).then((ris2) => {
|
||||
this.downline = ris2
|
||||
this.$emit('aggiorna')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public isextralist(user) {
|
||||
return !!user.cell_complete
|
||||
}
|
||||
|
||||
public ismyinvited_notreg(user) {
|
||||
return this.dashboard.downnotreg.find((rec) => rec.ind_order === user.ind_order)
|
||||
// return this.dashboard.downnotreg.find((rec) => rec.ind_order === user.ind_order)
|
||||
}
|
||||
|
||||
public ismydownline(user) {
|
||||
return this.dashboard.downline.find((rec) => rec.username === user.username)
|
||||
return this.downline.downline.find((rec) => rec.username === user.username)
|
||||
}
|
||||
|
||||
public async deleteUserFromExtraList(user) {
|
||||
@@ -248,7 +265,20 @@ export default class CMyRequirement extends MixinUsers {
|
||||
|
||||
await tools.askConfirm(this.$q, translate('reg.regala_invitato'), translate('reg.regala_invitato') + ' ' + user.name + ' ' + user.surname + ' a ' + aportador_solidario + ' ?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.REGALA_INVITATO, 0, {
|
||||
param1: user,
|
||||
param2: aportador_solidario,
|
||||
param2: { aportador_solidario },
|
||||
param3: notiftxt
|
||||
})
|
||||
}
|
||||
|
||||
public async RegalaInvitante(user, invitante_username, ind_order_ingr, id_listaingr, notifBottxt) {
|
||||
let notiftxt = ''
|
||||
invitante_username = invitante_username.trim()
|
||||
if (this.notifBot)
|
||||
notiftxt = notifBottxt
|
||||
|
||||
await tools.askConfirm(this.$q, translate('reg.regala_invitante'), translate('reg.regala_invitante') + ' ' + user.name + ' ' + user.surname + ' a ' + invitante_username + ' ?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.REGALA_INVITANTE, 0, {
|
||||
param1: id_listaingr,
|
||||
param2: { invitante_username, ind_order_ingr, name: user.name, surname: user.surname },
|
||||
param3: notiftxt
|
||||
})
|
||||
}
|
||||
@@ -281,7 +311,9 @@ export default class CMyRequirement extends MixinUsers {
|
||||
get allowSubmit() {
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
if (!this.showregalainv) {
|
||||
error = error || (this.aportador_solidario === this.seluser.aportador_solidario)
|
||||
}
|
||||
|
||||
return !error
|
||||
|
||||
@@ -294,6 +326,12 @@ export default class CMyRequirement extends MixinUsers {
|
||||
})
|
||||
}
|
||||
|
||||
get getnotifBotTxtInvitante() {
|
||||
return this.$t('dashboard.ricevuto_dono_invitante', {
|
||||
mittente: this.dashboard.myself.username
|
||||
})
|
||||
}
|
||||
|
||||
get myclassreq() {
|
||||
let mycl = 'text-center'
|
||||
mycl += (this.ismydownline) ? ' ' + 'background-color: green;' : ''
|
||||
@@ -308,4 +346,16 @@ export default class CMyRequirement extends MixinUsers {
|
||||
return ''
|
||||
}
|
||||
|
||||
public isregalainvitante() {
|
||||
return this.ind_order_ingr >= 0
|
||||
}
|
||||
|
||||
public gettitleregala() {
|
||||
if (this.isregalainvitante())
|
||||
return this.$t('reg.regala_invitante')
|
||||
else
|
||||
return this.$t('reg.regala_invitato')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,31 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="ismydownline(seluser)">
|
||||
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('reg.regala_invitato')"
|
||||
<CTitleBanner class="shadow-2 rounded-borders"
|
||||
:title="$t('steps.sharemovement') + ` - ` + seluser.name + ` ` + seluser.surname + ``"
|
||||
bgcolor="bg-secondary"
|
||||
clcolor="text-white"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<div :class="myclassreq">
|
||||
|
||||
<div v-if="!isextralist(seluser)">
|
||||
<div v-for="(req, index) of arrrequisiti_liberi">
|
||||
<CRequisito :icon="req.icon" :text="$t(req.textlang, {botname: $t('ws.botname')}) + req.textadd(seluser)"
|
||||
:icon_error="geticonerror(false)"
|
||||
:no_check="true"
|
||||
:isok="req.isok(seluser)"
|
||||
:info="req.info"></CRequisito>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
<div v-if="(ismydownline(seluser) && seluser.username !== mydashboard.myself.username) || showregalainv">
|
||||
|
||||
<CTitleBanner class="shadow-2 rounded-borders" :title="gettitleregala()"
|
||||
bgcolor="bg-positive"
|
||||
clcolor="text-white"
|
||||
:visible="false"
|
||||
@@ -49,7 +72,12 @@
|
||||
|
||||
<q-toggle v-model="notifBot" :label="$t('dashboard.sendnotification')"/>
|
||||
|
||||
<q-btn class="q-ma-sm" rounded color="positive" text-color="white" icon="fas fa-gift"
|
||||
<q-btn v-if="isregalainvitante()" class="q-ma-sm" rounded color="positive" text-color="white" icon="fas fa-gift"
|
||||
:label="$t('reg.regala_invitante')"
|
||||
:disabled='!allowSubmit'
|
||||
@click="RegalaInvitante(seluser, aportador_solidario, ind_order_ingr, id_listaingr, getnotifBotTxtInvitante)"></q-btn>
|
||||
|
||||
<q-btn v-else class="q-ma-sm" rounded color="positive" text-color="white" icon="fas fa-gift"
|
||||
:label="$t('reg.regala_invitato')"
|
||||
:disabled='!allowSubmit'
|
||||
@click="RegalaInvitato(seluser, aportador_solidario, getnotifBotTxt)"></q-btn>
|
||||
@@ -72,27 +100,6 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<CTitleBanner class="shadow-2 rounded-borders"
|
||||
:title="$t('steps.sharemovement') + ` - ` + seluser.name + ` ` + seluser.surname + ``"
|
||||
bgcolor="bg-secondary"
|
||||
clcolor="text-white"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<div :class="myclassreq">
|
||||
|
||||
<div v-if="!isextralist(seluser)">
|
||||
<div v-for="(req, index) of arrrequisiti_liberi">
|
||||
<CRequisito :icon="req.icon" :text="$t(req.textlang, {botname: $t('ws.botname')}) + req.textadd(seluser)"
|
||||
:icon_error="geticonerror(false)"
|
||||
:no_check="true"
|
||||
:isok="req.isok(seluser)"
|
||||
:info="req.info"></CRequisito>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
<!--<div v-else>
|
||||
<div class="column justify-center q-gutter-sm q-pa-sm">
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { CCopyBtn } from '../CCopyBtn'
|
||||
import { date } from 'quasar'
|
||||
|
||||
@Component({
|
||||
name: 'CStatusReg',
|
||||
name: 'CNextZoom',
|
||||
components: { CTitleBanner, CCardState, CCopyBtn }
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.nextzoom')" bgcolor="bg-primary" clcolor="text-white"
|
||||
<CTitleBanner v-if="listacalzoom.length > 0" class="q-pa-xs" :title="$t('pages.nextzoom')"
|
||||
bgcolor="bg-primary" clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
|
||||
|
||||
<div class="flex flex-center">
|
||||
|
||||
<div class="row animazione justify-center q-gutter-md">
|
||||
|
||||
<q-btn v-if="showzoom" size="md" type="a" :href="tools.getLinkZoom()"
|
||||
target="_blank" rounded color="white" text-color="primary" icon="fas fa-video" :label="$t('steps.entra_zoom')">
|
||||
target="_blank" rounded color="white" text-color="primary" icon="fas fa-video"
|
||||
:label="$t('steps.entra_zoom')">
|
||||
</q-btn>
|
||||
|
||||
<transition-group name="fade" mode="out-in"
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(confer, index) in listacalzoom" :key="confer._id" class="q-mb-xs animated clBorderZoom q-pa-sm" v-ripple>
|
||||
<q-item v-for="(confer, index) in listacalzoom" :key="confer._id"
|
||||
class="q-mb-xs animated clBorderZoom q-pa-sm" v-ripple>
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-avatar v-if="tools.geticon(confer.lang)" :class="tools.geticon(confer.lang)" size="sm">
|
||||
<q-avatar v-if="tools.geticon(confer.lang)" :class="tools.geticon(confer.lang)"
|
||||
size="sm">
|
||||
</q-avatar>
|
||||
<q-avatar v-else color="primary" text-color="white" class="text-center">
|
||||
{{ tools.capitalize(confer.lang) }}
|
||||
@@ -28,7 +33,13 @@
|
||||
|
||||
<q-item-section class="text-center">
|
||||
<q-item-label class="title">{{ confer.title }}</q-item-label>
|
||||
<q-item-label class="zoom_data">{{ tools.getstrDateMonthWeekTimeShort(confer.date_start) }}</q-item-label>
|
||||
<q-item-label class="text-center">
|
||||
<q-icon v-if="confer.benvenuto" name="fas fa-check" size="md" color="blue"></q-icon>
|
||||
<q-icon v-if="!!confer.icon" :name="confer.icon" size="md" inverted :color="confer.color"></q-icon>
|
||||
</q-item-label>
|
||||
<q-item-label class="zoom_data">{{
|
||||
tools.getstrDateMonthWeekTimeShort(confer.date_start) }}
|
||||
</q-item-label>
|
||||
<q-item-label class="note">
|
||||
<q-chip
|
||||
style="background-color: lightblue !important;"
|
||||
@@ -37,6 +48,9 @@
|
||||
>{{ confer.note }}
|
||||
</q-chip>
|
||||
</q-item-label>
|
||||
<q-item-label class="link">
|
||||
<a :href="getlinkzoom(confer)" target="_blank">{{getlinkzoom(confer)}}</a>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</transition-group>
|
||||
|
||||
12
src/components/CProductCard/CProductCard.scss
Executable file
12
src/components/CProductCard/CProductCard.scss
Executable file
@@ -0,0 +1,12 @@
|
||||
.card .product-image {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.text-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.centeritems{
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
113
src/components/CProductCard/CProductCard.ts
Executable file
113
src/components/CProductCard/CProductCard.ts
Executable file
@@ -0,0 +1,113 @@
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { CTitleBanner } from '@components'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { GlobalStore } from '../../store'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
|
||||
import { date } from 'quasar'
|
||||
import { IOrder, IProduct } from '@src/model'
|
||||
import { Products, UserStore } from '@store'
|
||||
|
||||
@Component({
|
||||
name: 'CProductCard',
|
||||
components: { CTitleBanner, CCardState, CCopyBtn }
|
||||
})
|
||||
|
||||
export default class CProductCard extends MixinBase {
|
||||
public $t
|
||||
@Prop({ required: true }) public product: IProduct
|
||||
@Prop({
|
||||
required: false,
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
idapp: process.env.APP_ID,
|
||||
quantity: 1,
|
||||
idStorehouse: ''
|
||||
}
|
||||
}
|
||||
}) public order: IOrder
|
||||
|
||||
public iconWhishlist(order: IProduct) {
|
||||
if (true) {
|
||||
return 'far fa-heart'
|
||||
} else {
|
||||
return 'fas fa-heart'
|
||||
}
|
||||
}
|
||||
|
||||
public decqty() {
|
||||
if (this.order.quantity > 0)
|
||||
this.order.quantity--
|
||||
}
|
||||
|
||||
public addqty() {
|
||||
if (this.order.quantity < 10)
|
||||
this.order.quantity++
|
||||
}
|
||||
|
||||
public addtoCart() {
|
||||
|
||||
// Controlla se esiste già nel carrello il prodotto
|
||||
if (Products.getters.existProductInCart(this.product._id)) {
|
||||
tools.showNegativeNotif(this.$q, 'Questo prodotto è stato già aggiunto al Carrello')
|
||||
} else {
|
||||
Products.actions.addToCart({ product: this.product, order: this.order }).then((ris) => {
|
||||
let strprod = 'prodotto'
|
||||
if (this.order.quantity > 1)
|
||||
strprod = 'prodotti'
|
||||
if (ris)
|
||||
tools.showPositiveNotif(this.$q, 'Hai Aggiunto ' + this.order.quantity + ' ' + strprod + ' al Carrello')
|
||||
else
|
||||
tools.showNegativeNotif(this.$q, 'Errore durante l\'inserimento del prodotto sul carrello, riprovare.')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public getnumstore() {
|
||||
if (!!this.product.storehouses)
|
||||
return this.product.storehouses.length
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
public getSingleStorehouse() {
|
||||
const mystore = this.product.storehouses[0]
|
||||
return mystore.name + ' (' + mystore.city + ')'
|
||||
}
|
||||
|
||||
public getStorehouses() {
|
||||
|
||||
const myarr = []
|
||||
let ind = 1
|
||||
this.product.storehouses.forEach((store) => {
|
||||
myarr.push(
|
||||
{
|
||||
id: ind,
|
||||
label: store.name + ' (' + store.city + ')',
|
||||
value: store._id
|
||||
})
|
||||
|
||||
ind++
|
||||
})
|
||||
|
||||
// console.log('arraystore', myarr)
|
||||
return myarr
|
||||
}
|
||||
|
||||
get checkifCartDisable() {
|
||||
return !this.order.idStorehouse
|
||||
}
|
||||
|
||||
public infoproduct() {
|
||||
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (this.product.storehouses.length === 1) {
|
||||
this.order.idStorehouse = this.product.storehouses[0]._id
|
||||
}
|
||||
}
|
||||
}
|
||||
94
src/components/CProductCard/CProductCard.vue
Executable file
94
src/components/CProductCard/CProductCard.vue
Executable file
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<q-card class="my-card">
|
||||
<img :src="`statics/` + product.img" :alt="product.name">
|
||||
|
||||
<q-card-section>
|
||||
<q-btn
|
||||
fab
|
||||
color="primary"
|
||||
icon="fas fa-info"
|
||||
class="absolute"
|
||||
style="top: 0; right: 12px; transform: translateY(-50%);"
|
||||
@click="infoproduct"
|
||||
/>
|
||||
|
||||
<div class="row items-center">
|
||||
<div class="text-h7">
|
||||
{{ product.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="text-title text-grey-9">
|
||||
<span class="text-grey-7">{{ product.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div class="text-grey text-title row items-center q-mt-sm">
|
||||
<q-icon name="map" class="q-mr-xs"/>
|
||||
Origine: <span class="text-blue q-ml-xs text-h8"> {{ product.producer.city }} ({{
|
||||
product.producer.region
|
||||
}})</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="text-grey text-title row items-center">
|
||||
<q-icon name="place" class="q-mr-xs"/>
|
||||
Produttore: <span class="text-black q-ml-xs text-h8"> {{ product.producer.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<q-rating v-model="product.stars" :max="5" size="32px" readonly/>-->
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row q-mb-sm no-wrap items-center centeritems">
|
||||
<div class="text-price q-mr-md no-wrap">
|
||||
€ {{ product.price.toFixed(2) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mb-sm no-wrap items-center centeritems">
|
||||
<q-btn round size="xs" text-color="grey" icon="fas fa-minus" @click="decqty"></q-btn>
|
||||
<q-field outlined dense style="width: 40px; height: 30px;" class="q-mx-xs">
|
||||
<template v-slot:control>
|
||||
<div class="self-center no-outline" tabindex="0">{{ order.quantity }}</div>
|
||||
</template>
|
||||
</q-field>
|
||||
<q-btn round size="xs" text-color="grey" icon="fas fa-plus" @click="addqty"></q-btn>
|
||||
</div>
|
||||
<div class="text-blue text-title row items-center q-mr-md centeritems">
|
||||
<q-icon size="sm" name="fas fa-shipping-fast" class="q-mr-sm"/>
|
||||
Ritiro presso:
|
||||
</div>
|
||||
<div class="text-green-6 text-title row items-center q-my-sm centeritems">
|
||||
|
||||
<div v-if="getnumstore() > 1">
|
||||
<q-select
|
||||
outlined v-model="order.idStorehouse"
|
||||
:options="getStorehouses()"
|
||||
label="Magazzino:" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span class="text-title text-center">{{ getSingleStorehouse() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator/>
|
||||
|
||||
<q-card-actions vertical align="center">
|
||||
<q-btn icon="fas fa-cart-plus" color="primary" :disable="checkifCartDisable" rounded size="md" label="Aggiungi al Carrello" @click="addtoCart">
|
||||
</q-btn>
|
||||
<q-btn :icon="iconWhishlist(product)" flat color="primary" rounded label="Lista Desideri">
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CProductCard.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CProductCard.scss';
|
||||
</style>
|
||||
1
src/components/CProductCard/index.ts
Executable file
1
src/components/CProductCard/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CProductCard} from './CProductCard.vue'
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="q-ma-sm">
|
||||
<div :class="getcl">
|
||||
<div :class="getcl + ' text-center'" style="margin-left: auto; margin-right: auto;">
|
||||
<div v-if="statebool" v-html="msgTrue"></div>
|
||||
<div v-else v-html="msgFalse"></div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ import { validationMixin } from 'vuelidate'
|
||||
import { Logo } from '../../components/logo'
|
||||
import { DefaultProfile } from '../../store/Modules/UserStore'
|
||||
|
||||
import 'vue-country-code/dist/vue-country-code.css'
|
||||
// import 'vue-country-code/dist/vue-country-code.css'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
rounded outlined
|
||||
@blur="$v.signup.username.$touch"
|
||||
:error="$v.signup.username.$error"
|
||||
@keydown.native.54="(event) => event.preventDefault()"
|
||||
@keydown.native.52="(event) => event.preventDefault()"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist, alfanum } from '../../validation'
|
||||
|
||||
export interface TSignup { signup: ISignupOptions, validationGroup: string[] }
|
||||
|
||||
@@ -19,6 +19,7 @@ export const validations = {
|
||||
username: {
|
||||
required,
|
||||
minLength: minLength(6),
|
||||
alfanum,
|
||||
registereduser
|
||||
},
|
||||
name: {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { validationMixin } from 'vuelidate'
|
||||
import { Logo } from '../../components/logo'
|
||||
import { DefaultProfile } from '../../store/Modules/UserStore'
|
||||
|
||||
import 'vue-country-code/dist/vue-country-code.css'
|
||||
// import 'vue-country-code/dist/vue-country-code.css'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<q-banner
|
||||
v-if="!nuovareg"
|
||||
rounded
|
||||
@@ -24,6 +25,8 @@
|
||||
<span class="mybanner">{{ $t('reg.nuove_registrazioni')}}</span>
|
||||
</q-banner>
|
||||
|
||||
-->
|
||||
|
||||
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
|
||||
|
||||
<div class="q-gutter-sm">
|
||||
@@ -84,6 +87,8 @@
|
||||
rounded outlined
|
||||
@blur="$v.signup.username.$touch"
|
||||
:error="$v.signup.username.$error"
|
||||
@keydown.native.54="(event) => event.preventDefault()"
|
||||
@keydown.native.52="(event) => event.preventDefault()"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
@@ -12,7 +12,7 @@ import { validationMixin } from 'vuelidate'
|
||||
import { Logo } from '../../components/logo'
|
||||
import { DefaultProfile } from '../../store/Modules/UserStore'
|
||||
|
||||
import 'vue-country-code/dist/vue-country-code.css'
|
||||
// import 'vue-country-code/dist/vue-country-code.css'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
|
||||
@@ -3,27 +3,10 @@
|
||||
<div class="text-center">
|
||||
<p>
|
||||
<logo mystyle="height:200px;"></logo>
|
||||
<CTitleBanner :title="gettitlereg"></CTitleBanner>
|
||||
<CTitleBanner :title="gettitlereg" :canopen="false"></CTitleBanner>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<q-banner
|
||||
v-if="!nuovareg"
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center; font-size:1rem;">
|
||||
<span class="mybanner" v-html="$t('reg.reg_lista_prec')"></span>
|
||||
</q-banner>
|
||||
|
||||
<br>
|
||||
<q-banner
|
||||
v-if="!nuovareg"
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
style="text-align: center; font-size:1rem;">
|
||||
<span class="mybanner">{{ $t('reg.nuove_registrazioni')}}</span>
|
||||
</q-banner>
|
||||
|
||||
<!--Prova URL : {{env('PROVA_PAOLO')}}-->
|
||||
|
||||
<div class="q-gutter-sm">
|
||||
@@ -84,6 +67,8 @@
|
||||
rounded outlined
|
||||
@blur="$v.signup.username.$touch"
|
||||
:error="$v.signup.username.$error"
|
||||
@keydown.native.52="(event) => event.preventDefault()"
|
||||
@keydown.native.54="(event) => event.preventDefault()"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
@@ -4,6 +4,7 @@ import { CSignIn } from '../../components/CSignIn'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
|
||||
@Component({
|
||||
name: 'CSigninNoreg',
|
||||
components: { CSignIn }
|
||||
})
|
||||
|
||||
|
||||
16
src/components/CSingleCart/CSingleCart.scss
Executable file
16
src/components/CSingleCart/CSingleCart.scss
Executable file
@@ -0,0 +1,16 @@
|
||||
.text-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.centeritems{
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
.imgNormal{
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
.imgSmall{
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
53
src/components/CSingleCart/CSingleCart.ts
Executable file
53
src/components/CSingleCart/CSingleCart.ts
Executable file
@@ -0,0 +1,53 @@
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { CTitleBanner } from '@components'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { GlobalStore } from '../../store'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
|
||||
import { date } from 'quasar'
|
||||
import { IOrder, IProduct } from '@src/model'
|
||||
import { Products, UserStore } from '@store'
|
||||
|
||||
@Component({
|
||||
components: { CTitleBanner, CCardState, CCopyBtn }
|
||||
})
|
||||
|
||||
export default class CSingleCart extends MixinBase {
|
||||
public $t
|
||||
@Prop({ required: true }) public order: IOrder
|
||||
@Prop({ required: false, default: false }) public showall: boolean
|
||||
|
||||
get myimgclass() {
|
||||
if (this.showall) {
|
||||
return 'imgNormal'
|
||||
} else {
|
||||
return 'imgSmall'
|
||||
}
|
||||
}
|
||||
|
||||
public addsubqty(addqty, subqty) {
|
||||
if (addqty) {
|
||||
if (this.order.quantity >= 10)
|
||||
return false
|
||||
}
|
||||
|
||||
if (subqty) {
|
||||
if (this.order.quantity === 0)
|
||||
return false
|
||||
}
|
||||
|
||||
Products.actions.addSubQtyToItem({
|
||||
addqty,
|
||||
subqty,
|
||||
order: this.order
|
||||
}).then((newqty) => {
|
||||
this.order.quantity = newqty
|
||||
})
|
||||
}
|
||||
|
||||
public removeFromCard() {
|
||||
Products.actions.removeFromCart({ order: this.order })
|
||||
}
|
||||
}
|
||||
45
src/components/CSingleCart/CSingleCart.vue
Executable file
45
src/components/CSingleCart/CSingleCart.vue
Executable file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="q-pa-xs q-gutter-xs">
|
||||
|
||||
<div class="row items-center justify-evenly no-wrap">
|
||||
<div class="col-2 text-h6 ellipsis">
|
||||
<img v-if="" :src="`statics/` + order.product.img" :alt="order.product.name" :class="myimgclass">
|
||||
</div>
|
||||
<div class="col-4 q-ml-xs">
|
||||
{{ order.product.name }}
|
||||
<div v-if="showall">
|
||||
<br><span class="text-grey">{{ order.product.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="row q-mb-xs no-wrap items-center centeritems">
|
||||
<q-btn v-if="showall" round size="xs" text-color="grey" icon="fas fa-minus"
|
||||
@click="addsubqty(false, true)"></q-btn>
|
||||
<!--<q-field outlined dense style="width: 25px; height: 20px; " class="q-mx-xs text-subtitle4">
|
||||
<template v-slot:control>
|
||||
<div class="self-center no-outline" tabindex="0" >{{ order.quantity }}</div>
|
||||
</template>
|
||||
</q-field>-->
|
||||
<div class="q-mx-sm text-blue-14">{{ order.quantity }}</div>
|
||||
<q-btn v-if="showall" round size="xs" text-color="grey" icon="fas fa-plus"
|
||||
@click="addsubqty(true, false)"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 no-wrap text-subtitle3 q-mr-sm">
|
||||
€ {{ (order.price * order.quantity).toFixed(2) }}
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<q-btn icon="fas fa-times" color="negative" round size="xs" @click="removeFromCard">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSingleCart.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CSingleCart.scss';
|
||||
</style>
|
||||
1
src/components/CSingleCart/index.ts
Executable file
1
src/components/CSingleCart/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CSingleCart} from './CSingleCart.vue'
|
||||
@@ -16,6 +16,7 @@ import { CRequisiti } from '../CRequisiti'
|
||||
import { shared_consts } from '../../common/shared_vuejs'
|
||||
import { CGuidelines } from '../CGuidelines'
|
||||
import { CVideoPromo } from '../CVideoPromo'
|
||||
import { lists } from '../../store/Modules/lists'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -49,6 +50,16 @@ export default class CStatus extends MixinBase {
|
||||
return 0
|
||||
}
|
||||
|
||||
private DiceDiAverPartec: boolean = false
|
||||
|
||||
/*@Watch('UserStore.state.my.profile.ask_zoom_partecipato', { immediate: true, deep: true })
|
||||
public array_changed() {
|
||||
console.log('*** ask_zoom_partecipato *** ', '[', UserStore.state.my.profile.ask_zoom_partecipato, ']')
|
||||
if (UserStore.state.my.profile.ask_zoom_partecipato !== undefined)
|
||||
this.DiceDiAverPartec = UserStore.state.my.profile.ask_zoom_partecipato
|
||||
console.log('*** this.DiceDiAverPartec *** ', '[', this.DiceDiAverPartec, ']')
|
||||
}*/
|
||||
|
||||
public arrsteps = [
|
||||
// {
|
||||
// title: 'steps.chat_biblio',
|
||||
@@ -132,7 +143,7 @@ export default class CStatus extends MixinBase {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
{
|
||||
/*{
|
||||
title: 'steps.zoom',
|
||||
descr: 'steps.zoom_long',
|
||||
page: '/zoom',
|
||||
@@ -169,24 +180,13 @@ export default class CStatus extends MixinBase {
|
||||
funcko() {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},*/
|
||||
{
|
||||
title: 'steps.paymenttype',
|
||||
descr: 'steps.paymenttype_long',
|
||||
page: '',
|
||||
funccheck(index) {
|
||||
let ispaypal = false
|
||||
if (UserStore.state.my.profile.paymenttypes) {
|
||||
if (UserStore.state.my.profile.paymenttypes.includes('paypal')) {
|
||||
if (UserStore.state.my.profile.email_paypal)
|
||||
ispaypal = true
|
||||
}
|
||||
if (UserStore.state.my.profile)
|
||||
if (UserStore.state.my.profile.paymenttypes)
|
||||
return (UserStore.state.my.profile.paymenttypes.length >= 1) && ispaypal
|
||||
|
||||
}
|
||||
return false
|
||||
return UserStore.state.my.profile.paymenttypes.length > 1
|
||||
},
|
||||
funccheck_error(index) {
|
||||
return true
|
||||
@@ -250,8 +250,8 @@ export default class CStatus extends MixinBase {
|
||||
funcko() {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
{
|
||||
}
|
||||
/*{
|
||||
title: 'steps.collaborate',
|
||||
descr: 'steps.collaborate_long',
|
||||
page: '/collaborate',
|
||||
@@ -318,7 +318,7 @@ export default class CStatus extends MixinBase {
|
||||
funcko() {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},*/
|
||||
]
|
||||
|
||||
public setstep() {
|
||||
@@ -344,10 +344,12 @@ export default class CStatus extends MixinBase {
|
||||
}
|
||||
|
||||
public created() {
|
||||
this.DiceDiAverPartec = UserStore.state.my.profile.ask_zoom_partecipato
|
||||
// this.my_dream = UserStore.state.my.profile.my_dream
|
||||
|
||||
this.setstep()
|
||||
this.setsteptodo()
|
||||
|
||||
this.my_dream = UserStore.state.my.profile.my_dream
|
||||
}
|
||||
|
||||
public change_mydream() {
|
||||
@@ -452,24 +454,6 @@ export default class CStatus extends MixinBase {
|
||||
return UserStore.state.my.profile.paymenttypes
|
||||
}
|
||||
|
||||
get isselectPaypal() {
|
||||
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('paypal')) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
get TelegramBiblio() {
|
||||
return 'https://t.me/joinchat/AL2qKExZKvenLgpVhOyefQ'
|
||||
}
|
||||
|
||||
public geticonstep(mystep) {
|
||||
if (!!mystep.icon)
|
||||
return mystep.icon
|
||||
@@ -506,9 +490,8 @@ export default class CStatus extends MixinBase {
|
||||
|
||||
get CompletatoRequisiti() {
|
||||
try {
|
||||
return this.VistoZoom && this.RequisitoPayment &&
|
||||
return this.RequisitoPayment &&
|
||||
this.TelegVerificato &&
|
||||
(UserStore.state.my.profile.my_dream.length >= 10) &&
|
||||
tools.isBitActive(UserStore.state.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI.value) &&
|
||||
tools.isBitActive(UserStore.state.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_READ_GUIDELINES.value)
|
||||
}catch (e) {
|
||||
@@ -517,24 +500,17 @@ export default class CStatus extends MixinBase {
|
||||
|
||||
}
|
||||
|
||||
/*public hagiapartecipato() {
|
||||
tools.AskGiaPartecipatoZoom(this, UserStore.state.my)
|
||||
}*/
|
||||
|
||||
get Completato9Req() {
|
||||
// return tools.Is9ReqOk(this.dashboard.myself)
|
||||
return this.CompletatoRequisiti && (this.getnuminvitati_attivi() >= 2)
|
||||
}
|
||||
|
||||
get RequisitoPayment() {
|
||||
let ispaypal = false
|
||||
if (UserStore.state.my.profile.paymenttypes) {
|
||||
if (UserStore.state.my.profile.paymenttypes.includes('paypal')) {
|
||||
if (UserStore.state.my.profile.email_paypal)
|
||||
ispaypal = true
|
||||
}
|
||||
if (UserStore.state.my.profile)
|
||||
if (UserStore.state.my.profile.paymenttypes)
|
||||
return (UserStore.state.my.profile.paymenttypes.length >= 1) && ispaypal
|
||||
|
||||
}
|
||||
return false
|
||||
return (UserStore.state.my.profile.paymenttypes.length > 1)
|
||||
}
|
||||
|
||||
get percstep() {
|
||||
@@ -552,7 +528,7 @@ export default class CStatus extends MixinBase {
|
||||
}
|
||||
|
||||
get progressstep() {
|
||||
return this.$t(this.arrsteps[this.steptodo].title)
|
||||
return this.$t(this.arrsteps[this.steptodo].title, {botname: this.$t('ws.botname')})
|
||||
}
|
||||
|
||||
get strpercstep() {
|
||||
@@ -563,6 +539,10 @@ export default class CStatus extends MixinBase {
|
||||
return this.getstep >= this.NUMSTEP_OBBLIGATORI
|
||||
}
|
||||
|
||||
public NoPartNoZoom() {
|
||||
return !this.DiceDiAverPartec && !this.VistoZoom
|
||||
}
|
||||
|
||||
public scrolltostep(mystep) {
|
||||
this.step = mystep
|
||||
if (mystep > 0)
|
||||
@@ -572,6 +552,18 @@ export default class CStatus extends MixinBase {
|
||||
|
||||
}
|
||||
|
||||
public Callback(funz) {
|
||||
console.log('callback')
|
||||
if (funz === lists.MenuAction.ZOOM_GIA_PARTECIPATO) {
|
||||
UserStore.mutations.setDiceDiAverPartecipato(true)
|
||||
this.DiceDiAverPartec = UserStore.state.my.profile.ask_zoom_partecipato
|
||||
// UserStore.state.my.profile.ask_zoom_partecipato = true
|
||||
|
||||
console.log('UserStore.state.my.profile.ask_zoom_partecipato = true')
|
||||
console.log('this.DiceDiAverPartec', this.DiceDiAverPartec)
|
||||
}
|
||||
}
|
||||
|
||||
public nextstep(index) {
|
||||
this.step = index + 1
|
||||
this.setsteptodo()
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="CompletatoRequisiti" class="centermydiv">
|
||||
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
|
||||
:label="$t('dashboard.entra_in_lavagna')"></q-btn>
|
||||
</div>
|
||||
|
||||
<CTitleBanner class="text-center" :title="$t('home.guida_passopasso')" bgcolor="bg-primary" clcolor="text-white"
|
||||
mystyle="" myclass="myshad" :canopen="true">
|
||||
|
||||
|
||||
<q-stepper
|
||||
v-model="step"
|
||||
vertical
|
||||
@@ -77,7 +81,7 @@
|
||||
<div v-else>
|
||||
<br>
|
||||
<q-btn color="primary" icon="fab fa-telegram"
|
||||
:label="$t('components.authentication.telegram.openbot')"
|
||||
:label="$t('components.authentication.telegram.openbot', {botname: $t('ws.botname')})"
|
||||
type="a"
|
||||
:href="getLinkBotTelegram" target="_blank"></q-btn>
|
||||
<br>
|
||||
@@ -97,9 +101,27 @@
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.paymenttype'">
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('pages.sitename')})"></div>
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_revolut')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="nST5iHM2LbE">
|
||||
|
||||
</CVideo>
|
||||
|
||||
<q-btn class="q-ma-md" size="md" type="a" href="https://www.revolut.com/"
|
||||
target="_blank" rounded color="primary" icon="info"
|
||||
:label="$t('steps.paymenttype_revolut_link')">
|
||||
</q-btn>
|
||||
|
||||
</CTitleBanner>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_paypal')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
@@ -123,28 +145,14 @@
|
||||
|
||||
</CTitleBanner>
|
||||
</CTitleBanner>
|
||||
-->
|
||||
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_revolut')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="nST5iHM2LbE">
|
||||
|
||||
</CVideo>
|
||||
|
||||
<q-btn class="q-ma-md" size="md" type="a" href="https://www.revolut.com/"
|
||||
target="_blank" rounded color="primary" icon="info"
|
||||
:label="$t('steps.paymenttype_revolut_link')">
|
||||
</q-btn>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<div>
|
||||
|
||||
<CRequisiti :statebool="RequisitoPayment" :msgTrue="$t('steps.paymenttype_long2')"
|
||||
<!--<CRequisiti :statebool="RequisitoPayment" :msgTrue="$t('steps.paymenttype_long2')"
|
||||
:msgFalse="$t('steps.paymenttype_long2')">
|
||||
</CRequisiti>
|
||||
</CRequisiti>-->
|
||||
|
||||
<CMyFieldDb :title="$t('reg.paymenttype')"
|
||||
table="users"
|
||||
@@ -154,58 +162,92 @@
|
||||
jointable="paymenttypes">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="isselectPaypal" :title="$t('reg.email_paypal')"
|
||||
<CMyFieldDb v-if="tools.isselectRevolut()" :title="$t('reg.revolut')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="revolut"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="tools.isselectPaypal()"
|
||||
:title="$t('reg.email_paypal')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="email_paypal"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="tools.isselectPayeer()"
|
||||
:title="$t('reg.payeer_id')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="payeer_id"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="tools.isselectAdvCash()"
|
||||
:title="$t('reg.advcash_id')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="advcash_id"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="tools.isselectPaypal()"
|
||||
:title="$t('reg.link_payment')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="link_payment"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
|
||||
<CMyFieldDb :title="$t('reg.note_payment')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="note_payment"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div v-else-if="mystep.title === 'steps.dream'">
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
|
||||
</div>
|
||||
<q-input v-model="my_dream" :label="$t('steps.dream')+' (min. 10):'"
|
||||
type="textarea" debounce="1000"
|
||||
input-class="myinput-area-big"
|
||||
autogrow
|
||||
@input="change_mydream"
|
||||
@input="change_mydream">
|
||||
|
||||
></q-input>
|
||||
|
||||
<!--
|
||||
<CMyFieldDb :title="$t('reg.my_dream')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="my_dream"
|
||||
:type="tools.FieldType.string"
|
||||
>
|
||||
</CMyFieldDb>
|
||||
-->
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.chat_biblio'">
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
</div>
|
||||
<br><strong>Entra in Chat BiblioBacheca, cliccando qui:</strong>
|
||||
|
||||
<div class="landing__footer-icons row flex-center margin_buttons">
|
||||
<a v-if="!!TelegramBiblio" :href="TelegramBiblio" target="_blank">
|
||||
<i aria-hidden="true" class="q-icon fab fa-telegram icon_contact links"></i></a>
|
||||
</div>
|
||||
</q-input>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-else-if="mystep.title === 'steps.zoom'">
|
||||
|
||||
<CRequisiti :statebool="VistoZoom" :msgTrue="$t('steps.zoom_si_partecipato')"
|
||||
:msgFalse="$t('steps.zoom_no_partecipato')">
|
||||
</CRequisiti>
|
||||
|
||||
<div v-if="NoPartNoZoom()">
|
||||
<q-btn rounded color="blue" @click="hagiapartecipato()"
|
||||
:label="$t('steps.zoom_gia_partecipato')"></q-btn>
|
||||
<br>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CRequisiti v-if="!VistoZoom" :statebool="true" :msgTrue="$t('steps.zoom_richiesta_inviata')"
|
||||
msgFalse="">
|
||||
</CRequisiti>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
|
||||
</div>
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.zoom_what')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
@@ -216,13 +258,16 @@
|
||||
</CVideo>
|
||||
|
||||
<div v-if="toolsext.isLang('it')">
|
||||
<h3>ISTRUZIONI ZOOM</h3>
|
||||
<h3>ISTRUZIONI ZOOM Cloud Meeting</h3>
|
||||
|
||||
<ul style="text-align: left; font-size:0.75rem;">
|
||||
<li>1. Scarica l'app (<a
|
||||
<li>1. Scarica l'app per: (<a
|
||||
href="https://play.google.com/store/apps/details?id=us.zoom.videomeetings"
|
||||
target="_blank">store</a> o <a href="https://zoom.us/support/download"
|
||||
target="_blank">da PC</a>)
|
||||
target="_blank">Android</a> o per
|
||||
<a href="https://apps.apple.com/us/app/zoom-cloud-meetings/id546505307" target="_blank">iPhone</a>
|
||||
o per
|
||||
<a href="https://zoom.us/support/download" target="_blank">PC Desktop</a>
|
||||
)
|
||||
</li>
|
||||
<li>2. Inserisci il tuo Nome e Cognome per essere riconosciuto</li>
|
||||
<li>3. Clicca "join meeting"</li>
|
||||
@@ -267,7 +312,8 @@
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div v-else-if="mystep.title === 'steps.sharemovement'">
|
||||
|
||||
<!--<CRequisiti :statebool="getnuminvitati() >= 2" :msgTrue="$t('steps.sharemovement_hai_invitato')"
|
||||
@@ -278,7 +324,7 @@
|
||||
:label="$t('pages.dashboard')"></q-btn>
|
||||
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-center q-ma-sm">
|
||||
@@ -315,37 +361,35 @@
|
||||
|
||||
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="mystep.title === 'steps.enter_prog'">
|
||||
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
|
||||
</div>
|
||||
|
||||
<div v-if="CompletatoRequisiti && !Completato9Req">
|
||||
<CRequisiti :statebool="CompletatoRequisiti" :msgTrue="$t('steps.enter_prog_requisiti_ok')"
|
||||
:msgFalse="$t('steps.enter_prog_completa_requisiti')">
|
||||
</CRequisiti>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<CRequisiti v-if="Completato9Req" :statebool="Completato9Req"
|
||||
:msgTrue="$t('steps.enter_nave_9req_ok', {sitename: $t('pages.sitename')})"
|
||||
:msgTrue="$t('steps.enter_nave_9req_ok', {sitename: $t('ws.sitename')})"
|
||||
:msgFalse="$t('steps.enter_nave_9req_ko')">
|
||||
</CRequisiti>
|
||||
|
||||
<div v-if="CompletatoRequisiti">
|
||||
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
|
||||
:label="$t('dashboard.entra_in_lavagna')"></q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="mystep.page">
|
||||
<CMyInnerPage :path=mystep.page>
|
||||
<div v-if="mystep.descr">
|
||||
<div v-html="$t(mystep.descr)"></div>
|
||||
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
|
||||
</div>
|
||||
</CMyInnerPage>
|
||||
</div>
|
||||
@@ -371,6 +415,7 @@
|
||||
<!--</q-stepper-navigation>-->
|
||||
<!--</q-step>-->
|
||||
</q-stepper>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<q-page-sticky expand position="top" v-if="!stepcompleti">
|
||||
|
||||
@@ -27,9 +27,9 @@ export default class CStatusReg extends MixinBase {
|
||||
public polling = null
|
||||
public numpolled: number = 0
|
||||
public datastat: INotData = {
|
||||
num_tot_lista: 0,
|
||||
num_reg_lista: 0,
|
||||
num_reg: 0,
|
||||
num_passeggeri: 0,
|
||||
num_imbarcati: 0,
|
||||
num_teleg_attivo: 0,
|
||||
email_non_verif: 0,
|
||||
num_teleg_pending: 0,
|
||||
@@ -39,7 +39,7 @@ export default class CStatusReg extends MixinBase {
|
||||
|
||||
public async checkifpolling() {
|
||||
if (UserStore.state.my.profile) {
|
||||
if (!UserStore.state.my.verified_email || UserStore.state.my.profile.teleg_id <= 0)
|
||||
if (!UserStore.state.my.verified_email || (UserStore.state.my.profile.teleg_id <= 0 && (tools.appid() === tools.IDAPP_AYNI)))
|
||||
this.NUMSEC_TO_POLLING = 10
|
||||
}
|
||||
|
||||
@@ -124,13 +124,6 @@ export default class CStatusReg extends MixinBase {
|
||||
this.checkifpolling()
|
||||
}
|
||||
|
||||
get perc_reg() {
|
||||
if (this.datastat.num_tot_lista > 0)
|
||||
return (this.datastat.num_reg_lista / this.datastat.num_tot_lista * 100)
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
public calcperc(val1, valmax ) {
|
||||
if (valmax > 0)
|
||||
return (val1 / valmax * 100)
|
||||
@@ -139,7 +132,7 @@ export default class CStatusReg extends MixinBase {
|
||||
}
|
||||
|
||||
get visustat() {
|
||||
return this.datastat.num_reg > 0 || this.datastat.num_reg_lista > 0
|
||||
return this.datastat.num_reg > 0
|
||||
}
|
||||
|
||||
get telegnonattivi() {
|
||||
|
||||
@@ -7,28 +7,43 @@
|
||||
|
||||
<div class="flex flex-center">
|
||||
|
||||
<CCardState :mytext="$t('pages.statusreg.reg')" :myval="datastat.num_reg" :myperc="100"></CCardState>
|
||||
<CCardState :mytext="$t('stat.requisiti')" :isperc="true" :myval="datastat.num_requisiti"
|
||||
<CCardState :mytext="$t('pages.statusreg.reg')" :myval="datastat.num_reg"
|
||||
:myperc="100"></CCardState>
|
||||
|
||||
<!--<CCardState :mytext="$t('pages.statusreg.passeggeri')"
|
||||
mycolor="blue"
|
||||
size="150px"
|
||||
size_mob="130px"
|
||||
:myval="datastat.num_passeggeri"
|
||||
:myperc="100"></CCardState>-->
|
||||
|
||||
<!--<CCardState :mytext="$t('statusreg.imbarcati')"
|
||||
size="150px"
|
||||
size_mob="130px"
|
||||
mycolor="blue" :myval="datastat.num_imbarcati"
|
||||
:myperc="100"></CCardState>-->
|
||||
|
||||
<!--<CCardState v-if="datastat.num_part_accepted > 1"
|
||||
:mytext="$t('stat.requisiti')" :isperc="true" :myval="datastat.num_requisiti"
|
||||
:myperc="calcperc(datastat.num_requisiti, datastat.num_reg) "
|
||||
mycolor="blue"
|
||||
:textadd="` / ` + datastat.num_reg"></CCardState>
|
||||
:textadd="` / ` + datastat.num_reg"></CCardState>-->
|
||||
|
||||
<!--<CCardState :mytext="$t('pages.statusreg.giainlista')" :isperc="true" :myval="datastat.num_reg_lista"-->
|
||||
<!--:myperc="perc_reg" :textadd="` / ` + datastat.num_tot_lista"></CCardState>-->
|
||||
|
||||
<div class="q-pa-xs ">
|
||||
<div class="q-pa-xs" v-if="datastat.num_part_accepted > 1">
|
||||
<CCardStat :mytext="$t('stat.imbarcati_in_attesa')" :myval="datastat.num_imbarcati"></CCardStat>
|
||||
<CCardStat :mytext="$t('stat.accepted')" :myval="datastat.num_part_accepted"></CCardStat>
|
||||
<CCardStat :mytext="$t('stat.zoom')" :myval="datastat.num_part_zoom"></CCardStat>
|
||||
<CCardStat :mytext="$t('stat.dream')" :myval="datastat.num_users_dream"></CCardStat>
|
||||
<CCardStat :mytext="$t('stat.modalita_pagamento')" :myval="datastat.num_modalita_pagamento"></CCardStat>
|
||||
<CCardStat :mytext="$t('stat.requisiti')" :myval="datastat.num_requisiti"></CCardStat>
|
||||
<!--<CCardStat :mytext="$t('stat.modalita_pagamento')"
|
||||
:myval="datastat.num_modalita_pagamento"></CCardStat>-->
|
||||
<!--<CCardStat :mytext="$t('stat.requisiti')" :myval="datastat.num_requisiti"></CCardStat>-->
|
||||
<!--<CCardStat :mytext="$t('stat.qualificati')" :myval="datastat.num_qualificati"></CCardStat>-->
|
||||
<CCardStat v-if="emailnonverif" :mytext="$t('stat.email_not_verif')" :myval="emailnonverif"
|
||||
<!--<CCardStat v-if="emailnonverif" :mytext="$t('stat.email_not_verif')" :myval="emailnonverif"
|
||||
mycol="negative"></CCardStat>
|
||||
<CCardStat v-if="telegnonattivi" :mytext="$t('stat.telegram_non_attivi')" :myval="telegnonattivi"
|
||||
<CCardStat v-if="telegnonattivi" :mytext="$t('stat.telegram_non_attivi')"
|
||||
:myval="telegnonattivi"
|
||||
mycol="negative"></CCardStat>
|
||||
<CCardStat v-if="datastat.num_teleg_pending > 0" :mytext="$t('stat.telegram_pendenti')"
|
||||
:myval="datastat.num_teleg_pending" mycol="negative"></CCardStat>
|
||||
:myval="datastat.num_teleg_pending" mycol="negative"></CCardStat>-->
|
||||
</div>
|
||||
|
||||
<div class="column animazione">
|
||||
@@ -38,7 +53,8 @@
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
|
||||
<q-item v-for="(user, index) in lastsreg" :key="user.username" class="q-mb-xs animated" v-ripple>
|
||||
<q-item v-for="(user, index) in lastsreg" :key="user.username" class="q-mb-xs animated"
|
||||
v-ripple>
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-avatar v-if="tools.geticon(user.profile.nationality)"
|
||||
@@ -51,32 +67,44 @@
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ user.name }} {{ tools.firstchars_onedot(user.surname, 1) }}</q-item-label>
|
||||
<q-item-label>{{ user.name }} {{ tools.firstchars_onedot(user.surname, 1) }}
|
||||
</q-item-label>
|
||||
<q-item-label caption lines="1">{{ user.username }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
<q-item-label>{{ tools.getstrDateTimeShort(user.date_temp_reg) }}</q-item-label>
|
||||
<q-chip outline color="green" text-color="white" icon-right="fas fa-user-plus" size="xs"></q-chip>
|
||||
<q-chip outline color="green" text-color="white" icon-right="fas fa-user-plus"
|
||||
size="xs"></q-chip>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</transition-group>
|
||||
</div>
|
||||
|
||||
<CGeoChart :mydata="datastat.arr_nations">
|
||||
<!--<CGeoChart :mydata="datastat.arr_nations">
|
||||
|
||||
</CGeoChart>
|
||||
<div class="row text-center justify-center">
|
||||
</CGeoChart>-->
|
||||
|
||||
<div class="row q-pa-sm text-center justify-center">
|
||||
<!--
|
||||
<div class="clBorderZoom">
|
||||
<CListNationality :mydata="datastat.arr_nations">
|
||||
|
||||
</CListNationality>
|
||||
</div>-->
|
||||
<div class="clBorderTutor">
|
||||
<CLineChart :mydata="datastat.reg_daily" :title="$t('stat.reg_daily')">
|
||||
|
||||
</CLineChart>
|
||||
<CLineChart :mydata="datastat.reg_daily" :title="$t('stat.reg_total')" :offset="datastat.numreg_untilday" :sum="true"
|
||||
:mycolors="['#0b0', '#666']">
|
||||
<CLineChart :mydata="datastat.reg_weekly" :title="$t('stat.reg_weekly')">
|
||||
|
||||
</CLineChart>
|
||||
<!--<CLineChart :mydata="datastat.reg_daily" :title="$t('stat.reg_total')"
|
||||
:offset="datastat.numreg_untilday" :sum="true"
|
||||
:mycolors="['#0b0', '#666']">
|
||||
|
||||
</CLineChart>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
.myshad {
|
||||
text-shadow: .125rem .125rem .125rem darkgray;
|
||||
}
|
||||
|
||||
.nonvisibile{
|
||||
border-radius: 16px;
|
||||
border: red solid 3px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
@@ -53,4 +53,11 @@ export default class CTitleBanner extends Vue {
|
||||
if (this.myvisible)
|
||||
this.$emit('apri')
|
||||
}
|
||||
|
||||
get getclass(){
|
||||
if (this.myvisible)
|
||||
return 'isvisibile'
|
||||
else
|
||||
return 'nonvisibile glossy'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<q-banner
|
||||
inline-actions
|
||||
rounded dense
|
||||
:class="bgcolor+` cursor-pointer q-my-sm `+clcolor+ ` ` + myclass"
|
||||
:class="bgcolor+` cursor-pointer q-my-sm `+clcolor+ ` ` + myclass + ' ' + getclass"
|
||||
style="text-align: center; "
|
||||
@click="apri()"
|
||||
>
|
||||
|
||||
@@ -21,8 +21,12 @@ export default class CUserBadge extends MixinBase {
|
||||
@Prop({ required: true }) public index: number
|
||||
@Prop({ required: false, default: false }) public yourinvite: boolean
|
||||
@Prop({ required: true }) public user: IUserFields
|
||||
@Prop({ required: true }) public numpeople: number
|
||||
@Prop({ required: true }) public mycolor: string
|
||||
@Prop({ required: false, default: false }) public mydisabled: string
|
||||
@Prop({ required: false, default: true }) public showsteps: boolean
|
||||
@Prop({ required: false, default: true }) public showregalainv: boolean
|
||||
@Prop({ required: false, default: -1 }) public ind_order_ingr: number
|
||||
@Prop({ required: false, default: -1 }) public id_listaingr: number
|
||||
public $v
|
||||
public $t: any
|
||||
|
||||
@@ -47,9 +51,17 @@ export default class CUserBadge extends MixinBase {
|
||||
}
|
||||
|
||||
public getindorder(user) {
|
||||
if (!!user.ind_order)
|
||||
return ' (' + user.ind_order + ')'
|
||||
else
|
||||
if (!!user.index)
|
||||
return ' (n°' + user.index + ')'
|
||||
return ''
|
||||
}
|
||||
|
||||
public getquanti(user) {
|
||||
if (!!user.quanti) {
|
||||
if (user.quanti > 1) {
|
||||
return ' (' + user.quanti + ' ' + this.$t('reg.volte') + ')'
|
||||
}
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -92,7 +104,7 @@ export default class CUserBadge extends MixinBase {
|
||||
}
|
||||
|
||||
public execclick(user) {
|
||||
this.$emit('myclick', user)
|
||||
this.$emit('myclick', user, this.showregalainv, this.ind_order_ingr, this.id_listaingr, this.mydisabled)
|
||||
}
|
||||
|
||||
public getnumreq(user) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="!!user">
|
||||
<div v-if="!!user" :disabled="mydisabled">
|
||||
<q-item class="q-my-sm q-pa-sm myuserbadge shadow-5" clickable v-ripple @click="execclick(user)">
|
||||
<q-item-section avatar>
|
||||
<q-item-section avatar v-if="showsteps">
|
||||
<div class="row" style="margin-left: 4px;">
|
||||
<q-avatar v-if="yourinvite" :text-color="mycolor" size="md">
|
||||
{{ getnumber(user, index + 1) }}°
|
||||
@@ -14,23 +14,23 @@
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ user.name }} {{ user.surname }} {{ getindorder(user) }}<br>
|
||||
<span class="text-grey">({{ getusername(user) }})</span>
|
||||
<span class="text-grey">({{ getusername(user) }}) <strong>{{ getquanti(user)}}</strong></span>
|
||||
<br><!--<span v-if="isextralist(user)" class="notreg">{{ $t('dashboard.notreg') }}</span>-->
|
||||
</q-item-label>
|
||||
<!--<q-item-label caption lines="1">{{ user.email }}</q-item-label>-->
|
||||
</q-item-section>
|
||||
|
||||
|
||||
<q-item-section side>
|
||||
<q-item-section side v-if="showsteps">
|
||||
<div class="row q-gutter-xs justify-center items-center">
|
||||
<div>
|
||||
<CCardState :mytext="$t('pages.statusreg.req')" :myval="getnumreq(user)" :myperc="getnumperc(user)" size="50px" size_mob="40px" fontsize="0.75rem" myclass="my-card-small-stat" :mycolor="getcolor(user)"></CCardState>
|
||||
<CCardState :mytext="$t('pages.statusreg.req')" :myval="getnumreq(user)" :myperc="getnumperc(user)" size="50px" size_mob="40px" fontsize="0.85rem" myclass="my-card-small-stat" :mycolor="getcolor(user)"></CCardState>
|
||||
</div>
|
||||
|
||||
<!--<q-icon v-if="!isextralist(user)" size="sm" name="fab fa-telegram" :color="getstatecolor(user)"></q-icon>
|
||||
<q-icon v-if="!isextralist(user)" size="sm" name="fas fa-video" :color="getzoomcolor(user)"></q-icon>-->
|
||||
<div>
|
||||
<CCardState :mytext="$t('pages.statusreg.people')" :myval="getnumpeople(user)" :myperc="getnumpercpeople(user)" size="50px" size_mob="40px" fontsize="0.75rem" myclass="my-card-small-stat" :mycolor="getcolorpeople(user)"></CCardState>
|
||||
<CCardState :mytext="$t('pages.statusreg.people')" :myval="getnumpeople(user)" :myperc="getnumpercpeople(user)" size="50px" size_mob="40px" fontsize="0.85rem" myclass="my-card-small-stat" :mycolor="getcolorpeople(user)"></CCardState>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
|
||||
@@ -4,42 +4,35 @@
|
||||
<CTitleBanner :title="`Video ` + $t('site.sitename')"></CTitleBanner>
|
||||
<CImgText src="">
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.video_intro_1', {sitename: $t('ws.sitename')})" bgcolor="bg-primary"
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.video_intro_1', {sitename: $t('ws.sitename')})"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="true">
|
||||
|
||||
<CVideo myvideokey="ybrjGr52jOI">
|
||||
<div v-if="showconditions">
|
||||
<div v-if="toolsext.isLang('fr')">
|
||||
<CVideo myvideokey="GZR0ncSaG8s"></CVideo>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CVideo myvideokey="DWfQzbOCK3s"></CVideo>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="toolsext.isLang('si')">
|
||||
<CVideo myvideokey="5vJ-xSdoUmk"></CVideo>
|
||||
</div>
|
||||
<div v-else-if="toolsext.isLang('it')">
|
||||
<CVideo myvideokey="GU93sIBG6yM"></CVideo>
|
||||
</div>
|
||||
<div v-else-if="toolsext.isLang('hr')">
|
||||
<CVideo myvideokey="zBksb1vdddw"></CVideo>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CVideo myvideokey="16VpLhir7xg"></CVideo>
|
||||
</div>
|
||||
|
||||
</CVideo>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.video_intro_2', {sitename: $t('ws.sitename')})" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="u90hVKBRD6w">
|
||||
|
||||
</CVideo>
|
||||
</CTitleBanner>
|
||||
|
||||
<!--
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.video_intro_3')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="ameNIjUWC6A">
|
||||
|
||||
</CVideo>
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('steps.video_intro_4')" bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="false">
|
||||
|
||||
<CVideo myvideokey="OVlriFnOxG4">
|
||||
|
||||
</CVideo>
|
||||
</CTitleBanner>
|
||||
-->
|
||||
|
||||
<div v-if="showconditions">
|
||||
<q-checkbox
|
||||
|
||||
@@ -299,8 +299,22 @@ canvas {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.text-cart {
|
||||
font-size: 1.15rem;
|
||||
text-shadow: .05rem .05rem .15rem #fff;
|
||||
background-color: limegreen;
|
||||
border-radius: 1rem !important;
|
||||
text-align: center;
|
||||
margin: 1px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.roundimg {
|
||||
border-radius: 50% !important;
|
||||
color: red;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.titlesite {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import drawer from '../../layouts/drawer/drawer.vue'
|
||||
import messagePopover from '../../layouts/toolbar/messagePopover/messagePopover.vue'
|
||||
import { CSignIn } from '../../components/CSignIn'
|
||||
|
||||
import { GlobalStore, UserStore } from '@modules'
|
||||
import { GlobalStore, Products, UserStore } from '@modules'
|
||||
// import { StateConnection } from '../../model'
|
||||
import { Prop, Watch } from 'vue-property-decorator'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
@@ -17,13 +17,14 @@ import { static_data } from '../../db/static_data'
|
||||
import MixinUsers from '../../mixins/mixin-users'
|
||||
import { CMyAvatar } from '../CMyAvatar'
|
||||
import { CSigninNoreg } from '../CSigninNoreg'
|
||||
import { CMyCart } from '@components'
|
||||
|
||||
@Component({
|
||||
name: 'Header',
|
||||
mixins: [MixinUsers],
|
||||
components: {
|
||||
drawer,
|
||||
messagePopover, CSigninNoreg, CMyAvatar
|
||||
messagePopover, CSigninNoreg, CMyAvatar, CMyCart
|
||||
}
|
||||
})
|
||||
|
||||
@@ -65,6 +66,14 @@ export default class Header extends Vue {
|
||||
return UserStore.state.isTutor
|
||||
}
|
||||
|
||||
get isZoomeri() {
|
||||
return UserStore.state.isZoomeri
|
||||
}
|
||||
|
||||
get isTratuttrici() {
|
||||
return UserStore.state.isTratuttrici
|
||||
}
|
||||
|
||||
get conndata_changed() {
|
||||
return GlobalStore.state.connData
|
||||
}
|
||||
@@ -114,10 +123,18 @@ export default class Header extends Vue {
|
||||
return GlobalStore.state.RightDrawerOpen
|
||||
}
|
||||
|
||||
get rightCartOpen() {
|
||||
return GlobalStore.state.rightCartOpen
|
||||
}
|
||||
|
||||
set rightDrawerOpen(value) {
|
||||
GlobalStore.state.RightDrawerOpen = value
|
||||
}
|
||||
|
||||
set rightCartOpen(value) {
|
||||
GlobalStore.state.rightCartOpen = value
|
||||
}
|
||||
|
||||
get lang() {
|
||||
return this.$q.lang.isoName
|
||||
}
|
||||
@@ -182,7 +199,7 @@ export default class Header extends Vue {
|
||||
if (this.static_data.functionality.SHOW_IF_IS_SERVER_CONNECTION) {
|
||||
|
||||
if (!!oldValue) {
|
||||
tools.showNotif(this.$q, this.$t('connection') + ` disc__value}`, {
|
||||
tools.showNotif(this.$q, this.$t('connection') + ` {disc__value}`, {
|
||||
color,
|
||||
icon: 'wifi'
|
||||
})
|
||||
@@ -362,6 +379,21 @@ export default class Header extends Vue {
|
||||
this.$router.replace('/signup')
|
||||
}
|
||||
|
||||
get getnumItemsCart() {
|
||||
const arrcart = Products.state.cart
|
||||
if (!!arrcart) {
|
||||
if (!!arrcart.items) {
|
||||
const total = arrcart.items.reduce((sum, item) => sum + item.order.quantity, 0)
|
||||
return total
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
get getcart() {
|
||||
return Products.state.cart
|
||||
}
|
||||
|
||||
get getClassColorHeader() {
|
||||
if (tools.isTest())
|
||||
return 'bg-warning'
|
||||
|
||||
@@ -32,14 +32,15 @@
|
||||
<q-btn ripple
|
||||
size="md"
|
||||
id="newvers" v-if="isNewVersionAvailable" color="secondary" rounded icon="refresh"
|
||||
class="btnNewVersShow" @click="RefreshApp()" :label="$t('notification.newVersionAvailable')"/>
|
||||
class="btnNewVersShow" @click="RefreshApp()" :label="$t('notification.newVersionAvailable')">
|
||||
</q-btn>
|
||||
|
||||
|
||||
<q-toolbar-title class="row items-center">
|
||||
<q-avatar>
|
||||
<img :src="imglogo" height="27" alt="Immagine Logo">
|
||||
</q-avatar>
|
||||
<div class="q-mx-sm">{{getappname}}</div>
|
||||
<div class="q-mx-sm titlesite">{{getappname}}</div>
|
||||
<div slot="subtitle">{{$t('msg.myDescriz')}} {{ getAppVersion() }}</div>
|
||||
</q-toolbar-title>
|
||||
|
||||
@@ -107,9 +108,16 @@
|
||||
icon="menu"
|
||||
@click="rightDrawerOpen = !rightDrawerOpen">
|
||||
</q-btn>
|
||||
<q-btn class="q-mx-xs" v-if="static_data.functionality.ENABLE_ECOMMERCE && isLogged" round dense flat
|
||||
@click="rightCartOpen = !rightCartOpen" icon="fas fa-shopping-cart">
|
||||
|
||||
|
||||
<q-badge v-if="getnumItemsCart > 0" color="red" floating transparent>
|
||||
{{getnumItemsCart}}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
<q-btn class="q-mx-xs" v-if="static_data.functionality.SHOW_USER_MENU && isLogged" round dense flat
|
||||
@click="rightDrawerOpen = !rightDrawerOpen">
|
||||
<CMyAvatar :myimg="getMyImg"></CMyAvatar>
|
||||
@click="rightDrawerOpen = !rightDrawerOpen" :icon="getMyImgforIcon">
|
||||
</q-btn>
|
||||
|
||||
</q-toolbar>
|
||||
@@ -128,6 +136,15 @@
|
||||
|
||||
</q-drawer>
|
||||
|
||||
<!-- USER BAR -->
|
||||
<q-drawer v-if="static_data.functionality.ENABLE_ECOMMERCE" v-model="rightCartOpen" side="right" elevated>
|
||||
<q-btn class="absolute-top-right" style="margin-right: 10px; color: white;"
|
||||
dense flat round icon="close" @click="rightCartOpen = !rightCartOpen">
|
||||
</q-btn>
|
||||
<div v-if="isLogged" class="text-weight-bold text-cart">Carrello
|
||||
</div>
|
||||
<CMyCart></CMyCart>
|
||||
</q-drawer>
|
||||
<!-- USER BAR -->
|
||||
<q-drawer v-if="static_data.functionality.SHOW_USER_MENU" v-model="rightDrawerOpen" side="right" elevated>
|
||||
<div id="profile">
|
||||
@@ -145,6 +162,7 @@
|
||||
v-if="isAdmin"> [Admin]</span>
|
||||
<span v-if="isManager"> [Manager]</span>
|
||||
<span v-if="isTutor"> [Tutor]</span>
|
||||
<span v-if="isTratuttrici"> [Trad]</span>
|
||||
</div>
|
||||
<div v-else class="text-user text-italic bg-red">
|
||||
{{ $t('user.loggati') }}
|
||||
|
||||
@@ -59,3 +59,8 @@ export * from './CVideoPromo'
|
||||
export * from './CMyRequirement'
|
||||
export * from './CSigninNoreg'
|
||||
export * from './CMyNave'
|
||||
export * from './CMyFlotta'
|
||||
export * from './CECommerce'
|
||||
export * from './CSingleCart'
|
||||
export * from './CMyCart'
|
||||
export * from '../views/ecommerce/'
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
IProject,
|
||||
ITodo,
|
||||
Privacy,
|
||||
IPerson,
|
||||
IUserProfile,
|
||||
IFunctionality,
|
||||
IPreloadImages
|
||||
} from '../model/index'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import messages from '../statics/i18n'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
function translate(params) {
|
||||
const msg = params.split('.')
|
||||
@@ -12,6 +13,7 @@ function translate(params) {
|
||||
msg.forEach((param) => {
|
||||
ris = ris[param]
|
||||
})
|
||||
|
||||
} else {
|
||||
console.log('ERRORE IN TRANSLATE! ', params, ' NON ESISTE!')
|
||||
return params
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova) { %>, viewport-fit=cover<% } %>">
|
||||
content="user-scalable=no, initial-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova || htmlWebpackPlugin.options.ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">
|
||||
|
||||
<link rel="icon" href="<%= htmlWebpackPlugin.files.publicPath %>statics/icons/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%= htmlWebpackPlugin.files.publicPath %>statics/icons/favicon-32x32.png">
|
||||
|
||||
@@ -82,6 +82,8 @@ export default class MenuOne extends Vue {
|
||||
menu += ' isManager'
|
||||
if (elem.onlyTutor)
|
||||
menu += ' isTutor'
|
||||
if (elem.onlyTraduttrici)
|
||||
menu += ' isTraduttrici'
|
||||
|
||||
if (elem.extraclass)
|
||||
menu += ' ' + elem.extraclass
|
||||
|
||||
@@ -36,9 +36,9 @@ export default class MixinBase extends MixinMetaTags {
|
||||
return tools
|
||||
}
|
||||
|
||||
public getValDb(keystr, serv, def?, table?, subkey?) {
|
||||
public getValDb(keystr, serv, def?, table?, subkey?, id?) {
|
||||
|
||||
return tools.getValDb(keystr, serv, def, table, subkey)
|
||||
return tools.getValDb(keystr, serv, def, table, subkey, id)
|
||||
}
|
||||
|
||||
public getValDbLang(keystr, serv, def?, table?, subkey?) {
|
||||
@@ -48,7 +48,7 @@ export default class MixinBase extends MixinMetaTags {
|
||||
return ris
|
||||
}
|
||||
|
||||
public async setValDb(key, value, type, serv: boolean, table?, subkey?) {
|
||||
public async setValDb(key, value, type, serv: boolean, table?, subkey?, id?) {
|
||||
|
||||
// console.log('setValDb', key, value, serv, table, subkey)
|
||||
let mydatatosave = null
|
||||
@@ -78,7 +78,7 @@ export default class MixinBase extends MixinMetaTags {
|
||||
fieldsvalue: myfield
|
||||
}
|
||||
|
||||
} else {
|
||||
} else if (table === 'settings') {
|
||||
GlobalStore.mutations.setValueSettingsByKey({ key, value, serv })
|
||||
|
||||
let myrec = GlobalStore.getters.getrecSettingsByKey(key, serv)
|
||||
@@ -117,6 +117,24 @@ export default class MixinBase extends MixinMetaTags {
|
||||
table: 'settings',
|
||||
fieldsvalue: myrec
|
||||
}
|
||||
} else {
|
||||
const myfield = {}
|
||||
|
||||
// Save to the DB:
|
||||
if (subkey) {
|
||||
myfield[key + '.' + subkey] = value
|
||||
} else {
|
||||
myfield[key] = value
|
||||
}
|
||||
|
||||
// console.log('myfield', myfield)
|
||||
|
||||
mydatatosave = {
|
||||
id,
|
||||
table,
|
||||
fieldsvalue: myfield
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// console.log('mydatatosave', mydatatosave)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Vue from 'vue'
|
||||
import { GlobalStore, UserStore, MessageStore } from '../store/Modules'
|
||||
import { GlobalStore, UserStore, MessageStore, Products } from '../store/Modules'
|
||||
|
||||
import Component from 'vue-class-component'
|
||||
import { func_tools } from '../store/Modules/toolsext'
|
||||
@@ -48,6 +48,17 @@ export default class MixinUsers extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
get getnumItemsCart() {
|
||||
const arrcart = Products.state.cart
|
||||
if (!!arrcart) {
|
||||
if (!!arrcart.items) {
|
||||
const total = arrcart.items.reduce((sum, item) => sum + item.order.quantity, 0)
|
||||
return total
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
public getImgByMsg(msg: IMessage) {
|
||||
return `statics/` + UserStore.getters.getImgByUsername(this.getUsernameChatByMsg(msg))
|
||||
}
|
||||
@@ -57,6 +68,17 @@ export default class MixinUsers extends Vue {
|
||||
return (ris !== '') ? 'statics/' + ris : ''
|
||||
}
|
||||
|
||||
get getMyImgforIcon() {
|
||||
const ris = UserStore.getters.getImgByUsername(UserStore.state.my.username)
|
||||
return (ris !== '') ? 'img:statics/' + ris : 'fas fa-user-circle'
|
||||
}
|
||||
|
||||
get getIconCart() {
|
||||
const iconcart = 'fas fa-shopping-cart'
|
||||
|
||||
return iconcart
|
||||
}
|
||||
|
||||
get MenuCollapse() {
|
||||
return GlobalStore.state.menuCollapse
|
||||
// return true
|
||||
|
||||
@@ -2,6 +2,7 @@ import { IAction } from '@src/model/Projects'
|
||||
import { Component } from 'vue-router/types/router'
|
||||
import { lists } from '@src/store/Modules/lists'
|
||||
import { IPaymentType } from '@src/model/UserStore'
|
||||
import { ICart, IProducer, IProduct, IStorehouse } from '@src/model/Products'
|
||||
|
||||
export interface IPost {
|
||||
title: string
|
||||
@@ -16,6 +17,7 @@ export interface IConnData {
|
||||
|
||||
export interface ICfgServer {
|
||||
chiave: string
|
||||
idapp: string
|
||||
userId: string
|
||||
valore: string
|
||||
}
|
||||
@@ -148,6 +150,7 @@ export interface IGlobalState {
|
||||
menuCollapse: boolean
|
||||
leftDrawerOpen: boolean
|
||||
RightDrawerOpen: boolean
|
||||
rightCartOpen: boolean
|
||||
category: string
|
||||
stateConnection: string
|
||||
networkDataReceived: boolean
|
||||
@@ -170,6 +173,8 @@ export interface IGlobalState {
|
||||
opzemail: ISettings[],
|
||||
mailinglist: IMailinglist[],
|
||||
calzoom: ICalZoom[],
|
||||
producers: IProducer[],
|
||||
storehouses: IStorehouse[],
|
||||
autoplaydisc: number
|
||||
}
|
||||
|
||||
@@ -203,6 +208,7 @@ export interface IListRoutes {
|
||||
onlyif_logged?: boolean
|
||||
onlyManager?: boolean
|
||||
onlyTutor?: boolean
|
||||
onlyTraduttrici?: boolean
|
||||
extraclass?: string
|
||||
meta?: any
|
||||
idelem?: string
|
||||
@@ -300,7 +306,7 @@ export interface IGallery {
|
||||
|
||||
export interface IColl {
|
||||
title: IAllLang
|
||||
date: string
|
||||
date?: string
|
||||
subtitle?: IAllLang
|
||||
img: string
|
||||
img2?: string
|
||||
@@ -308,6 +314,8 @@ export interface IColl {
|
||||
linkagg_type?: number
|
||||
width?: number
|
||||
height?: number
|
||||
ingallery?: boolean
|
||||
inexibitions?: boolean
|
||||
}
|
||||
|
||||
export interface ICollaborations {
|
||||
@@ -330,6 +338,7 @@ export interface IFunctionality {
|
||||
SHOW_IF_IS_SERVER_CONNECTION?: boolean
|
||||
ENABLE_TODOS_LOADING?: boolean
|
||||
ENABLE_PROJECTS_LOADING?: boolean
|
||||
ENABLE_ECOMMERCE?: boolean
|
||||
SHOW_NEWSLETTER?: boolean
|
||||
SHOW_ONLY_POLICY?: boolean
|
||||
SHOW_MESSAGES?: boolean
|
||||
@@ -407,5 +416,5 @@ export const DefaultNewsState: INewsState = {
|
||||
totemail: 0,
|
||||
totsubscribed: 0,
|
||||
totunsubscribed: 0,
|
||||
totsentlastid: 0,
|
||||
totsentlastid: 0
|
||||
}
|
||||
|
||||
@@ -7,23 +7,23 @@ export interface ICheckUser {
|
||||
}
|
||||
|
||||
export interface INotData {
|
||||
num_tot_lista?: number
|
||||
num_reg_lista?: number
|
||||
num_reg?: number
|
||||
num_passeggeri?: number
|
||||
num_imbarcati?: number
|
||||
email_non_verif?: number
|
||||
num_teleg_attivo?: number
|
||||
num_teleg_pending?: number
|
||||
num_part_zoom?: number
|
||||
num_part_accepted?: number
|
||||
num_qualificati?: number
|
||||
num_requisiti?: number
|
||||
num_modalita_pagamento?: number
|
||||
num_users_dream?: number
|
||||
arr_nations?: string
|
||||
lastsreg?: IUserFields[]
|
||||
checkuser?: ICheckUser | any
|
||||
numreg_untilday?: number
|
||||
reg_daily?: string
|
||||
imbarcati_daily?: string
|
||||
imbarcati_weekly?: string
|
||||
reg_weekly?: string
|
||||
}
|
||||
|
||||
export interface INotevoleState {
|
||||
|
||||
88
src/model/Products.ts
Executable file
88
src/model/Products.ts
Executable file
@@ -0,0 +1,88 @@
|
||||
export interface IProduct {
|
||||
_id?: any
|
||||
descr?: string,
|
||||
idProducer?: string,
|
||||
idStorehouses?: string[],
|
||||
producer?: IProducer,
|
||||
storehouses?: IStorehouse[],
|
||||
name?: string,
|
||||
department?: string,
|
||||
category?: string,
|
||||
price?: number,
|
||||
color?: string,
|
||||
size?: string,
|
||||
quantityAvailable?: number,
|
||||
weight?: number,
|
||||
stars?: number,
|
||||
date?: Date,
|
||||
icon?: string,
|
||||
img?: string
|
||||
}
|
||||
|
||||
export interface IBaseOrder {
|
||||
order?: IOrder
|
||||
}
|
||||
|
||||
export interface IOrder {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
userId?: string
|
||||
status?: number
|
||||
idProduct?: string
|
||||
idProducer?: string
|
||||
idStorehouse?: string
|
||||
price?: number
|
||||
color?: string
|
||||
size?: string
|
||||
quantity?: number
|
||||
weight?: number
|
||||
stars?: number
|
||||
product?: IProduct
|
||||
producer?: IProducer
|
||||
storehouse?: IStorehouse
|
||||
date_created?: Date
|
||||
date_checkout?: Date
|
||||
date_payment?: Date
|
||||
date_shipping?: Date
|
||||
date_delivered?: Date
|
||||
notes?: string
|
||||
}
|
||||
|
||||
export interface IProductsState {
|
||||
products: IProduct[]
|
||||
cart: ICart
|
||||
}
|
||||
|
||||
export interface IProducer {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
name?: string,
|
||||
description?: string,
|
||||
referent?: string,
|
||||
region?: string,
|
||||
city?: string,
|
||||
img?: string,
|
||||
website?: string,
|
||||
}
|
||||
|
||||
export interface IStorehouse {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
name?: string,
|
||||
description?: string,
|
||||
referent?: string,
|
||||
address?: string,
|
||||
city?: string,
|
||||
region?: string,
|
||||
img?: string,
|
||||
website?: string,
|
||||
}
|
||||
|
||||
export interface ICart {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
userId?: string
|
||||
totalQty?: number
|
||||
totalPrice?: number
|
||||
items?: IBaseOrder[]
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { IToken } from 'model/other'
|
||||
import { ICart } from '@src/model/Products'
|
||||
|
||||
const enum ESexType {
|
||||
None = 0,
|
||||
@@ -16,6 +17,11 @@ export interface IUserProfile {
|
||||
sex?: ESexType
|
||||
country_pay?: string
|
||||
email_paypal?: string
|
||||
payeer_id?: string
|
||||
advcash_id?: string
|
||||
revolut?: string
|
||||
link_payment?: string
|
||||
note_payment?: string
|
||||
username_telegram?: string
|
||||
teleg_id?: number
|
||||
teleg_checkcode?: number
|
||||
@@ -23,7 +29,10 @@ export interface IUserProfile {
|
||||
paymenttypes?: IPaymentType[]
|
||||
manage_telegram?: boolean
|
||||
saw_zoom_presentation?: boolean
|
||||
ask_zoom_partecipato?: boolean
|
||||
saw_and_accepted?: boolean
|
||||
qualified?: boolean
|
||||
qualified_2invitati?: boolean
|
||||
}
|
||||
|
||||
export interface IPaymentType {
|
||||
@@ -35,10 +44,17 @@ export interface IDashboard {
|
||||
myself?: IUserFields
|
||||
aportador?: IUserFields,
|
||||
numpeople_aportador?: number
|
||||
arrimbarchi?: any[]
|
||||
arrposizioni?: any[]
|
||||
navi_partenza?: any[]
|
||||
lastnave?: any
|
||||
arrusers?: any[]
|
||||
}
|
||||
|
||||
export interface IDownline {
|
||||
downline: any[],
|
||||
downnotreg: any[],
|
||||
downbyuser: any[]
|
||||
arrposizioni?: any[]
|
||||
}
|
||||
|
||||
export interface ICalcStat {
|
||||
@@ -48,6 +64,7 @@ export interface ICalcStat {
|
||||
|
||||
export interface IUserFields {
|
||||
_id?: string
|
||||
ind_order?: number
|
||||
email?: string
|
||||
username?: string
|
||||
name?: string
|
||||
@@ -57,7 +74,7 @@ export interface IUserFields {
|
||||
perm?: number
|
||||
verified_email?: boolean
|
||||
aportador_solidario?: string
|
||||
date_temp_reg?: Date
|
||||
|
||||
made_gift?: boolean
|
||||
tokens?: IToken[]
|
||||
lasttimeonline?: Date
|
||||
@@ -65,9 +82,12 @@ export interface IUserFields {
|
||||
downline?: IUserFields[]
|
||||
calcstat?: ICalcStat
|
||||
dashboard?: IDashboard
|
||||
mydownline?: IDownline
|
||||
qualified?: boolean
|
||||
numNaviEntrato?: number
|
||||
numinvitati?: number
|
||||
numinvitatiattivi?: number
|
||||
cart?: ICart
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -97,6 +117,8 @@ export interface IUserState {
|
||||
isAdmin?: boolean
|
||||
isManager?: boolean
|
||||
isTutor?: boolean
|
||||
isZoomeri?: boolean
|
||||
isTraduttrici?: boolean
|
||||
isTeacher?: boolean
|
||||
usersList?: IUserFields[]
|
||||
countusers?: number
|
||||
|
||||
@@ -13,3 +13,4 @@ export * from './Projects'
|
||||
|
||||
export * from './Calendar'
|
||||
export * from './Estimate'
|
||||
export * from './Products'
|
||||
|
||||
@@ -46,6 +46,10 @@ export default class Home extends Vue {
|
||||
this.initprompt()
|
||||
}
|
||||
|
||||
get mythis() {
|
||||
return this
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
let primo = true
|
||||
const mytime = 10000
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
class="enable-notifications shadow"
|
||||
color="primary" rounded
|
||||
size="md"
|
||||
icon="notifications" @click="tools.askfornotification"
|
||||
icon="notifications" @click="tools.askfornotification(mythis)"
|
||||
:label="$t('notification.ask')"/>
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>-->
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="secondary" rounded size="lg" icon="notifications" @click="createPushSubscription" label="Create Push Subscription !"/>-->
|
||||
@@ -170,7 +170,7 @@
|
||||
class="enable-notifications shadow"
|
||||
color="primary" rounded
|
||||
size="md"
|
||||
icon="notifications" @click="tools.askfornotification"
|
||||
icon="notifications" @click="tools.askfornotification(mythis)"
|
||||
:label="$t('notification.ask')"/>
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>-->
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="secondary" rounded size="lg" icon="notifications" @click="createPushSubscription" label="Create Push Subscription !"/>-->
|
||||
@@ -261,7 +261,7 @@
|
||||
class="enable-notifications shadow"
|
||||
color="primary" rounded
|
||||
size="md"
|
||||
icon="notifications" @click="tools.askfornotification"
|
||||
icon="notifications" @click="tools.askfornotification(mythis)"
|
||||
:label="$t('notification.ask')"/>
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>-->
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="secondary" rounded size="lg" icon="notifications" @click="createPushSubscription" label="Create Push Subscription !"/>-->
|
||||
|
||||
@@ -34,6 +34,7 @@ export default class Listadoninavi extends MixinBase {
|
||||
public msg_tosend: string = ''
|
||||
public msg_tosend_user: string = ''
|
||||
public showtesto: boolean = false
|
||||
public showall: boolean = false
|
||||
public seltesto: string = ''
|
||||
public pagination = {
|
||||
sortBy: 'desc',
|
||||
@@ -69,14 +70,14 @@ export default class Listadoninavi extends MixinBase {
|
||||
sortable: true
|
||||
},
|
||||
{ name: 'date_start', align: 'center', label: '⏰ Partenza', field: 'date_start', sortable: true },
|
||||
{ name: 'sognatore', align: 'center', label: 'Sognatore', field: '', sortable: true },
|
||||
{ name: 'provvisoria', align: 'center', label: 'Temp.', field: 'provvisoria', sortable: true },
|
||||
{ name: 'tutor', align: 'left', label: 'Tutor', field: 'tutor', sortable: true },
|
||||
{ name: 'mediatore', align: 'center', label: '🌀 Mediatore', field: '', sortable: true },
|
||||
{ name: 'sognatore', align: 'center', label: 'Sognatore', field: '', sortable: true },
|
||||
{ name: 'donatori', align: 'center', label: 'Donatori', field: '', sortable: true },
|
||||
{ name: 'DoniConfermati', align: 'center', label: '🎁 OK', field: 'DoniConfermati', sortable: true },
|
||||
{ name: 'DoniAttesaDiConferma', align: 'center', label: '🎁 Wait', field: 'DoniAttesaDiConferma', sortable: true },
|
||||
{ name: 'DoniMancanti', align: 'center', label: '🎁 Miss', field: 'DoniMancanti', sortable: true },
|
||||
{ name: 'DoniConfermati', align: 'center', label: '🎁 OK', field: 'DoniConfermati', sortable: true },
|
||||
{ name: 'note_bot', align: 'left', label: 'Note Placca', field: 'note_bot', sortable: true },
|
||||
{ name: 'note_interne', align: 'left', label: 'Note Interne', field: 'note_interne', sortable: true },
|
||||
]
|
||||
@@ -106,7 +107,7 @@ export default class Listadoninavi extends MixinBase {
|
||||
this.loading = true
|
||||
// this.$q.loading.show({ message: this.$t('otherpages.update') })
|
||||
|
||||
const ris = await GlobalStore.actions.GetArrDoniNavi({ ricalcola })
|
||||
const ris = await GlobalStore.actions.GetArrDoniNavi({ ricalcola, showall: this.showall })
|
||||
console.log('ris', ris)
|
||||
this.arrdoninavi = ris.arrnavi
|
||||
|
||||
@@ -140,11 +141,20 @@ export default class Listadoninavi extends MixinBase {
|
||||
donatore: rec.name + ' ' + rec.surname
|
||||
})
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_RICEVUTO, 0, {
|
||||
param1: {
|
||||
let param1 = {
|
||||
_id: rec._id,
|
||||
made_gift: true
|
||||
},
|
||||
made_gift: true,
|
||||
riga: rec.riga,
|
||||
col: rec.col,
|
||||
date_made_gift: null
|
||||
}
|
||||
|
||||
if (!rec.date_made_gift) {
|
||||
param1.date_made_gift = tools.getDateNow()
|
||||
}
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '? (Pos ' + rec.riga + '.' + rec.col + ')', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_RICEVUTO, 0, {
|
||||
param1,
|
||||
param2: '',
|
||||
param3: ''
|
||||
})
|
||||
@@ -172,7 +182,7 @@ export default class Listadoninavi extends MixinBase {
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msgobj.msgpar1 + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.INVIA_MSG_A_DONATORI, 0, {
|
||||
param1: msgobj,
|
||||
param2: navemediatore,
|
||||
param2: navemediatore
|
||||
})
|
||||
|
||||
}
|
||||
@@ -183,7 +193,7 @@ export default class Listadoninavi extends MixinBase {
|
||||
|
||||
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,
|
||||
param2: navemediatore
|
||||
})
|
||||
|
||||
}
|
||||
@@ -196,7 +206,7 @@ export default class Listadoninavi extends MixinBase {
|
||||
const msgobj = {
|
||||
tipomsg: tools.TipoMsg.SEND_MSG,
|
||||
msgpar1: this.msg_tosend,
|
||||
inviareale: true,
|
||||
inviareale: true
|
||||
}
|
||||
|
||||
const navemediatore = this.selrec.donatore.recmediatore
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
@click="Ricalcola(true)"></q-btn>
|
||||
<br>
|
||||
|
||||
<q-toggle v-model="showall"
|
||||
label="Mostra Tutte le Navi" @input="Ricalcola(false)">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<q-table
|
||||
class="my-sticky-header-table"
|
||||
dense
|
||||
@@ -24,6 +29,7 @@
|
||||
row-key="index">
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
|
||||
<q-td key="index" :props="props">
|
||||
{{ props.row.index }}
|
||||
</q-td>
|
||||
@@ -37,8 +43,8 @@
|
||||
|
||||
</q-td>
|
||||
<q-td key="date_gift_chat_open" :props="props">
|
||||
|
||||
<div>
|
||||
<div v-if="!!props.row.rec">
|
||||
<div v-if="!!props.row.rec.donatore">
|
||||
<div class="text-center cursor-pointer">
|
||||
<a v-if="!!props.row.rec.donatore.navepersistente.link_chat"
|
||||
:href="props.row.rec.donatore.navepersistente.link_chat"
|
||||
@@ -48,7 +54,8 @@
|
||||
title="Link della Chat Telegram" buttons
|
||||
@save="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'link_chat')">
|
||||
<q-field>
|
||||
<q-input v-model="props.row.rec.donatore.navepersistente.link_chat"/>
|
||||
<q-input
|
||||
v-model="props.row.rec.donatore.navepersistente.link_chat"/>
|
||||
</q-field>
|
||||
</q-popup-edit>
|
||||
<div v-if="!props.row.rec.donatore.navepersistente.link_chat">---</div>
|
||||
@@ -61,22 +68,40 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="props.row.rec.donatore.recmediatore.sent_msg_howto_make_gift">(Link Inviato)
|
||||
<div v-if="!!props.row.rec.donatore.recmediatore">
|
||||
<div v-if="props.row.rec.donatore.recmediatore.sent_msg_howto_make_gift">(Link
|
||||
Inviato)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="date_start" :props="props">
|
||||
<div v-if="!!props.row.rec">
|
||||
<div v-if="!!props.row.rec.donatore.navepersistente">
|
||||
{{ tools.getstrshortDate(props.row.rec.donatore.navepersistente.date_start) }}
|
||||
DA {{ tools.getstrshortDate(props.row.rec.donatore.navepersistente.date_gift_chat_open) }} - A {{
|
||||
tools.getstrshortDate(props.row.rec.donatore.navepersistente.date_start) }}
|
||||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="sognatore" :props="props">
|
||||
<div v-if="props.row.rec.donatore.recsognatori">
|
||||
<q-btn v-if="!!props.row.rec.donatore.recsognatori[0]" flat rounded color="blue"
|
||||
:label="props.row.rec.donatore.recsognatori[0].name + ` ` + props.row.rec.donatore.recsognatori[0].surname"
|
||||
@click="clickseluser(props.row.rec.donatore.recsognatori[0])">
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="provvisoria" :props="props">
|
||||
<div v-if="!!props.row.rec">
|
||||
<div v-if="!!props.row.rec.donatore.navepersistente">
|
||||
<q-toggle dark color="green"
|
||||
v-model="props.row.rec.donatore.navepersistente.provvisoria"
|
||||
@input="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'provvisoria')"></q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="tutor" :props="props">
|
||||
<div v-if="!!props.row.rec">
|
||||
<div class="text-center">
|
||||
<div class="text-center cursor-pointer">
|
||||
{{ props.row.tutor }}
|
||||
@@ -90,7 +115,8 @@
|
||||
<div v-if="!props.row.tutor">---</div>
|
||||
</div>
|
||||
<div v-if="props.row.rec.donatore.navepersistente.tutor_namesurname">
|
||||
<q-btn v-if="!!props.row.rec.donatore.navepersistente.tutor_namesurname" flat
|
||||
<q-btn v-if="!!props.row.rec.donatore.navepersistente.tutor_namesurname"
|
||||
flat
|
||||
rounded color="blue"
|
||||
:label="props.row.rec.donatore.navepersistente.tutor_namesurname"
|
||||
@click="clickseluser({ username: props.row.rec.donatore.navepersistente.tutor, name: props.row.rec.donatore.navepersistente.tutor_namesurname })">
|
||||
@@ -98,44 +124,46 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="mediatore" :props="props">
|
||||
<div v-if="props.row.rec">
|
||||
<q-btn v-if="!!props.row.rec.donatore.recmediatore" flat rounded color="blue"
|
||||
:label="props.row.rec.donatore.recmediatore.name + ` ` + props.row.rec.donatore.recmediatore.surname"
|
||||
@click="clickseluser(props.row.rec.donatore.recmediatore)">
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td key="sognatore" :props="props">
|
||||
<q-btn v-if="!!props.row.rec.donatore.recsognatori[0]" flat rounded color="blue"
|
||||
:label="props.row.rec.donatore.recsognatori[0].name + ` ` + props.row.rec.donatore.recsognatori[0].surname"
|
||||
@click="clickseluser(props.row.rec.donatore.recsognatori[0])">
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="donatori" :props="props">
|
||||
<div v-if="props.row.rec">
|
||||
|
||||
<q-btn v-if="EsistonoDonatori(props.row.rec)" flat rounded color="blue"
|
||||
:label="$t('dashboard.donatori')"
|
||||
@click="clickdonatori(props.row.rec)">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
</q-td>
|
||||
|
||||
<q-td key="DoniConfermati" :props="props">
|
||||
<div v-if="props.row.DoniConfermati > 0" class="DoniConfermati">
|
||||
{{props.row.DoniConfermati }}
|
||||
({{props.row.DoniTotali }})
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="DoniAttesaDiConferma" :props="props">
|
||||
<div v-if="props.row.DoniAttesaDiConferma > 0" class="DoniAttesaDiConferma">{{
|
||||
props.row.DoniAttesaDiConferma }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="DoniMancanti" :props="props">
|
||||
<div v-if="props.row.DoniMancanti > 0" class="DoniMancanti">{{ props.row.DoniMancanti
|
||||
<div v-if="props.row.DoniMancanti > 0" class="DoniMancanti">{{
|
||||
props.row.DoniMancanti
|
||||
}}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="DoniConfermati" :props="props">
|
||||
<div v-if="props.row.DoniConfermati > 0" class="DoniConfermati">{{
|
||||
props.row.DoniConfermati }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="note_bot" :props="props">
|
||||
<div class="Note cursor-pointer">
|
||||
<div v-if="!!props.row.rec.donatore" class="Note cursor-pointer">
|
||||
<div v-if="props.row.rec.donatore.navepersistente.note_bot">{{
|
||||
props.row.rec.donatore.navepersistente.note_bot }}
|
||||
</div>
|
||||
@@ -152,7 +180,7 @@
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="note_interne" :props="props">
|
||||
<div class="Note cursor-pointer">
|
||||
<div v-if="!!props.row.rec.donatore" class="Note cursor-pointer">
|
||||
<div v-if="props.row.rec.donatore.navepersistente.note_interne">{{
|
||||
props.row.rec.donatore.navepersistente.note_interne }}
|
||||
</div>
|
||||
@@ -170,6 +198,7 @@
|
||||
</q-popup-edit>
|
||||
</div>
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
@@ -186,7 +215,7 @@
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div>
|
||||
<div v-if="!!selrec.donatore">
|
||||
<q-table
|
||||
class="my-sticky-header-table"
|
||||
dense
|
||||
@@ -279,6 +308,7 @@
|
||||
<div>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!!seluser.profile.cell"
|
||||
fab-mini
|
||||
icon="fab fa-whatsapp"
|
||||
color="white" text-color="green" type="a"
|
||||
|
||||
32
src/rootgen/admin/listaflotte/listaflotte.scss
Executable file
32
src/rootgen/admin/listaflotte/listaflotte.scss
Executable file
@@ -0,0 +1,32 @@
|
||||
.DoniMancanti{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.DoniAttesaDiConferma{
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.DoniConfermati{
|
||||
color: green;
|
||||
}
|
||||
|
||||
.cont_donatore {
|
||||
border: solid 2px #4198ef;
|
||||
padding: 2px 8px;
|
||||
margin: 2px 4px;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.donatore, .mediatore, .sognatore, .title-nave, .intermedio2, .intermedio3 {
|
||||
padding: 2px 4px;
|
||||
margin: 2px 4px;
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.donatore {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
59
src/rootgen/admin/listaflotte/listaflotte.ts
Executable file
59
src/rootgen/admin/listaflotte/listaflotte.ts
Executable file
@@ -0,0 +1,59 @@
|
||||
import { Component, Watch } from 'vue-property-decorator'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { func_tools } from 'store/Modules/toolsext'
|
||||
import { CalendarStore, GlobalStore, UserStore } from '@store'
|
||||
import { CGridTableRec, CMyFieldDb, CTitleBanner } from '@components'
|
||||
import { colnewstosent, coltemplemail, colopzemail, colmailinglist } from '@src/store/Modules/fieldsTable'
|
||||
import { DefaultNewsState, INewsState } from '@src/model/index'
|
||||
import translate from '../../../globalroutines/util'
|
||||
import { getCookie } from 'utils/auth'
|
||||
import { CTitle } from '../../../components/CTitle'
|
||||
import { CMyPage } from '../../../components/CMyPage'
|
||||
import MixinBase from '../../../mixins/mixin-base'
|
||||
import { CMyNave } from '../../../components/CMyNave'
|
||||
import { lists } from '../../../store/Modules/lists'
|
||||
import { CMyFlotta } from '../../../components/CMyFlotta'
|
||||
|
||||
const namespace = 'CalendarModule'
|
||||
|
||||
@Component({
|
||||
components: { CTitle, CTitleBanner, CMyNave, CMyFlotta },
|
||||
mixins: []
|
||||
})
|
||||
export default class Listaflotte extends MixinBase {
|
||||
public $t: any
|
||||
public $q
|
||||
public incaricamento: boolean = false
|
||||
public loading: boolean = false
|
||||
public showall: boolean = false
|
||||
public tutteleflotte: boolean = false
|
||||
public mostratemporanee: boolean = false
|
||||
public arrflotte = []
|
||||
public async mounted() {
|
||||
|
||||
this.Ricalcola(false)
|
||||
}
|
||||
|
||||
public async Ricalcola(ricalcola) {
|
||||
this.loading = true
|
||||
// this.$q.loading.show({ message: this.$t('otherpages.update') })
|
||||
|
||||
this.arrflotte = await GlobalStore.actions.GetFlotte({ ricalcola, showall: this.showall })
|
||||
|
||||
console.log('this.arrflotte', this.arrflotte)
|
||||
|
||||
// this.$q.loading.hide()
|
||||
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
public SaveField(rec, table, myfield) {
|
||||
if (!!rec) {
|
||||
const mydata = {}
|
||||
mydata[myfield] = rec[myfield]
|
||||
// console.log('mydata', mydata, 'id', rec._id)
|
||||
tools.saveFieldToServer(this, table, rec._id, mydata)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
39
src/rootgen/admin/listaflotte/listaflotte.vue
Executable file
39
src/rootgen/admin/listaflotte/listaflotte.vue
Executable file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="q-my-xs q-gutter-xs q-py-xs text-center">
|
||||
<CTitleBanner class="q-pa-xs"
|
||||
title="Flotte"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
|
||||
<q-toggle v-model="tutteleflotte"
|
||||
label="Tutte le Flotte">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle v-model="mostratemporanee"
|
||||
label="Flotte Temporanee">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<div v-for="(flotta, index) in arrflotte" :key="index">
|
||||
|
||||
<div v-if="!tutteleflotte && ((flotta.DoniTotali !== flotta.DoniConfermati) || (flotta.DoniTotali === 0 && !flotta.provvisoria)) || tutteleflotte || (mostratemporanee && flotta.provvisoria)">
|
||||
|
||||
<CMyFlotta :flottaprop="flotta">
|
||||
|
||||
</CMyFlotta>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./listaflotte.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './listaflotte.scss';
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user