Compare commits

...

15 Commits

Author SHA1 Message Date
Paolo Arena
9828f4818a Carrello Spesa 2020-12-25 03:55:16 +01:00
Paolo Arena
a9c4b09062 Creazione tabella Product 2020-12-21 02:17:47 +01:00
Paolo Arena
3b0a39673a Ayni... 2020-09-14 20:46:37 +02:00
Paolo Arena
f94186be75 Payeer e AdvCash 2020-09-04 00:08:36 +02:00
Paolo Arena
25dcde96df Attacco SPAM 2020-07-13 23:36:15 +02:00
Paolo Arena
570340d645 Aggiornamenti 2020-07-11 17:09:42 +02:00
Paolo Arena
e526231576 Aggiornamenti 2020-07-04 10:54:05 +02:00
Paolo Arena
2fc89ebc82 - Nuovo Sistema di Flotte per Tutor.
X - Mettere anche la email del sognatore, per chi è abituato ad inviarla in quel modo...
X - Controllare che sul sito compaiano le informazioni del Sognatore...
2020-06-08 13:31:44 +02:00
Paolo Arena
bd6ccad236 Aggiornamenti Flotta, Nave, Dashboard, Tabelle, Popupmenu 2020-06-02 22:19:20 +02:00
Paolo Arena
3fb1de9b70 AGGIORNAMENTO SITO
👉🏻 E' possibile ora visualizzare la Posizione Reale d'imbarco di quando si verrà aggiunti alle prossime Navi Definitive.
Le posizioni verranno aggiornate ogni ora in automatico!

👉🏻 Ora gli imbarchi comprendono anche le navi provvisorie, pertanto è possibile annullarli oppure cambiare l'Invitante, dalla lista imbarchi.

 👉🏻 E' ora possibile spostare gli invitati solo se si hanno piu' di 2 invitati per ogni Nave già partita.

👨🏻‍💻 Per i Tutor:
👉🏻- Sostituzioni : Cliccando su "Cerca il Primo Disponibile" vi suggerirà in automatico il primo passeggero disponibile per la sostituzione.

2020-05-19 00:18:55 +02:00
Paolo Arena
d2bf9eb202 Ultimo aggiornamento Nuova versione del Sito ! 2020-05-14 17:23:03 +02:00
Paolo Arena
9dffc92d22 Modifiche ultimate: Grafica Navi , Prenota un Altro Viaggio. 2020-05-13 01:33:07 +02:00
Paolo Arena
e4570fc393 Grosse Modifiche Completate ! 2020-05-11 22:43:54 +02:00
Paolo Arena
33cc721ceb SubAccounts ! 2020-05-10 21:07:01 +02:00
Paolo Arena
67b8e592c0 SubAccounts ! 2020-05-10 21:06:42 +02:00
174 changed files with 21134 additions and 3631 deletions

6087
package-lock.json generated

File diff suppressed because it is too large Load Diff

7
src/.directory Executable file
View File

@@ -0,0 +1,7 @@
[Dolphin]
Timestamp=2019,4,26,20,5,48
Version=4
ViewMode=1
[Settings]
HiddenFilesShown=true

View File

@@ -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)

View File

@@ -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']
}

View File

@@ -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',

View File

@@ -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',

View File

@@ -1,78 +1,76 @@
<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>
<div class="text-subtitle-carica text-trans">{{myop.qualification}}</div>
<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>
<div class="text-subtitle-carica text-trans">{{ myop.qualification }}</div>
</div>
</q-img>
<q-tabs v-model="tab" class="text-teal">
<q-tab label="Info" name="one"></q-tab>
<q-tab v-if="myop.intro" label="Biografia" name="two"></q-tab>
</q-tabs>
<q-separator></q-separator>
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="one">
<div class="text-subtitle-carica">{{ myop.disciplines }}</div>
<div v-if="myop.certifications" class="text-subtitle-certificato">{{ myop.certifications }}</div>
<div class="op__cell">
<q-icon class="flex-icon" name="mobile_friendly"></q-icon>
<span class="q-ma-sm">{{ myop.cell }}</span>
<div class="row justify-center margin_buttons q-gutter-lg">
<q-btn v-if="myop.email" fab-mini icon="fas fa-envelope"
color="blue-grey-6" type="a"
size="sm"
:href="tools.getemailto(myop.email)" target="__blank">
</q-btn>
<q-btn v-if="tools.getHttpForWhatsapp(myop.cell)" fab-mini icon="fab fa-whatsapp"
color="green" type="a"
size="sm"
:href="tools.getHttpForWhatsapp(myop.cell)" target="__blank">
</q-btn>
<q-btn v-if="tools.getHttpForTelegram(myop.usertelegram)" fab-mini icon="fab fa-telegram"
color="blue" type="a"
size="sm"
:href="tools.getHttpForTelegram(myop.usertelegram)" target="__blank">
</q-btn>
</div>
</q-img>
</div>
<div class="op__email">
<q-icon class="flex-icon" name="contact_mail"></q-icon>&nbsp;
<a :href="tools.getemailto(myop.email)" target="_blank">{{ myop.email }}
</a>
</div>
<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-tabs>
<q-separator></q-separator>
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="one">
<div class="text-subtitle-carica">{{myop.disciplines}}</div>
<div v-if="myop.certifications" class="text-subtitle-certificato">{{myop.certifications}}</div>
<div class="op__cell">
<q-icon class="flex-icon" name="mobile_friendly"></q-icon>
<span class="q-ma-sm">{{myop.cell}}</span>
<div class="row justify-center margin_buttons q-gutter-lg">
<q-btn v-if="myop.email" fab-mini icon="fas fa-envelope"
color="blue-grey-6" type="a"
size="sm"
:href="tools.getemailto(myop.email)" target="__blank">
</q-btn>
<q-btn v-if="tools.getHttpForWhatsapp(myop.cell)" fab-mini icon="fab fa-whatsapp"
color="green" type="a"
size="sm"
:href="tools.getHttpForWhatsapp(myop.cell)" target="__blank">
</q-btn>
<q-btn v-if="tools.getHttpForTelegram(myop.usertelegram)" fab-mini icon="fab fa-telegram"
color="blue" type="a"
size="sm"
:href="tools.getHttpForTelegram(myop.usertelegram)" target="__blank">
</q-btn>
</div>
</div>
<div class="op__email">
<q-icon class="flex-icon" name="contact_mail"></q-icon>&nbsp;
<a :href="tools.getemailto(myop.email)" target="_blank">{{myop.email}}
</a>
</div>
<div class="op__facebook" v-if="myop.paginafb">
<a :href="myop.paginafb" target="_blank">
<i aria-hidden="true" class="q-icon fab fa-facebook-f icon_contact links"></i> Pagina Facebook
</a>
</div>
<div class="op__facebook" v-if="myop.paginafb">
<a :href="myop.paginafb" target="_blank">
<i aria-hidden="true" class="q-icon fab fa-facebook-f icon_contact links"></i> Pagina Facebook
</a>
</div>
<div class="op__storia" v-html="myop.intro"></div>
<q-btn rounded size="sm" color="secondary" @click="clicca()">Continua ...</q-btn>
</q-tab-panel>
<div class="op__storia" v-html="myop.intro"></div>
<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-tab-panel name="two">
<div class="op__storia" v-html="myop.info"></div>
</q-tab-panel>
</q-tab-panels>
</q-card>
</div>
</template>
<script lang="ts" src="./CCard.ts">
</script>
<style lang="scss" scoped>
@import './CCard.scss';
@import './CCard.scss';
</style>

View File

@@ -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;

View File

@@ -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>

View File

@@ -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

View File

@@ -1,36 +1,36 @@
<template>
<q-card :class="myclass +` text-center`" :style="mystyle">
<q-circular-progress
show-value
:font-size="fontsize"
:value="myperc"
:size="getsize"
:thickness="0.25"
:color="mycolor"
track-color="grey-3"
class="animated"
>
<q-card :class="myclass +` text-center`" :style="mystyle">
<q-circular-progress
show-value
:font-size="fontsize"
:value="myperc"
:size="getsize"
:thickness="0.25"
:color="mycolor"
track-color="grey-3"
class="animated"
>
<q-avatar v-if="imgsrc" size="60px">
<img :src="imgsrc">
</q-avatar>
<div class="column q-pa-sm text-center">
<div>
{{ mytext }}
</div>
<div class="mlvalue text-h5 text-blue boldhigh text-h5-short"> {{ myval }} {{ textadd }}
</div>
<div v-if="isperc" class="cltexth4">
({{ myperc.toFixed(1) }} %)
</div>
</div>
</q-circular-progress>
</q-card>
<q-avatar v-if="imgsrc" size="60px">
<img :src="imgsrc">
</q-avatar>
<div class="column q-pa-sm text-center">
<div>
{{ mytext }}
</div>
<div v-if="myval" class="mlvalue text-h5 text-blue boldhigh text-h5-short"> {{ myval }} {{ textadd }}
</div>
<div v-if="isperc" class="cltexth5" >
{{ myperc.toFixed(1) }}%
</div>
</div>
</q-circular-progress>
</q-card>
</template>
<script lang="ts" src="./CCardState.ts">
</script>
<style lang="scss" scoped>
@import './CCardState.scss';
@import './CCardState.scss';
</style>

View File

View 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
}

View 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>

View File

@@ -0,0 +1 @@
export {default as CECommerce} from './CECommerce.vue'

View File

@@ -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'

View File

@@ -7,3 +7,10 @@
min-width: 200px;
}
.tdclass, .trclass{
height: 20px !important;
}
.q-table td {
padding: 0;
}

View File

@@ -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,7 +479,10 @@ export default class CGridTableRec extends Vue {
}
public changeCol(newval) {
tools.setCookie(this.mytable, this.colVisib.join('|'))
console.log('changecol', this.mytable)
if (!!this.mytable) {
tools.setCookie(this.mytable, this.colVisib.join('|'))
}
}
public changeTable(mysel) {
@@ -489,7 +529,9 @@ export default class CGridTableRec extends Vue {
this.mytable = mytab.value
}
tools.setCookie('tablesel', this.tablesel)
if (!!this.tablesList) {
tools.setCookie('tablesel', this.tablesel)
}
this.updatedcol()
@@ -521,7 +563,9 @@ export default class CGridTableRec extends Vue {
}
public changefuncAct(newval) {
tools.setCookie(tools.CAN_EDIT, newval)
if (!this.disabilita) {
tools.setCookie(tools.CAN_EDIT, newval)
}
}
public clickrowcol(row, col) {

View File

@@ -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>

File diff suppressed because it is too large Load Diff

View File

@@ -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 '
}
}

View File

@@ -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">

View File

@@ -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;
}

View File

@@ -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>

View 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;
}

View 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
}
}
}

View 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>

View File

@@ -0,0 +1 @@
export {default as CMyCart} from './CMyCart.vue'

View 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
}
}

View File

@@ -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;
}

View File

@@ -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.dashboard = 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) {
this.showuserinfo = true
this.seluser = 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)
return this.dashboard.myself.qualified
if (!!this.dashboard.myself)
return this.dashboard.myself.qualified
return false
}
get Completato9Req() {
// return tools.Is9ReqOk(this.dashboard.myself)
return this.dashboard.myself.qualified && (this.dashboard.myself.numinvitatiattivi >= 2)
if (!!this.dashboard.myself)
return this.dashboard.myself.qualified && (this.dashboard.myself.numinvitatiattivi >= 2)
return false
}
public HasNave() {
return this.dashboard.arrposizioni.length > 0
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
}
}

View File

@@ -1,130 +1,588 @@
<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>
</div>
</q-tabs>
<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">
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="requisiti">
<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 v-if="loading" class="q-ma-md text-center" style="height: 50px;">
<q-spinner-gears size="50px" color="primary"/>
</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.myself.name">
<div v-if="!!dashboard && !!dashboard.myself">
<div v-if="!!dashboard.myself.name">
<CMyRequirement :myseluser="dashboard.myself" :mydashboard="dashboard">
</CMyRequirement>
</div>
<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"
mycolor="accent" @myclick="selectclick">
</CUserBadge>
<div v-else class="q-pa-sm text-center">
{{ $t('dashboard.nessun_invitante')}}
</div>
</CTitleBanner>
<CTitleBanner class="shadow-2" :title="$t('reg.you')" bgcolor="bg-blue"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<CUserBadge v-if="!!dashboard.myself" :user="dashboard.myself" :index="0"
:numpeople="dashboard.downline.length"
@myclick="selectclick"
mycolor="blue">
</CUserBadge>
</CTitleBanner>
<CTitleBanner class="shadow-2 rounded-borders" :title="$t('dashboard.downline')" 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">
<CUserBadge :yourinvite="true" :user="user" mycolor="positive" :index="index"
:numpeople="dashboard.downbyuser[user.username].length"
@myclick="selectclick"
>
</CUserBadge>
<div style="margin-left:10px;" v-for="(user2, index2) in dashboard.downbyuser[user.username]" :key="index2">
<CUserBadge :yourinvite="false" :user="user2" mycolor="orange" :index="index2"
:numpeople="dashboard.downbyuser[user2.username].length"
@myclick="selectclick"
<CMyRequirement :myseluser="dashboard.myself" :mydashboard="dashboard" :mydownline="downline"
@aggiorna="aggiorna"
>
</CUserBadge>
</CMyRequirement>
</div>
</div>
</q-list>
<div v-else class="q-pa-sm text-center">
{{ $t('dashboard.nessun_invitato')}}
</div>
</CTitleBanner>
<div class="row justify-center q-ma-sm">
<q-btn push
rounded
color="primary"
size="md"
:label="$t('pages.invita')"
icon="fas fa-user-plus"
to="/invite">
</q-btn>
</div>
</q-tab-panel>
<q-tab-panel name="invitati">
<!--<CTitleBanner v-if="invitatinotreg" class="shadow-2 rounded-borders" :title="$t('dashboard.downnotreg')"
bgcolor="bg-grey"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<CTitleBanner class="shadow-2" :title="$t('reg.aportador_solidario')" bgcolor="bg-accent"
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 v-if="!!dashboard.aportador" :user="dashboard.aportador" :index="0"
:showregalainv="false"
mycolor="accent" @myclick="selectclick">
</CUserBadge>
</div>
</q-list>
</CTitleBanner>-->
<div v-else class="q-pa-sm text-center">
{{ $t('dashboard.nessun_invitante')}}
</div>
</CTitleBanner>
<CTitleBanner class="shadow-2" :title="$t('reg.you')" bgcolor="bg-blue"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<CUserBadge v-if="!!dashboard.myself" :user="dashboard.myself" :index="0"
:showregalainv="false"
@myclick="selectclick"
mycolor="blue">
</CUserBadge>
</CTitleBanner>
<CTitleBanner class="shadow-2 rounded-borders" :title="getstrinvitati" bgcolor="bg-positive"
clcolor="text-white"
mystyle=" " myclass="myshad" :canopen="true">
<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"
:showregalainv="false"
@myclick="selectclick"
>
</CUserBadge>
<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"
: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">
<q-btn push
rounded
color="primary"
size="md"
:label="$t('pages.invita')"
icon="fas fa-user-plus"
to="/invite">
</q-btn>
</div>
<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="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>
</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">&nbsp;</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) }} &nbsp;-->
{{ 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) }} &nbsp;-->
{{ 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) }} &nbsp;-->
{{ 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>
<!--
<CTitleBanner class="q-pa-xs" :title="$t('text.dashboard.madegift')" bgcolor="bg-info" clcolor="text-white"
@@ -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>

View File

@@ -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

View File

@@ -1,39 +1,56 @@
<template>
<div>
<CTitleBanner :title="title"></CTitleBanner>
<form
autocorrect="off"
autocapitalize="off"
autocomplete="off"
spellcheck="false">
<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"
autocapitalize="off"
autocomplete="off"
spellcheck="false">
<q-btn rounded size="sm" color="primary">
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy>
<q-color v-model="mycolor" @change="setcolor"></q-color>
</q-popup-proxy>
</q-icon>
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy>
<q-color v-model="mycolor" @change="setcolor"></q-color>
</q-popup-proxy>
</q-icon>
</q-btn>
<q-editor
ref="editor_ref"
toolbar-text-color="white"
toolbar-toggle-color="yellow-8"
toolbar-bg="primary"
:toolbar="toolbarcomp"
debounce="500"
:fonts="myfonts"
@input="changeval"
@paste.native="evt => pasteCapture(evt)"
@keyup.enter.stop
v-model="myvalue">
ref="editor_ref"
toolbar-text-color="white"
toolbar-toggle-color="yellow-8"
toolbar-bg="primary"
:toolbar="toolbarcomp"
debounce="500"
:fonts="myfonts"
@input="changeval"
@paste.native="evt => pasteCapture(evt)"
@keyup.enter.stop
v-model="myvalue">
</q-editor>
</form>
</div>
</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>
<script lang="ts" src="./CMyEditor.ts">
</script>
<style lang="scss" scoped>
@import './CMyEditor.scss';
@import './CMyEditor.scss';
</style>

View File

@@ -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) {

View File

@@ -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="self-center full-width no-outline text-center" tabindex="0">{{title}}</div>
<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"
@@ -205,25 +217,25 @@
:isarray="true">
</CMyToggleList>
<!--
<q-select
v-model="myvalue"
rounded
dense
outlined
multiple
options-dense
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
emit-value
map-options
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px"
>
<!--
<q-select
v-model="myvalue"
rounded
dense
outlined
multiple
options-dense
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
emit-value
map-options
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px"
>
</q-select>
-->
</q-select>
-->
</div>
<div v-else-if="col.fieldtype === tools.FieldType.multioption">
</div>
@@ -239,5 +251,5 @@
</script>
<style lang="scss" scoped>
@import './CMyFieldDb.scss';
@import './CMyFieldDb.scss';
</style>

View 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
}
}

View 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;
}

View 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; '
}
}

View 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>

View File

@@ -0,0 +1 @@
export {default as CMyFlotta} from './CMyFlotta.vue'

View 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
}
}

View File

@@ -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;
}

View File

@@ -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,12 +583,18 @@ export default class CMyNave extends MixinNave {
}
public sonoSecondaTessituraDonatore() {
const mediatore = this.getmediatore()
for (const rec of this.nave.rec.donatore.arrdonatori) {
if (!!rec) {
if (mediatore) {
if ((mediatore.ind_order === rec.ind_order) && (rec.num_tess % 2) === 0)
return true
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) {
if ((mediatore.ind_order === rec.ind_order) && (rec.num_tess % 2) === 0)
return true
}
}
}
}
}
}
@@ -419,8 +607,10 @@ export default class CMyNave extends MixinNave {
}
public getmediatore() {
if (!!this.nave.rec.mediatore)
return this.nave.rec.mediatore.recmediatore
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 += '&nbsp;'
// }
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,10 +748,12 @@ export default class CMyNave extends MixinNave {
}
public getclpos(rec) {
if (this.NaveeseguitabyInd(this.getrigaNaveByInd(rec.ind))) {
return 'you'
} else {
return ''
if (!!this.dashboard) {
if (this.dashboard.lastnave.riga >= this.getrigaNaveByInd(rec.ind)) {
return 'you'
} else {
return ''
}
}
}
@@ -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)
myrec = this.nave.rec
else {
if (this.listanavi) {
if (!!this.nave)
myrec = this.nave.rec
} 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'
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -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) {

View File

@@ -1,219 +1,219 @@
<template>
<div :class="getclassCol(col)">
<div v-if="col.fieldtype === tools.FieldType.listimages">
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
@showandsave="Savedb">
<div :class="getclassCol(col)">
<div v-if="col.fieldtype === tools.FieldType.listimages">
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
@showandsave="Savedb">
</CGallery>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.image">
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
@showandsave="Savedb">
</CGallery>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.image">
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
@showandsave="Savedb">
</CGallery>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
<div>
{{myvalue}}
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
<div>
{{myvalue}}
</div>
</div>
<div v-else>
<!-- Edit Value -->
<span v-if="col.fieldtype === tools.FieldType.date">
</CGallery>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
<div>
{{myvalue}}
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
<div>
{{myvalue}}
</div>
</div>
<div v-else>
<!-- Edit Value -->
<span v-if="col.fieldtype === tools.FieldType.date">
<CDateTime
:label="col.label"
class="cursor-pointer"
:valueDate="myvalue"
:readonly="false"
:minuteinterval="minuteinterval"
:dense="true"
:canEdit="canEdit"
@savetoclose="SaveValueInt"
@show="OpenEdit">
:label="col.label"
class="cursor-pointer"
:valueDate="myvalue"
:readonly="false"
:minuteinterval="minuteinterval"
:dense="true"
:canEdit="canEdit"
@savetoclose="SaveValueInt"
@show="OpenEdit">
</CDateTime>
</span>
<div v-if="col.fieldtype !== tools.FieldType.date">
<div>
<div v-if="col.fieldtype === tools.FieldType.binary">
<CMyChipList
:type="tools.FieldType.binary"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<!-- Show Value -->
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<CMyChipList
:type="tools.FieldType.multiselect"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.select">
<CMyChipList
myclass="text-center"
:type="tools.FieldType.select"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.boolean">
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
@input="Savedb"></q-toggle>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.html">
<div v-html="visuValByType(myvalue, col, row)">
<div v-if="col.fieldtype !== tools.FieldType.date">
<div>
<div v-if="col.fieldtype === tools.FieldType.binary">
<CMyChipList
:type="tools.FieldType.binary"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<!-- Show Value -->
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<CMyChipList
:type="tools.FieldType.multiselect"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.select">
<CMyChipList
myclass="text-center"
:type="tools.FieldType.select"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</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)" @click="visueditor = true">
</div>
</div>
<div v-else>
{{ visuValByType(myvalue, col, row) }}
</div>
</div>
<q-popup-edit
v-if="canEdit"
v-model="myvalue"
:disable="col.disable"
:title="col.title"
buttons
persistent
@save="SaveValueInt"
@show="OpenEdit">
<div v-if="col.fieldtype === tools.FieldType.boolean">
<q-checkbox v-model="myvalue" :label="col.title">
</q-checkbox>
{{ visuValByType(myvalue, col, row) }}
</div>
<div v-else-if="col.fieldtype === tools.FieldType.string">
<q-input v-model="myvalue"
autogrow
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.password">
<q-input v-model="myvalue"
type="password"
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.number">
<q-input v-model="myvalue" type="number"
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.binary">
<CMyToggleList :label="col.title"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:value.sync="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
: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"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:useinput="false">
</CMySelect>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
<q-input
v-model="countryname"
:readonly="true"
rounded dense
debounce="1000"
>
<template v-slot:prepend>
<div style="font-size: 1rem;">
<vue-country-code
:defaultCountry="myvalue"
:disabledFetchingCountry="true"
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }">
</vue-country-code>
</div>
</template>
</q-input>
<div style="height: 180px;">
</div>
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
<vue-tel-input
@country-changed="intcode_change"
v-model="myvalue"
:placeholder="$t('reg.cell')"
:enabledCountryCode="true"
inputClasses="clCell"
wrapperClasses="clCellCode">
</vue-tel-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<div>join: {{col.jointable}}</div>
<q-select
v-model="myvalue"
rounded
outlined
multiple
dense
options-dense
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
emit-value
map-options
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px"
@input="changeCol">
</q-select>
</div>
</q-popup-edit>
</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 && col.fieldtype !== tools.FieldType.html"
v-model="myvalue"
:disable="col.disable"
:title="col.title"
buttons
persistent
@save="SaveValueInt"
@show="OpenEdit">
<div v-if="col.fieldtype === tools.FieldType.boolean">
<q-checkbox v-model="myvalue" :label="col.title">
</q-checkbox>
{{ visuValByType(myvalue, col, row) }}
</div>
<div v-else-if="col.fieldtype === tools.FieldType.string">
<q-input v-model="myvalue"
autogrow
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.password">
<q-input v-model="myvalue"
type="password"
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.number">
<q-input v-model="myvalue" type="number"
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.binary">
<CMyToggleList :label="col.title"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:value.sync="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)">
</CMyToggleList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.select">
<CMySelect :label="col.title"
:value.sync="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:useinput="false">
</CMySelect>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
<q-input
v-model="countryname"
:readonly="true"
rounded dense
debounce="1000"
>
<template v-slot:prepend>
<div style="font-size: 1rem;">
<vue-country-code
:defaultCountry="myvalue"
:disabledFetchingCountry="true"
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }">
</vue-country-code>
</div>
</template>
</q-input>
<div style="height: 180px;">
</div>
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
<vue-tel-input
@country-changed="intcode_change"
v-model="myvalue"
:placeholder="$t('reg.cell')"
:enabledCountryCode="true"
inputClasses="clCell"
wrapperClasses="clCellCode">
</vue-tel-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<div>join: {{col.jointable}}</div>
<q-select
v-model="myvalue"
rounded
outlined
multiple
dense
options-dense
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
emit-value
map-options
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px"
@input="changeCol">
</q-select>
</div>
</q-popup-edit>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" src="./CMyPopupEdit.ts">
</script>
<style lang="scss" scoped>
@import './CMyPopupEdit.scss';
@import './CMyPopupEdit.scss';
</style>

View File

@@ -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
error = error || (this.aportador_solidario === this.seluser.aportador_solidario)
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')
}
}

View File

@@ -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">

View File

@@ -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
}
}

View File

@@ -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>

View File

@@ -0,0 +1,12 @@
.card .product-image {
height: 300px;
}
.text-title {
font-size: 0.9rem;
}
.centeritems{
place-content: center;
}

View 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
}
}
}

View 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>

View File

@@ -0,0 +1 @@
export {default as CProductCard} from './CProductCard.vue'

View File

@@ -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>

View File

@@ -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'

View File

@@ -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"

View File

@@ -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: {

View File

@@ -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'

View File

@@ -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"

View File

@@ -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'

View File

@@ -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"

View File

@@ -4,6 +4,7 @@ import { CSignIn } from '../../components/CSignIn'
import { tools } from '../../store/Modules/tools'
@Component({
name: 'CSigninNoreg',
components: { CSignIn }
})

View 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;
}

View 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 })
}
}

View 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>

View File

@@ -0,0 +1 @@
export {default as CSingleCart} from './CSingleCart.vue'

View File

@@ -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()

View File

@@ -1,404 +1,449 @@
<template>
<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
header-nav
done-color="green"
active-color="blue"
inactive-color="grey"
animated
>
<!--
<q-step
id="step1"
:name="1"
:title="emailtext"
icon="mail"
:done="isEmailVerified"
:error="!isEmailVerified"
:error-icon="geterricon(true)"
>
<q-stepper-navigation v-if="isEmailVerified">
<q-btn @click="step = 2" color="primary" :label="$t('dialog.avanti')"></q-btn>
</q-stepper-navigation>
</q-step>
<q-step
id="step2"
:name="2"
:title="telegramtext"
icon="fab fa-telegram"
:done="TelegVerificato"
:error="!TelegVerificato"
:error-icon="geterricon(true)"
>
<q-stepper-navigation>
<q-btn v-if="TelegVerificato" @click="step = 3" color="primary" :label="$t('dialog.avanti')"></q-btn>
<q-btn flat @click="step = 1" color="primary" :label="$t('dialog.indietro')" class="q-ml-sm"></q-btn>
</q-stepper-navigation>
</q-step>
-->
<q-step
v-for="(mystep, index) in arrsteps"
:id="`step`+(index)"
:key="mystep.title"
:name="index"
:title="gettextstep(mystep, index)"
:icon="geticonstep(mystep)"
:done-color="geticoncolor(mystep.title)"
:done="mystep.funccheck(index)"
:error="getiferror(mystep.funccheck_error(index), mystep.funccheck(index))"
:error-icon="geterricon(mystep.funccheck(index), mystep)"
:error-color="geterrcolor(mystep)"
>
<div v-if="mystep.title === 'reg.email'">
<CVerifyEmail>
</CVerifyEmail>
</div>
<div v-else-if="mystep.title === 'reg.telegram'">
<q-chip v-if="TelegVerificato" color="positive" text-color="white" icon="fab fa-telegram">
{{ telegramtext }}
</q-chip>
<q-chip v-else color="negative" text-color="white" icon="email">
{{ telegramtext }}
</q-chip>
<CVerifyTelegram v-if="TelegCode || !TelegVerificato">
</CVerifyTelegram>
<div v-else>
<br>
<q-btn color="primary" icon="fab fa-telegram"
:label="$t('components.authentication.telegram.openbot')"
type="a"
:href="getLinkBotTelegram" target="_blank"></q-btn>
<br>
</div>
</div>
<div v-else-if="mystep.title === 'steps.linee_guida'">
<CGuidelines :showconditions="true">
</CGuidelines>
</div>
<div v-else-if="mystep.title === 'steps.video_intro'">
<CVideoPromo :showconditions="true">
</CVideoPromo>
</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>
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_paypal')" bgcolor="bg-primary"
clcolor="text-white"
myclass="myshad" canopen="true" :visible="false">
<CVideo myvideokey="RqsWDlpnN3k">
</CVideo>
<q-btn class="q-ma-md" size="md" type="a" href="https://www.paypal.com/"
target="_blank" rounded color="primary" icon="info"
:label="$t('steps.paymenttype_paypal_link')">
</q-btn>
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_paypal_carta_conto')"
bgcolor="bg-primary"
clcolor="text-white"
myclass="myshad" canopen="true" :visible="true">
<CVideo myvideokey="wRNBmQrsnes">
</CVideo>
</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')"
:msgFalse="$t('steps.paymenttype_long2')">
</CRequisiti>
<CMyFieldDb :title="$t('reg.paymenttype')"
table="users"
mykey="profile"
mysubkey="paymenttypes"
:type="tools.FieldType.multiselect"
jointable="paymenttypes">
</CMyFieldDb>
<CMyFieldDb v-if="isselectPaypal" :title="$t('reg.email_paypal')"
table="users"
mykey="profile"
mysubkey="email_paypal"
: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>
<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"
></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>
</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="mystep.descr">
<div v-html="$t(mystep.descr)"></div>
</div>
<CTitleBanner class="q-pa-xs" :title="$t('steps.zoom_what')" bgcolor="bg-primary"
clcolor="text-white"
myclass="myshad" canopen="true" :visible="false">
<div>
<CVideo myvideokey="2yHhNktRDjg">
</CVideo>
<div v-if="toolsext.isLang('it')">
<h3>ISTRUZIONI ZOOM</h3>
<ul style="text-align: left; font-size:0.75rem;">
<li>1. Scarica l'app (<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>)
</li>
<li>2. Inserisci il tuo Nome e Cognome per essere riconosciuto</li>
<li>3. Clicca "join meeting"</li>
<li>4. Clicca "call in device" altrimenti non potrai sentire 🔊</li>
<li>5. Clicca il microfono per Attivarlo o Silenziarlo.</li>
</ul>
<div class="text-h6"><strong>In più avrai:</strong></div>
<ul style="text-align: left; font-size:0.75rem;">
<li>Tasto per togliere il video (📹) ❌</li>
<li>Tasto 'Share': per condividere contenuti condivisi</li>
<li>Tasto 'Partecipants' in cui sulla sinistra, in basso, troverai la CHAT.</li>
<li>Tasto 'More': troverai Raise Hands per fare le domande.</li>
</ul>
</div>
<div v-else>
<h3>ZOOM INSTRUCTIONS</h3>
<ul style="text-align: left; font-size:0.75rem;">
<li>1. Download the app (<a
href="https://play.google.com/store/apps/details?id=us.zoom.videomeetings"
target="_blank">store</a> or <a href="https://zoom.us/support/download"
target="_blank">by PC</a>)
</li>
<li>2. Enter your first and last name to be recognized</li>
<li>3. Click "join meeting"</li>
<li>4. Click "call in device" otherwise you won't be able to hear 🔊</li>
<li>5. Click the microphone to turn it on or mute it</li>
</ul>
<div class="text-h6"><strong>More you will have:</strong></div>
<ul style="text-align: left; font-size:0.75rem;">
<li>Cancel button to remove the video (📹) </li>
<li>Share' button: to share shared content</li>
<li>Participants' button where on the left, at the bottom, you will find the
CHAT.
</li>
<li>Button 'More': you'll find Raise Hands to ask questions.</li>
</ul>
</div>
</div>
</CTitleBanner>
</div>
<div v-else-if="mystep.title === 'steps.sharemovement'">
<!--<CRequisiti :statebool="getnuminvitati() >= 2" :msgTrue="$t('steps.sharemovement_hai_invitato')"
:msgFalse="$t('steps.sharemovement_devi_invitare_almeno_2')">
</CRequisiti>-->
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
:label="$t('pages.dashboard')"></q-btn>
<div v-if="mystep.descr">
<div v-html="$t(mystep.descr)"></div>
</div>
<div class="row justify-center q-ma-sm">
<q-btn push
rounded
color="primary"
size="md"
:label="$t('pages.invita')"
icon="fas fa-user-plus"
to="/invite">
</q-btn>
</div>
<CCopyBtn :title="$t('reg.reflink')" :texttocopy="getRefLink">
</CCopyBtn>
<CCopyBtn :title="$t('reg.linkzoom')" :texttocopy="tools.getLinkZoom()">
</CCopyBtn>
</div>
<div v-else-if="mystep.title === 'dashboard.inv_attivi'">
<CRequisiti v-if="getnuminvitati() > 0" :statebool="getnuminvitati_attivi() >= 2"
:msgTrue="$t('steps.sharemovement_invitati_attivi_si')"
:msgFalse="$t('steps.sharemovement_invitati_attivi_no')">
</CRequisiti>
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
:label="$t('pages.dashboard')"></q-btn>
<div v-if="mystep.descr">
<div v-html="$t(mystep.descr)"></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>
<CRequisiti :statebool="CompletatoRequisiti" :msgTrue="$t('steps.enter_prog_requisiti_ok')"
:msgFalse="$t('steps.enter_prog_completa_requisiti')">
</CRequisiti>
<CRequisiti v-if="Completato9Req" :statebool="Completato9Req"
:msgTrue="$t('steps.enter_nave_9req_ok', {sitename: $t('pages.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>
</CMyInnerPage>
</div>
</div>
<q-stepper-navigation>
<q-btn v-if="index < getlaststep" @click="nextstep(index)"
color="primary" :label="$t('dialog.avanti')" class="q-ml-sm"></q-btn>
<q-btn flat @click="step = index - 1" color="primary" :label="$t('dialog.indietro')"
class="q-ml-sm"></q-btn>
</q-stepper-navigation>
</q-step>
<!--<q-step-->
<!--:name="getlaststep"-->
<!--:title="$t('dialog.finish')"-->
<!--icon="check-circle"-->
<!--:done="step > getlaststep"-->
<!--&gt;-->
<!--<q-stepper-navigation>-->
<!--<q-btn flat @click="step = getlaststep - 1" color="primary" :label="$t('dialog.indietro')" class="q-ml-sm"></q-btn>-->
<!--</q-stepper-navigation>-->
<!--</q-step>-->
</q-stepper>
</CTitleBanner>
<q-page-sticky expand position="top" v-if="!stepcompleti">
<q-toolbar class="bg-yellow-7 glossy text-white">
<q-toolbar-title @click="scrolltostep(steptodo)">
<div class="flex flex-center q-mt-xs">
<div class="flex flex-center">
<q-badge color="white" text-color="grey-8" style="opacity: 0.9; font-size: 0.85rem;"
:label="strpercstep"></q-badge>
</div>
<q-linear-progress size="lg" :value="percstep" color="green" class="q-pa-xs q-mb-xs bg-red">
</q-linear-progress>
</div>
<div class="flex flex-center q-mb-xs">
<q-badge color="white" text-color="blue" :label="progressstep" class="wrap"
style="font-size: 0.85rem; height:20px; font-weight: bold;"></q-badge>
</div>
</q-toolbar-title>
<q-btn round dense icon="arrow_forward" color="blue" @click="scrolltostep(steptodo)"></q-btn>
</q-toolbar>
</q-page-sticky>
<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
header-nav
done-color="green"
active-color="blue"
inactive-color="grey"
animated
>
<!--
<q-step
id="step1"
:name="1"
:title="emailtext"
icon="mail"
:done="isEmailVerified"
:error="!isEmailVerified"
:error-icon="geterricon(true)"
>
<q-stepper-navigation v-if="isEmailVerified">
<q-btn @click="step = 2" color="primary" :label="$t('dialog.avanti')"></q-btn>
</q-stepper-navigation>
</q-step>
<q-step
id="step2"
:name="2"
:title="telegramtext"
icon="fab fa-telegram"
:done="TelegVerificato"
:error="!TelegVerificato"
:error-icon="geterricon(true)"
>
<q-stepper-navigation>
<q-btn v-if="TelegVerificato" @click="step = 3" color="primary" :label="$t('dialog.avanti')"></q-btn>
<q-btn flat @click="step = 1" color="primary" :label="$t('dialog.indietro')" class="q-ml-sm"></q-btn>
</q-stepper-navigation>
</q-step>
-->
<q-step
v-for="(mystep, index) in arrsteps"
:id="`step`+(index)"
:key="mystep.title"
:name="index"
:title="gettextstep(mystep, index)"
:icon="geticonstep(mystep)"
:done-color="geticoncolor(mystep.title)"
:done="mystep.funccheck(index)"
:error="getiferror(mystep.funccheck_error(index), mystep.funccheck(index))"
:error-icon="geterricon(mystep.funccheck(index), mystep)"
:error-color="geterrcolor(mystep)"
>
<div v-if="mystep.title === 'reg.email'">
<CVerifyEmail>
</CVerifyEmail>
</div>
<div v-else-if="mystep.title === 'reg.telegram'">
<q-chip v-if="TelegVerificato" color="positive" text-color="white" icon="fab fa-telegram">
{{ telegramtext }}
</q-chip>
<q-chip v-else color="negative" text-color="white" icon="email">
{{ telegramtext }}
</q-chip>
<CVerifyTelegram v-if="TelegCode || !TelegVerificato">
</CVerifyTelegram>
<div v-else>
<br>
<q-btn color="primary" icon="fab fa-telegram"
:label="$t('components.authentication.telegram.openbot', {botname: $t('ws.botname')})"
type="a"
:href="getLinkBotTelegram" target="_blank"></q-btn>
<br>
</div>
</div>
<div v-else-if="mystep.title === 'steps.linee_guida'">
<CGuidelines :showconditions="true">
</CGuidelines>
</div>
<div v-else-if="mystep.title === 'steps.video_intro'">
<CVideoPromo :showconditions="true">
</CVideoPromo>
</div>
<div v-else-if="mystep.title === 'steps.paymenttype'">
<div v-if="mystep.descr">
<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">
<CVideo myvideokey="RqsWDlpnN3k">
</CVideo>
<q-btn class="q-ma-md" size="md" type="a" href="https://www.paypal.com/"
target="_blank" rounded color="primary" icon="info"
:label="$t('steps.paymenttype_paypal_link')">
</q-btn>
<CTitleBanner class="q-pa-xs" :title="$t('steps.paymenttype_paypal_carta_conto')"
bgcolor="bg-primary"
clcolor="text-white"
myclass="myshad" canopen="true" :visible="true">
<CVideo myvideokey="wRNBmQrsnes">
</CVideo>
</CTitleBanner>
</CTitleBanner>
-->
<div>
<!--<CRequisiti :statebool="RequisitoPayment" :msgTrue="$t('steps.paymenttype_long2')"
:msgFalse="$t('steps.paymenttype_long2')">
</CRequisiti>-->
<CMyFieldDb :title="$t('reg.paymenttype')"
table="users"
mykey="profile"
mysubkey="paymenttypes"
:type="tools.FieldType.multiselect"
jointable="paymenttypes">
</CMyFieldDb>
<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, {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">
</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, {sitename: $t('ws.sitename')})"></div>
</div>
<CTitleBanner class="q-pa-xs" :title="$t('steps.zoom_what')" bgcolor="bg-primary"
clcolor="text-white"
myclass="myshad" canopen="true" :visible="false">
<div>
<CVideo myvideokey="2yHhNktRDjg">
</CVideo>
<div v-if="toolsext.isLang('it')">
<h3>ISTRUZIONI ZOOM Cloud Meeting</h3>
<ul style="text-align: left; font-size:0.75rem;">
<li>1. Scarica l'app per: (<a
href="https://play.google.com/store/apps/details?id=us.zoom.videomeetings"
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>
<li>4. Clicca "call in device" altrimenti non potrai sentire 🔊</li>
<li>5. Clicca il microfono per Attivarlo o Silenziarlo.</li>
</ul>
<div class="text-h6"><strong>In più avrai:</strong></div>
<ul style="text-align: left; font-size:0.75rem;">
<li>Tasto per togliere il video (📹) ❌</li>
<li>Tasto 'Share': per condividere contenuti condivisi</li>
<li>Tasto 'Partecipants' in cui sulla sinistra, in basso, troverai la CHAT.</li>
<li>Tasto 'More': troverai Raise Hands per fare le domande.</li>
</ul>
</div>
<div v-else>
<h3>ZOOM INSTRUCTIONS</h3>
<ul style="text-align: left; font-size:0.75rem;">
<li>1. Download the app (<a
href="https://play.google.com/store/apps/details?id=us.zoom.videomeetings"
target="_blank">store</a> or <a href="https://zoom.us/support/download"
target="_blank">by PC</a>)
</li>
<li>2. Enter your first and last name to be recognized</li>
<li>3. Click "join meeting"</li>
<li>4. Click "call in device" otherwise you won't be able to hear 🔊</li>
<li>5. Click the microphone to turn it on or mute it</li>
</ul>
<div class="text-h6"><strong>More you will have:</strong></div>
<ul style="text-align: left; font-size:0.75rem;">
<li>Cancel button to remove the video (📹) </li>
<li>Share' button: to share shared content</li>
<li>Participants' button where on the left, at the bottom, you will find the
CHAT.
</li>
<li>Button 'More': you'll find Raise Hands to ask questions.</li>
</ul>
</div>
</div>
</CTitleBanner>
</div> -->
<div v-else-if="mystep.title === 'steps.sharemovement'">
<!--<CRequisiti :statebool="getnuminvitati() >= 2" :msgTrue="$t('steps.sharemovement_hai_invitato')"
:msgFalse="$t('steps.sharemovement_devi_invitare_almeno_2')">
</CRequisiti>-->
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
:label="$t('pages.dashboard')"></q-btn>
<div v-if="mystep.descr">
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
</div>
<div class="row justify-center q-ma-sm">
<q-btn push
rounded
color="primary"
size="md"
:label="$t('pages.invita')"
icon="fas fa-user-plus"
to="/invite">
</q-btn>
</div>
<CCopyBtn :title="$t('reg.reflink')" :texttocopy="getRefLink">
</CCopyBtn>
<CCopyBtn :title="$t('reg.linkzoom')" :texttocopy="tools.getLinkZoom()">
</CCopyBtn>
</div>
<div v-else-if="mystep.title === 'dashboard.inv_attivi'">
<CRequisiti v-if="getnuminvitati() > 0" :statebool="getnuminvitati_attivi() >= 2"
:msgTrue="$t('steps.sharemovement_invitati_attivi_si')"
:msgFalse="$t('steps.sharemovement_invitati_attivi_no')">
</CRequisiti>
<q-btn class="q-mb-md" rounded size="md" color="primary" to="/dashboard"
:label="$t('pages.dashboard')"></q-btn>
<div v-if="mystep.descr">
<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, {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('ws.sitename')})"
:msgFalse="$t('steps.enter_nave_9req_ko')">
</CRequisiti>
</div>
<div v-else>
<div v-if="mystep.page">
<CMyInnerPage :path=mystep.page>
<div v-if="mystep.descr">
<div v-html="$t(mystep.descr, {sitename: $t('ws.sitename')})"></div>
</div>
</CMyInnerPage>
</div>
</div>
<q-stepper-navigation>
<q-btn v-if="index < getlaststep" @click="nextstep(index)"
color="primary" :label="$t('dialog.avanti')" class="q-ml-sm"></q-btn>
<q-btn flat @click="step = index - 1" color="primary" :label="$t('dialog.indietro')"
class="q-ml-sm"></q-btn>
</q-stepper-navigation>
</q-step>
<!--<q-step-->
<!--:name="getlaststep"-->
<!--:title="$t('dialog.finish')"-->
<!--icon="check-circle"-->
<!--:done="step > getlaststep"-->
<!--&gt;-->
<!--<q-stepper-navigation>-->
<!--<q-btn flat @click="step = getlaststep - 1" color="primary" :label="$t('dialog.indietro')" class="q-ml-sm"></q-btn>-->
<!--</q-stepper-navigation>-->
<!--</q-step>-->
</q-stepper>
</CTitleBanner>
<q-page-sticky expand position="top" v-if="!stepcompleti">
<q-toolbar class="bg-yellow-7 glossy text-white">
<q-toolbar-title @click="scrolltostep(steptodo)">
<div class="flex flex-center q-mt-xs">
<div class="flex flex-center">
<q-badge color="white" text-color="grey-8" style="opacity: 0.9; font-size: 0.85rem;"
:label="strpercstep"></q-badge>
</div>
<q-linear-progress size="lg" :value="percstep" color="green" class="q-pa-xs q-mb-xs bg-red">
</q-linear-progress>
</div>
<div class="flex flex-center q-mb-xs">
<q-badge color="white" text-color="blue" :label="progressstep" class="wrap"
style="font-size: 0.85rem; height:20px; font-weight: bold;"></q-badge>
</div>
</q-toolbar-title>
<q-btn round dense icon="arrow_forward" color="blue" @click="scrolltostep(steptodo)"></q-btn>
</q-toolbar>
</q-page-sticky>
</div>
</template>
<script lang="ts" src="./CStatus.ts">
</script>
<style lang="scss">
@import './CStatus.scss';
@import './CStatus.scss';
</style>

View File

@@ -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() {

View File

@@ -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">
<CListNationality :mydata="datastat.arr_nations">
</CGeoChart>-->
</CListNationality>
<CLineChart :mydata="datastat.reg_daily" :title="$t('stat.reg_daily')">
<div class="row q-pa-sm text-center justify-center">
<!--
<div class="clBorderZoom">
<CListNationality :mydata="datastat.arr_nations">
</CLineChart>
<CLineChart :mydata="datastat.reg_daily" :title="$t('stat.reg_total')" :offset="datastat.numreg_untilday" :sum="true"
:mycolors="['#0b0', '#666']">
</CListNationality>
</div>-->
<div class="clBorderTutor">
<CLineChart :mydata="datastat.reg_daily" :title="$t('stat.reg_daily')">
</CLineChart>
</CLineChart>
<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>

View File

@@ -1,3 +1,9 @@
.myshad {
text-shadow: .125rem .125rem .125rem darkgray;
}
.nonvisibile{
border-radius: 16px;
border: red solid 3px;
padding: 4px;
}

View File

@@ -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'
}
}

View File

@@ -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()"
>

View File

@@ -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,10 +51,18 @@ export default class CUserBadge extends MixinBase {
}
public getindorder(user) {
if (!!user.ind_order)
return ' (' + user.ind_order + ')'
else
return ''
if (!!user.index)
return ' (' + user.index + ')'
return ''
}
public getquanti(user) {
if (!!user.quanti) {
if (user.quanti > 1) {
return ' (' + user.quanti + ' ' + this.$t('reg.volte') + ')'
}
}
return ''
}
public getmoneycolor(user) {
@@ -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) {
@@ -120,7 +132,7 @@ export default class CUserBadge extends MixinBase {
return (user.numinvitati / 2) * 100
}
public getcolorpeople(user){
public getcolorpeople(user) {
if (user.numinvitati === 1)
return 'blue'
else if (user.numinvitati === 2)

View File

@@ -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

View File

@@ -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
@@ -61,5 +54,5 @@
</script>
<style lang="scss" scoped>
@import './CVideoPromo';
@import './CVideoPromo';
</style>

View File

@@ -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;
}

View File

@@ -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'

View File

@@ -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') }}

View File

@@ -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/'

View File

@@ -9,7 +9,7 @@ import {
IProject,
ITodo,
Privacy,
IPerson,
IUserProfile,
IFunctionality,
IPreloadImages
} from '../model/index'

View File

@@ -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

View File

@@ -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">

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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
@@ -283,7 +289,7 @@ export interface ITimeLineMain {
}
export interface IImgGallery {
_id?:string
_id?: string
imagefile: string
order?: number
alt?: 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
}

View File

@@ -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
View 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[]
}

View File

@@ -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

View File

@@ -13,3 +13,4 @@ export * from './Projects'
export * from './Calendar'
export * from './Estimate'
export * from './Products'

View File

@@ -46,6 +46,10 @@ export default class Home extends Vue {
this.initprompt()
}
get mythis() {
return this
}
public mounted() {
let primo = true
const mytime = 10000

View File

@@ -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 !"/>-->

View File

@@ -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: {
_id: rec._id,
made_gift: true
},
let param1 = {
_id: rec._id,
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

View File

@@ -1,335 +1,365 @@
<template>
<div>
<div class="q-my-xs q-gutter-xs q-py-xs text-center">
<CTitleBanner class="q-pa-xs"
title="Navi"
bgcolor="bg-primary"
clcolor="text-white"
mystyle="" myclass="myshad" canopen="true">
<div>
<div class="q-my-xs q-gutter-xs q-py-xs text-center">
<CTitleBanner class="q-pa-xs"
title="Navi"
bgcolor="bg-primary"
clcolor="text-white"
mystyle="" myclass="myshad" canopen="true">
<q-btn rounded color="primary"
label="Ricalcola"
@click="Ricalcola(true)"></q-btn>
<br>
<q-btn rounded color="primary"
label="Ricalcola"
@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
color="primary"
title="Doni Navi"
:data="arrdoninavi"
:columns="coldoninavi"
:loading="loading"
:Pagination.sync="pagination"
row-key="index">
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="index" :props="props">
{{ props.row.index }}
</q-td>
<q-td key="rigacol" :props="props">
<q-btn flat
rounded color="blue"
:label="props.row.riga + `.` + props.row.col"
@click="Mostraplacca(props.row.riga, props.row.col)">
</q-btn>
</q-td>
<q-td key="date_gift_chat_open" :props="props">
<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"
target="_blank">Link</a>
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.link_chat"
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-field>
</q-popup-edit>
<div v-if="!props.row.rec.donatore.navepersistente.link_chat">---</div>
</div>
<div v-if="!!props.row.rec.donatore.navepersistente">
{{
tools.getstrshortDate(props.row.rec.donatore.navepersistente.date_gift_chat_open)
}}
</div>
</div>
<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">
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 }}
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.tutor"
title="Username del Tutor" buttons
@save="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'tutor')">
<q-field>
<q-input v-model="props.row.rec.donatore.navepersistente.tutor"/>
</q-field>
</q-popup-edit>
<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
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 })">
</q-btn>
</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>
</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>
</q-td>
<q-td key="note_bot" :props="props">
<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>
<div v-else>---</div>
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.note_bot"
title="Note che compariranno sulla Placca dell'Utente" buttons
@save="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'note_bot')">
<q-field>
<q-input type="textarea" autogrow
v-model="props.row.rec.donatore.navepersistente.note_bot">
</q-input>
</q-field>
</q-popup-edit>
</div>
</q-td>
<q-td key="note_interne" :props="props">
<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>
<div v-else>---</div>
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.note_interne"
title="Note uso interno Staff"
buttons
@save="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'note_interne')">
<q-field>
<q-input type="textarea"
autogrow
v-model="props.row.rec.donatore.navepersistente.note_interne">
</q-input>
</q-field>
</q-popup-edit>
</div>
</q-td>
</q-tr>
</template>
</q-table>
</CTitleBanner>
<q-dialog v-model="showdonatori">
<q-card v-if="selrec" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
<q-toolbar-title>
{{$t('dashboard.donatori')}}
</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 v-if="!!selrec.donatore">
<q-table
class="my-sticky-header-table"
dense
color="primary"
title="Doni Navi"
:data="arrdoninavi"
:columns="coldoninavi"
:loading="loading"
:Pagination.sync="pagination"
row-key="index">
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="index" :props="props">
{{ props.row.index }}
</q-td>
<q-td key="rigacol" :props="props">
class="my-sticky-header-table"
dense
color="primary"
title="Donatori"
:data="selrec.donatore.arrdonatori"
:columns="coldonatori"
:Pagination="pagination2"
:nodataLabel="$t('grid.nodata')"
row-key="index">
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="index" :props="props">
D{{ props.row.index }}
</q-td>
<q-td key="rigacol" :props="props">
{{ props.row.riga }}.{{ props.row.col }}
</q-td>
<q-td key="name" :props="props">
<q-btn flat rounded color="blue"
:label="props.row.name + ` ` + props.row.surname"
@click="clickseluser(props.row)">
</q-btn>
</q-td>
<q-td key="num_tess" :props="props">
{{ props.row.num_tess }}
</q-td>
<q-td key="date_made_gift" :props="props">
{{ tools.getstrshortDateTime(props.row.date_made_gift) }}
</q-td>
<q-td key="made_gift" :props="props">
<q-btn flat
rounded color="blue"
:label="props.row.riga + `.` + props.row.col"
@click="Mostraplacca(props.row.riga, props.row.col)">
</q-btn>
<div v-if="deveDonare(props.row)">
<div class="row justify-center">
<q-btn v-if="!props.row.made_gift"
push
rounded
color="primary"
size="md"
:label="$t('dashboard.dono_ricevuto_3', {donatore: props.row.name })"
</q-td>
<q-td key="date_gift_chat_open" :props="props">
@click="HoRicevutoIlDono(props.row)">
</q-btn>
</div>
<q-icon v-if="props.row.made_gift" color="green" inverted size="sm"
name="fas fa-gift" class="gift"></q-icon>
</div>
<div v-else>
--------
</div>
</q-td>
<div>
<div class="text-center cursor-pointer">
<a v-if="!!props.row.rec.donatore.navepersistente.link_chat"
:href="props.row.rec.donatore.navepersistente.link_chat"
target="_blank">Link</a>
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.link_chat"
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-field>
</q-popup-edit>
<div v-if="!props.row.rec.donatore.navepersistente.link_chat">---</div>
</div>
<div v-if="!!props.row.rec.donatore.navepersistente">
{{
tools.getstrshortDate(props.row.rec.donatore.navepersistente.date_gift_chat_open)
}}
</div>
</div>
<div v-if="props.row.rec.donatore.recmediatore.sent_msg_howto_make_gift">(Link Inviato)
</div>
</q-td>
<q-td key="date_start" :props="props">
<div v-if="!!props.row.rec.donatore.navepersistente">
{{ tools.getstrshortDate(props.row.rec.donatore.navepersistente.date_start) }}
</div>
</q-td>
<q-td key="provvisoria" :props="props">
<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>
</q-td>
<q-td key="tutor" :props="props">
<div class="text-center">
<div class="text-center cursor-pointer">
{{ props.row.tutor }}
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.tutor"
title="Username del Tutor" buttons
@save="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'tutor')">
<q-field>
<q-input v-model="props.row.rec.donatore.navepersistente.tutor"/>
</q-field>
</q-popup-edit>
<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
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 })">
</q-btn>
</div>
</div>
</q-td>
<q-td key="mediatore" :props="props">
<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>
</q-td>
<q-td key="donatori" :props="props">
<q-btn v-if="EsistonoDonatori(props.row.rec)" flat rounded color="blue"
:label="$t('dashboard.donatori')"
@click="clickdonatori(props.row.rec)">
</q-btn>
</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>
</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.navepersistente.note_bot">{{
props.row.rec.donatore.navepersistente.note_bot }}
</div>
<div v-else>---</div>
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.note_bot"
title="Note che compariranno sulla Placca dell'Utente" buttons
@save="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'note_bot')">
<q-field>
<q-input type="textarea" autogrow
v-model="props.row.rec.donatore.navepersistente.note_bot">
</q-input>
</q-field>
</q-popup-edit>
</div>
</q-td>
<q-td key="note_interne" :props="props">
<div class="Note cursor-pointer">
<div v-if="props.row.rec.donatore.navepersistente.note_interne">{{
props.row.rec.donatore.navepersistente.note_interne }}
</div>
<div v-else>---</div>
<q-popup-edit v-model="props.row.rec.donatore.navepersistente.note_interne"
title="Note uso interno Staff"
buttons
@save="SaveField(props.row.rec.donatore.navepersistente, 'navepersistente', 'note_interne')">
<q-field>
<q-input type="textarea"
autogrow
v-model="props.row.rec.donatore.navepersistente.note_interne">
</q-input>
</q-field>
</q-popup-edit>
</div>
</q-td>
</q-tr>
</template>
</q-tr>
</template>
</q-table>
</CTitleBanner>
<div class="q-ma-sm text-center">
<div>Invia un Messaggio a tutti questi Donatori:</div>
<q-input type="textarea"
autogrow
v-model="msg_tosend" :label="$t('cal.msgbooking')"
input-class="myinput-area">
<q-dialog v-model="showdonatori">
<q-card v-if="selrec" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
<q-toolbar-title>
{{$t('dashboard.donatori')}}
</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>
<q-table
class="my-sticky-header-table"
dense
color="primary"
title="Donatori"
:data="selrec.donatore.arrdonatori"
:columns="coldonatori"
:Pagination="pagination2"
:nodataLabel="$t('grid.nodata')"
row-key="index">
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="index" :props="props">
D{{ props.row.index }}
</q-td>
<q-td key="rigacol" :props="props">
{{ props.row.riga }}.{{ props.row.col }}
</q-td>
<q-td key="name" :props="props">
<q-btn flat rounded color="blue"
:label="props.row.name + ` ` + props.row.surname"
@click="clickseluser(props.row)">
</q-btn>
</q-td>
<q-td key="num_tess" :props="props">
{{ props.row.num_tess }}
</q-td>
<q-td key="date_made_gift" :props="props">
{{ tools.getstrshortDateTime(props.row.date_made_gift) }}
</q-td>
<q-td key="made_gift" :props="props">
</q-input>
<div v-if="deveDonare(props.row)">
<div class="row justify-center">
<q-btn v-if="!props.row.made_gift"
push
rounded
color="primary"
size="md"
:label="$t('dashboard.dono_ricevuto_3', {donatore: props.row.name })"
<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')"
@click="InviaMsgADonatori()"></q-btn>
@click="HoRicevutoIlDono(props.row)">
</q-btn>
</div>
<q-icon v-if="props.row.made_gift" color="green" inverted size="sm"
name="fas fa-gift" class="gift"></q-icon>
</div>
<div v-else>
--------
</div>
</q-td>
</div>
</div>
</div>
</div>
</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>
<q-btn
v-if="!!seluser.profile.cell"
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 class="q-ma-sm text-center">
<div>{{$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-tr>
</template>
</q-table>
</q-input>
<div class="q-ma-sm text-center">
<div>Invia un Messaggio a tutti questi Donatori:</div>
<q-input type="textarea"
autogrow
v-model="msg_tosend" :label="$t('cal.msgbooking')"
input-class="myinput-area">
<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>
</q-input>
</div>
</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 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')"
@click="InviaMsgADonatori()"></q-btn>
</div>
</div>
</div>
</div>
</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>
<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 class="q-ma-sm text-center">
<div>{{$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="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>
</div>
</div>
</template>
<script lang="ts" src="./listadoninavi.ts">
</script>
<style lang="scss" scoped>
@import './listadoninavi.scss';
@import './listadoninavi.scss';
</style>

View 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;
}

View 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)
}
}
}

View 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