Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f524f790f | ||
|
|
7c8c970a9e | ||
|
|
0a0ed62e27 | ||
|
|
30dbd9bb57 | ||
|
|
47b01c9002 | ||
|
|
1fdafbb0e4 | ||
|
|
f8ad20d1ae | ||
|
|
5568547784 | ||
|
|
7d0b3fb26f | ||
|
|
d02044ae17 | ||
|
|
9828f4818a | ||
|
|
a9c4b09062 | ||
|
|
3b0a39673a | ||
|
|
f94186be75 | ||
|
|
25dcde96df | ||
|
|
570340d645 | ||
|
|
e526231576 | ||
|
|
2fc89ebc82 | ||
|
|
bd6ccad236 | ||
|
|
3fb1de9b70 | ||
|
|
d2bf9eb202 | ||
|
|
9dffc92d22 | ||
|
|
e4570fc393 | ||
|
|
33cc721ceb | ||
|
|
67b8e592c0 |
6087
package-lock.json
generated
6087
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
7
src/.directory
Executable file
7
src/.directory
Executable file
@@ -0,0 +1,7 @@
|
||||
[Dolphin]
|
||||
Timestamp=2019,4,26,20,5,48
|
||||
Version=4
|
||||
ViewMode=1
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
||||
@@ -9,10 +9,13 @@ export default ({ app, store, Vue }) => {
|
||||
// Vue.config.lang = process.env.LANG_DEFAULT;
|
||||
|
||||
let mylang = tools.getItemLS(tools.localStorage.lang)
|
||||
console.log(`LANG LocalStorage ${mylang}`)
|
||||
|
||||
if ((navigator) && (mylang === '')) {
|
||||
mylang = navigator.language
|
||||
// console.log(`LANG NAVIGATOR ${mylang}`)
|
||||
if ((navigator)) {
|
||||
const mylangnav = navigator.language
|
||||
console.log(`LANG NAVIGATOR ${mylangnav}`)
|
||||
if (mylang === '')
|
||||
mylang = mylangnav
|
||||
}
|
||||
|
||||
mylang = tools.checkLangPassed(mylang)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import moment from 'moment'
|
||||
import 'moment/locale/fr'
|
||||
moment.locale('fr')
|
||||
import 'moment/locale/it'
|
||||
moment.locale('it')
|
||||
|
||||
const monthsStrings = ['Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre']
|
||||
const monthsStrings = ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre']
|
||||
|
||||
export class DateMoving {
|
||||
public date: moment.Moment
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { translation } from '@src/store/Modules/translation'
|
||||
import { Privacy } from '@src/model'
|
||||
|
||||
export const shared_consts = {
|
||||
|
||||
Accepted: {
|
||||
@@ -28,6 +31,25 @@ 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,
|
||||
FILTER_HOURS_MYLIST: 65536,
|
||||
FILTER_HOURS_ALL: 131072,
|
||||
FILTER_MISSING_PAYMENT: 262144,
|
||||
FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
|
||||
FILTER_MEMBERSHIP_CARD_OK: 1048576,
|
||||
|
||||
REPORT_FILT_RESP: 1,
|
||||
REPORT_FILT_ATTIVITA: 2,
|
||||
|
||||
CashType: {
|
||||
None: 0,
|
||||
Incoming: 1,
|
||||
Outcoming: 2,
|
||||
},
|
||||
|
||||
Permissions: {
|
||||
Admin: {
|
||||
@@ -52,7 +74,25 @@ export const shared_consts = {
|
||||
value: 8,
|
||||
label: 'dashboard.tutor',
|
||||
icon: 'fas fa-user-tie',
|
||||
color: 'blue'
|
||||
color: 'fuchsia'
|
||||
},
|
||||
Editor: {
|
||||
value: 16,
|
||||
label: 'dashboard.Editor',
|
||||
icon: 'fas fa-user-tie',
|
||||
color: 'orange'
|
||||
},
|
||||
Zoomeri: {
|
||||
value: 32,
|
||||
label: 'dashboard.zoomeri',
|
||||
icon: 'fas fa-user-tie',
|
||||
color: 'yellow'
|
||||
},
|
||||
Department: {
|
||||
value: 64,
|
||||
label: 'pages.department',
|
||||
icon: 'fas fa-user-tie',
|
||||
color: 'yellow'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -61,6 +101,125 @@ export const shared_consts = {
|
||||
Notify_ByPushNotification: 4
|
||||
},
|
||||
|
||||
TypeMsg: {
|
||||
SEND_TO_ALL: 1,
|
||||
SEND_TO_SOCI: 2,
|
||||
SEND_TO_SOCIO_RESIDENTE: 3,
|
||||
SEND_TO_NON_SOCI: 10,
|
||||
SEND_TO_PAOLO: 20
|
||||
},
|
||||
|
||||
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
|
||||
}
|
||||
],
|
||||
|
||||
selectDestination: [
|
||||
{
|
||||
id: 0,
|
||||
label: 'A Tutti',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
label: 'Solo ai Soci',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Solo ai Soci Residenti',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: 'Solo ai NON Soci',
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
label: 'a Paolo (test)',
|
||||
value: 20
|
||||
}
|
||||
],
|
||||
|
||||
OrderStatus: {
|
||||
NONE: 0,
|
||||
IN_CART: 1,
|
||||
CHECKOUT_SENT: 2,
|
||||
ORDER_CONFIRMED: 3,
|
||||
PAYED: 4,
|
||||
DELIVEDED: 5,
|
||||
RECEIVED: 6,
|
||||
CANCELED: 10
|
||||
},
|
||||
|
||||
OrderStatusView: [
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
6,
|
||||
10
|
||||
],
|
||||
|
||||
OrderStatusStr: [
|
||||
{
|
||||
label: 'Nessuno',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: 'In Carrello',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: 'Ordine in Lavorazione',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
label: 'Ordine Confermato',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
label: 'Pagato',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
label: 'Spedito',
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
label: 'Ricevuto',
|
||||
value: 6
|
||||
},
|
||||
{
|
||||
label: 'Cancellato',
|
||||
value: 10
|
||||
}
|
||||
],
|
||||
|
||||
getStatusStr(status) {
|
||||
const trovatorec = this.OrderStatusStr.find((rec) => rec.value === status)
|
||||
return (!!trovatorec) ? trovatorec.label : ''
|
||||
},
|
||||
|
||||
fieldsUserToChange() {
|
||||
return ['_id', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IOperators } from '../../model/GlobalStore'
|
||||
import { IOperators } from '../../model'
|
||||
|
||||
@Component({
|
||||
name: 'CBook',
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IOperators } from '../../model/GlobalStore'
|
||||
import { IOperators } from '../../model'
|
||||
|
||||
@Component({
|
||||
name: 'CCard',
|
||||
|
||||
@@ -1,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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -31,31 +31,12 @@ $grayshadow: #555;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.my-card-shadow {
|
||||
width: 100%;
|
||||
max-width: 350px;
|
||||
min-width: 300px;
|
||||
padding-bottom: 20px;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
border-radius: 30px;
|
||||
|
||||
transition: transform .2s ease-out;
|
||||
}
|
||||
|
||||
.yes_shadow {
|
||||
-webkit-box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.16);
|
||||
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
|
||||
.my-card-shadow:hover {
|
||||
transition: transform .2s ease-in;
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
.disc {
|
||||
text-align: center !important;
|
||||
font-size: 1rem;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="row justify-between q-pa-xs-sm">
|
||||
<div style="font-size:1rem; padding-right: 8px;">
|
||||
<div :style="' padding-right: 8px;'">
|
||||
{{mytext}}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -10,8 +10,8 @@ import MixinBase from '@src/mixins/mixin-base'
|
||||
})
|
||||
|
||||
export default class CCardState extends MixinBase {
|
||||
@Prop({ required: true, default: '' }) public mytext
|
||||
@Prop({ required: true, default: 0 }) public myval
|
||||
@Prop({ required: false, default: '' }) public mytext
|
||||
@Prop({ required: false, default: 0 }) public myval
|
||||
@Prop({ required: true, default: 0 }) public myperc
|
||||
@Prop({ required: false, default: '' }) public imgsrc
|
||||
@Prop({ required: false, default: false }) public isperc
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -16,6 +16,9 @@ export default class CDate extends Vue {
|
||||
@Prop({ required: false, default: false }) public readonly!: boolean
|
||||
@Prop({ required: false, default: false }) public disable!: boolean
|
||||
@Prop({ required: false, default: '' }) public color!: string
|
||||
@Prop({ required: false, default: false }) public rounded!: boolean
|
||||
@Prop({ required: false, default: false }) public outlined!: boolean
|
||||
@Prop({ required: false, default: true }) public dense!: boolean
|
||||
|
||||
public mystyleicon: string = 'font-size: 1.5rem;'
|
||||
|
||||
@@ -41,7 +44,7 @@ export default class CDate extends Vue {
|
||||
const datavalida = tools.convertstrtoDate(value)
|
||||
if (!!datavalida) {
|
||||
this.valueInternal = datavalida
|
||||
console.log('EMIT: changedate', datavalida)
|
||||
console.log('EMIT: changedate', datavalida.toString())
|
||||
this.$emit('input', this.getDate())
|
||||
} else {
|
||||
console.log(' DATA NON VALIDAAAAAAAAAAAAA ', value, datavalida)
|
||||
@@ -50,7 +53,9 @@ export default class CDate extends Vue {
|
||||
}
|
||||
|
||||
get getdatestring() {
|
||||
return tools.getstrDate(this.valueInternal)
|
||||
const mydate = tools.getstrDate(this.valueInternal)
|
||||
console.log('getdatestring', mydate)
|
||||
return mydate
|
||||
}
|
||||
get getdateyymmddstring() {
|
||||
return tools.getstrYYMMDDDate(this.valueInternal)
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
<template>
|
||||
<q-input :class="data_class" :bg-color="color" :readonly="readonly" :disable="disable" debounce="1000" dense :value="getdatestring" stack-label :label="label" @input="changedate">
|
||||
<template v-slot:append>
|
||||
<q-icon name="event" class="cursor-pointer" :style="mystyleicon">
|
||||
<q-popup-proxy v-if="!readonly" ref="datePicker">
|
||||
<q-date :value="getdateyymmddstring" today-btn @input="changedate"></q-date>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-input :class="data_class" :bg-color="color" :readonly="readonly" :disable="disable" debounce="1000" :dense="dense"
|
||||
:value="getdatestring" stack-label :label="label" @input="changedate" :rounded="rounded"
|
||||
mask="##/##/####"
|
||||
fill-mask
|
||||
:outlined="outlined">
|
||||
<template v-slot:append>
|
||||
<q-icon name="event" class="cursor-pointer" :style="mystyleicon">
|
||||
<q-popup-proxy v-if="!readonly" ref="datePicker">
|
||||
<q-date :value="getdateyymmddstring" today-btn @input="changedate"></q-date>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CDate.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CDate.scss';
|
||||
@import './CDate.scss';
|
||||
</style>
|
||||
|
||||
@@ -24,6 +24,7 @@ export default class CDateTime extends Vue {
|
||||
@Prop({ required: false, default: '' }) public bgcolor!: string
|
||||
@Prop({ required: false, default: false }) public dense: boolean
|
||||
@Prop({ required: false, default: '5' }) public minuteinterval: boolean
|
||||
@Prop({ required: false, default: 'date-time' }) public view: string
|
||||
|
||||
public mystyleicon: string = 'font-size: 1.5rem;'
|
||||
public showDateTimeScroller: boolean = false
|
||||
@@ -118,4 +119,12 @@ export default class CDateTime extends Vue {
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public getstrDate(mydate) {
|
||||
if (this.view === 'date-time') {
|
||||
return tools.getstrDateTime(mydate)
|
||||
} else {
|
||||
return tools.getstrDate(mydate)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<template v-slot:control>
|
||||
<div style="">
|
||||
<div class="self-center full-width no-outline" :style="mystyle" tabindex="0">
|
||||
{{ tools.getstrDateTime(myvalue) }}
|
||||
{{ getstrDate(myvalue) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<q-scroller
|
||||
v-model="myvalue"
|
||||
view="date-time"
|
||||
:view="view"
|
||||
:locale="toolsext.getLocale()"
|
||||
:rounded-borders="true"
|
||||
border-color="#2196f3"
|
||||
|
||||
0
src/components/CECommerce/CECommerce.scss
Executable file
0
src/components/CECommerce/CECommerce.scss
Executable file
18
src/components/CECommerce/CECommerce.ts
Executable file
18
src/components/CECommerce/CECommerce.ts
Executable file
@@ -0,0 +1,18 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
import { ProductsList } from '@src/views/ecommerce'
|
||||
|
||||
|
||||
@Component({
|
||||
mixins: [validationMixin],
|
||||
components: { ProductsList }
|
||||
})
|
||||
|
||||
export default class CECommerce extends MixinBase {
|
||||
public $v
|
||||
public $t: any
|
||||
|
||||
|
||||
}
|
||||
14
src/components/CECommerce/CECommerce.vue
Executable file
14
src/components/CECommerce/CECommerce.vue
Executable file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<ProductsList>
|
||||
|
||||
</ProductsList>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CECommerce.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CECommerce.scss';
|
||||
</style>
|
||||
1
src/components/CECommerce/index.ts
Executable file
1
src/components/CECommerce/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CECommerce} from './CECommerce.vue'
|
||||
@@ -272,7 +272,7 @@ $graytext: #555;
|
||||
position: absolute;
|
||||
margin-top: -10px;
|
||||
overflow: hidden;
|
||||
z-index: 9999;
|
||||
z-index: 1000;
|
||||
box-sizing: border-box;
|
||||
right: 0;
|
||||
@media (max-width: 400px) {
|
||||
@@ -297,3 +297,7 @@ $graytext: #555;
|
||||
flex-flow: column;
|
||||
}
|
||||
}
|
||||
.itemprenota{
|
||||
align-self: center;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
@@ -57,8 +57,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
public $q
|
||||
public $t: any
|
||||
public calendarView = 'month'
|
||||
public selectedDate = '2019-04-01'
|
||||
public selectedDate = ''
|
||||
public tabeditor: string = 'details'
|
||||
public showPrev: boolean = false
|
||||
public formDefault: IEvents = {
|
||||
title: '',
|
||||
details: '',
|
||||
@@ -74,6 +75,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
msgbooking: '',
|
||||
infoevent: '',
|
||||
numpeople: 1,
|
||||
numpeopleLunch: 0,
|
||||
numpeopleDinner: 0,
|
||||
numpeopleDinnerShared: 0,
|
||||
datebooked: tools.getDateNow(),
|
||||
booked: false,
|
||||
modified: false
|
||||
@@ -133,33 +137,15 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
return this
|
||||
}
|
||||
|
||||
get lists() {
|
||||
return lists
|
||||
}
|
||||
|
||||
set mythis(aa) {
|
||||
|
||||
}
|
||||
|
||||
public resources = [
|
||||
{
|
||||
label: 'John'
|
||||
},
|
||||
{
|
||||
label: 'Mary'
|
||||
},
|
||||
{
|
||||
label: 'Susan'
|
||||
},
|
||||
{
|
||||
label: 'Olivia'
|
||||
},
|
||||
{
|
||||
label: 'Board Room'
|
||||
},
|
||||
{
|
||||
label: 'Room-1'
|
||||
},
|
||||
{
|
||||
label: 'Room-2'
|
||||
}
|
||||
]
|
||||
public resources = []
|
||||
|
||||
// public eventdata =
|
||||
// [
|
||||
@@ -365,6 +351,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
|
||||
get hasModifiedBooking() {
|
||||
return (this.bookEventpage.bookedevent.numpeople !== this.bookEventForm.numpeople) ||
|
||||
(this.bookEventpage.bookedevent.numpeopleLunch !== this.bookEventForm.numpeopleLunch) ||
|
||||
(this.bookEventpage.bookedevent.numpeopleDinner !== this.bookEventForm.numpeopleDinner) ||
|
||||
(this.bookEventpage.bookedevent.numpeopleDinnerShared !== this.bookEventForm.numpeopleDinnerShared) ||
|
||||
(this.bookEventpage.bookedevent.msgbooking !== this.bookEventForm.msgbooking) ||
|
||||
(this.bookEventpage.bookedevent.booked !== this.bookEventForm.booked)
|
||||
}
|
||||
@@ -399,16 +388,21 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.selectedDate = this.formatDate(tools.getDateNow())
|
||||
this.$root.$on('calendar:next', this.calendarNext)
|
||||
this.$root.$on('calendar:prev', this.calendarPrev)
|
||||
this.$root.$on('calendar:today', this.calendarToday)
|
||||
|
||||
this.SetToday()
|
||||
// CalendarStore.state.eventlist = events
|
||||
this.updateFormatters()
|
||||
|
||||
}
|
||||
|
||||
public beforeMount() {
|
||||
// console.log('mounted')
|
||||
this.selectedDate = this.formatDate(tools.getDateNow())
|
||||
// console.log('this.selectedDate', this.selectedDate)
|
||||
|
||||
CalendarStore.state.locale = toolsext.getLocale()
|
||||
this.updateFormatters()
|
||||
}
|
||||
@@ -450,16 +444,18 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
this.eventForm = { ...this.formDefault }
|
||||
}
|
||||
|
||||
public addEventMenu(day, type) {
|
||||
// console.log('addeventmenu editable = ', this.editable)
|
||||
public addEventMenu(day) {
|
||||
console.log('addeventmenu', day)
|
||||
if (this.calendarView === 'scheduler' || this.calendarView === 'week-scheduler' || this.calendarView === 'month-scheduler' || !this.editable) {
|
||||
return
|
||||
}
|
||||
this.resetForm()
|
||||
this.contextDay = { ...day }
|
||||
this.contextDay = { ...day.scope }
|
||||
|
||||
this.eventForm.dateTimeStart = tools.getstrYYMMDDDateTime(day.date + ' 21:00:00')
|
||||
this.eventForm.dateTimeEnd = tools.getstrYYMMDDDateTime(day.date + ' 22:00:00')
|
||||
this.eventForm.dateTimeStart = tools.getstrYYMMDDDateTime(day.scope.timestamp.date + ' 21:00:00')
|
||||
this.eventForm.dateTimeEnd = tools.getstrYYMMDDDateTime(day.scope.timestamp.date + ' 22:00:00')
|
||||
|
||||
console.log('eventForm', this.eventForm)
|
||||
|
||||
this.addEvent = true // show dialog
|
||||
}
|
||||
@@ -467,7 +463,7 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
public addBookEventMenu(eventparam) {
|
||||
if (!UserStore.state.isLogged || !UserStore.state.my.verified_email) {
|
||||
// Visu right Toolbar to make SignIn
|
||||
GlobalStore.state.RightDrawerOpen = true
|
||||
GlobalStore.state.rightDrawerOpen = true
|
||||
tools.showNeutralNotif(this.$q, this.$t('login.needlogin'))
|
||||
tools.scrollToTop()
|
||||
// window.scrollTo(0, 0)
|
||||
@@ -479,6 +475,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
this.myevent = eventparam
|
||||
this.bookEventForm.msgbooking = ''
|
||||
this.bookEventForm.numpeople = 1
|
||||
this.bookEventForm.numpeopleLunch = 0
|
||||
this.bookEventForm.numpeopleDinner = 0
|
||||
this.bookEventForm.numpeopleDinnerShared = 0
|
||||
this.bookEventForm.booked = true
|
||||
this.bookEventpage.state = EState.Creating
|
||||
|
||||
@@ -490,7 +489,7 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
public askForInfoEventMenu(eventparam) {
|
||||
if (!UserStore.state.isLogged || !UserStore.state.my.verified_email) {
|
||||
// Visu right Toolbar to make SignIn
|
||||
GlobalStore.state.RightDrawerOpen = true
|
||||
GlobalStore.state.rightDrawerOpen = true
|
||||
|
||||
tools.showNeutralNotif(this.$q, this.$t('login.needlogin'))
|
||||
tools.scrollToTop()
|
||||
@@ -703,6 +702,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
if (bookedevent) {
|
||||
this.bookEventForm._id = bookedevent._id
|
||||
this.bookEventForm.numpeople = bookedevent.numpeople
|
||||
this.bookEventForm.numpeopleLunch = bookedevent.numpeopleLunch
|
||||
this.bookEventForm.numpeopleDinner = bookedevent.numpeopleDinner
|
||||
this.bookEventForm.numpeopleDinnerShared = bookedevent.numpeopleDinnerShared
|
||||
this.bookEventForm.infoevent = bookedevent.infoevent
|
||||
this.bookEventForm.msgbooking = bookedevent.msgbooking
|
||||
this.bookEventForm.booked = bookedevent.booked
|
||||
@@ -755,6 +757,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
userId: UserStore.state.my._id,
|
||||
id_bookedevent: myevent._id,
|
||||
numpeople: self.bookEventForm.numpeople,
|
||||
numpeopleLunch: self.bookEventForm.numpeopleLunch,
|
||||
numpeopleDinner: self.bookEventForm.numpeopleDinner,
|
||||
numpeopleDinnerShared: self.bookEventForm.numpeopleDinnerShared,
|
||||
infoevent: tools.gettextevent(self, myevent),
|
||||
msgbooking: self.bookEventForm.msgbooking,
|
||||
booked: self.bookEventForm.booked,
|
||||
@@ -763,6 +768,7 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
}
|
||||
|
||||
this.BookEvent(data).then((ris) => {
|
||||
console.log('ris uscita di BookEvent', ris)
|
||||
if (ris)
|
||||
tools.showPositiveNotif(self.$q, self.$t('cal.booked') + ' ' + self.$t('cal.event') + ' "' + myevent.title + '"')
|
||||
else
|
||||
@@ -894,6 +900,10 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
return CalendarStore.state.operators
|
||||
}
|
||||
|
||||
get getInternalPagesArr() {
|
||||
return CalendarStore.state.internalpages
|
||||
}
|
||||
|
||||
get getWhereArr() {
|
||||
return CalendarStore.state.wheres
|
||||
}
|
||||
@@ -986,6 +996,7 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
|
||||
public getEvents(dt) {
|
||||
const eventsloc = []
|
||||
// console.log('dt', dt)
|
||||
|
||||
for (let i = 0; i < CalendarStore.state.eventlist.length; ++i) {
|
||||
let added = false
|
||||
@@ -994,11 +1005,11 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
// check for overlapping times
|
||||
const startTime = CalendarStore.state.eventlist[i].dateTimeStart
|
||||
const endTime = CalendarStore.state.eventlist[i].dateTimeEnd
|
||||
for (let j = 0; j < eventsloc.length; ++j) {
|
||||
const startTime2 = eventsloc[j].dateTimeStart
|
||||
const endTime2 = eventsloc[j].dateTimeEnd
|
||||
for (const item of eventsloc) {
|
||||
const startTime2 = item.dateTimeStart
|
||||
const endTime2 = item.dateTimeEnd
|
||||
if (date.isBetweenDates(startTime, startTime2, endTime2) || date.isBetweenDates(endTime, startTime2, endTime2)) {
|
||||
eventsloc[j].side = 'left'
|
||||
item.side = 'left'
|
||||
eventsloc.push(CalendarStore.state.eventlist[i])
|
||||
added = true
|
||||
break
|
||||
@@ -1018,6 +1029,8 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (eventsloc.length > 0)
|
||||
// console.log('eventsloc', eventsloc)
|
||||
return eventsloc
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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'
|
||||
|
||||
@@ -52,7 +52,7 @@ export default class CGeoChart extends Vue {
|
||||
|
||||
for (const rec of this.mydata) {
|
||||
alldata = []
|
||||
alldata.push(tools.getNationsByNationality(rec._id, true))
|
||||
alldata.push(tools.getNationsByNationality(rec._id))
|
||||
alldata.push(rec.count)
|
||||
|
||||
this.mydatafixed.push(alldata)
|
||||
|
||||
@@ -7,3 +7,16 @@
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.tdclass, .trclass{
|
||||
height: 20px !important;
|
||||
}
|
||||
|
||||
.q-table td {
|
||||
padding-left: 1px;
|
||||
padding-right: 2px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
&__title {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { GlobalStore, UserStore } from '../../store/Modules/index'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
|
||||
import { shared_consts } from '../../common/shared_vuejs'
|
||||
import { ICategory, IColGridTable, IFilter, ITableRec } from '../../model'
|
||||
import { ICategory, IColGridTable, IFilter, ITableRec, IPagination } from '../../model'
|
||||
import { CTodo } from '../todos/CTodo'
|
||||
import { SingleProject } from '../projects/SingleProject'
|
||||
import { lists } from '../../store/Modules/lists'
|
||||
@@ -19,14 +19,32 @@ import { CMyDashboard } from '../CMyDashboard'
|
||||
components: { CMyPopupEdit, CTitleBanner, CMyDashboard }
|
||||
})
|
||||
export default class CGridTableRec extends Vue {
|
||||
private addRow: string = 'Aggiungi'
|
||||
@Prop({ required: true }) public prop_mytitle: string
|
||||
@Prop({ required: false }) public prop_mytable: string
|
||||
@Prop({ required: false, default: null }) public prop_mycolumns: any[]
|
||||
@Prop({ required: false, default: '' }) public prop_colkey: string
|
||||
@Prop({ required: false, default: '' }) public prop_codeId: string
|
||||
@Prop({ required: false, default: '' }) public nodataLabel: string
|
||||
@Prop({ required: false, default: 'Aggiungi' }) public labelBtnAddRow: string
|
||||
@Prop({ required: false, default: '' }) public noresultLabel: string
|
||||
@Prop({
|
||||
required: false, default: function mydef(): object {
|
||||
return {}
|
||||
}
|
||||
}) public defaultnewrec: object
|
||||
@Prop({ required: false, default: null }) public tablesList: ITableRec[]
|
||||
@Prop({ required: false, default: null }) public arrfilters: IFilter[]
|
||||
@Prop({ required: false, default: [] }) public filterdef: number[]
|
||||
@Prop({ required: false, default: {} }) public extraparams: any
|
||||
@Prop({
|
||||
required: false,
|
||||
default: { sortBy: '', descending: false, page: 1, rowsNumber: 10, rowsPerPage: 10 }
|
||||
}) public pagination: IPagination
|
||||
|
||||
public newRecordBool: boolean = false
|
||||
public newRecord: any = {}
|
||||
public savenewRec: boolean = false
|
||||
|
||||
public mytable: string
|
||||
public mytitle: string
|
||||
@@ -39,13 +57,6 @@ export default class CGridTableRec extends Vue {
|
||||
public $q
|
||||
public $t
|
||||
public loading: boolean = false
|
||||
public pagination: {
|
||||
sortBy: string,
|
||||
descending: boolean
|
||||
rowsNumber: number
|
||||
page: number,
|
||||
rowsPerPage: number // specifying this determines pagination is server-side
|
||||
} = { sortBy: '', descending: false, page: 1, rowsNumber: 10, rowsPerPage: 10 }
|
||||
|
||||
public serverData: any [] = []
|
||||
public spinner_visible: boolean = false
|
||||
@@ -55,9 +66,9 @@ export default class CGridTableRec extends Vue {
|
||||
public valPrec: string = ''
|
||||
|
||||
public separator: 'horizontal'
|
||||
public myfilter = undefined
|
||||
public myfilter: any = ''
|
||||
public myfilterand = []
|
||||
public rowsel: any
|
||||
public rowsel: any = {}
|
||||
public dark: boolean = true
|
||||
public canEdit: boolean = false
|
||||
|
||||
@@ -71,6 +82,43 @@ export default class CGridTableRec extends Vue {
|
||||
|
||||
public selected = []
|
||||
|
||||
@Watch('prop_codeId')
|
||||
public changeprop_codeId() {
|
||||
this.refresh()
|
||||
}
|
||||
|
||||
get isAdmin() {
|
||||
return UserStore.state.isAdmin
|
||||
}
|
||||
|
||||
get isManager() {
|
||||
return UserStore.state.isManager
|
||||
}
|
||||
|
||||
get isSocioResidente() {
|
||||
return UserStore.state.my.profile.socioresidente
|
||||
}
|
||||
|
||||
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 +169,16 @@ export default class CGridTableRec extends Vue {
|
||||
this.colsel = col
|
||||
this.idsel = row._id
|
||||
this.SaveValue(newval, valinitial)
|
||||
|
||||
// this.rowclicksel = null
|
||||
}
|
||||
|
||||
public annulla(val) {
|
||||
console.log('annulla')
|
||||
GlobalStore.actions.DeleteRec({ table: this.mytable, id: this.newRecord._id })
|
||||
.then((ris) => {
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
public SaveValue(newVal, valinitial) {
|
||||
@@ -155,9 +213,15 @@ export default class CGridTableRec extends Vue {
|
||||
this.valPrec = valinitial
|
||||
|
||||
this.saveFieldValue(mydata)
|
||||
|
||||
}
|
||||
|
||||
public beforeMount() {
|
||||
console.log('beforeMount')
|
||||
}
|
||||
|
||||
public created() {
|
||||
console.log('created')
|
||||
// this.serverData = this.mylist.slice() // [{ chiave: 'chiave1', valore: 'valore 1' }]
|
||||
|
||||
this.mytable = this.prop_mytable
|
||||
@@ -194,6 +258,8 @@ export default class CGridTableRec extends Vue {
|
||||
const myfilter = this.myfilter
|
||||
const myfilterand = this.myfilterand
|
||||
|
||||
this.savefilter()
|
||||
|
||||
if (!this.mytable)
|
||||
return
|
||||
|
||||
@@ -258,16 +324,20 @@ export default class CGridTableRec extends Vue {
|
||||
myobj[sortBy] = 1
|
||||
}
|
||||
|
||||
const params: IParamsQuery = {
|
||||
let params: IParamsQuery = {
|
||||
table: this.mytable,
|
||||
startRow,
|
||||
endRow,
|
||||
filter: myfilter,
|
||||
filterand: myfilterand,
|
||||
sortBy: myobj,
|
||||
descending
|
||||
descending,
|
||||
userId: UserStore.state.my._id,
|
||||
codeId: this.prop_codeId
|
||||
}
|
||||
|
||||
params = { ...params, ...this.extraparams }
|
||||
|
||||
const data = await GlobalStore.actions.loadTable(params)
|
||||
|
||||
if (data) {
|
||||
@@ -334,6 +404,27 @@ export default class CGridTableRec extends Vue {
|
||||
return this.returnedCount
|
||||
}
|
||||
|
||||
public async createNewRecordDialog() {
|
||||
|
||||
const mydata = {
|
||||
table: this.mytable,
|
||||
data: {}
|
||||
}
|
||||
|
||||
mydata.data = this.defaultnewrec
|
||||
|
||||
// const mykey = fieldsTable.getKeyByTable(this.mytable)
|
||||
|
||||
// mydata.data[mykey] = ''
|
||||
|
||||
console.log('mydata', mydata)
|
||||
const data = await GlobalStore.actions.saveTable(mydata)
|
||||
|
||||
this.newRecord = data
|
||||
this.newRecordBool = true
|
||||
|
||||
}
|
||||
|
||||
public async createNewRecord() {
|
||||
this.loading = true
|
||||
|
||||
@@ -342,10 +433,13 @@ export default class CGridTableRec extends Vue {
|
||||
data: {}
|
||||
}
|
||||
|
||||
mydata.data = this.defaultnewrec
|
||||
|
||||
// const mykey = fieldsTable.getKeyByTable(this.mytable)
|
||||
|
||||
// mydata.data[mykey] = ''
|
||||
|
||||
console.log('mydata', mydata)
|
||||
const data = await GlobalStore.actions.saveTable(mydata)
|
||||
|
||||
this.serverData.push(data)
|
||||
@@ -369,11 +463,14 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
console.log('GridTable mounted', this.tablesel)
|
||||
|
||||
if (!!this.tablesList) {
|
||||
this.canEdit = tools.getCookie(tools.CAN_EDIT, this.canEdit) === 'true'
|
||||
this.tablesel = tools.getCookie('tablesel', this.tablesel)
|
||||
}
|
||||
this.myfilterand = this.filterdef
|
||||
console.log('this.tablesel', this.tablesel)
|
||||
|
||||
if (this.tablesel === '') {
|
||||
if (!!this.tablesList)
|
||||
@@ -382,6 +479,8 @@ export default class CGridTableRec extends Vue {
|
||||
this.tablesel = this.mytable
|
||||
}
|
||||
|
||||
console.log('2) this.tablesel', this.tablesel)
|
||||
|
||||
this.changeTable(false)
|
||||
|
||||
}
|
||||
@@ -442,7 +541,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 +591,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 +625,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) {
|
||||
@@ -544,9 +650,11 @@ export default class CGridTableRec extends Vue {
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public getSelectedString() {
|
||||
return this.selected.length === 0 ? '' : `${this.selected.length} record${this.selected.length > 1 ? 's' : ''} selected of ${this.serverData.length}`
|
||||
}
|
||||
|
||||
public selectionclick(details) {
|
||||
// console.log('selectionclick this.selected', this.selected, 'details', details)
|
||||
if (details.added) {
|
||||
@@ -574,4 +682,49 @@ export default class CGridTableRec extends Vue {
|
||||
public changemyfilterand() {
|
||||
this.refresh()
|
||||
}
|
||||
|
||||
public async saveNewRecord() {
|
||||
console.log('saveNewRecord')
|
||||
this.savenewRec = true
|
||||
const mydata = {
|
||||
table: this.mytable,
|
||||
data: {}
|
||||
}
|
||||
|
||||
mydata.data = this.newRecord
|
||||
|
||||
const data = await GlobalStore.actions.saveTable(mydata)
|
||||
.then((ris) => {
|
||||
if (ris) {
|
||||
// console.log('ris', ris)
|
||||
this.newRecordBool = false
|
||||
this.refresh()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
public hidewindow() {
|
||||
console.log('hidewindow')
|
||||
if (!this.savenewRec) {
|
||||
this.annulla(0)
|
||||
}
|
||||
}
|
||||
|
||||
get isfinishLoading() {
|
||||
return GlobalStore.state.finishLoading
|
||||
}
|
||||
|
||||
get getlabelAddRow() {
|
||||
return this.labelBtnAddRow
|
||||
}
|
||||
|
||||
get visButtRow() {
|
||||
return this.labelBtnAddRow !== this.addRow
|
||||
}
|
||||
|
||||
public savefilter() {
|
||||
// console.log('Close')
|
||||
this.$emit('savefilter', this.myfilterand)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div class="q-pa-xs">
|
||||
|
||||
<div class="q-pa-xs" v-if="isfinishLoading">
|
||||
<div class="centermydiv q-ma-sm" style="text-align: center">
|
||||
<q-btn v-if="mytable && visButtRow" rounded dense color="primary"
|
||||
size="lg"
|
||||
:label="getlabelAddRow"
|
||||
@click="createNewRecordDialog"></q-btn>
|
||||
</div>
|
||||
|
||||
<q-table
|
||||
flat
|
||||
@@ -20,8 +25,7 @@
|
||||
:no-results-label="noresultLabel"
|
||||
:selected-rows-label="getSelectedString"
|
||||
selection="single"
|
||||
:selected.sync="selected"
|
||||
>
|
||||
:selected.sync="selected">
|
||||
|
||||
<template v-slot:header="props">
|
||||
|
||||
@@ -42,7 +46,7 @@
|
||||
</template>
|
||||
|
||||
<template v-slot:top="props">
|
||||
<div class="col-2 q-table__title">{{ mytitle }}</div>
|
||||
<div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div>
|
||||
|
||||
<!--<p style="color:red"> Rows: {{ getrows }}</p>-->
|
||||
|
||||
@@ -52,17 +56,19 @@
|
||||
<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"
|
||||
:label="$t('grid.editvalues')" @input="changefuncAct"
|
||||
></q-toggle>
|
||||
<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>
|
||||
|
||||
<q-btn v-if="mytable" flat dense color="primary" :disable="loading || !canEdit"
|
||||
:label="$t('grid.addrecord')"
|
||||
@click="createNewRecord"></q-btn>
|
||||
@click="createNewRecord">
|
||||
|
||||
</q-btn>
|
||||
|
||||
<q-space/>
|
||||
|
||||
|
||||
<!--<q-toggle v-for="(mycol, index) in mycolumns" v-model="colVisib" :val="rec.field" :label="mycol.label"></q-toggle>-->
|
||||
|
||||
<q-select
|
||||
@@ -78,7 +84,7 @@
|
||||
map-options
|
||||
:options="mycolumns"
|
||||
option-value="name"
|
||||
style="min-width: 150px"
|
||||
º
|
||||
@input="changeCol">
|
||||
|
||||
</q-select>
|
||||
@@ -101,22 +107,27 @@
|
||||
</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" :disable="filter.hide"
|
||||
:val="filter.value"
|
||||
:label="filter.label">
|
||||
|
||||
</q-toggle>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<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 +140,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>
|
||||
@@ -137,6 +149,7 @@
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
||||
<!--
|
||||
<q-btn
|
||||
flat round dense
|
||||
@@ -165,13 +178,14 @@
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="orange-3" dense>
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline" tabindex="0">{{mycol.label}}</div>
|
||||
<div class="self-center full-width no-outline" tabindex="0">{{ mycol.label }}</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
<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,18 +194,53 @@
|
||||
:subfield="mycol.subfield"
|
||||
@save="SaveValdb"
|
||||
@show="selItem(rowclicksel, mycol)"
|
||||
@showandsave="showandsel">
|
||||
@showandsave="showandsel"
|
||||
@annulla="annulla">
|
||||
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-dialog v-model="newRecordBool" @hide="hidewindow">
|
||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ mytitle }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<div v-for="col in mycolumns" :key="col.name"
|
||||
v-if="colVisib.includes(col.field + col.subfield)">
|
||||
<div>
|
||||
|
||||
<CMyPopupEdit :canEdit="true"
|
||||
:col="col"
|
||||
:row.sync="newRecord"
|
||||
:field="col.field"
|
||||
:subfield="col.subfield"
|
||||
minuteinterval="1"
|
||||
:visulabel="true"
|
||||
@save="SaveValue"
|
||||
@show="selItem(newRecord, col)"
|
||||
@showandsave="showandsel">
|
||||
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn flat :label="$t('dialog.ok')" color="primary" @click="saveNewRecord"></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="./CGridTableRec.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './CGridTableRec.scss';
|
||||
@import './CGridTableRec.scss';
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
0
src/components/CHours/CHours.scss
Executable file
0
src/components/CHours/CHours.scss
Executable file
91
src/components/CHours/CHours.ts
Executable file
91
src/components/CHours/CHours.ts
Executable file
@@ -0,0 +1,91 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { colTableHours, colTableStorehouse } from '@src/store/Modules/fieldsTable'
|
||||
|
||||
|
||||
import { CCard, CGridTableRec, CMyPage, CTitleBanner, CImgText } from '@components'
|
||||
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { UserStore } from '@store'
|
||||
|
||||
@Component({
|
||||
name: 'CHours',
|
||||
mixins: [MixinBase],
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec }
|
||||
})
|
||||
export default class CHours extends MixinBase {
|
||||
|
||||
@Prop({ required: true }) public todoId: string
|
||||
|
||||
public pagination = {
|
||||
sortBy: 'descr',
|
||||
descending: false,
|
||||
page: 2,
|
||||
rowsPerPage: 5
|
||||
// rowsNumber: xx if getting data from a server
|
||||
}
|
||||
|
||||
public created() {
|
||||
console.log('created CHours')
|
||||
}
|
||||
|
||||
get extraparams() {
|
||||
return {
|
||||
lk_tab: 'users',
|
||||
lk_LF: 'userId',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'user',
|
||||
af_objId_tab: 'myId',
|
||||
lk_proj: {
|
||||
todoId: 1, userId: 1, descr: 1, date: 1, time_start: 1, time_end: 1, hours: 1,
|
||||
username: 1, name: 1, surname: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public arrfilterand = [
|
||||
{
|
||||
label: 'Tutte le ore',
|
||||
value: shared_consts.FILTER_HOURS_ALL
|
||||
}
|
||||
]
|
||||
|
||||
get myfilterdef() {
|
||||
return [shared_consts.FILTER_HOURS_MYLIST]
|
||||
}
|
||||
|
||||
get myarrfilterand() {
|
||||
const myfiltrodef = {
|
||||
label: 'Mie Ore',
|
||||
value: shared_consts.FILTER_HOURS_MYLIST,
|
||||
hide: true,
|
||||
default: true
|
||||
}
|
||||
let myarr = []
|
||||
myarr.push(myfiltrodef)
|
||||
if (this.arrfilterand)
|
||||
myarr = [...myarr, ...this.arrfilterand]
|
||||
|
||||
return myarr
|
||||
}
|
||||
|
||||
public selected = []
|
||||
public dataPages = []
|
||||
|
||||
get getcolHours() {
|
||||
return colTableHours
|
||||
}
|
||||
|
||||
get getdefaultnewrec() {
|
||||
const myrec = {
|
||||
todoId: this.todoId,
|
||||
userId: UserStore.state.my._id,
|
||||
descr: ''
|
||||
}
|
||||
|
||||
return myrec
|
||||
}
|
||||
|
||||
}
|
||||
26
src/components/CHours/CHours.vue
Executable file
26
src/components/CHours/CHours.vue
Executable file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CGridTableRec prop_mytable="hours"
|
||||
prop_mytitle="Lista Ore"
|
||||
:prop_mycolumns="getcolHours"
|
||||
prop_colkey="descr"
|
||||
nodataLabel="Nessuna Lista Ore"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||
:arrfilters="myarrfilterand"
|
||||
:filterdef="myfilterdef"
|
||||
:prop_codeId="todoId"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
:extraparams="extraparams"
|
||||
labeladd="Aggiungi Ora">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./CHours.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'CHours.scss';
|
||||
</style>
|
||||
1
src/components/CHours/index.ts
Executable file
1
src/components/CHours/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CHours} from './CHours.vue'
|
||||
@@ -30,4 +30,17 @@ export default class CImgText extends Vue {
|
||||
@Prop({ required: false, default: '' }) public style1: string
|
||||
@Prop({ required: false, default: 'image' }) public alt1: string
|
||||
@Prop({ required: false, default: 'image' }) public alt2: string
|
||||
|
||||
get clrowcol() {
|
||||
let mycl = 'row'
|
||||
if (tools.isMobile())
|
||||
mycl = 'column'
|
||||
|
||||
return mycl
|
||||
}
|
||||
|
||||
get myclass() {
|
||||
|
||||
return this.clrowcol + ' items-start q-col-gutter-xs imgtext '
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="padding_testo bg-white text-grey-10 text-justify"> <!-- v-scroll-reveal.reset -->
|
||||
<div class="row items-start q-col-gutter-xs imgtext">
|
||||
<div class="row q-px-xs">
|
||||
<div :class="myclass">
|
||||
<div :class="clrowcol + ` q-px-xs`">
|
||||
<q-img v-if="src" :src="src" class="" :style="style1" :alt="alt1"></q-img>
|
||||
<q-img v-if="src2" :src="src2" class="" :style="style1" :alt="alt2"></q-img>
|
||||
<div class="section_text">
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
}
|
||||
|
||||
.title{
|
||||
font-size: 3.5rem;
|
||||
font-size: 3rem;
|
||||
padding: 10px;
|
||||
text-shadow: .2rem .2rem .2rem #3d3d3d;
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
@media (max-width: 400px) {
|
||||
.title{
|
||||
padding: 5px;
|
||||
font-size: 3rem;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-parallax :src="getsrc" :height="tools.myheight_imgtitle(myheight, myheightmobile)">
|
||||
<h1 class="text-white center_to_image title">{{title}}</h1>
|
||||
<div v-if="legendinside" class="mylegendinside absolute-bottom custom-caption center_to_image" v-html="legendinside"></div>
|
||||
<h1 class="text-white title" style="text-align: center" >{{title}}</h1>
|
||||
<div v-if="legendinside" class="mylegendinside absolute-bottom custom-caption" style="text-align: center" v-html="legendinside"></div>
|
||||
</q-parallax>
|
||||
<div v-if="legend" class="mylegend" v-html="legend"></div>
|
||||
</div>
|
||||
|
||||
0
src/components/CInput/CInput.scss
Executable file
0
src/components/CInput/CInput.scss
Executable file
34
src/components/CInput/CInput.ts
Executable file
34
src/components/CInput/CInput.ts
Executable file
@@ -0,0 +1,34 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
|
||||
import VueScrollReveal from 'vue-scroll-reveal'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { Screen } from 'quasar'
|
||||
|
||||
|
||||
@Component({
|
||||
name: 'CInput'
|
||||
})
|
||||
export default class CInput extends Vue {
|
||||
@Prop({ required: false, default: '' }) public src: string
|
||||
@Prop({ required: false, default: '' }) public src2: string
|
||||
@Prop({ required: false, default: 'myclimg' }) public class1: string
|
||||
@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 '
|
||||
}
|
||||
}
|
||||
11
src/components/CInput/CInput.vue
Executable file
11
src/components/CInput/CInput.vue
Executable file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-field
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CInput.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CInput.scss';
|
||||
</style>
|
||||
1
src/components/CInput/index.ts
Executable file
1
src/components/CInput/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CInput} from './CInput.vue'
|
||||
@@ -1,15 +1,21 @@
|
||||
.flag_icon{
|
||||
max-height: 40px;
|
||||
max-height: 20px;
|
||||
}
|
||||
|
||||
.label_count{
|
||||
font-size: 1.15rem;
|
||||
font-size: 1.00rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.clitemnat{
|
||||
height: 40px;
|
||||
padding: 2px 2px !important;
|
||||
.q-avatar {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.q-item {
|
||||
min-height: 17px;
|
||||
}
|
||||
.clitemnat{
|
||||
height: 15px;
|
||||
padding: 0px 0px !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
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>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ tools.getNationsByNationality(nat._id, false) }}</q-item-label>
|
||||
<q-item-label>{{ tools.getNationsByNationality(nat._id) }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
|
||||
18
src/components/CMyCart/CMyCart.scss
Executable file
18
src/components/CMyCart/CMyCart.scss
Executable file
@@ -0,0 +1,18 @@
|
||||
.card .product-image {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.text-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.centeritems{
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
51
src/components/CMyCart/CMyCart.ts
Executable file
51
src/components/CMyCart/CMyCart.ts
Executable file
@@ -0,0 +1,51 @@
|
||||
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 { GlobalStore, 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
|
||||
}
|
||||
}
|
||||
|
||||
public closecart() {
|
||||
GlobalStore.state.rightCartOpen = false
|
||||
}
|
||||
}
|
||||
46
src/components/CMyCart/CMyCart.vue
Executable file
46
src/components/CMyCart/CMyCart.vue
Executable file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="mycontainer">
|
||||
<div class="myheader row justify-between">
|
||||
<div class="col-6">
|
||||
<q-btn class="q-mx-xs" round dense flat icon="fas fa-shopping-cart">
|
||||
|
||||
<q-badge v-if="getnumItemsCart > 0" color="red" floating transparent>
|
||||
{{ getnumItemsCart }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right">
|
||||
<span v-if="myTotalPrice" 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" @click="closecart"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyCart.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyCart.scss';
|
||||
</style>
|
||||
1
src/components/CMyCart/index.ts
Executable file
1
src/components/CMyCart/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMyCart} from './CMyCart.vue'
|
||||
12
src/components/CMyDashboard/CMyDashboard-validate.ts
Executable file
12
src/components/CMyDashboard/CMyDashboard-validate.ts
Executable file
@@ -0,0 +1,12 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
|
||||
invitante_username: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
.title-nave {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.titlenave{
|
||||
width: 100px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cont_pos {
|
||||
border: solid 2px #4198ef;
|
||||
padding: 2px 8px;
|
||||
margin: 2px 4px;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.cont_pos, .cont_pos_intest{
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
border-radius: 64px !important;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.cont_pos_intest {
|
||||
width: 37px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.extra{
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.passo{
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.posizione_imbarco {
|
||||
font-weight: bold;
|
||||
font-size: 0.75rem;
|
||||
color: blue;
|
||||
text-align: -webkit-center;
|
||||
}
|
||||
|
||||
.ins_invitante{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.q-tab-panel {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { CMyFieldDb } from '../CMyFieldDb'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { CUserBadge } from '../CUserBadge'
|
||||
import { CLegenda } from '../CLegenda'
|
||||
import { IDashboard, IUserProfile } from '../../model'
|
||||
import { IDashboard, IDownline, IUserProfile } from '../../model'
|
||||
import { IUserFields } from '../../model/UserStore'
|
||||
import { CRequisito } from '../CRequisito'
|
||||
import translate from '../../globalroutines/util'
|
||||
@@ -21,35 +21,73 @@ import { CMyRequirement } from '../CMyRequirement'
|
||||
import { CRequisiti } from '../CRequisiti'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { CMyNave } from '../CMyNave'
|
||||
import { validations } from './CMyDashboard-validate'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
|
||||
@Component({
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CCopyBtn, CUserBadge, CLegenda, CRequisito, CMyRequirement, CRequisiti, CCardState, CMyNave }
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: {
|
||||
CProfile,
|
||||
CTitleBanner,
|
||||
CMyFieldDb,
|
||||
CCopyBtn,
|
||||
CUserBadge,
|
||||
CLegenda,
|
||||
CRequisito,
|
||||
CMyRequirement,
|
||||
CRequisiti,
|
||||
CCardState,
|
||||
CMyNave
|
||||
},
|
||||
})
|
||||
|
||||
export default class CMyDashboard extends MixinUsers {
|
||||
public $v
|
||||
public $q
|
||||
public myusername: string = ''
|
||||
public tab: string = 'requisiti'
|
||||
public tabcosa: string = ''
|
||||
public showuserinfo: boolean = false
|
||||
public shownuovoviaggio: boolean = false
|
||||
public notifBot: boolean = true
|
||||
public loading: boolean = false
|
||||
public loading_invitati: boolean = false
|
||||
public seluser: IUserFields = null
|
||||
public aportador_solidario: string = ''
|
||||
public invitante_username: string = ''
|
||||
public showregalainv: boolean = false
|
||||
public id_listaingr: number = -1
|
||||
public ind_order_ingr: number = -1
|
||||
public myrigaattuale: number = 0
|
||||
public mycolattuale: number = 0
|
||||
public upgrade_graduatorie: boolean = false
|
||||
public dashboard: IDashboard = {
|
||||
myself: DefaultUser,
|
||||
aportador: DefaultUser,
|
||||
numpeople_aportador: 0,
|
||||
arrimbarchi: [],
|
||||
arrposizioni: [],
|
||||
navi_partenza: [],
|
||||
lastnave: {},
|
||||
arrusers: [],
|
||||
}
|
||||
|
||||
public downline: IDownline = {
|
||||
downline: [],
|
||||
downnotreg: [],
|
||||
downbyuser: [],
|
||||
arrposizioni: []
|
||||
downbyuser: []
|
||||
}
|
||||
|
||||
@Prop({ required: true }) public username
|
||||
|
||||
@Watch('UserStore.state.my.dashboard')
|
||||
public changedash() {
|
||||
console.log('changedash')
|
||||
// console.log('changedash')
|
||||
this.dashboard = UserStore.state.my.dashboard
|
||||
if (!!this.dashboard)
|
||||
this.invitante_username = this.dashboard.myself.username
|
||||
|
||||
}
|
||||
|
||||
get mythis() {
|
||||
@@ -57,25 +95,80 @@ export default class CMyDashboard extends MixinUsers {
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (!!tools.getCookie(tools.TABBED_DASHBOARD)) {
|
||||
this.tab = tools.getCookie(tools.TABBED_DASHBOARD)
|
||||
}
|
||||
this.update_username()
|
||||
}
|
||||
|
||||
public changetab(val) {
|
||||
tools.setCookie(tools.TABBED_DASHBOARD, val)
|
||||
if (this.tab === 'invitati') {
|
||||
if (this.downline.downline.length <= 0) {
|
||||
this.loading_invitati = true
|
||||
UserStore.actions.getDownline({ username: this.myusername }).then((ris) => {
|
||||
this.downline = ris
|
||||
this.loading_invitati = false
|
||||
})
|
||||
}
|
||||
}
|
||||
// console.log('setcook', val)
|
||||
}
|
||||
|
||||
@Watch('this.username')
|
||||
public changeusername() {
|
||||
this.update_username()
|
||||
|
||||
}
|
||||
|
||||
public aggiorna() {
|
||||
this.dashboard = null
|
||||
this.update_username()
|
||||
this.showuserinfo = false
|
||||
}
|
||||
|
||||
public async update_username() {
|
||||
// console.log('update_username')
|
||||
this.loading = true
|
||||
if (this.username === '')
|
||||
this.myusername = this.getMyUsername()
|
||||
else
|
||||
this.myusername = this.username
|
||||
|
||||
await UserStore.actions.getDashboard({ username: this.myusername }).then((ris) => {
|
||||
this.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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"> </div>
|
||||
<div v-for="(mianave, index) in dashboard.arrposizioni" :key="index">
|
||||
<q-list dense>
|
||||
<q-item>
|
||||
<q-item-section avatar style="width: 70px; font-size: 0.75rem;">
|
||||
{{ getnumtessstr(1, index) }}
|
||||
- {{ tools.getrigacolstr(mianave)}}
|
||||
<q-icon :color="getcolornave(mianave)" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-slider
|
||||
:value="getmyrigaattuale(mianave)"
|
||||
:label-text-color="gettextcolor(mianave)"
|
||||
:label-value="getval7(mianave) + '/7'"
|
||||
:color="getcolorbyval(mianave)"
|
||||
markers
|
||||
dense
|
||||
label
|
||||
label-always
|
||||
readonly
|
||||
:min="tools.getRiganave(mianave.riga)"
|
||||
:max="tools.getRiganave(mianave.riga)+6">
|
||||
|
||||
</q-slider>
|
||||
</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<!--{{tools.getlastnavestr(dashboard.lastnave) }} -->
|
||||
{{ getNaveSognatoreStr(mianave)}}
|
||||
<q-icon color="purple" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-flag-checkered"></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<div v-for="(mianave, index) in dashboard.arrposizioni" :key="index"
|
||||
class="q-pa-sm row items-start q-gutter-sm">
|
||||
|
||||
<q-card class="my-card-shadow yes_shadow">
|
||||
<q-img
|
||||
:src="`statics/images/nave${index+1}.jpg`"
|
||||
style="width: 100%"
|
||||
native-context-menu>
|
||||
<div class="absolute-bottom text-subtitle1 text-center text-sobig">
|
||||
{{ getnumtessstr(mianave.num_tess, index) }} - {{$t('dashboard.nave') + ' ' +
|
||||
tools.getrigacolstr(mianave)}}
|
||||
</div>
|
||||
</q-img>
|
||||
<div class="row justify-sm-start items-center rounded-borders">
|
||||
|
||||
<div class="row items-center justify-center q-ma-xs" style="width: 100%">
|
||||
<q-chip class="glossy q-mx-md" :color="getcolorbynave(mianave)" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ $t('dashboard.nave_in_partenza') + ' ' + datagiftchat(mianave) }}
|
||||
</q-chip>
|
||||
<q-chip v-if="datagiftchat(mianave) !== datanave(mianave)" class="glossy q-mx-md" color="blue"
|
||||
text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ $t('dashboard.nave_in_chiusura') + ' ' + datanave(mianave) }}
|
||||
</q-chip>
|
||||
</div>
|
||||
|
||||
<div v-if="isprovvisoria(mianave)" class="text-center centermydiv">
|
||||
<CRequisiti :statebool="true"
|
||||
:msgTrue="$t('dashboard.nave_provvisoria') + `<br><strong>` + $t('steps.enter_prog_msg') + `</strong>`"
|
||||
msgFalse="">
|
||||
</CRequisiti>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row items-center justify-between q-ma-xs" style="width: 100%;">
|
||||
<div class="row items-center justify-between q-ma-xs no-wrap"
|
||||
style="width: 100%; font-weight: bold; font-size: 1rem">
|
||||
<div>{{$t('dashboard.donatore')}}</div>
|
||||
<div>{{$t('dashboard.mediatore')}}</div>
|
||||
<div>{{$t('dashboard.sognatore')}}</div>
|
||||
</div>
|
||||
<div class="row items-center justify-between q-ma-xs no-wrap" style="width: 100%;">
|
||||
<div class="justify-center">
|
||||
<q-chip class="glossy q-ma-sm" color="red" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ tools.getrigacolstr(mianave) }}
|
||||
</q-chip>
|
||||
<div class="items-center">
|
||||
<q-icon color="blue" size="md" name="fas fa-gift"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-center">
|
||||
<q-chip class="glossy q-ma-sm" color="green" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ getNaveMediatoreStr(mianave)}}
|
||||
</q-chip>
|
||||
<div class="items-center">
|
||||
<q-icon color="blue" size="md" name="fas fa-user-check"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-center">
|
||||
<q-chip class="glossy q-ma-sm" color="purple" text-color="white"
|
||||
icon="fas fa-ship">
|
||||
{{ getNaveSognatoreStr(mianave)}}
|
||||
</q-chip>
|
||||
<div class="items-center">
|
||||
<q-icon color="blue" size="md" name="fas fa-flag-checkered"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<!--<span v-for="index of 8">{{ getNaveSognatoreStr(mianave, index)}} - </span>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="q-pa-md" style="width: 100%;">
|
||||
<!--<q-badge color="primary">
|
||||
{{$t('dashboard.nave')}} {{ myrigaattuale }}.{{ mycolattuale }}
|
||||
</q-badge>-->
|
||||
<q-list dense>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<!--{{tools.getlastnavestr(dashboard.lastnave) }} -->
|
||||
{{ tools.getrigacolstr(mianave)}}
|
||||
<q-icon :color="getcolornave(mianave)" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-slider
|
||||
:value="getmyrigaattuale(mianave)"
|
||||
:label-text-color="gettextcolor(mianave)"
|
||||
:label-value="getval7(mianave) + '/7'"
|
||||
:color="getcolorbyval(mianave)"
|
||||
markers
|
||||
label
|
||||
label-always
|
||||
readonly
|
||||
:min="tools.getRiganave(mianave.riga)"
|
||||
:max="tools.getRiganave(mianave.riga)+6">
|
||||
|
||||
</q-slider>
|
||||
</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<!--{{tools.getlastnavestr(dashboard.lastnave) }} -->
|
||||
{{ getNaveSognatoreStr(mianave)}}
|
||||
<q-icon color="purple" name="fas fa-ship"></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="mianave.num_tess % 2 !== 0">
|
||||
<q-item-section avatar>
|
||||
<q-icon :color="colordono(mianave)" inverted size="sm" name="fas fa-gift"
|
||||
class="gift"></q-icon>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<div v-if="mianave.made_gift">
|
||||
<q-chip class="glossy"
|
||||
size="md"
|
||||
color="green"
|
||||
text-color="white"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('steps.dono') + ' ' + $t('dashboard.dono_ricevuto_2') }} !
|
||||
</q-chip>
|
||||
</div>
|
||||
<div v-else-if="!!mianave.date_made_gift">
|
||||
<q-chip class=""
|
||||
size="md"
|
||||
text-color="blue"
|
||||
color="white"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dashboard.ho_effettuato_il_dono') }}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="(mianave.num_tess % 2 !== 0) && !isprovvisoria(mianave)">
|
||||
<q-item-section avatar>
|
||||
<q-icon size="sm" name="fas fa-heart" color="red"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
|
||||
<q-input v-model="mianave.note" :label="$t('reg.my_dream')"
|
||||
rounded outlined
|
||||
debounce="1000"
|
||||
autogrow
|
||||
dense
|
||||
style="width: 100%; font-size:0.75rem;"
|
||||
@input="change_mynote(mianave)">
|
||||
</q-input>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="mianave.num_tess % 2 !== 0">
|
||||
<q-item-section avatar>
|
||||
<q-icon size="sm" name="fas fa-user" color="blue"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-input v-model="mianave.invitante_username" :label="$t('dashboard.invitante')"
|
||||
rounded outlined
|
||||
readonly
|
||||
dense
|
||||
style="width: 100%; font-size:0.75rem;">
|
||||
</q-input>
|
||||
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<CMyNave :posizprop="mianave" :key="index"
|
||||
:navi_partenzaprop="dashboard.navi_partenza" :listanavi="false" :dashboard="dashboard">
|
||||
|
||||
</CMyNave>
|
||||
</div>
|
||||
|
||||
<!--<q-card-actions>
|
||||
<q-btn flat>Action 1</q-btn>
|
||||
<q-btn flat>Action 2</q-btn>
|
||||
</q-card-actions>-->
|
||||
</q-card>
|
||||
<!--<div class="col-3">
|
||||
<div>
|
||||
<CCardState :isperc="true" size="50px" size_mob="40px" fontsize="0.75rem"
|
||||
:myperc="getposizioneattuale(mianave)"></CCardState>
|
||||
</div>
|
||||
</div>-->
|
||||
<!--<div class="col-1">
|
||||
<div>
|
||||
{{ getposizioneattuale(mianave, true) }}
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
|
||||
<div v-if="!!dashboard.myself">
|
||||
<div v-if="!!dashboard.myself.name">
|
||||
<div v-if="dashboard.myself.deleted">
|
||||
<span style="color: red;"> <h2><strong>UTENTE CANCELLATO (Nascosto: true) !</strong></h2></span>
|
||||
</div>
|
||||
|
||||
<div v-if="dashboard.myself.sospeso">
|
||||
<span style="color: blue;"> <h2><strong>UTENTE SOSPESO !</strong></h2></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<!--
|
||||
<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>
|
||||
|
||||
|
||||
@@ -18,10 +18,13 @@ export default class CMyEditor extends Vue {
|
||||
@Prop({ required: false, default: '' }) public title
|
||||
@Prop({ required: true }) public value
|
||||
@Prop({ required: false, default: '' }) public myclass
|
||||
@Prop({ required: false, default: true }) public showButtons
|
||||
|
||||
public myvalue = ''
|
||||
public mycolor = ''
|
||||
|
||||
public showeditor: boolean = true
|
||||
|
||||
public myfonts = {
|
||||
arial: 'Arial',
|
||||
arial_black: 'Arial Black',
|
||||
@@ -98,6 +101,20 @@ export default class CMyEditor extends Vue {
|
||||
this.$emit('update:value', newval)
|
||||
}
|
||||
|
||||
public annulla() {
|
||||
this.$emit('annulla', true)
|
||||
}
|
||||
public saveval() {
|
||||
// Converti i <b> in <strong>
|
||||
|
||||
this.myvalue = tools.convertiTagHTMLPerBOT(this.myvalue)
|
||||
|
||||
console.log('saveval', this.myvalue)
|
||||
this.$emit('showandsave', this.myvalue)
|
||||
// this.$emit('update:value', this.myvalue)
|
||||
this.showeditor = false
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.myvalue = this.value
|
||||
this.editor = this.$refs.editor_ref
|
||||
|
||||
@@ -1,39 +1,55 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<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">
|
||||
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-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">
|
||||
</q-editor>
|
||||
<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-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">
|
||||
</q-editor>
|
||||
</form>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-actions v-if="showButtons" 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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyEditor.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyEditor.scss';
|
||||
@import './CMyEditor.scss';
|
||||
</style>
|
||||
|
||||
@@ -12,10 +12,12 @@ import { CMySelect } from '../CMySelect'
|
||||
import { GlobalStore, UserStore } from '../../store/Modules'
|
||||
import { CMyChipList } from '../CMyChipList'
|
||||
import { CMyToggleList } from '../CMyToggleList'
|
||||
import translate from '@src/globalroutines/util'
|
||||
import { CDateTime } from '../CDateTime'
|
||||
|
||||
@Component({
|
||||
name: 'CMyFieldDb',
|
||||
components: { CMyEditor, CMySelect, CMyChipList, CMyToggleList }
|
||||
components: { CMyEditor, CMySelect, CMyChipList, CMyToggleList, CDateTime }
|
||||
})
|
||||
|
||||
export default class CMyFieldDb extends MixinBase {
|
||||
@@ -26,7 +28,10 @@ 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
|
||||
@Prop({ required: false, default: '' }) public id: string
|
||||
@Prop({ required: false, default: '' }) public idmain: string
|
||||
|
||||
public $t
|
||||
public myvalue = ''
|
||||
@@ -35,18 +40,28 @@ export default class CMyFieldDb extends MixinBase {
|
||||
public countryname = ''
|
||||
|
||||
public created() {
|
||||
this.myvalue = this.getValDb(this.mykey, this.serv, '', this.table, this.mysubkey)
|
||||
this.crea()
|
||||
}
|
||||
|
||||
public crea() {
|
||||
|
||||
this.myvalue = this.getValDb(this.mykey, this.serv, '', this.table, this.mysubkey, this.id, this.idmain)
|
||||
this.col.jointable = this.jointable
|
||||
this.col.fieldtype = this.type
|
||||
this.col.label = this.title
|
||||
|
||||
// console.log('created', this.myvalue)
|
||||
// console.log('CMyFieldDb crea', this.myvalue)
|
||||
}
|
||||
|
||||
@Watch('id')
|
||||
public idchanged(value) {
|
||||
this.crea()
|
||||
}
|
||||
|
||||
public getclassCol(col) {
|
||||
if (col) {
|
||||
let mycl = (this.disable || col.disable) ? '' : 'colmodif '
|
||||
mycl += (col.fieldtype === tools.FieldType.date) ? ' coldate flex flex-container ' : ''
|
||||
mycl += ((col.fieldtype === tools.FieldType.date) || (col.fieldtype === tools.FieldType.onlydate)) ? ' coldate flex flex-container ' : ''
|
||||
|
||||
return mycl
|
||||
} else {
|
||||
@@ -61,6 +76,12 @@ export default class CMyFieldDb extends MixinBase {
|
||||
} else {
|
||||
return tools.getstrDateTime(val)
|
||||
}
|
||||
} else if (this.col.fieldtype === tools.FieldType.onlydate) {
|
||||
if (val === undefined) {
|
||||
return '[]'
|
||||
} else {
|
||||
return tools.getstrDate(val)
|
||||
}
|
||||
} else if (this.col.fieldtype === tools.FieldType.boolean) {
|
||||
return (val) ? this.$t('dialog.yes') : this.$t('dialog.no')
|
||||
} else if (this.col.fieldtype === tools.FieldType.binary) {
|
||||
@@ -90,9 +111,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) {
|
||||
@@ -118,7 +139,7 @@ export default class CMyFieldDb extends MixinBase {
|
||||
|
||||
public savefield(value, initialval) {
|
||||
this.myvalue = value
|
||||
this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey)
|
||||
this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey, this.id)
|
||||
}
|
||||
|
||||
public savefieldboolean(value) {
|
||||
@@ -127,10 +148,10 @@ export default class CMyFieldDb extends MixinBase {
|
||||
else
|
||||
this.myvalue = value
|
||||
|
||||
this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey)
|
||||
this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey, this.id)
|
||||
}
|
||||
|
||||
public selectcountry({name, iso2, dialCode}) {
|
||||
public selectcountry({ name, iso2, dialCode }) {
|
||||
// console.log(name, iso2, dialCode)
|
||||
this.myvalue = iso2
|
||||
this.countryname = name
|
||||
|
||||
@@ -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>
|
||||
@@ -20,6 +31,18 @@
|
||||
>
|
||||
</CDateTime>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.onlydate">
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
class="cursor-pointer"
|
||||
:value.sync="myvalue"
|
||||
:readonly="false"
|
||||
:dense="true"
|
||||
:canEdit="canEdit"
|
||||
view="date"
|
||||
>
|
||||
</CDateTime>
|
||||
</div>
|
||||
<div v-else :class="mycl">
|
||||
<div v-if="type === tools.FieldType.binary">
|
||||
<CMyChipList
|
||||
@@ -56,7 +79,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 +111,7 @@
|
||||
@input="savefieldboolean"></q-toggle>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ myvalprinted }}
|
||||
<div v-html="myvalprinted"></div>
|
||||
</div>
|
||||
|
||||
<q-popup-edit
|
||||
@@ -103,7 +126,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"
|
||||
@@ -128,6 +152,13 @@
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.hours">
|
||||
<CMySelect label="Ore" :value.sync="myvalue"
|
||||
optval="_id" optlab="label"
|
||||
:useinput="false"
|
||||
o :options="tools.SelectHours">
|
||||
</CMySelect>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.binary">
|
||||
<CMyToggleList :label="col.title"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
@@ -205,25 +236,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 +270,5 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyFieldDb.scss';
|
||||
@import './CMyFieldDb.scss';
|
||||
</style>
|
||||
|
||||
12
src/components/CMyFlotta/CMyFlotta-validate.ts
Executable file
12
src/components/CMyFlotta/CMyFlotta-validate.ts
Executable file
@@ -0,0 +1,12 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
|
||||
username_sostituire: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
182
src/components/CMyFlotta/CMyFlotta.scss
Executable file
182
src/components/CMyFlotta/CMyFlotta.scss
Executable file
@@ -0,0 +1,182 @@
|
||||
|
||||
.title-nave {
|
||||
padding: 2px 4px;
|
||||
margin: 2px 4px;
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.donatore, .mediatore, .sognatore, .intermedio1, .intermedio2, .intermedio4, .intermedio5{
|
||||
color: white;
|
||||
background-color: lightblue;
|
||||
padding: 1px 2px;
|
||||
margin: 1px 2px;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 32px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
max-width: 200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.intermedio1{
|
||||
background-color: indigo;
|
||||
}
|
||||
.intermedio2{
|
||||
background-color: blue;
|
||||
}
|
||||
.intermedio4{
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
}
|
||||
.intermedio5{
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.tutor{
|
||||
|
||||
}
|
||||
|
||||
.selezione:hover {
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
.donatore {
|
||||
background-color: red;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.mediatore {
|
||||
background-color: green;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sognatore {
|
||||
background-color: purple;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
.cont_donatore, .cont_sognatore, .cont_mediatore, .cont_tragitto, .cont_pos, .cont_intestaz, .cont_pos_intest, .cont_intestaz_small {
|
||||
border: solid 2px #4198ef;
|
||||
padding: 2px 8px;
|
||||
margin: 2px 4px;
|
||||
font-size: 1rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.cont_donatore {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.you {
|
||||
background-color: yellow;
|
||||
}
|
||||
.issognatore {
|
||||
background-color: orangered;
|
||||
color: white;
|
||||
font-size: 1.10rem;
|
||||
border-radius: 64px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cont_tragitto{
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.cont_pos, .cont_pos_intest{
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
border-radius: 64px !important;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.cont_pos_intest {
|
||||
width: 37px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.extra{
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.passo{
|
||||
font-weight: bold;
|
||||
width: 110px;
|
||||
}
|
||||
.passoint{
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.gift{
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.cont_intestaz, .cont_intestaz_small{
|
||||
font-size: 0.75rem;
|
||||
margin: 4px;
|
||||
border-radius: 16px !important;
|
||||
|
||||
}
|
||||
|
||||
.cont_intestaz_small{
|
||||
margin: 0;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.title-nave {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.titlenave{
|
||||
width: 75px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.datanave{
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.datanave_int{
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dati {
|
||||
color: blue;
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mancanti {
|
||||
color: red;
|
||||
|
||||
}
|
||||
.inviati {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.pan_sognatore {
|
||||
padding: 0px 0px;
|
||||
}
|
||||
|
||||
.ricevuti{
|
||||
color: green;
|
||||
}
|
||||
|
||||
.title-nave {
|
||||
font-size: 1.25rem;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.q-table th, .q-table--dense {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.q-btn {
|
||||
text-transform: none;
|
||||
}
|
||||
637
src/components/CMyFlotta/CMyFlotta.ts
Executable file
637
src/components/CMyFlotta/CMyFlotta.ts
Executable file
@@ -0,0 +1,637 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import MixinNave from '../../mixins/mixin-nave'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { GlobalStore, UserStore } from '../../store/Modules'
|
||||
import { lists } from '../../store/Modules/lists'
|
||||
import translate from '../../globalroutines/util'
|
||||
import { CMyChipList } from '../CMyChipList'
|
||||
import { CVideo } from '../CVideo'
|
||||
import { validations } from './CMyFlotta-validate'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import { CMyDashboard } from '../CMyDashboard'
|
||||
import { CDateTime } from '../CDateTime'
|
||||
|
||||
@Component({
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { CTitleBanner, CMyChipList, CVideo, CMyDashboard, CDateTime }
|
||||
})
|
||||
|
||||
export default class CMyFlotta extends MixinNave {
|
||||
@Prop({ required: false, default: null }) public flottaprop
|
||||
public $t
|
||||
public $v
|
||||
public flotta: any = null
|
||||
public flotta_completa: any = null
|
||||
public arrdonatori: any[] = []
|
||||
public arrmediatori: any[] = []
|
||||
public loading: boolean = false
|
||||
public seluser = null
|
||||
public showmsguser: boolean = false
|
||||
public showsostituisci: boolean = false
|
||||
public showdashboard: boolean = false
|
||||
public showtesto: boolean = false
|
||||
public notifBot: boolean = true
|
||||
public deleteUser: boolean = true
|
||||
public AddImbarco: boolean = false
|
||||
public seltesto: string = ''
|
||||
public msg_tosend_user: string = ''
|
||||
public username_sostituire: string = ''
|
||||
public userfreestr: string = ''
|
||||
public tuttiidoni: boolean = false
|
||||
public showcommenti: boolean = true
|
||||
public showcolmodifica: boolean = false
|
||||
public showcoldati: boolean = false
|
||||
public inviaemail: boolean = false
|
||||
public seldonatore = null
|
||||
public ordinamento: string = 'data'
|
||||
public tabflotta: string = 'flotta'
|
||||
public tabmsg: string = 'donatori'
|
||||
public direzordin: number = -1
|
||||
public tutor1: string = ''
|
||||
public tutor2: string = ''
|
||||
public tutor3: string = ''
|
||||
public tutorslo: string = ''
|
||||
public date_start: Date = null
|
||||
public date_close: Date = null
|
||||
public revolut: string = ''
|
||||
public email_paypal: string = ''
|
||||
public payeer_id: string = ''
|
||||
public advcash_id: string = ''
|
||||
public note_payment: string = ''
|
||||
public link_payment: string = ''
|
||||
public link_superchat: string = ''
|
||||
public last_riga_aperto: string = ''
|
||||
public last_col_aperto: string = ''
|
||||
public MyPagination: {
|
||||
sortBy: string,
|
||||
descending: boolean,
|
||||
page: number,
|
||||
rowsNumber: number, // specifying this determines pagination is server-side
|
||||
rowsPerPage: number
|
||||
} = { sortBy: 'index', descending: false, page: 1, rowsNumber: 10, rowsPerPage: 10 }
|
||||
public colflotte: any[] = [
|
||||
{
|
||||
name: 'index',
|
||||
required: true,
|
||||
label: 'Num',
|
||||
align: 'left',
|
||||
field: '',
|
||||
sortable: true
|
||||
},
|
||||
{ name: 'flotta', align: 'center', label: 'Flotta', field: 'flotta', sortable: true }, // da 8.1 a 8.8
|
||||
{
|
||||
name: 'date_gift_chat_open', align: 'center',
|
||||
label: '⏰ Gift Chat', field: 'date_gift_chat_open', sortable: true
|
||||
},
|
||||
{ name: 'date_start', align: 'center', label: '⏰ Chiusura', field: 'date_start', sortable: true }, // 4/6/2020
|
||||
{ name: 'sognatore', align: 'center', label: 'Sognatore', field: 'sognatore_nomecognome', sortable: true }, // Username Sognatore
|
||||
{ name: 'provvisoria', align: 'center', label: 'Temp.', field: 'provvisoria', sortable: true }, // Flotta Provvisoria
|
||||
// { name: 'tutor', align: 'left', label: 'Tutor', field: 'tutor', sortable: true },
|
||||
// { name: 'mediatore', align: 'center', label: '🌀 Mediatore', field: '', sortable: true },
|
||||
{ name: 'DoniConfermati', align: 'center', label: '🎁 OK', field: 'DoniConfermati', sortable: true },
|
||||
{ name: 'DoniAttesaDiConferma', align: 'center', label: '🎁 Wait', field: 'DoniAttesaDiConferma', sortable: true },
|
||||
{ name: 'DoniMancanti', align: 'center', label: '🎁 Miss', field: 'DoniMancanti', sortable: true },
|
||||
{ name: 'msg_inviato', align: 'center', label: 'Msg Sent', field: 'msg_inviato', sortable: true },
|
||||
]
|
||||
|
||||
public coldonatori: any[] = [
|
||||
{ name: 'nave', align: 'center', label: 'Nave', field: '', sortable: true },
|
||||
{ name: 'name', align: 'center', label: 'Nome', field: 'name', sortable: true },
|
||||
{ name: 'num_tess', align: 'center', label: 'Tessitura', field: 'num_tess', sortable: true },
|
||||
{ name: 'date_made_gift', align: 'center', label: 'Inviato', field: 'date_made_gift', sortable: true },
|
||||
{ name: 'made_gift', align: 'center', label: 'Dono', field: 'made_gift', sortable: true },
|
||||
]
|
||||
|
||||
get getcol() {
|
||||
// if (tools.isMobile())
|
||||
// return this.coldonatori_cell
|
||||
// else
|
||||
return this.coldonatori
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.flotta = this.flottaprop
|
||||
|
||||
if (!!this.flotta) {
|
||||
this.last_riga_aperto = tools.getCookie('flotta_riga', '')
|
||||
this.last_col_aperto = tools.getCookie('flotta_col', '')
|
||||
}
|
||||
|
||||
if (this.isaperto)
|
||||
this.apriflotta()
|
||||
}
|
||||
|
||||
public aggiorna() {
|
||||
if (!!this.flotta) {
|
||||
this.tutor1 = this.flotta.tutor1
|
||||
this.tutor2 = this.flotta.tutor2
|
||||
this.tutor3 = this.flotta.tutor3
|
||||
this.tutorslo = this.flotta.tutorslo
|
||||
this.date_start = this.flotta.date_start
|
||||
this.date_close = this.flotta.date_close
|
||||
this.note_payment = this.flotta.note_payment
|
||||
this.revolut = this.flotta.revolut
|
||||
this.email_paypal = this.flotta.email_paypal
|
||||
this.payeer_id = this.flotta.payeer_id
|
||||
this.advcash_id = this.flotta.advcash_id
|
||||
this.link_payment = this.flotta.link_payment
|
||||
this.link_superchat = this.flotta.link_superchat
|
||||
}
|
||||
}
|
||||
|
||||
public addstrnaveseprovv() {
|
||||
if (this.flotta.provvisoria)
|
||||
return ' (La FLOTTA è ancora Provvisoria !) '
|
||||
return ''
|
||||
}
|
||||
|
||||
public getflottastr() {
|
||||
if (!!this.flotta) {
|
||||
let mystr = ''
|
||||
if (this.flotta.provvisoria)
|
||||
mystr += ' Provvisoria '
|
||||
mystr += 'Da ' + this.flotta.riga + '.' + Math.ceil(this.flotta.col_prima / 8) + ' a ' + this.flotta.riga + '.' + Math.ceil(this.flotta.col_ultima / 8)
|
||||
|
||||
let perc = 0
|
||||
let conf = 0
|
||||
let tot = 0
|
||||
|
||||
if (this.arrdonatori.length > 0) {
|
||||
tot = this.getDoniTotali()
|
||||
conf = this.getDoniConfermati()
|
||||
} else {
|
||||
tot = this.flotta.DoniTotali
|
||||
conf = this.flotta.DoniConfermati
|
||||
}
|
||||
|
||||
if (tot > 0) {
|
||||
perc = Math.round((conf / tot) * 100)
|
||||
}
|
||||
|
||||
mystr += ' (' + conf + '/' + tot + ') [' + perc + '%]'
|
||||
|
||||
|
||||
if (!!this.flotta.sognatore_nomecognome)
|
||||
mystr += ' - ' + this.flotta.sognatore_nomecognome
|
||||
return mystr
|
||||
} else
|
||||
return ''
|
||||
}
|
||||
|
||||
public gettitoloflotta() {
|
||||
return 'Flotta ' + this.getflottastr()
|
||||
}
|
||||
|
||||
get log_attivita() {
|
||||
if (!!this.flotta)
|
||||
return this.flotta.log_attivita
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public getcolorflotta() {
|
||||
if (!!this.flotta) {
|
||||
if (this.flotta.DoniMancanti === 0 && this.flotta.DoniTotali === 0)
|
||||
return 'bg-orange'
|
||||
else if (this.flotta.DoniConfermati === this.flotta.DoniTotali && this.flotta.DoniTotali > 0)
|
||||
return 'bg-green'
|
||||
else if (this.flotta.DoniConfermati <= this.flotta.DoniTotali)
|
||||
return 'bg-red'
|
||||
else
|
||||
return 'bg-blue'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async apriflotta() {
|
||||
|
||||
console.log('apriflotta')
|
||||
|
||||
this.loading = true
|
||||
const ris = await GlobalStore.actions.GetFlotta({
|
||||
riga: this.flotta.riga,
|
||||
col_prima: this.flotta.col_prima,
|
||||
col_ultima: this.flotta.col_ultima
|
||||
})
|
||||
|
||||
if (!!ris) {
|
||||
this.arrdonatori = ris.arrdonatori
|
||||
this.arrmediatori = ris.arrmediatori
|
||||
this.flotta = ris.flotta
|
||||
this.flotta.log_attivita = this.flotta.log_attivita.replace(/\n/g, '<br>')
|
||||
|
||||
}
|
||||
|
||||
this.aggiorna()
|
||||
this.loading = false
|
||||
|
||||
if (!!this.flotta) {
|
||||
tools.setCookie('flotta_riga', this.flotta.riga)
|
||||
tools.setCookie('flotta_col', this.flotta.col_prima)
|
||||
}
|
||||
}
|
||||
|
||||
get getnotifBotTxt() {
|
||||
return this.seluser.name + ' (' + this.seluser.surname + ') è stato sostituito con ' + this.username_sostituire
|
||||
}
|
||||
|
||||
public getnave(row) {
|
||||
return tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col)
|
||||
}
|
||||
|
||||
public getnavestr(row, index) {
|
||||
let flottastr = tools.getRiganave(row.riga) + '.' + tools.getColnave(row.col) + ' D' + (((row.col - 1) % 8) + 1)
|
||||
|
||||
if (this.showcoldati) {
|
||||
flottastr += ' ' + row.riga + '.' + row.col
|
||||
}
|
||||
|
||||
return flottastr
|
||||
}
|
||||
|
||||
public getwidthpos() {
|
||||
return (this.showcoldati) ? '80' : '60'
|
||||
}
|
||||
|
||||
public HoRicevutoIlDono(rec, annulla) {
|
||||
this.seldonatore = rec
|
||||
let msgtitle = ''
|
||||
let msginvia = ''
|
||||
let mymsg = ''
|
||||
if (annulla) {
|
||||
msgtitle = 'Annulla la ricezione del dono'
|
||||
msginvia = `Confermi di annullare il Dono da parte di ${rec.name} ${rec.surname} (${rec.username})'`
|
||||
mymsg = ''
|
||||
} else {
|
||||
msgtitle = this.$t('dashboard.dono_ricevuto_2')
|
||||
msginvia = this.$t('dashboard.confermi_dono_ricevuto', {
|
||||
donatore: rec.name + ' ' + rec.surname
|
||||
})
|
||||
mymsg = this.$t('dashboard.confermi_dono_ricevuto_msg', {
|
||||
donatore: rec.name + ' ' + rec.surname + ' (' + this.$t('dashboard.posizione') + ' ' + rec.riga + '.' + rec.col + ')'
|
||||
})
|
||||
mymsg += ' [' + rec.riga + '.' + rec.col + ']'
|
||||
}
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '? (Pos ' + rec.riga + '.' + rec.col + ')', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_RICEVUTO, 0, {
|
||||
param1: {
|
||||
_id: rec._id,
|
||||
made_gift: !annulla,
|
||||
annulla,
|
||||
riga: rec.riga,
|
||||
col: rec.col
|
||||
},
|
||||
param2: rec.username,
|
||||
param3: mymsg
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public clickseluser(rec) {
|
||||
this.seluser = rec
|
||||
this.showmsguser = true
|
||||
this.userfreestr = ''
|
||||
}
|
||||
|
||||
public clicksostituisci(rec) {
|
||||
this.seluser = rec
|
||||
this.showsostituisci = true
|
||||
this.username_sostituire = ''
|
||||
this.userfreestr = ''
|
||||
}
|
||||
|
||||
public viewdashboard(rec) {
|
||||
this.seluser = rec
|
||||
this.showdashboard = true
|
||||
}
|
||||
|
||||
public Chiudi() {
|
||||
this.showmsguser = false
|
||||
this.showsostituisci = false
|
||||
this.showtesto = false
|
||||
}
|
||||
|
||||
public async InviaMsgAUserConfirm(msgobj, navemediatore) {
|
||||
|
||||
const msgtitle = translate('dialog.sendmsg')
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msgobj.msgpar1 + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.INVIA_MSG_A_SINGOLO, 0, {
|
||||
param1: msgobj,
|
||||
param2: navemediatore
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
let error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
error = error || (this.username_sostituire === this.seluser.username_sostituire)
|
||||
|
||||
return !error
|
||||
|
||||
}
|
||||
|
||||
public async InviaMsgAFlotta(inviareale, tipomsg, msg) {
|
||||
|
||||
if ((tipomsg === tools.TipoMsg.SEND_MSG_EFFETTUA_IL_DONO) || (tipomsg === tools.TipoMsg.SEND_MSG_SOLLECITO_DONATORI_NO_DONO)) {
|
||||
msg = this.addstrnaveseprovv() + msg
|
||||
}
|
||||
const msgtitle = msg
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msg, translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.INVIA_MSG_A_FLOTTA, 0, {
|
||||
param1: this.flotta,
|
||||
param2: { inviareale, inviaemail: this.inviaemail },
|
||||
param3: tipomsg
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public Callback() {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
public ActionAfterYes(action, item, data) {
|
||||
console.log('ActionAfterYes...')
|
||||
if (action === lists.MenuAction.DONO_RICEVUTO) {
|
||||
if (!!this.seldonatore) {
|
||||
this.seldonatore.made_gift = true
|
||||
}
|
||||
}
|
||||
|
||||
this.apriflotta()
|
||||
}
|
||||
|
||||
get getarr() {
|
||||
let myarr = []
|
||||
if (this.ordinamento === 'data')
|
||||
myarr = this.arrdonatori.sort((a, b) => tools.gettimestampstrDate(a.date_made_gift) - tools.gettimestampstrDate(b.date_made_gift) * (this.direzordin))
|
||||
else if (this.ordinamento === 'num')
|
||||
myarr = this.arrdonatori.sort((a, b) => a.col - b.col * (this.direzordin))
|
||||
else if (this.ordinamento === 'nationality')
|
||||
myarr = this.arrdonatori.sort((a, b) => ('' + a.profile.nationality).localeCompare(b.profile.nationality) * (this.direzordin))
|
||||
else
|
||||
myarr = this.arrdonatori
|
||||
|
||||
return myarr.filter((rec) => ((!this.tuttiidoni && !rec.made_gift) || (this.tuttiidoni)))
|
||||
}
|
||||
|
||||
public exportLista() {
|
||||
let mystr = ''
|
||||
let nave = ''
|
||||
for (const rec of this.getarr) {
|
||||
if (this.getnave(rec) !== nave) {
|
||||
nave = this.getnave(rec)
|
||||
mystr += '\n' + nave + ': ' + '\n'
|
||||
}
|
||||
|
||||
if (rec.made_gift) {
|
||||
mystr += '✅🎁'
|
||||
} else {
|
||||
if (!rec.date_made_gift) {
|
||||
mystr += ' 👉🏻 '
|
||||
} else {
|
||||
mystr += ' 🎁 '
|
||||
}
|
||||
}
|
||||
|
||||
if (rec.profile.nationality === 'IT')
|
||||
mystr += '🇮🇹'
|
||||
else if (rec.profile.nationality === 'SI')
|
||||
mystr += '🇸🇮'
|
||||
else if (rec.profile.nationality === 'HR')
|
||||
mystr += '🇭🇷'
|
||||
else if (rec.profile.nationality === 'FR')
|
||||
mystr += '🇫🇷'
|
||||
else if (rec.profile.nationality === 'ES')
|
||||
mystr += '🇪🇸'
|
||||
else if (rec.profile.nationality === 'PT')
|
||||
mystr += '🇵🇹'
|
||||
else if (rec.profile.nationality === 'DE')
|
||||
mystr += '🇩🇪'
|
||||
else if (rec.profile.nationality === 'UK')
|
||||
mystr += '🇬🇧'
|
||||
else if (rec.profile.nationality === 'GB')
|
||||
mystr += '🇬🇧'
|
||||
else if (rec.profile.nationality === 'IE')
|
||||
mystr += '🇮🇪'
|
||||
else if (rec.profile.nationality === 'KE')
|
||||
mystr += '🇰🇪'
|
||||
else if (rec.profile.nationality === 'AU')
|
||||
mystr += '🇦🇺'
|
||||
else if (rec.profile.nationality === 'CM')
|
||||
mystr += '🇨🇲'
|
||||
else if (rec.profile.nationality === 'CO')
|
||||
mystr += '🇨🇴'
|
||||
else if (rec.profile.nationality === 'BR')
|
||||
mystr += '🇧🇷'
|
||||
else if (rec.profile.nationality === 'PL')
|
||||
mystr += '🇵🇱'
|
||||
else if (rec.profile.nationality === 'VE')
|
||||
mystr += '🇻🇪'
|
||||
else
|
||||
mystr += '(' + rec.profile.nationality + ')'
|
||||
|
||||
mystr += ' ' + rec.name + ' ' + rec.surname + ' (' + rec.username + ')'
|
||||
|
||||
mystr += '\n'
|
||||
}
|
||||
|
||||
tools.copyStringToClipboard(this, mystr, false)
|
||||
}
|
||||
|
||||
public getDoniAttesaDiConferma() {
|
||||
return this.arrdonatori.filter((rec) => (!!rec.date_made_gift && !rec.made_gift)).reduce((sum, item) => sum + 1, 0)
|
||||
}
|
||||
|
||||
public getDoniTotali() {
|
||||
return this.arrdonatori.filter((rec) => (!!rec)).reduce((sum, item) => sum + 1, 0)
|
||||
}
|
||||
|
||||
public getDoniConfermati() {
|
||||
return this.arrdonatori.filter((rec) => rec.made_gift).reduce((sum, item) => sum + 1, 0)
|
||||
}
|
||||
|
||||
public getDoniMancanti() {
|
||||
return this.arrdonatori.filter((rec) => (!rec.made_gift && !rec.date_made_gift)).reduce((sum, item) => sum + 1, 0)
|
||||
}
|
||||
|
||||
public setordin(ord) {
|
||||
this.ordinamento = ord
|
||||
if (this.direzordin === 1)
|
||||
this.direzordin = -1
|
||||
else
|
||||
this.direzordin = 1
|
||||
}
|
||||
|
||||
public InviaMsgAUser() {
|
||||
|
||||
if (!this.msg_tosend_user)
|
||||
return
|
||||
|
||||
const msgobj = {
|
||||
tipomsg: tools.TipoMsg.SEND_MSG_SINGOLO,
|
||||
msgpar1: this.msg_tosend_user,
|
||||
username: this.seluser.username,
|
||||
inviareale: true,
|
||||
username_mitt: '',
|
||||
}
|
||||
|
||||
msgobj.username_mitt = UserStore.state.my.username
|
||||
|
||||
const naveuser = this.seluser
|
||||
|
||||
this.InviaMsgAUserConfirm(msgobj, naveuser)
|
||||
}
|
||||
|
||||
get isAdmin() {
|
||||
return UserStore.state.isAdmin
|
||||
}
|
||||
|
||||
get isManager() {
|
||||
return UserStore.state.isManager
|
||||
}
|
||||
|
||||
get isTutor() {
|
||||
return UserStore.state.isTutor
|
||||
}
|
||||
|
||||
get isTratuttrici() {
|
||||
return UserStore.state.isTratuttrici
|
||||
}
|
||||
|
||||
public async SostituisciUtente(user, usernamesost, notifBottxt) {
|
||||
usernamesost = usernamesost.trim()
|
||||
|
||||
await tools.askConfirm(this.$q, 'Sostituisci', notifBottxt + ' ?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.SOSTITUISCI, 0, {
|
||||
param1: user,
|
||||
param2: {
|
||||
username: usernamesost,
|
||||
username_da_sostituire: user.username,
|
||||
riga: user.riga,
|
||||
col: user.col,
|
||||
notifBot: this.notifBot,
|
||||
inviaemail: this.inviaemail,
|
||||
deleteUser: this.deleteUser,
|
||||
AddImbarco: this.AddImbarco,
|
||||
},
|
||||
param3: notifBottxt
|
||||
})
|
||||
}
|
||||
|
||||
public async TrovaUserFree(username) {
|
||||
|
||||
this.ChiamaFunz(null, lists.MenuAction.DAMMI_PRIMO_UTENTE_LIBERO, null)
|
||||
|
||||
}
|
||||
|
||||
public async ChiamaFunz(username, func, data) {
|
||||
|
||||
const mydatatosave = {
|
||||
username,
|
||||
ind_order: -1,
|
||||
myfunc: func,
|
||||
notifBot: null,
|
||||
data: null
|
||||
}
|
||||
|
||||
if (!!data) {
|
||||
mydatatosave.data = data
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
|
||||
GlobalStore.actions.askFunz({ mydata: mydatatosave }).then((ris) => {
|
||||
this.loading = false
|
||||
if (ris) {
|
||||
if (func === lists.MenuAction.DAMMI_PRIMO_UTENTE_LIBERO) {
|
||||
this.userfreestr = ris.username + ' (' + ris.name + ' ' + ris.surname + ')'
|
||||
this.username_sostituire = ris.username
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
public async Mostraplacca(riga, col) {
|
||||
const data = {
|
||||
riga,
|
||||
col
|
||||
}
|
||||
this.showtesto = true
|
||||
this.seltesto = await GlobalStore.actions.GetData({ data })
|
||||
}
|
||||
|
||||
public change_link_payment() {
|
||||
if (this.flotta.link_payment !== this.link_payment) {
|
||||
this.flotta.link_payment = this.link_payment
|
||||
|
||||
const mydata = {
|
||||
link_payment: this.flotta.link_payment
|
||||
}
|
||||
tools.saveFieldToServer(this, 'flotte', this.flotta._id, mydata)
|
||||
}
|
||||
}
|
||||
|
||||
public change_field(fieldname) {
|
||||
console.log('fieldname', this.date_start, this.flotta[fieldname], this[fieldname])
|
||||
if (this.flotta[fieldname] !== this[fieldname]) {
|
||||
this.flotta[fieldname] = this[fieldname]
|
||||
|
||||
const mydata = {
|
||||
[fieldname]: this.flotta[fieldname]
|
||||
}
|
||||
tools.saveFieldToServer(this, 'flotte', this.flotta._id, mydata)
|
||||
}
|
||||
}
|
||||
|
||||
public change_link_superchat() {
|
||||
if (this.flotta.link_superchat !== this.link_superchat) {
|
||||
this.flotta.link_superchat = this.link_superchat
|
||||
const mydata = {
|
||||
link_superchat: this.flotta.link_superchat
|
||||
}
|
||||
tools.saveFieldToServer(this, 'flotte', this.flotta._id, mydata)
|
||||
}
|
||||
}
|
||||
|
||||
get isaperto() {
|
||||
let open = false
|
||||
if (!!this.flotta)
|
||||
open = (this.flotta.riga.toString() === this.last_riga_aperto) && (this.flotta.col_prima.toString() === this.last_col_aperto)
|
||||
|
||||
// console.log('isaperto', open, 'lastriga = ', this.last_riga_aperto, this.flotta.riga, 'last_col_aperto', this.last_col_aperto, this.flotta.col_prima)
|
||||
return open
|
||||
|
||||
}
|
||||
|
||||
public async update_nave() {
|
||||
this.Chiudi()
|
||||
this.apriflotta()
|
||||
}
|
||||
|
||||
public async EseguiCallServer() {
|
||||
this.Chiudi()
|
||||
this.loading = true
|
||||
}
|
||||
|
||||
public getnamebyrec(rec) {
|
||||
let mystr = rec.name + ' ' + rec.surname
|
||||
if (this.showcoldati)
|
||||
mystr += ' (' + rec.username + ')'
|
||||
|
||||
return mystr
|
||||
}
|
||||
|
||||
public getwidthnome() {
|
||||
if (this.showcoldati)
|
||||
return 'width: 250px; '
|
||||
else
|
||||
return 'width: 200px; '
|
||||
}
|
||||
|
||||
}
|
||||
761
src/components/CMyFlotta/CMyFlotta.vue
Executable file
761
src/components/CMyFlotta/CMyFlotta.vue
Executable file
@@ -0,0 +1,761 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<CTitleBanner v-if="!!flotta" class=""
|
||||
:title="gettitoloflotta()"
|
||||
:bgcolor="getcolorflotta()"
|
||||
clcolor="text-white"
|
||||
:visible="isaperto" mystyle="" myclass="myshad" canopen="true" @apri="apriflotta">
|
||||
|
||||
<div v-if="loading" class="q-ma-md text-center" style="height: 50px;">
|
||||
<q-spinner-hourglass size="50px" color="primary"></q-spinner-hourglass>
|
||||
</div>
|
||||
|
||||
<p v-if="flotta.provvisoria" class="text-center" style="color:red; font-weight: bold; font-size: 1.5rem;">
|
||||
NAVE <span v-if="flotta.provvisoria">TEMPORANEA</span><span v-else>DEFINITIVA</span>
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<CDateTime
|
||||
label="Data Inizio"
|
||||
class="cursor-pointer"
|
||||
:value.sync="date_start"
|
||||
:readonly="false"
|
||||
:minuteinterval="30"
|
||||
:dense="true"
|
||||
:canEdit="true"
|
||||
@savetoclose="change_field('date_start')">
|
||||
</CDateTime>
|
||||
|
||||
<CDateTime
|
||||
label="Data Fine"
|
||||
class="cursor-pointer"
|
||||
:value.sync="date_close"
|
||||
:readonly="false"
|
||||
:minuteinterval="30"
|
||||
:dense="true"
|
||||
:canEdit="true"
|
||||
@savetoclose="change_field('date_close')">
|
||||
</CDateTime>
|
||||
</div>
|
||||
|
||||
<q-tabs
|
||||
v-model="tabflotta"
|
||||
dense
|
||||
class="text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
align="justify"
|
||||
narrow-indicator
|
||||
>
|
||||
<q-tab name="messaggi" icon="fas fa-comments" label="Messaggi"></q-tab>
|
||||
<q-tab name="flotta" icon="fas fa-ship" label="Flotta"></q-tab>
|
||||
<q-tab name="attivita" icon="fas fa-ship" label="Attività Eseguite"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
|
||||
<q-tab-panels v-model="tabflotta" animated>
|
||||
<q-tab-panel name="messaggi">
|
||||
|
||||
<div class="row q-ma-md">
|
||||
<q-input v-model="tutor1" label="Tutor 1:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutor1')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="tutor2" label="Tutor 2:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutor2')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="tutor3" label="Tutor 3:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutor3')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="tutorslo" label="Tutor per Sloveni:"
|
||||
filled dense
|
||||
debounce="1000"
|
||||
@input="change_field('tutorslo')">
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div class="justify-sm-start q-ma-md">
|
||||
<q-input v-model="payeer_id" style="max-width: 300px;" label="ID Payeer:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('payeer_id')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="advcash_id" style="max-width: 300px;" label="ID Advanced Cash:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('advcash_id')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="email_paypal" style="max-width: 300px;" label="Email Paypal:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('email_paypal')">
|
||||
|
||||
</q-input>
|
||||
<q-input v-model="revolut" style="max-width: 300px;" label="Revolut:"
|
||||
filled dense
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
@input="change_field('revolut')">
|
||||
|
||||
</q-input>
|
||||
<q-input standout bottom-slots
|
||||
v-model="link_payment" style="max-width: 400px;" label="Link MoneyBox PayPal:"
|
||||
:readonly="true"
|
||||
debounce="1000"
|
||||
filled dense
|
||||
@input="change_link_payment">
|
||||
|
||||
<q-btn round dense flat icon="send"
|
||||
type="a" :href="tools.getlinkstd(link_payment)"
|
||||
target="_blank" color="primary">
|
||||
</q-btn>
|
||||
</q-input>
|
||||
<q-input v-model="note_payment" style="max-width: 400px;" label="Note Aggiuntive Pagamento:"
|
||||
filled dense
|
||||
debounce="1000" dense
|
||||
:readonly="true"
|
||||
autogrow
|
||||
@input="change_field('note_payment')">
|
||||
</q-input>
|
||||
<br>
|
||||
<div class="justify-center" style="max-width: 500px;">
|
||||
<q-input standout bottom-slots
|
||||
filled dense
|
||||
v-model="link_superchat" style="max-width: 400px;" label="Link per Super Chat:"
|
||||
debounce="1000"
|
||||
@input="change_link_superchat">
|
||||
|
||||
<q-btn round dense flat icon="send"
|
||||
type="a" :href="link_superchat"
|
||||
target="_blank" color="primary">
|
||||
</q-btn>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-toggle v-model="inviaemail" label="Invia anche tramite Email"></q-toggle>
|
||||
|
||||
<q-tabs
|
||||
v-model="tabmsg"
|
||||
dense
|
||||
class="text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
align="justify"
|
||||
narrow-indicator
|
||||
>
|
||||
<q-tab name="sognatore" icon="fas fa-ship" label="Sognatore"></q-tab>
|
||||
<q-tab name="mediatore" icon="fas fa-ship" label="Mediatore"></q-tab>
|
||||
<q-tab name="donatori" icon="fas fa-ship" label="Donatori"></q-tab>
|
||||
<q-tab name="donatori_nodono" icon="fas fa-ship" label="Donatori che non hanno fatto il Dono"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabmsg" animated>
|
||||
<q-tab-panel name="sognatore">
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio a Sognatore"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_A_SOGNATORE, 'TEST: Inviare al Sognatore?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Sognatore`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_A_SOGNATORE, 'Inviare al Sognatore?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="mediatore">
|
||||
|
||||
<div>
|
||||
<strong>MEDIATORI:</strong>
|
||||
<br>
|
||||
<div v-for="(rec, index) of arrmediatori">
|
||||
<div class="row justify-center q-px-xs content-center" style="max-width: 350px;">
|
||||
<div style="width: 30px;">
|
||||
{{index + 1}}
|
||||
</div>
|
||||
<div :style="`color: blue; ` + getwidthnome()">
|
||||
<q-btn v-if="!!rec.profile" flat rounded dense color="blue"
|
||||
:size="tools.getsizesmall()"
|
||||
:label=getnamebyrec(rec)
|
||||
@click="viewdashboard(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div style="color: blue; width: 40px;">
|
||||
<q-btn color="blue"
|
||||
dense
|
||||
size="md"
|
||||
label="Msg"
|
||||
@click="clickseluser(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio Mediatori"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_A_MEDIATORI, 'TEST: Inviare ai Mediatori?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Tutti Mediatori`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_A_MEDIATORI, 'Inviare ai Mediatori?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="donatori">
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio Donatori"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_EFFETTUA_IL_DONO, 'TEST: Inviare a tutti i Donatori?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Tutti i Donatori`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_EFFETTUA_IL_DONO, 'Inviare a tutti i Donatori?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="donatori_nodono">
|
||||
<div class="row q-pa-sm q-ma-sm" style="max-width: 450px;">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
label="TEST Messaggio Donatori No Dono"
|
||||
@click="InviaMsgAFlotta(false, tools.TipoMsg.SEND_MSG_SOLLECITO_DONATORI_NO_DONO, 'TEST: Inviare a tutti i Donatori che non hanno fatto il dono, il msg del Sollecito?')"></q-btn>
|
||||
|
||||
</div>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` a Tutti i Donatori No Dono`"
|
||||
@click="InviaMsgAFlotta(true, tools.TipoMsg.SEND_MSG_SOLLECITO_DONATORI_NO_DONO, 'Inviare a tutti i Donatori che non hanno fatto il dono, il msg del Sollecito?')"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<div v-if="tools.isAdmin()">
|
||||
<q-field rounded outlined bg-color="orange-3" dense>
|
||||
<div class="justify-evenly" style="max-width: 300px;">
|
||||
<strong>Legenda dei codici speciali da inserire nei messaggi: </strong>
|
||||
<div>{link_paypalme}</div>
|
||||
<div>{payeer_id}</div>
|
||||
<div>{advcash_id}</div>
|
||||
<div>{link_superchat}</div>
|
||||
<div>{tutor1}</div>
|
||||
<div>{tutor2}</div>
|
||||
<div>{tutor3}</div>
|
||||
<div>{tutorslo}</div>
|
||||
<div>{date_start}</div>
|
||||
<div>{date_close}</div>
|
||||
<div>{sognatore}</div>
|
||||
</div>
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="flotta">
|
||||
<div>
|
||||
|
||||
<q-toggle v-model="tuttiidoni"
|
||||
label="Mostra Tutti i Doni">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle v-model="showcommenti"
|
||||
label="Mostra i Commenti">
|
||||
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle v-model="showcolmodifica"
|
||||
label="Modifica">
|
||||
</q-toggle>
|
||||
|
||||
<q-toggle v-model="showcoldati"
|
||||
label="Mostra Dati Extra">
|
||||
</q-toggle>
|
||||
|
||||
<div v-if="!!flotta" class="text-evidente bordo_stondato justify-between q-pa-xs-sm">
|
||||
<div class="">
|
||||
SOGNATORE:
|
||||
<q-btn rounded color="green"
|
||||
:label="flotta.sognatore_nomecognome + ' ' + ' (' + flotta.sognatore + ')'"
|
||||
@click="viewdashboard({username: flotta.sognatore })">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<div>
|
||||
{{$t('dashboard.doni_ricevuti')}}:
|
||||
<span class="ricevuti dati">{{getDoniConfermati()}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="inviati">
|
||||
{{$t('dashboard.doni_inviati_da_confermare')}}:
|
||||
<span class="inviati dati">{{getDoniAttesaDiConferma()}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="">
|
||||
{{$t('dashboard.doni_mancanti')}}:
|
||||
<span class="mancanti dati">{{getDoniMancanti()}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Copia questa Lista negli appunti"
|
||||
|
||||
@click="exportLista()">
|
||||
</q-btn>
|
||||
|
||||
<div class="row">
|
||||
<div class="row justify-center q-px-xs content-center">
|
||||
<div style="width: 40px;">
|
||||
<q-btn
|
||||
flat
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Num"
|
||||
@click="setordin('num')">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div style="width: 100px;">
|
||||
<q-btn
|
||||
flat
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Ora Invio"
|
||||
|
||||
@click="setordin('data')">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<div style="width: 80px;">
|
||||
Esegui
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="width: 80px;">
|
||||
Annulla
|
||||
</div>
|
||||
<div v-if="showcoldati" style="width: 70px;">
|
||||
Nave Posiz
|
||||
</div>
|
||||
<div v-else style="width: 40px;">
|
||||
Nave
|
||||
</div>
|
||||
<div style="width: 30px;">
|
||||
<q-btn
|
||||
flat
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
label="Nat"
|
||||
|
||||
@click="setordin('nationality')">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div :style="getwidthnome()">
|
||||
Nome Cognome
|
||||
</div>
|
||||
<div v-if="showcoldati" style="width: 40px;">
|
||||
Tess
|
||||
</div>
|
||||
<div v-if="showcoldati" style="width: 40px;">
|
||||
Msg
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="width: 60px;">
|
||||
Sostituisci
|
||||
</div>
|
||||
<div v-if="showcommenti" style="width: 100px;">
|
||||
Commenti
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" v-for="(rec, index) of getarr">
|
||||
|
||||
<div class="row justify-center q-px-xs content-center">
|
||||
<div class="row items-center q-mx-md justify-between" style="padding: 2px;">
|
||||
<div style="width: 40px;">
|
||||
{{index + 1}}
|
||||
|
||||
</div>
|
||||
<div v-if="!tools.isMobile()" style="width: 100px;">
|
||||
{{ tools.getstrshortDateTime(rec.date_made_gift) }}
|
||||
</div>
|
||||
<div>
|
||||
<div class="row justify-center">
|
||||
<q-btn v-if="!rec.made_gift"
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="md"
|
||||
:label="$t('dashboard.dono_ricevuto_3', {donatore: rec.name })"
|
||||
|
||||
@click="HoRicevutoIlDono(rec, false)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="rec.made_gift">
|
||||
<q-chip class="glossy"
|
||||
size="sm"
|
||||
text-color="white"
|
||||
color="positive"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dialog.ok')
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="width: 80px;">
|
||||
<q-btn v-if="rec.made_gift || rec.date_made_gift"
|
||||
rounded
|
||||
dense
|
||||
color="negative"
|
||||
size="md"
|
||||
label="Annulla"
|
||||
@click="HoRicevutoIlDono(rec, true)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div :style="`color: blue; width: ` + getwidthpos() + `;`">
|
||||
<q-btn rounded color="blue"
|
||||
flat
|
||||
dense
|
||||
size="md"
|
||||
:label="getnavestr(rec)"
|
||||
@click="Mostraplacca(tools.getRiganave(rec.riga), tools.getColnave(rec.col))">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="!!rec.profile" style="width: 30px;">
|
||||
|
||||
<q-avatar v-if="tools.geticon(rec.profile.nationality)" :class="tools.geticon(rec.profile.nationality)"
|
||||
size="sm">
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div :style="`color: blue; ` + getwidthnome()">
|
||||
<q-btn v-if="!!rec.profile" flat rounded dense color="blue"
|
||||
:size="tools.getsizesmall()"
|
||||
:label=getnamebyrec(rec)
|
||||
@click="viewdashboard(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="showcoldati && !tools.isMobile()">
|
||||
({{ rec.num_tess }})
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="color: blue; width: 40px;">
|
||||
<q-btn color="blue"
|
||||
dense
|
||||
size="md"
|
||||
label="Msg"
|
||||
@click="clickseluser(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="showcolmodifica" style="color: blue; width: 70px;">
|
||||
<q-btn color="red"
|
||||
dense
|
||||
size="md"
|
||||
label="Sostituisci"
|
||||
@click="clicksostituisci(rec)">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showcommenti && !!rec.commento_al_sognatore" class="wrap">
|
||||
{{ rec.commento_al_sognatore }}
|
||||
</div>
|
||||
<div v-if="showcoldati && !!rec.ind_order" class="wrap">
|
||||
({{ rec.ind_order }})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--<q-table
|
||||
v-if="false"
|
||||
dense
|
||||
color="primary"
|
||||
dense
|
||||
flat
|
||||
table-style="padding: 0;"
|
||||
:title="$t('dashboard.donatori')"
|
||||
:data="arrdonatori"
|
||||
:columns="getcol"
|
||||
:nodataLabel="$t('grid.nodata')"
|
||||
:Pagination.sync="MyPagination"
|
||||
row-key="index">
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td v-if="!tools.isMobile()" key="nave" :props="props">
|
||||
<div style="font-size:1rem;"><a :href="getlinkchat(props.row)" target="_blank">{{
|
||||
getnavestr(props.row)}}</a></div>
|
||||
</q-td>
|
||||
<q-td key="name" :props="props">
|
||||
<q-btn v-if="!!props.row.profile" flat rounded dense color="blue"
|
||||
:size="tools.getsizesmall()"
|
||||
:label="props.row.name + ' ' + props.row.surname"
|
||||
@click="clickseluser(props.row)">
|
||||
</q-btn>
|
||||
<div v-if="tools.isMobile()">
|
||||
<br>
|
||||
{{'(' + getnavestr(props.row) + ')'}} - {{ tools.getstrshortDateTime(props.row.date_made_gift)
|
||||
}}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="num_tess" :props="props">
|
||||
{{ props.row.num_tess }}
|
||||
</q-td>
|
||||
<q-td v-if="!tools.isMobile()" key="date_made_gift" :props="props">
|
||||
{{ tools.getstrshortDateTime(props.row.date_made_gift) }}
|
||||
</q-td>
|
||||
<q-td key="made_gift" :props="props">
|
||||
|
||||
<div class="row justify-center">
|
||||
<q-btn v-if="!props.row.made_gift"
|
||||
push
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
size="sm"
|
||||
:label="$t('dashboard.dono_ricevuto_3', {donatore: props.row.name })"
|
||||
|
||||
@click="HoRicevutoIlDono(props.row)">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="props.row.made_gift">
|
||||
<q-chip class="glossy"
|
||||
size="sm"
|
||||
text-color="white"
|
||||
color="positive"
|
||||
icon="fas fa-gift">
|
||||
{{ $t('dialog.ok')
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>-->
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="attivita">
|
||||
<div class="text-left" v-html="log_attivita"></div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<q-dialog v-model="showdashboard">
|
||||
<q-card v-if="seluser" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
<div v-if="!!seluser">
|
||||
{{ seluser.name }} {{ seluser.surname }}
|
||||
</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup clickable
|
||||
@click="Chiudi"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<CMyDashboard :username="seluser.username">
|
||||
|
||||
</CMyDashboard>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="showmsguser">
|
||||
<q-card v-if="seluser" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
<div v-if="!!seluser">
|
||||
{{ seluser.name }} {{ seluser.surname }}
|
||||
</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup clickable
|
||||
@click="Chiudi"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div>
|
||||
<div v-if="!!seluser.profile">
|
||||
<div v-if="!!seluser.profile.cell" class="q-ma-sm text-center clBorderWarning">
|
||||
Whatsapp: {{seluser.profile.cell}}
|
||||
<q-btn
|
||||
|
||||
fab-mini
|
||||
icon="fab fa-whatsapp"
|
||||
color="white" text-color="green" type="a"
|
||||
size="sm"
|
||||
:href="tools.getHttpForWhatsapp(seluser.profile.cell)"
|
||||
target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-ma-sm text-center clBorderSteps">
|
||||
<div>TELEGRAM {{$t('ws.sitename')}} BOT {{$t('dialog.sendmsg')}} ->
|
||||
{{seluser.name }} {{ seluser.surname }}:
|
||||
</div>
|
||||
<q-input type="textarea"
|
||||
autogrow
|
||||
v-model="msg_tosend_user" :label="$t('cal.msgbooking')"
|
||||
input-class="myinput-area">
|
||||
|
||||
</q-input>
|
||||
|
||||
<div class="row justify-center centermydiv q-gutter-sm"
|
||||
style="max-width: 420px;">
|
||||
<q-btn rounded text-color="secondary" icon="fab fa-telegram"
|
||||
:label="$t('dialog.sendmsg') + ` -> ` + seluser.name + ` ` + seluser.surname"
|
||||
@click="InviaMsgAUser()"></q-btn>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="showsostituisci">
|
||||
<q-card v-if="seluser" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
<div v-if="!!seluser">
|
||||
{{ seluser.name }} {{ seluser.surname }}
|
||||
</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup clickable
|
||||
@click="Chiudi"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<div class="row justify-center q-gutter-md">
|
||||
<div>
|
||||
<div v-if="isManager || isTutor">
|
||||
<CTitleBanner class="shadow-2 rounded-borders" title="Sostituisci"
|
||||
bgcolor="bg-positive"
|
||||
clcolor="text-white"
|
||||
mystyle=" " myclass="myshad" :canopen="true">
|
||||
|
||||
<div class="column q-gutter-sm justify-center text-center">
|
||||
<q-input
|
||||
bg-color="lightblue"
|
||||
v-model="username_sostituire"
|
||||
rounded outlined
|
||||
@blur="$v.username_sostituire.$touch"
|
||||
:error="$v.username_sostituire.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
|
||||
label="Username Nuova Persona:">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-btn rounded color="warning" icon="fab fa-find"
|
||||
text-color="black"
|
||||
label="Cerca il primo Disponibile"
|
||||
@click="TrovaUserFree()"></q-btn>
|
||||
<div v-if="!!userfreestr">
|
||||
<q-field
|
||||
stack-label
|
||||
dense
|
||||
>
|
||||
<template v-slot:control>
|
||||
<div class="text-center" tabindex="0">{{userfreestr}}</div>
|
||||
</template>
|
||||
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
<q-toggle v-model="deleteUser"
|
||||
:label="'Elimina ' + seluser.name + ' ' + seluser.surname"></q-toggle>
|
||||
<q-toggle v-model="AddImbarco"
|
||||
label="Aggiungi Destinatario (senza spostarlo da altre Navi)"></q-toggle>
|
||||
<q-toggle v-model="notifBot" :label="$t('dashboard.sendnotification')"></q-toggle>
|
||||
<q-toggle v-model="inviaemail" label="Invia anche tramite Email"></q-toggle>
|
||||
|
||||
<q-btn class="q-ma-sm" rounded color="positive" text-color="white"
|
||||
icon="fas fa-gift"
|
||||
label="Sostituisci"
|
||||
:disabled='!allowSubmit'
|
||||
@click="SostituisciUtente(seluser, username_sostituire, getnotifBotTxt)"></q-btn>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="showtesto">
|
||||
<q-card v-if="seltesto" :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
Testo:
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup clickable @click="Chiudi"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
<div class="">
|
||||
<div>
|
||||
<pre>{{ seltesto }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-inner-loading id="spinner" :showing="loading">
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em">
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyFlotta.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyFlotta.scss';
|
||||
</style>
|
||||
1
src/components/CMyFlotta/index.ts
Executable file
1
src/components/CMyFlotta/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMyFlotta} from './CMyFlotta.vue'
|
||||
12
src/components/CMyNave/CMyNave-validate.ts
Executable file
12
src/components/CMyNave/CMyNave-validate.ts
Executable file
@@ -0,0 +1,12 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
|
||||
username_sostituire: {
|
||||
aportadorexist,
|
||||
required
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
.donatore, .mediatore, .sognatore, .title-nave, .intermedio2, .intermedio3 {
|
||||
|
||||
.title-nave {
|
||||
padding: 2px 4px;
|
||||
margin: 2px 4px;
|
||||
color: white;
|
||||
@@ -6,6 +7,33 @@
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.donatore, .mediatore, .sognatore, .intermedio1, .intermedio2, .intermedio4, .intermedio5{
|
||||
color: white;
|
||||
background-color: lightblue;
|
||||
padding: 1px 2px;
|
||||
margin: 1px 2px;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 32px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
max-width: 200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.intermedio1{
|
||||
background-color: indigo;
|
||||
}
|
||||
.intermedio2{
|
||||
background-color: blue;
|
||||
}
|
||||
.intermedio4{
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
}
|
||||
.intermedio5{
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.tutor{
|
||||
|
||||
@@ -17,24 +45,19 @@
|
||||
|
||||
.donatore {
|
||||
background-color: red;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.mediatore {
|
||||
background-color: green;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sognatore {
|
||||
background-color: purple;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.intermedio2{
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.intermedio3{
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.cont_donatore, .cont_sognatore, .cont_mediatore, .cont_tragitto, .cont_pos, .cont_intestaz, .cont_pos_intest, .cont_intestaz_small {
|
||||
border: solid 2px #4198ef;
|
||||
@@ -51,6 +74,13 @@
|
||||
.you {
|
||||
background-color: yellow;
|
||||
}
|
||||
.issognatore {
|
||||
background-color: orangered;
|
||||
color: white;
|
||||
font-size: 1.10rem;
|
||||
border-radius: 64px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cont_tragitto{
|
||||
color: blue;
|
||||
@@ -74,10 +104,10 @@
|
||||
|
||||
.passo{
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
width: 110px;
|
||||
}
|
||||
.passoint{
|
||||
width: 90px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.gift{
|
||||
@@ -102,7 +132,7 @@
|
||||
}
|
||||
|
||||
.titlenave{
|
||||
width: 55px;
|
||||
width: 75px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,14 @@ import { lists } from '../../store/Modules/lists'
|
||||
import translate from '../../globalroutines/util'
|
||||
import { CMyChipList } from '../CMyChipList'
|
||||
import { CVideo } from '../CVideo'
|
||||
import { validations } from './CMyNave-validate'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
|
||||
@Component({
|
||||
components: { CTitleBanner, CMyChipList, CVideo }
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { CTitleBanner, CMyChipList, CVideo, CCopyBtn }
|
||||
})
|
||||
|
||||
export default class CMyNave extends MixinNave {
|
||||
@@ -21,9 +26,12 @@ export default class CMyNave extends MixinNave {
|
||||
@Prop({ required: false, default: null }) public posizprop
|
||||
@Prop({ required: true }) public navi_partenzaprop: any[]
|
||||
@Prop({ required: true }) public listanavi: boolean
|
||||
@Prop({ required: false, default: null }) public dashboard: any
|
||||
public navi_partenza: any[]
|
||||
public $t
|
||||
public $v
|
||||
public link_chat: string = ''
|
||||
public tabnave: string = 'donatore'
|
||||
public cosa: string = 'tragitto'
|
||||
public cosa2: string = 'donatore'
|
||||
public nave: any = null
|
||||
@@ -35,6 +43,7 @@ export default class CMyNave extends MixinNave {
|
||||
public coldoni: number = 1
|
||||
public mediatore: any = null
|
||||
public donatore: any = {}
|
||||
public flotta: any = null
|
||||
public donatore_navepers: any = {}
|
||||
public mediatore_navepers: any = {}
|
||||
public iodonatore: any = {}
|
||||
@@ -45,7 +54,16 @@ export default class CMyNave extends MixinNave {
|
||||
public loading: boolean = false
|
||||
public showmsguser: boolean = false
|
||||
public seluser = null
|
||||
public showtesto: boolean = false
|
||||
public notifBot: boolean = true
|
||||
public deleteUser: boolean = true
|
||||
public AddImbarco: boolean = false
|
||||
public seltesto: string = ''
|
||||
public msg_tosend_user: string = ''
|
||||
public username_sostituire: string = ''
|
||||
public userfreestr: string = ''
|
||||
public commento_al_sognatore: string = ''
|
||||
public tabpagam: string = 'paypal'
|
||||
public MyPagination: {
|
||||
sortBy: string,
|
||||
descending: boolean,
|
||||
@@ -53,7 +71,7 @@ export default class CMyNave extends MixinNave {
|
||||
rowsNumber: number, // specifying this determines pagination is server-side
|
||||
rowsPerPage: number
|
||||
} = { sortBy: 'index', descending: false, page: 1, rowsNumber: 10, rowsPerPage: 10 }
|
||||
public coldonatori: any[] = [
|
||||
public coldonatori_cell: any[] = [
|
||||
/*{
|
||||
name: 'index',
|
||||
required: true,
|
||||
@@ -63,11 +81,34 @@ export default class CMyNave extends MixinNave {
|
||||
sortable: true
|
||||
},*/
|
||||
{ name: 'name', align: 'center', label: translate('reg.name'), field: 'name', sortable: true },
|
||||
{ name: 'surname', align: 'center', label: translate('reg.surname'), field: 'surname', sortable: true },
|
||||
{ name: 'posizione', align: 'center', label: 'Posizione', field: 'riga', sortable: true },
|
||||
{ name: 'date_made_gift', align: 'center', label: 'Inviato', field: 'date_made_gift', sortable: true },
|
||||
{ name: 'tel', align: 'center', label: 'Tel', field: 'tel', sortable: true },
|
||||
{ name: 'made_gift', align: 'center', label: 'Confermato', field: 'made_gift', sortable: true },
|
||||
// { name: 'surname', align: 'center', label: translate('reg.surname'), field: 'surname', sortable: true },
|
||||
// { name: 'date_made_gift', align: 'center', label: 'Inviato', field: 'date_made_gift', sortable: true },
|
||||
// { name: 'tel', align: 'center', label: 'Tel', field: 'tel', sortable: true },
|
||||
{ name: 'made_gift', align: 'center', label: 'Conferm.', field: 'made_gift', sortable: true },
|
||||
]
|
||||
|
||||
public coldonatori: any[] = [
|
||||
{
|
||||
name: 'index',
|
||||
required: true,
|
||||
label: 'Num',
|
||||
align: 'left',
|
||||
field: 'index',
|
||||
sortable: true
|
||||
},
|
||||
{ name: 'nave', align: 'center', label: 'Gift Chat', field: 'nave', sortable: true },
|
||||
{ name: 'name', align: 'center', label: translate('reg.name_complete'), field: 'name', sortable: true },
|
||||
{ name: 'posizione', align: 'center', label: translate('dashboard.posizione'), field: 'posizione', sortable: true },
|
||||
{ name: 'date_made_gift', align: 'center', label: translate('dashboard.inviato'), field: 'date_made_gift', sortable: true },
|
||||
// { name: 'tel', align: 'center', label: 'Tel', field: 'tel', sortable: true },
|
||||
{ name: 'made_gift', align: 'center', label: translate('dashboard.azione'), field: 'made_gift', sortable: true },
|
||||
{
|
||||
name: 'commento_al_sognatore',
|
||||
align: 'center',
|
||||
label: translate('dashboard.commento'),
|
||||
field: 'commento_al_sognatore',
|
||||
sortable: true
|
||||
},
|
||||
]
|
||||
|
||||
public tragitto = [
|
||||
@@ -125,6 +166,17 @@ export default class CMyNave extends MixinNave {
|
||||
this.aggiorna()
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (!!tools.getCookie(tools.TABBED_NAVE)) {
|
||||
this.tabnave = tools.getCookie(tools.TABBED_NAVE)
|
||||
}
|
||||
}
|
||||
|
||||
public changetab(val) {
|
||||
tools.setCookie(tools.TABBED_NAVE, val)
|
||||
// console.log('setcook', val)
|
||||
}
|
||||
|
||||
public aggiorna() {
|
||||
|
||||
this.riga = tools.getValDb('riga', false, 1)
|
||||
@@ -134,6 +186,8 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
if (!!this.nave) {
|
||||
if (!!this.nave.rec) {
|
||||
if (!!this.nave.rec.donatore.flotta)
|
||||
this.flotta = this.nave.rec.donatore.flotta
|
||||
if (!!this.nave.rec.donatore)
|
||||
this.donatore_navepers = this.nave.rec.donatore.navepersistente
|
||||
if (!!this.nave.rec.mediatore) {
|
||||
@@ -157,6 +211,24 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.sonoDonatore()) {
|
||||
this.tabnave = 'donatore'
|
||||
} else if (this.sonoMediatore()) {
|
||||
this.tabnave = 'mediatore'
|
||||
} else if (this.sonoSognatore()) {
|
||||
this.tabnave = 'sognatore'
|
||||
}
|
||||
|
||||
if (!!this.getRevolutPagamentoSognatore()) {
|
||||
this.tabpagam = 'revolut'
|
||||
}
|
||||
if (!!this.getAdvCashPagamentoSognatore()) {
|
||||
this.tabpagam = 'advcash'
|
||||
}
|
||||
if (!!this.getPayeerPagamentoSognatore()) {
|
||||
this.tabpagam = 'payeer'
|
||||
}
|
||||
}
|
||||
|
||||
public getListaDonatoriDaConfermare() {
|
||||
@@ -227,6 +299,12 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
public sonoMediatore() {
|
||||
if (!this.nave)
|
||||
return false
|
||||
|
||||
if (!this.nave.rec.donatore.recmediatore)
|
||||
return false
|
||||
|
||||
if (!!this.nave) {
|
||||
if (!!this.nave.rec.donatore)
|
||||
return this.nave.rec.donatore.recmediatore.ind_order === this.myindorder
|
||||
@@ -240,6 +318,15 @@ export default class CMyNave extends MixinNave {
|
||||
}
|
||||
|
||||
public partenza_primo_donatore() {
|
||||
if (!!this.nave) {
|
||||
if (!!this.mediatore_navepers) {
|
||||
return this.mediatore_navepers.date_gift_chat_open
|
||||
}
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public fine_doni() {
|
||||
if (!!this.nave) {
|
||||
if (!!this.mediatore_navepers) {
|
||||
return this.mediatore_navepers.date_start
|
||||
@@ -250,17 +337,23 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
public getGiornoDelDono() {
|
||||
if (!!this.nave) {
|
||||
return tools.getstrDate(this.donatore_navepers.date_start)
|
||||
return tools.getstrDate(this.donatore_navepers.date_gift_chat_open)
|
||||
}
|
||||
}
|
||||
|
||||
get GiornoDelDonoArrivato() {
|
||||
if (!!this.nave) {
|
||||
return tools.isDateArrived(this.donatore_navepers.date_start)
|
||||
return tools.isDateArrived(this.donatore_navepers.date_gift_chat_open)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
get getsuperchat() {
|
||||
if (!!this.flotta) {
|
||||
return this.flotta.link_superchat
|
||||
}
|
||||
}
|
||||
|
||||
get FattoDono() {
|
||||
if (!!this.iodonatore) {
|
||||
return this.iodonatore.made_gift
|
||||
@@ -314,14 +407,16 @@ export default class CMyNave extends MixinNave {
|
||||
donatore: rec.name + ' ' + rec.surname
|
||||
})
|
||||
|
||||
const mymsg = this.$t('dashboard.confermi_dono_ricevuto_msg', {
|
||||
let mymsg = this.$t('dashboard.confermi_dono_ricevuto_msg', {
|
||||
donatore: rec.name + ' ' + rec.surname + ' (' + this.$t('dashboard.posizione') + ' ' + rec.riga + '.' + rec.col + ')'
|
||||
})
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_RICEVUTO, 0, {
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '? (Pos ' + rec.riga + '.' + rec.col + ')', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_RICEVUTO, 0, {
|
||||
param1: {
|
||||
_id: rec._id,
|
||||
made_gift: true
|
||||
made_gift: true,
|
||||
riga: rec.riga,
|
||||
col: rec.col,
|
||||
},
|
||||
param2: rec.username,
|
||||
param3: mymsg
|
||||
@@ -329,19 +424,27 @@ export default class CMyNave extends MixinNave {
|
||||
|
||||
}
|
||||
|
||||
public getIdPagam() {
|
||||
|
||||
}
|
||||
|
||||
public HoEffettuatoIlDono() {
|
||||
const msgtitle = translate('dashboard.confermi_dono')
|
||||
const msginvia = msgtitle
|
||||
|
||||
const mymsg = this.$t('dashboard.msg_bot_conferma', {
|
||||
donatore: this.iodonatore.name + ' ' + this.iodonatore.surname,
|
||||
sognatore: this.sognatoredelDono().name + ' ' + this.sognatoredelDono().surname
|
||||
sognatore: this.sognatoredelDono().name + ' ' + this.sognatoredelDono().surname,
|
||||
commento: this.commento_al_sognatore + ' (' + this.tabpagam + ')',
|
||||
})
|
||||
|
||||
tools.askConfirm(this.$q, msgtitle, msginvia + ' ' + '?', translate('dialog.yes'), translate('dialog.no'), this, '', lists.MenuAction.DONO_INVIATO, 0, {
|
||||
param1: {
|
||||
riga: this.posiz.riga,
|
||||
col: this.posiz.col,
|
||||
_id: this.iodonatore._id,
|
||||
date_made_gift: tools.getDateNow()
|
||||
date_made_gift: tools.getDateNow(),
|
||||
commento_al_sognatore: this.commento_al_sognatore + ' (' + this.tabpagam + ')' + this.getIdPagam(),
|
||||
},
|
||||
param2: this.sognatoredelDono().username,
|
||||
param3: mymsg
|
||||
@@ -388,6 +491,85 @@ export default class CMyNave extends MixinNave {
|
||||
return ''
|
||||
}
|
||||
|
||||
public getlinkRevolutSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.revolut
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getRevolutPagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.revolut
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getPayeerPagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.payeer_id
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getAdvCashPagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.advcash_id
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getLinkPayeerPagamentoSognatore() {
|
||||
const payeerid = this.getPayeerPagamentoSognatore()
|
||||
if (!!payeerid) {
|
||||
return 'https://payeer.com/en/account/send/'
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
public getLinkAdvCashPagamentoSognatore() {
|
||||
const advcash = this.getAdvCashPagamentoSognatore()
|
||||
if (!!advcash) {
|
||||
return 'https://wallet.advcash.com/pages/transfer/wallet'
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
|
||||
public getpaypalmePagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.link_payment
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getnoteaggiuntivePagamentoSognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
if (!!rec.profile)
|
||||
return rec.profile.note_payment
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
public getnomesognatore() {
|
||||
const rec = this.sognatoredelDono()
|
||||
if (!!rec) {
|
||||
return rec.name + ' ' + rec.surname
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
get getDonoInviato() {
|
||||
if (!!this.iodonatore) {
|
||||
return !!this.iodonatore.date_made_gift
|
||||
@@ -401,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 += ' '
|
||||
// }
|
||||
|
||||
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
@@ -4,13 +4,10 @@ import { GlobalStore, UserStore } from '@store'
|
||||
|
||||
import { Footer } from '../../components/Footer'
|
||||
|
||||
// import VueScrollReveal from 'vue-scroll-reveal'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { Screen } from 'quasar'
|
||||
import { CImgTitle } from '../../components/CImgTitle/index'
|
||||
import { CTitle } from '../../components/CTitle/index'
|
||||
import MixinsMetaTags from '../../mixins/mixin-metatags'
|
||||
import { IMyPage } from '@src/model'
|
||||
|
||||
@Component({
|
||||
name: 'CMyPage',
|
||||
@@ -18,7 +15,8 @@ import MixinsMetaTags from '../../mixins/mixin-metatags'
|
||||
components: { Footer, CImgTitle, CTitle }
|
||||
})
|
||||
export default class CMyPage extends Vue {
|
||||
@Prop({ required: true, default: '' }) public title: string
|
||||
@Prop({ required: false, default: '' }) public title: string
|
||||
@Prop({ required: false, default: '' }) public mypath: string
|
||||
@Prop({ required: false, default: '' }) public img: string
|
||||
@Prop({ required: false, default: '' }) public imgbackground: string
|
||||
@Prop({ required: false, default: '' }) public sizes: string
|
||||
@@ -26,6 +24,7 @@ export default class CMyPage extends Vue {
|
||||
@Prop({ required: false, default: false }) public nofooter: boolean
|
||||
public $t
|
||||
public $q
|
||||
public rec: IMyPage = null
|
||||
|
||||
// public metaInfo() {
|
||||
// return {
|
||||
@@ -40,8 +39,10 @@ export default class CMyPage extends Vue {
|
||||
// }
|
||||
// }
|
||||
|
||||
public mounted() {
|
||||
public async mounted() {
|
||||
// console.log('CMYPage title=', this.title)
|
||||
// console.table(this.meta)
|
||||
if (this.mypath !== '')
|
||||
this.rec = await GlobalStore.actions.loadPage(this.mypath)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,53 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<div v-if="mypath && !!rec">
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<div v-if="!!rec.img1" class="text-center">
|
||||
<q-img :src="`statics/`+ rec.img1" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content" v-html="rec.content"></div>
|
||||
<q-video v-if="!!rec.video1" :src="rec.video1" :ratio="rec.ratio1">
|
||||
</q-video>
|
||||
|
||||
<div v-if="!!rec.img2" class="text-center">
|
||||
<q-img :src="`statics/`+ rec.img2" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content2" v-html="rec.content2"></div>
|
||||
<q-video v-if="!!rec.video2" :src="rec.video2" :ratio="rec.ratio2"></q-video>
|
||||
|
||||
<div v-if="!!rec.img3" class="text-center">
|
||||
<q-img :src="`statics/`+ rec.img2" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content3" v-html="rec.content3"></div>
|
||||
<q-video v-if="!!rec.video3" :src="rec.video3" :ratio="rec.ratio3"></q-video>
|
||||
<div v-if="!!rec.content4" v-html="rec.content4"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="!!title">
|
||||
<CTitle v-if="imgbackground" :imgbackground="imgbackground"
|
||||
:headtitle="title" :sizes="sizes" :styleadd="styleadd"></CTitle>
|
||||
<div v-if="!imgbackground">
|
||||
<CImgTitle v-if="img" :src="img" :title="title">
|
||||
</CImgTitle>
|
||||
<CImgTitle v-if="img" :src="img" :title="title">
|
||||
</CImgTitle>
|
||||
</div>
|
||||
<slot></slot>
|
||||
<div v-if="!nofooter">
|
||||
<Footer></Footer>
|
||||
<Footer></Footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts" src="./CMyPage.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyPage.scss';
|
||||
@import './CMyPage.scss';
|
||||
</style>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IColGridTable } from '../../model'
|
||||
import { fieldsTable } from '../../store/Modules/fieldsTable'
|
||||
import { CMyChipList } from '../CMyChipList'
|
||||
import { CDate } from '../CDate'
|
||||
import { CDateTime } from '../CDateTime'
|
||||
import { CMyToggleList } from '../CMyToggleList'
|
||||
import { CMySelect } from '../CMySelect'
|
||||
@@ -14,7 +15,7 @@ import { CGallery } from '../CGallery'
|
||||
|
||||
@Component({
|
||||
name: 'CMyPopupEdit',
|
||||
components: { CMyChipList, CDateTime, CMyToggleList, CMySelect, CMyEditor, CGallery }
|
||||
components: { CMyChipList, CDateTime, CDate, CMyToggleList, CMySelect, CMyEditor, CGallery }
|
||||
})
|
||||
|
||||
export default class CMyPopupEdit extends Vue {
|
||||
@@ -26,10 +27,14 @@ 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
|
||||
@Prop({ required: false, default: false }) public visulabel
|
||||
|
||||
public myvalue = ''
|
||||
public myvalueprec = 'false'
|
||||
public countryname = ''
|
||||
public visueditor: boolean = false
|
||||
public showeditor: boolean = true
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
@@ -44,9 +49,33 @@ export default class CMyPopupEdit extends Vue {
|
||||
}
|
||||
|
||||
public changeval(newval) {
|
||||
console.log('changeval update:row', newval)
|
||||
this.$emit('update:row', newval)
|
||||
}
|
||||
|
||||
public getrealval(newval) {
|
||||
if (this.col.fieldtype === tools.FieldType.hours) {
|
||||
newval = newval.value
|
||||
}
|
||||
}
|
||||
|
||||
public changevalRec(newval) {
|
||||
console.log('this.row', this.row, 'this.col', this.col, 'newval', newval)
|
||||
console.log('this.row[this.col.name]', this.row[this.col.name])
|
||||
this.row[this.col.name] = newval
|
||||
console.log('changevalRec update:row', newval)
|
||||
this.$emit('update:row', this.row)
|
||||
}
|
||||
|
||||
public changevalRecHours(newval) {
|
||||
if (this.col.fieldtype === tools.FieldType.hours) {
|
||||
newval = newval.value
|
||||
}
|
||||
this.changevalRec(newval)
|
||||
|
||||
this.myvalue = newval
|
||||
}
|
||||
|
||||
public updatedata() {
|
||||
this.mounted()
|
||||
}
|
||||
@@ -116,6 +145,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 +164,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) {
|
||||
@@ -153,6 +187,12 @@ export default class CMyPopupEdit extends Vue {
|
||||
} else {
|
||||
return tools.getstrDateTime(val)
|
||||
}
|
||||
} else if (col.fieldtype === tools.FieldType.onlydate) {
|
||||
if (val === undefined) {
|
||||
return '[]'
|
||||
} else {
|
||||
return tools.getstrDate(val)
|
||||
}
|
||||
} else if (col.fieldtype === tools.FieldType.boolean) {
|
||||
return (val) ? this.$t('dialog.yes') : this.$t('dialog.no')
|
||||
} else if (col.fieldtype === tools.FieldType.binary) {
|
||||
@@ -171,7 +211,7 @@ export default class CMyPopupEdit extends Vue {
|
||||
else
|
||||
return fieldsTable.getMultiValueByTable(col, val)
|
||||
} else {
|
||||
if (val === undefined)
|
||||
if (val === undefined || val === null)
|
||||
return '[]'
|
||||
else if (val === '') {
|
||||
return '[]'
|
||||
@@ -193,10 +233,14 @@ export default class CMyPopupEdit extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
public visInNewRec(col) {
|
||||
return !col.notShowInNewRec
|
||||
}
|
||||
|
||||
public getclassCol(col) {
|
||||
if (col) {
|
||||
let mycl = (col.disable || this.isviewfield) ? '' : 'colmodif'
|
||||
mycl += (col.fieldtype === tools.FieldType.date) ? ' coldate flex flex-container' : ''
|
||||
mycl += ((col.fieldtype === tools.FieldType.date) || (col.fieldtype === tools.FieldType.onlydate)) ? ' coldate flex flex-container' : ''
|
||||
|
||||
return mycl
|
||||
} else {
|
||||
@@ -220,4 +264,8 @@ export default class CMyPopupEdit extends Vue {
|
||||
this.myvalue = '+' + coderec.dialCode
|
||||
}
|
||||
|
||||
public createHours(value) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,219 +1,380 @@
|
||||
<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="visulabel" class="flex">
|
||||
<div v-if="visInNewRec(col)" style="flex-grow: 1;">
|
||||
<div v-if="col.fieldtype === tools.FieldType.string">
|
||||
<q-input v-model="myvalue"
|
||||
autogrow
|
||||
@keyup.enter.stop
|
||||
@input="changevalRec"
|
||||
autofocus
|
||||
:label="col.label">
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.date">
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
class="cursor-pointer"
|
||||
:valueDate="myvalue"
|
||||
:readonly="false"
|
||||
:minuteinterval="minuteinterval"
|
||||
:dense="true"
|
||||
@input="changevalRec"
|
||||
canEdit="true"
|
||||
@savetoclose="SaveValueInt"
|
||||
@show="OpenEdit">
|
||||
</CDateTime>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.onlydate">
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
class="cursor-pointer"
|
||||
:valueDate="myvalue"
|
||||
:readonly="false"
|
||||
:minuteinterval="minuteinterval"
|
||||
:dense="true"
|
||||
@input="changevalRec"
|
||||
canEdit="true"
|
||||
@savetoclose="SaveValueInt"
|
||||
@show="OpenEdit"
|
||||
view="date">
|
||||
</CDateTime>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.number">
|
||||
<q-input v-model="myvalue" type="number"
|
||||
autofocus
|
||||
@input="changevalRec"
|
||||
:label="col.label"
|
||||
>
|
||||
|
||||
</CGallery>
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.hours">
|
||||
<div class="row">
|
||||
<q-input v-model="myvalue" type="number"
|
||||
autofocus
|
||||
@input="changevalRec"
|
||||
style="max-width: 100px;"
|
||||
:label="col.label"
|
||||
>
|
||||
|
||||
</q-input>
|
||||
|
||||
<CMySelect label="Ore" :value.sync="myvalue"
|
||||
optval="value" optlab="label"
|
||||
:dense="false"
|
||||
:use-input="false"
|
||||
@changeval="changevalRecHours"
|
||||
style="max-width: 100px;"
|
||||
:options="tools.SelectHours">
|
||||
</CMySelect>
|
||||
</div>
|
||||
|
||||
<!--<q-input v-model="myvalue" type="number"
|
||||
autofocus
|
||||
@input="changevalRec"
|
||||
:label="col.label">
|
||||
</q-input>
|
||||
-->
|
||||
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.listimages">
|
||||
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
|
||||
@showandsave="Savedb"
|
||||
@input="changevalRec"
|
||||
>
|
||||
|
||||
</CGallery>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.image">
|
||||
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
|
||||
@showandsave="Savedb">
|
||||
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
|
||||
@input="changevalRec"
|
||||
@showandsave="Savedb">
|
||||
|
||||
</CGallery>
|
||||
</CGallery>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
|
||||
<div>
|
||||
{{myvalue}}
|
||||
<div v-if="col.fieldtype === tools.FieldType.binary">
|
||||
<CMyChipList
|
||||
:type="tools.FieldType.binary"
|
||||
:value="myvalue"
|
||||
@input="changevalRec"
|
||||
: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
|
||||
@input="changevalRec"
|
||||
: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
|
||||
@input="changevalRec"
|
||||
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="changevalRec"></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-if="col.fieldtype === tools.FieldType.intcode">
|
||||
<div>
|
||||
{{myvalue}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<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.nationality">
|
||||
<div>
|
||||
{{ myvalue }}
|
||||
</div>
|
||||
<div v-else>
|
||||
<!-- Edit Value -->
|
||||
<span v-if="col.fieldtype === tools.FieldType.date">
|
||||
</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>
|
||||
</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>
|
||||
<span v-else-if="col.fieldtype === tools.FieldType.onlydate">
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
class="cursor-pointer"
|
||||
:valueDate="myvalue"
|
||||
:readonly="false"
|
||||
:minuteinterval="minuteinterval"
|
||||
:dense="true"
|
||||
:canEdit="canEdit"
|
||||
@savetoclose="SaveValueInt"
|
||||
@show="OpenEdit"
|
||||
view="date">
|
||||
</CDateTime>
|
||||
</span>
|
||||
<div v-else>
|
||||
<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 v-if="col.fieldtype === tools.FieldType.html">
|
||||
|
||||
<!--<q-dialog v-model="showeditor">-->
|
||||
<CMyEditor v-if="visueditor" :value.sync="myvalue" :title="col.title" @keyup.enter.stop
|
||||
@showandsave="Savedb" @annulla="visueditor=false">
|
||||
|
||||
</CMyEditor>
|
||||
<!--</q-dialog>-->
|
||||
</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.hours">
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyPopupEdit.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyPopupEdit.scss';
|
||||
@import './CMyPopupEdit.scss';
|
||||
</style>
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -15,7 +15,13 @@ export default class CMySelect extends Vue {
|
||||
@Prop({ required: true, default: '' }) public optlab
|
||||
@Prop({ required: true, default: '' }) public optval
|
||||
@Prop({ required: false, default: true }) public useinput: boolean
|
||||
@Prop({ required: false, default: null }) public newvaluefunc
|
||||
@Prop({ required: false, default: true }) public dense: boolean
|
||||
@Prop({ required: false, default: false }) public multiple: boolean
|
||||
@Prop({
|
||||
required: false, default: function mydef(): object {
|
||||
return {}
|
||||
}
|
||||
}) public newvaluefunc: object
|
||||
@Prop({ required: false, default: null }) public funcgetvaluebyid
|
||||
@Prop({ required: true }) public options
|
||||
|
||||
@@ -26,7 +32,9 @@ export default class CMySelect extends Vue {
|
||||
}
|
||||
|
||||
public changeval(newval) {
|
||||
console.log('changeval', newval)
|
||||
this.$emit('update:value', newval)
|
||||
this.$emit('changeval', newval)
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<div class="text-center">
|
||||
<div v-if="useinput">
|
||||
<q-select
|
||||
:multiple="multiple"
|
||||
rounded
|
||||
outlined
|
||||
:input-class="myclass"
|
||||
@@ -15,15 +16,16 @@
|
||||
:option-label="optlab"
|
||||
@input="changeval"
|
||||
:label="label"
|
||||
dense
|
||||
:dense="dense"
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-select
|
||||
:multiple="multiple"
|
||||
rounded
|
||||
outlined
|
||||
dense
|
||||
:dense="dense"
|
||||
:input-class="myclass"
|
||||
v-model="myvalue"
|
||||
:options="options"
|
||||
|
||||
@@ -61,11 +61,11 @@ $graytext: #555;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__img {
|
||||
&__singleevimg {
|
||||
padding: 0.25rem !important;
|
||||
float: left;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
border-radius: 1rem;
|
||||
|
||||
@media (max-width: 718px) {
|
||||
@@ -73,6 +73,9 @@ $graytext: #555;
|
||||
float: none;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,173 +1,187 @@
|
||||
<template>
|
||||
<div>
|
||||
<CMyPage v-if="myevent" :imgbackground="myevent.img" :title="myevent.title" keywords="" description="" nofooter="true">
|
||||
<div>
|
||||
<CMyPage v-if="myevent" :imgbackground="myevent.img" :title="myevent.title" keywords="" description=""
|
||||
nofooter="true">
|
||||
|
||||
<div class="q-mx-md">
|
||||
<div class="listaev__align_chips q-ma-md">
|
||||
<img :src="getImgEvent(myevent)"
|
||||
@click="selectEvent(myevent)"
|
||||
class="text-left padding_cell listaev__tdimg listaev__img cursor-pointer"
|
||||
:style="getStyleByEvent(myevent, true)"
|
||||
:alt="myevent.title">
|
||||
<q-chip dense v-if="isAlreadyBooked(myevent)" class="cltexth4 chipbooked shadow-5 q-mb-md"
|
||||
color="green" text-color="white"
|
||||
icon="event_available">{{$t('cal.booked')}}
|
||||
</q-chip>
|
||||
<div v-if="selected">
|
||||
<q-chip v-if="editable" class="text-center shadow-5 glossy bg-blue chipmodif">
|
||||
<div class="q-mx-md">
|
||||
<div class="listaev__align_chips q-ma-md">
|
||||
<img :src="getImgEvent(myevent)"
|
||||
@click="selectEvent(myevent)"
|
||||
class="text-left padding_cell listaev__tdimg listaev__singleevimg cursor-pointer"
|
||||
:style="getStyleByEvent(myevent, true)"
|
||||
:alt="myevent.title">
|
||||
<q-chip dense v-if="isAlreadyBooked(myevent)" class="cltexth4 chipbooked shadow-5 q-mb-md"
|
||||
color="green" text-color="white"
|
||||
icon="event_available">{{ $t('cal.booked') }}
|
||||
</q-chip>
|
||||
<div v-if="selected">
|
||||
<q-chip v-if="editable" class="text-center shadow-5 glossy bg-blue chipmodif">
|
||||
|
||||
<q-btn v-if="editable" flat round color="white" icon="fas fa-copy">
|
||||
<q-menu
|
||||
transition-show="flip-right"
|
||||
transition-hide="flip-left">
|
||||
<q-list style="min-width: 100px">
|
||||
<q-item clickable @click="duplicateEvent(myevent, 7)">
|
||||
<q-item-section>Tra 1 Settimana</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable @click="duplicateEvent(myevent, 14)">
|
||||
<q-item-section>Tra 2 Settimane</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable @click="duplicateEvent(myevent, 7, 4)">
|
||||
<q-item-section>4 Eventi ogni Settimana</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="delete" v-close-popup
|
||||
@click="deleteEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="edit" v-close-popup
|
||||
@click="editEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="cancel"
|
||||
@click="selectEvent(null)"></q-btn>
|
||||
</q-chip>
|
||||
</div>
|
||||
<q-chip v-if="myevent.news" class="cltexth4 chipnews shadow-5 glossy text-right" color="red"
|
||||
text-color="white" icon-right="star" icon="star" dense
|
||||
style="">
|
||||
{{$t('event.news')}}
|
||||
</q-chip>
|
||||
<q-btn v-if="editable" flat round color="white" icon="fas fa-copy">
|
||||
<q-menu
|
||||
transition-show="flip-right"
|
||||
transition-hide="flip-left">
|
||||
<q-list style="min-width: 100px">
|
||||
<q-item clickable @click="duplicateEvent(myevent, 7)">
|
||||
<q-item-section>Tra 1 Settimana</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable @click="duplicateEvent(myevent, 14)">
|
||||
<q-item-section>Tra 2 Settimane</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable @click="duplicateEvent(myevent, 7, 4)">
|
||||
<q-item-section>4 Eventi ogni Settimana</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="delete" v-close-popup
|
||||
@click="deleteEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="edit" v-close-popup
|
||||
@click="editEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="cancel"
|
||||
@click="selectEvent(null)"></q-btn>
|
||||
</q-chip>
|
||||
</div>
|
||||
<q-chip v-if="myevent.news" class="cltexth4 chipnews shadow-5 glossy text-right" color="red"
|
||||
text-color="white" icon-right="star" icon="star" dense
|
||||
style="">
|
||||
{{ $t('event.news') }}
|
||||
</q-chip>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="listaev__date listaev__align_center_mobile">
|
||||
<span v-html="tools.getstrDateTimeEvent(mythis, myevent, true)"></span>
|
||||
</div>
|
||||
<div class="listaev__date listaev__align_center_mobile">
|
||||
<span v-html="tools.getstrDateTimeEvent(mythis, myevent, true)"></span>
|
||||
</div>
|
||||
|
||||
<div class="listaev__align_center_mobile">
|
||||
<div class="listaev__align_center_mobile">
|
||||
|
||||
<div style="margin: 10px;"></div>
|
||||
<div style="margin: 10px;"></div>
|
||||
|
||||
<div class="">
|
||||
<!-- Se c'è un link, allora -->
|
||||
<q-btn v-if="myevent.linkpdf" size="md" type="a"
|
||||
:href="`../../statics/` + myevent.linkpdf"
|
||||
target="_blank"
|
||||
ripple rounded :label="myevent.title" :icon="myevent.icon"
|
||||
:color="myevent.bgcolor" text-color="white" glossy>
|
||||
<div class="q-pa-sm q-gutter-md text-center">
|
||||
<!-- Se c'è un link, allora -->
|
||||
<q-btn class="text-center boldhigh" v-if="myevent.linkpdf" size="md" type="a"
|
||||
:href="`../../statics/` + myevent.linkpdf"
|
||||
target="_blank"
|
||||
ripple rounded :label="myevent.title"
|
||||
:color="myevent.bgcolor" text-color="white" glossy>
|
||||
|
||||
</q-btn>
|
||||
<!-- altrimenti mostra solo Chip -->
|
||||
<div v-else>
|
||||
<div v-if="tools.isMobile()" class="cltexth3 text-center"
|
||||
:style="`background-color: ${myevent.bgcolor} !important; color: white !important;`">
|
||||
{{myevent.title}}
|
||||
</div>
|
||||
<q-chip v-else class="cltexth3 text-center"
|
||||
:style="`background-color: ${myevent.bgcolor} !important; color: white !important;`"
|
||||
text-color="white"
|
||||
:icon="myevent.icon"
|
||||
dense>{{myevent.title}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
</q-btn>
|
||||
<!-- altrimenti mostra solo Chip -->
|
||||
<div v-else-if="tools.isMobile()" class="cltexth3 text-center boldhigh"
|
||||
:style="`background-color: ${myevent.bgcolor} !important; color: white !important;`">
|
||||
{{ myevent.title }}
|
||||
</div>
|
||||
<q-chip v-else class="cltexth3 text-center boldhigh"
|
||||
icon="bookmark"
|
||||
:style="`background-color: ${myevent.bgcolor} !important; color: white !important;`"
|
||||
text-color="white"
|
||||
dense>{{ myevent.title }}
|
||||
</q-chip>
|
||||
</div>
|
||||
|
||||
<div style="margin: 10px;"></div>
|
||||
<div style="margin: 10px;"></div>
|
||||
|
||||
<p v-if="myevent.bodytext" class="listaev__details text-left q-mb-md" v-html="myevent.bodytext"></p>
|
||||
<p v-else class="listaev__details" v-html="myevent.details"></p>
|
||||
<p v-if="myevent.bodytext" class="listaev__details text-left q-mb-md" v-html="myevent.bodytext"></p>
|
||||
<p v-else class="listaev__details" v-html="myevent.details"></p>
|
||||
|
||||
<div v-if="myevent.teacher" class="">
|
||||
<span class="cal__teacher-title">{{$t('cal.teacher')}}: <span
|
||||
class="margin_with"></span></span>
|
||||
|
||||
<CMyTeacher :username="myevent.teacher"></CMyTeacher>
|
||||
<CMyTeacher :username="myevent.teacher2"></CMyTeacher>
|
||||
<div v-for="(mypage, index) in myevent.pagefooter" :key="index">
|
||||
<CMyPage v-if="!!mypage" :mypath="`/`+ mypage">
|
||||
</CMyPage>
|
||||
</div>
|
||||
|
||||
<span v-if="myevent.wherecode" class="q-ma-md">
|
||||
<div v-if="myevent.teacher" class="">
|
||||
<span class="cal__teacher-title">{{ $t('cal.teacher') }}: <span
|
||||
class="margin_with"></span></span>
|
||||
|
||||
<CMyTeacher :username="myevent.teacher"></CMyTeacher>
|
||||
<CMyTeacher :username="myevent.teacher2"></CMyTeacher>
|
||||
<CMyTeacher :username="myevent.teacher3"></CMyTeacher>
|
||||
<CMyTeacher :username="myevent.teacher4"></CMyTeacher>
|
||||
|
||||
<span v-if="myevent.wherecode" class="q-ma-md">
|
||||
<span v-if="tools.isMobile()"><br/></span>
|
||||
<span class="cal__where-title">{{$t('cal.where')}}: </span>
|
||||
<span class="cal__where-title">{{ $t('cal.where') }}: </span>
|
||||
|
||||
<q-chip>
|
||||
<q-avatar v-if="getWhereIcon(myevent.wherecode)">
|
||||
<img :src="`../../statics/images/avatar/` + getWhereIcon(myevent.wherecode)" alt="località">
|
||||
<img
|
||||
:src="`../../statics/images/avatar/` + getWhereIcon(myevent.wherecode)"
|
||||
alt="località">
|
||||
</q-avatar>
|
||||
<q-avatar v-else color="blue" font-size="20px" text-color="white"
|
||||
icon="home">
|
||||
</q-avatar>
|
||||
<span class="cal__teacher-content">{{getWhereName(myevent.wherecode)}}</span>
|
||||
<span
|
||||
class="cal__teacher-content">{{ getWhereName(myevent.wherecode) }}</span>
|
||||
</q-chip>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="myevent.contribtype" class="q-ma-sm">
|
||||
<span class="cal__quota-title">{{$t('event.price')}}:<span
|
||||
class="margin_with"></span></span>
|
||||
<span v-if="!isShowPrice(myevent)" class="">
|
||||
</div>
|
||||
<div v-if="myevent.contribtype" class="q-ma-sm">
|
||||
<span class="cal__quota-title">{{ $t('event.price') }}:<span
|
||||
class="margin_with"></span></span>
|
||||
<span v-if="!isShowPrice(myevent)" class="">
|
||||
<q-chip class="glossy" color="orange" text-color="white">
|
||||
<span class="cal__quota-content">{{getContribtypeById(myevent.contribtype)}}</span>
|
||||
<span
|
||||
class="cal__quota-content">{{
|
||||
getContribtypeById(myevent.contribtype)
|
||||
}}</span>
|
||||
</q-chip>
|
||||
</span>
|
||||
|
||||
<q-chip v-if="myevent.price && isShowPrice(myevent)" class="glossy" color="orange"
|
||||
text-color="white" icon-right="star">
|
||||
<span class="cal__quota-content">{{getPrice(myevent)}}</span>
|
||||
</q-chip>
|
||||
</div>
|
||||
<q-chip v-if="myevent.price && isShowPrice(myevent)" class="glossy" color="orange"
|
||||
text-color="white" icon-right="star">
|
||||
<span class="cal__quota-content">{{ getPrice(myevent) }}</span>
|
||||
</q-chip>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row justify-start q-ma-md">
|
||||
<q-btn v-if="myevent.linkpdf"
|
||||
size="md" type="a" :href="`../../statics/` + myevent.linkpdf"
|
||||
target="_blank" rounded outline
|
||||
color="primary" icon="info"
|
||||
:label="$t('cal.showpdf')">
|
||||
<div class="row justify-start q-ma-md">
|
||||
<q-btn v-if="myevent.linkpdf"
|
||||
size="md" type="a" :href="`../../statics/` + myevent.linkpdf"
|
||||
target="_blank" rounded outline
|
||||
color="primary" icon="info"
|
||||
:label="$t('cal.showpdf')">
|
||||
|
||||
</q-btn>
|
||||
<q-btn v-if="myevent.bodytext" rounded outline class="q-mx-sm"
|
||||
color="primary"
|
||||
:to="`/event/${myevent.typol}/${myevent._id}`"
|
||||
:label="$t('event.showpage')">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="row justify-end q-mb-lg">
|
||||
<q-btn rounded outline class="q-mx-sm"
|
||||
color="primary" @click="askForInfoEventMenu(myevent)"
|
||||
:label="$t('event.askinfo')">
|
||||
</q-btn>
|
||||
<q-btn rounded class="q-mx-sm"
|
||||
v-if="!myevent.nobookable && !isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS"
|
||||
color="primary" @click="addBookEventMenu(myevent)"
|
||||
:label="$t('cal.booking')" :disable="!isEventEnabled(myevent)">
|
||||
</q-btn>
|
||||
<q-btn rounded outline class="q-mx-sm"
|
||||
v-if="!myevent.nobookable && isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS"
|
||||
text-color="red"
|
||||
@click="EditBookEvent(myevent)"
|
||||
:label="$t('cal.modifybooking')">
|
||||
</q-btn>
|
||||
<!--
|
||||
<q-btn push rounded v-if="!myevent.nobookable && isAlreadyBooked(myevent)" color="positive" @click="BookEvent(myevent)"
|
||||
:label="$t('cal.booked')">
|
||||
</q-btn>
|
||||
-->
|
||||
</q-btn>
|
||||
<!--<q-btn v-if="myevent.bodytext" rounded outline class="q-mx-sm"
|
||||
color="primary"
|
||||
:to="`/event/${myevent.typol}/${myevent._id}`"
|
||||
:label="$t('event.showpage')">
|
||||
</q-btn>-->
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<q-btn rounded outline class="q-mx-sm"
|
||||
color="primary" @click="askForInfoEventMenu(myevent)"
|
||||
:label="$t('event.askinfo')">
|
||||
</q-btn>
|
||||
<q-btn rounded class="q-mx-sm"
|
||||
v-if="!myevent.nobookable && !isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS"
|
||||
color="primary" @click="addBookEventMenu(myevent)"
|
||||
:label="$t('cal.booking')" :disable="!isEventEnabled(myevent)">
|
||||
</q-btn>
|
||||
<q-btn rounded outline class="q-mx-sm"
|
||||
v-if="!myevent.nobookable && isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS"
|
||||
text-color="red"
|
||||
@click="EditBookEvent(myevent)"
|
||||
:label="$t('cal.modifybooking')">
|
||||
</q-btn>
|
||||
<br>
|
||||
<!--
|
||||
<q-btn push rounded v-if="!myevent.nobookable && isAlreadyBooked(myevent)" color="positive" @click="BookEvent(myevent)"
|
||||
:label="$t('cal.booked')">
|
||||
</q-btn>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./CMySingleEvent.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CMySingleEvent.scss';
|
||||
@import './CMySingleEvent.scss';
|
||||
</style>
|
||||
|
||||
@@ -41,6 +41,7 @@ export default class CMyToggleList extends Vue {
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
console.log('mounted')
|
||||
this.myarrvalues = []
|
||||
|
||||
// console.log('value', this.value)
|
||||
@@ -50,11 +51,28 @@ export default class CMyToggleList extends Vue {
|
||||
if (this.isarray) {
|
||||
// console.table(this.options)
|
||||
this.options.forEach((rec) => {
|
||||
console.log('rec: ', rec)
|
||||
console.log('rec: ', rec, 'optval', this.optval, 'optlab', this.optlab)
|
||||
const mydata = {
|
||||
label: this.$t(rec[this.optlab]),
|
||||
label: '',
|
||||
value: rec[this.optval],
|
||||
valbool: this.value.includes(rec[this.optval])
|
||||
valbool: false
|
||||
}
|
||||
|
||||
const lab = rec[`${this.optlab}`]
|
||||
console.log('lab', lab)
|
||||
|
||||
if (tools.isObject(this.optlab)) {
|
||||
const arr = this.options.filter((myrec) => myrec[this.optval] === mydata.value).map(this.optlab)
|
||||
if (arr) {
|
||||
// @ts-ignore
|
||||
mydata.label = arr[0]
|
||||
}
|
||||
} else {
|
||||
mydata.label = this.$t(rec[this.optlab])
|
||||
}
|
||||
|
||||
if (this.value) {
|
||||
mydata.valbool = this.value.includes(rec[this.optval])
|
||||
}
|
||||
console.log('mydata ', mydata)
|
||||
this.myarrvalues.push(mydata)
|
||||
|
||||
@@ -14,7 +14,7 @@ import { CCopyBtn } from '../CCopyBtn'
|
||||
import { date } from 'quasar'
|
||||
|
||||
@Component({
|
||||
name: 'CStatusReg',
|
||||
name: 'CNextZoom',
|
||||
components: { CTitleBanner, CCardState, CCopyBtn }
|
||||
})
|
||||
|
||||
@@ -44,4 +44,28 @@ export default class CNextZoom extends MixinBase {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
public getlinkzoom(rec) {
|
||||
if (rec === null) {
|
||||
rec = {
|
||||
typeconf: tools.TYPECONF_ZOOM,
|
||||
id_conf_zoom: ''
|
||||
}
|
||||
}
|
||||
let typeconf = rec.typeconf
|
||||
if (typeconf === '')
|
||||
typeconf = tools.TYPECONF_ZOOM
|
||||
|
||||
let mylink = 'https://zoom.us/j/'
|
||||
if (typeconf === tools.TYPECONF_JITSI)
|
||||
mylink = 'https://meet.jit.si/'
|
||||
|
||||
if (rec.id_conf_zoom === '') {
|
||||
rec.id_conf_zoom = '6668882000'
|
||||
}
|
||||
|
||||
return mylink + rec.id_conf_zoom
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.nextzoom')" bgcolor="bg-primary" clcolor="text-white"
|
||||
<CTitleBanner v-if="listacalzoom.length > 0" class="q-pa-xs" :title="$t('pages.nextzoom')"
|
||||
bgcolor="bg-primary" clcolor="text-white"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
|
||||
|
||||
<div class="flex flex-center">
|
||||
|
||||
<div class="row animazione justify-center q-gutter-md">
|
||||
|
||||
<q-btn v-if="showzoom" size="md" type="a" :href="tools.getLinkZoom()"
|
||||
target="_blank" rounded color="white" text-color="primary" icon="fas fa-video" :label="$t('steps.entra_zoom')">
|
||||
target="_blank" rounded color="white" text-color="primary" icon="fas fa-video"
|
||||
:label="$t('steps.entra_zoom')">
|
||||
</q-btn>
|
||||
|
||||
<transition-group name="fade" mode="out-in"
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(confer, index) in listacalzoom" :key="confer._id" class="q-mb-xs animated clBorderZoom q-pa-sm" v-ripple>
|
||||
<q-item v-for="(confer, index) in listacalzoom" :key="confer._id"
|
||||
class="q-mb-xs animated clBorderZoom q-pa-sm" v-ripple>
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-avatar v-if="tools.geticon(confer.lang)" :class="tools.geticon(confer.lang)" size="sm">
|
||||
<q-avatar v-if="tools.geticon(confer.lang)" :class="tools.geticon(confer.lang)"
|
||||
size="sm">
|
||||
</q-avatar>
|
||||
<q-avatar v-else color="primary" text-color="white" class="text-center">
|
||||
{{ tools.capitalize(confer.lang) }}
|
||||
@@ -28,7 +33,13 @@
|
||||
|
||||
<q-item-section class="text-center">
|
||||
<q-item-label class="title">{{ confer.title }}</q-item-label>
|
||||
<q-item-label class="zoom_data">{{ tools.getstrDateMonthWeekTimeShort(confer.date_start) }}</q-item-label>
|
||||
<q-item-label class="text-center">
|
||||
<q-icon v-if="confer.benvenuto" name="fas fa-check" size="md" color="blue"></q-icon>
|
||||
<q-icon v-if="!!confer.icon" :name="confer.icon" size="md" inverted :color="confer.color"></q-icon>
|
||||
</q-item-label>
|
||||
<q-item-label class="zoom_data">{{
|
||||
tools.getstrDateMonthWeekTimeShort(confer.date_start) }}
|
||||
</q-item-label>
|
||||
<q-item-label class="note">
|
||||
<q-chip
|
||||
style="background-color: lightblue !important;"
|
||||
@@ -37,6 +48,9 @@
|
||||
>{{ confer.note }}
|
||||
</q-chip>
|
||||
</q-item-label>
|
||||
<q-item-label class="link">
|
||||
<a :href="getlinkzoom(confer)" target="_blank">{{getlinkzoom(confer)}}</a>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</transition-group>
|
||||
|
||||
168
src/components/CPhotosGallery/CPhotosGallery.scss
Executable file
168
src/components/CPhotosGallery/CPhotosGallery.scss
Executable file
@@ -0,0 +1,168 @@
|
||||
$grayshadow: #555;
|
||||
$textcol: #eeefe1;
|
||||
$textcol_scuro: darkblue;
|
||||
|
||||
p {
|
||||
margin: 0 0 1.25rem;
|
||||
//text-shadow: .125rem .125rem .25rem $grayshadow;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.landing > section {
|
||||
/*
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
//padding: 0 16px
|
||||
*/
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.landing > section.padding {
|
||||
padding: 5.62rem 1rem;
|
||||
}
|
||||
|
||||
.landing > section > div {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.landing__footer .doc-link {
|
||||
color: $textcol;
|
||||
}
|
||||
|
||||
.landing__footer .doc-link:hover {
|
||||
opacity: .8
|
||||
}
|
||||
|
||||
.gallery:before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
//background: #000 url(../../statics/images/cover.jpg) 50%;
|
||||
|
||||
background-size: cover
|
||||
}
|
||||
|
||||
.carousel_slide {
|
||||
|
||||
}
|
||||
|
||||
.gallery {
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.gallery2{
|
||||
margin: auto;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.btn-start {
|
||||
margin: 3.125rem;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
//color: white;
|
||||
text-shadow: 0.125rem 0.125rem 0.25rem $grayshadow;
|
||||
}
|
||||
|
||||
.shadow-max {
|
||||
//color: white;
|
||||
text-shadow: .25rem .25rem .5rem $grayshadow;
|
||||
}
|
||||
|
||||
@media (max-width: 2000px) {
|
||||
.q-carousel {
|
||||
height: 800px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
.q-carousel {
|
||||
height: 800px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.q-carousel {
|
||||
height: 600px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
|
||||
.gallery2 {
|
||||
max-height: 80vh;
|
||||
}
|
||||
|
||||
.text-h1 {
|
||||
font-size: 3rem;
|
||||
line-height: 3.05rem;
|
||||
margin-bottom: 1.5rem
|
||||
}
|
||||
|
||||
.text-subtitle1 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.text-vers {
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.q-carousel {
|
||||
height: 450px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.q-carousel {
|
||||
height: 300px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.allunga0 {
|
||||
height: 300px !important;
|
||||
}
|
||||
.allunga1 {
|
||||
height: 400px !important;
|
||||
}
|
||||
.allunga2 {
|
||||
height: 500px !important;
|
||||
}
|
||||
.allunga3 {
|
||||
height: 600px !important;
|
||||
}
|
||||
|
||||
|
||||
.custom-caption {
|
||||
text-align: center;
|
||||
padding: .75rem;
|
||||
color: $textcol;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
}
|
||||
250
src/components/CPhotosGallery/CPhotosGallery.ts
Executable file
250
src/components/CPhotosGallery/CPhotosGallery.ts
Executable file
@@ -0,0 +1,250 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
|
||||
import { IColl, IGallery, ITimeLineEntry } from '@src/model/GlobalStore'
|
||||
|
||||
import { Logo } from '../../components/logo'
|
||||
|
||||
import { Footer } from '../../components/Footer'
|
||||
|
||||
import VueScrollReveal from 'vue-scroll-reveal'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { CImgTitle } from '../../components/CImgTitle/index'
|
||||
import { Screen } from 'quasar'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
|
||||
Vue.use(VueScrollReveal, {
|
||||
class: 'v-scroll-reveal', // A CSS class applied to elements with the v-scroll-reveal directive; useful for animation overrides.
|
||||
duration: 1200,
|
||||
scale: 0.95,
|
||||
distance: '10px',
|
||||
rotate: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
}
|
||||
// mobile: true
|
||||
})
|
||||
|
||||
@Component({
|
||||
components: { Logo, Footer, CImgTitle }
|
||||
})
|
||||
export default class PhotosGallery extends Vue {
|
||||
@Prop({ required: true }) public mygallery: []
|
||||
public text: string = ''
|
||||
public visibile: boolean = false
|
||||
public cardvisible: string = 'hidden'
|
||||
public displaycard: string = 'block'
|
||||
public $t: any
|
||||
// public firstClassSection: string = 'landing_background fade homep-cover-img animate-fade homep-cover-img-1'
|
||||
public firstClassSection: string = 'fade homep-cover-img animate-fade homep-cover-img-1'
|
||||
public $q
|
||||
public polling
|
||||
public slide = 'first'
|
||||
public slide2 = 1
|
||||
public animare: number = 0
|
||||
public activePanelImg: number
|
||||
public withThumbnails: boolean = true
|
||||
public withCaptions: boolean = true
|
||||
public allunga: boolean = false
|
||||
public fullscreen: boolean = false
|
||||
public myclass: string = ''
|
||||
public dimensione: string = ''
|
||||
public dimensioneImg: any = [
|
||||
{
|
||||
id: 0,
|
||||
label: 'Piccola',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
label: 'Media',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Grande',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: 'Molto Grande',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
// console.log('Home constructor...')
|
||||
this.initprompt()
|
||||
}
|
||||
|
||||
get static_data() {
|
||||
return static_data
|
||||
}
|
||||
|
||||
public changeAllunga(value, evt) {
|
||||
if (value)
|
||||
this.myclass = 'allunga'
|
||||
else
|
||||
this.myclass = ''
|
||||
}
|
||||
|
||||
get getappname() {
|
||||
return this.$t('msg.myAppName')
|
||||
}
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
let primo = true
|
||||
const mytime = 10000
|
||||
this.polling = setInterval(() => {
|
||||
|
||||
this.firstClassSection = 'landing_background fade homep-cover-img ' + (primo ? 'homep-cover-img-2' : 'homep-cover-img-1')
|
||||
primo = !primo
|
||||
|
||||
// console.log('this.firstClassSection', this.firstClassSection)
|
||||
|
||||
}, mytime)
|
||||
}
|
||||
|
||||
get appname() {
|
||||
return process.env.APP_NAME
|
||||
}
|
||||
|
||||
public beforeDestroy() {
|
||||
console.log('beforeDestroy')
|
||||
clearInterval(this.polling)
|
||||
}
|
||||
|
||||
public created() {
|
||||
this.animare = process.env.DEV ? 0 : 8000
|
||||
|
||||
GlobalStore.actions.prova()
|
||||
}
|
||||
|
||||
get isLogged() {
|
||||
return UserStore.state.isLogged
|
||||
}
|
||||
|
||||
public meta() {
|
||||
return {
|
||||
keywords: { name: 'keywords', content: 'Quasar website' },
|
||||
// meta tags
|
||||
meta: {
|
||||
mykey: { name: 'mykey', content: 'Key 1' },
|
||||
description: { name: 'description', content: 'Page 1' },
|
||||
keywords: { name: 'keywords', content: 'Quasar website' },
|
||||
equiv: { 'http-equiv': 'Content-Type', 'content': 'text/html; charset=UTF-8' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public mystilecard() {
|
||||
return {
|
||||
visibility: this.cardvisible,
|
||||
display: this.displaycard
|
||||
}
|
||||
}
|
||||
|
||||
get conta() {
|
||||
return GlobalStore.state.conta
|
||||
}
|
||||
|
||||
public getenv(myvar) {
|
||||
return process.env[myvar]
|
||||
}
|
||||
|
||||
set conta(valore) {
|
||||
GlobalStore.actions.setConta(valore)
|
||||
const my = this.$q.lang.isoName
|
||||
tools.showNotif(this.$q, String(my))
|
||||
}
|
||||
|
||||
public initprompt() {
|
||||
window.addEventListener('beforeinstallprompt', function (event) {
|
||||
// console.log('******************************** beforeinstallprompt fired')
|
||||
event.preventDefault()
|
||||
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
|
||||
// #Todo++ IMPOSTA DEFERRED PROMPT
|
||||
return false
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
get isInCostruction() {
|
||||
return process.env.IN_CONSTRUCTION === '1'
|
||||
}
|
||||
|
||||
public getPermission() {
|
||||
return Notification.permission
|
||||
}
|
||||
|
||||
public NotServiceWorker() {
|
||||
return (!('serviceWorker' in navigator))
|
||||
}
|
||||
|
||||
public PagLogin() {
|
||||
this.$router.replace('/signin')
|
||||
}
|
||||
|
||||
public PagReg() {
|
||||
this.$router.replace('/signup')
|
||||
}
|
||||
|
||||
public openCreatePostModal() {
|
||||
console.log('APERTO ! openCreatePostModal')
|
||||
|
||||
this.conta = this.conta + 1
|
||||
|
||||
this.visibile = !this.visibile
|
||||
|
||||
if (this.visibile) {
|
||||
this.displaycard = 'block'
|
||||
this.cardvisible = 'visible'
|
||||
} else {
|
||||
this.displaycard = 'block'
|
||||
this.cardvisible = 'hidden'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public getmywidth(rec: IColl) {
|
||||
return rec.width
|
||||
}
|
||||
|
||||
public getmyheight(rec: IColl) {
|
||||
return rec.height
|
||||
}
|
||||
|
||||
public setTransition(newVal, oldVal) {
|
||||
// console.log('setTransition', newVal, oldVal)
|
||||
this.activePanelImg = newVal
|
||||
}
|
||||
|
||||
public getsubtitle(data: IColl) {
|
||||
if (data.subtitle[toolsext.getLocale()])
|
||||
return data.subtitle[toolsext.getLocale()]
|
||||
else {
|
||||
return data.subtitle[static_data.arrLangUsed[0]]
|
||||
}
|
||||
}
|
||||
|
||||
public getTitle(data: IColl) {
|
||||
if (data.title[toolsext.getLocale()])
|
||||
return data.title[toolsext.getLocale()]
|
||||
else {
|
||||
return data.title[static_data.arrLangUsed[0]]
|
||||
}
|
||||
}
|
||||
|
||||
public changedim(value) {
|
||||
this.myclass = 'allunga' + value
|
||||
// console.log('myclass', this.myclass, value)
|
||||
}
|
||||
}
|
||||
67
src/components/CPhotosGallery/CPhotosGallery.vue
Executable file
67
src/components/CPhotosGallery/CPhotosGallery.vue
Executable file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-black">
|
||||
<q-checkbox v-model="withThumbnails" label="Miniature">
|
||||
</q-checkbox>
|
||||
<q-checkbox v-model="withCaptions" label="Didascalie">
|
||||
</q-checkbox>
|
||||
<q-select v-model="dimensione" :options="dimensioneImg"
|
||||
style="max-width: 150px"
|
||||
rounded
|
||||
outlined
|
||||
dense
|
||||
label="Altezza"
|
||||
emit-value map-options
|
||||
@input="changedim"
|
||||
></q-select>
|
||||
</div>
|
||||
|
||||
<q-carousel
|
||||
animated
|
||||
infinite
|
||||
arrows
|
||||
control-color="primary"
|
||||
control-text-color="white"
|
||||
swipeable
|
||||
:thumbnails="withThumbnails"
|
||||
transition-next="slide-left"
|
||||
transition-prev="slide-right"
|
||||
v-model="slide2"
|
||||
:class="`bg-grey-1 shadow-2 rounded-borders ` + myclass + ' gallery2 ' "
|
||||
@transition="setTransition"
|
||||
|
||||
>
|
||||
<q-carousel-slide v-for="(rec, index) in mygallery" v-if="rec.ingallery"
|
||||
:key="index" :name="index" :img-src="rec.img">
|
||||
|
||||
<div v-if="rec.ingallery && withCaptions" class="absolute-bottom custom-caption"
|
||||
style="margin-bottom: 70px">
|
||||
<div v-if="!!rec.title" class="text-h5"><span style="font-size: 1.25rem;">{{ getTitle(rec) }}</span></div>
|
||||
<div class="subtitle" v-html="getsubtitle(rec)"></div>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
|
||||
<!--<template v-slot:control>
|
||||
<q-carousel-control
|
||||
position="bottom-right"
|
||||
:offset="[18, 18]"
|
||||
>
|
||||
<q-btn
|
||||
push round dense color="white" text-color="primary"
|
||||
:icon="fullscreen ? 'fullscreen_exit' : 'fullscreen'"
|
||||
@click="fullscreen = !fullscreen"
|
||||
/>
|
||||
</q-carousel-control>
|
||||
</template>-->
|
||||
</q-carousel>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CPhotosGallery.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CPhotosGallery.scss';
|
||||
</style>
|
||||
1
src/components/CPhotosGallery/index.ts
Executable file
1
src/components/CPhotosGallery/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CPhotosGallery} from './CPhotosGallery.vue'
|
||||
12
src/components/CProductCard/CProductCard.scss
Executable file
12
src/components/CProductCard/CProductCard.scss
Executable file
@@ -0,0 +1,12 @@
|
||||
.card .product-image {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.text-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.centeritems{
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
149
src/components/CProductCard/CProductCard.ts
Executable file
149
src/components/CProductCard/CProductCard.ts
Executable file
@@ -0,0 +1,149 @@
|
||||
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: false, default: null }) public product: IProduct
|
||||
public myproduct: IProduct = null
|
||||
@Prop({ required: false, default: '' }) public code: string
|
||||
@Prop({ required: false, default: false }) public complete: boolean
|
||||
@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() {
|
||||
|
||||
if (!UserStore.state.isLogged) {
|
||||
tools.showNeutralNotif(this.$q, 'Devi prima accedere alla tua Area Personale')
|
||||
GlobalStore.state.rightDrawerOpen = true
|
||||
return false
|
||||
}
|
||||
|
||||
// Controlla se esiste già nel carrello il prodotto
|
||||
if (Products.getters.existProductInCart(this.myproduct._id)) {
|
||||
tools.showNegativeNotif(this.$q, 'Questo prodotto è stato già aggiunto al Carrello')
|
||||
} else {
|
||||
Products.actions.addToCart({ product: this.myproduct, 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.myproduct.storehouses)
|
||||
return this.myproduct.storehouses.length
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
public getSingleStorehouse() {
|
||||
const mystore = this.myproduct.storehouses[0]
|
||||
return mystore.name + ' (' + mystore.city + ')'
|
||||
}
|
||||
|
||||
public getStorehouses() {
|
||||
|
||||
const myarr = []
|
||||
let ind = 1
|
||||
this.myproduct.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
|
||||
}
|
||||
|
||||
@Watch('code')
|
||||
public codechanged(value) {
|
||||
console.log('change code')
|
||||
this.load()
|
||||
}
|
||||
|
||||
public async load() {
|
||||
// console.log('created Cproductcard', this.code)
|
||||
if (this.code) {
|
||||
this.myproduct = await Products.actions.loadProduct({ code: this.code })
|
||||
} else {
|
||||
this.myproduct = this.product
|
||||
}
|
||||
|
||||
console.log('this.myproduct', this.myproduct, 'this.product', this.product)
|
||||
|
||||
if (!!this.myproduct) {
|
||||
if (this.myproduct.storehouses.length === 1) {
|
||||
this.order.idStorehouse = this.myproduct.storehouses[0]._id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async created() {
|
||||
this.load()
|
||||
}
|
||||
|
||||
get getmycardcl() {
|
||||
return (this.complete) ? 'my-card-big' : 'my-card'
|
||||
}
|
||||
|
||||
get getclimg() {
|
||||
return (this.complete) ? 'myimgtitle centermydiv' : 'centermydiv'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
99
src/components/CProductCard/CProductCard.vue
Executable file
99
src/components/CProductCard/CProductCard.vue
Executable file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<q-card :class="getmycardcl" v-if="!!myproduct">
|
||||
<q-img :src="`statics/` + myproduct.img" :alt="myproduct.name" :class="getclimg"></q-img>
|
||||
|
||||
<q-card-section>
|
||||
<q-btn
|
||||
v-if="!complete"
|
||||
fab
|
||||
color="primary"
|
||||
icon="fas fa-info"
|
||||
class="absolute"
|
||||
style="top: 0; right: 12px; transform: translateY(-50%);"
|
||||
:to="`/product/`+ myproduct.code"
|
||||
/>
|
||||
|
||||
<div class="row items-center centeritems">
|
||||
<div class="text-h7 boldhigh">
|
||||
{{ myproduct.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="complete" class="row items-center">
|
||||
<div class="text-title text-grey-9">
|
||||
<span class="text-grey-7" v-html="myproduct.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="complete">
|
||||
<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"> {{ myproduct.producer.city }} ({{
|
||||
myproduct.producer.region
|
||||
}})</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="complete" 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"> {{ myproduct.producer.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<q-rating v-model="myproduct.stars" :max="5" size="32px" readonly/>-->
|
||||
|
||||
<div class="row q-mb-sm no-wrap items-center centeritems">
|
||||
<div class="text-price no-wrap">
|
||||
<span v-if="!!myproduct.price">€ {{ myproduct.price.toFixed(2) }}</span>
|
||||
<span v-if="!!myproduct.after_price">{{ myproduct.after_price }}</span>
|
||||
</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 v-if="complete || getnumstore() > 1">
|
||||
<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>
|
||||
</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(myproduct)" flat color="primary" rounded label="Lista Desideri">
|
||||
</q-btn>
|
||||
-->
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CProductCard.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CProductCard.scss';
|
||||
</style>
|
||||
1
src/components/CProductCard/index.ts
Executable file
1
src/components/CProductCard/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CProductCard} from './CProductCard.vue'
|
||||
@@ -12,9 +12,23 @@ $heightBtn: 100%;
|
||||
|
||||
.cpr-progrbar-item {
|
||||
//height: 10px
|
||||
margin-top: 11px;
|
||||
margin-bottom: 11px;
|
||||
height:15px;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
height:10px;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.cpr-progrbar-item {
|
||||
//height: 10px
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.progress-item {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.cpr-slider-item {
|
||||
|
||||
@@ -40,7 +40,7 @@ export default class CProgress extends Vue {
|
||||
|
||||
get getdescr() {
|
||||
if (!!this.descr) {
|
||||
return this.descr + ' : '
|
||||
return this.descr + ': '
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
18
src/components/CShareWithUs/CShareWithUs.scss
Executable file
18
src/components/CShareWithUs/CShareWithUs.scss
Executable file
@@ -0,0 +1,18 @@
|
||||
.zoom_data{
|
||||
font-size:1rem;
|
||||
font-weight: bold;
|
||||
text-shadow: .05rem .05rem .05rem #3d3d3d;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.id_conf{
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.note{
|
||||
font-style: italic;
|
||||
}
|
||||
225
src/components/CShareWithUs/CShareWithUs.ts
Executable file
225
src/components/CShareWithUs/CShareWithUs.ts
Executable file
@@ -0,0 +1,225 @@
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { INotData, IParamsQuery, IShareWithUs } from '../../model/index'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { NotevoleStore } from '@store'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import { validations } from '../CSignUpNotevole/CSignUp-validate'
|
||||
import { CTitleBanner } from '@components'
|
||||
import { CCardState } from '../CCardState'
|
||||
import { UserStore } from '../../store/Modules'
|
||||
import { GlobalStore } from '../../store'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
|
||||
import { date } from 'quasar'
|
||||
import objectId from '@src/js/objectId'
|
||||
|
||||
@Component({
|
||||
name: 'CShareWithUs',
|
||||
components: { CTitleBanner, CCardState, CCopyBtn }
|
||||
})
|
||||
|
||||
export default class CShareWithUs extends MixinBase {
|
||||
public $t
|
||||
public myshares: IShareWithUs[] = []
|
||||
public mydescr: string = ''
|
||||
|
||||
get listasharewithus() {
|
||||
return GlobalStore.state.sharewithus.sort((a, b) => b.numshared - a.numshared)
|
||||
}
|
||||
|
||||
get listamyshare() {
|
||||
return UserStore.state.my.profile.myshares
|
||||
}
|
||||
|
||||
public myload() {
|
||||
const sortBy = 'numshared'
|
||||
const descending = 1
|
||||
const myobj = {}
|
||||
if (descending)
|
||||
myobj[sortBy] = -1
|
||||
else
|
||||
myobj[sortBy] = 1
|
||||
|
||||
const params: IParamsQuery = {
|
||||
table: 'sharewithus',
|
||||
startRow: 0,
|
||||
endRow: 10000,
|
||||
filter: '',
|
||||
filterand: '',
|
||||
sortBy: myobj,
|
||||
descending,
|
||||
userId: UserStore.state.my._id
|
||||
}
|
||||
|
||||
console.log('myload', params)
|
||||
|
||||
GlobalStore.actions.loadTable(params).then((data) => {
|
||||
GlobalStore.state.sharewithus = data.rows
|
||||
})
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.myload()
|
||||
}
|
||||
|
||||
public recsharenow(mydescr): IShareWithUs {
|
||||
return {
|
||||
idapp: process.env.APP_ID,
|
||||
description: mydescr,
|
||||
userId: UserStore.state.my._id,
|
||||
numshared: 0,
|
||||
rating: 0
|
||||
}
|
||||
}
|
||||
|
||||
public add_newshare(mydescr) {
|
||||
if (!mydescr)
|
||||
return false
|
||||
const recfound = UserStore.state.my.profile.myshares.find((rec) => rec.description.toLowerCase() === mydescr.toLowerCase())
|
||||
if (!!recfound) {
|
||||
tools.showNegativeNotif(this.$q, '"' + mydescr + '" è già presente!')
|
||||
return false
|
||||
}
|
||||
UserStore.state.my.profile.myshares.push({ description: mydescr, rating: 5 })
|
||||
|
||||
const mydata = {
|
||||
'profile.myshares': UserStore.state.my.profile.myshares
|
||||
}
|
||||
tools.saveFieldToServer(this, 'users', UserStore.state.my._id, mydata)
|
||||
|
||||
const myrec = this.recsharenow(mydescr)
|
||||
|
||||
const updatedexistingrec = this.updaterecnow(mydescr, true)
|
||||
if (!updatedexistingrec) {
|
||||
tools.createNewRecord(this, 'sharewithus', myrec, false).then((myrecris) => {
|
||||
GlobalStore.state.sharewithus.push(myrecris)
|
||||
this.myload()
|
||||
this.mydescr = ''
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public updaterecnow(mydescr, add) {
|
||||
const recesistente = GlobalStore.state.sharewithus.find((rec) => rec.description.toLowerCase() === mydescr.toLowerCase())
|
||||
const indrec = GlobalStore.state.sharewithus.findIndex((rec) => rec.description.toLowerCase() === mydescr.toLowerCase())
|
||||
console.log('recesistente', recesistente)
|
||||
if (recesistente) {
|
||||
const mydatatosave = {
|
||||
id: recesistente._id,
|
||||
table: tools.TABSHAREWITHUS,
|
||||
fieldsvalue: recesistente
|
||||
}
|
||||
|
||||
if (add)
|
||||
recesistente.numshared++
|
||||
else {
|
||||
if (recesistente.numshared <= 0)
|
||||
return false
|
||||
else
|
||||
recesistente.numshared--
|
||||
}
|
||||
|
||||
GlobalStore.actions.saveFieldValue(mydatatosave).then((myrecris) => {
|
||||
if (myrecris) {
|
||||
GlobalStore.state.sharewithus[indrec] = recesistente
|
||||
this.myload()
|
||||
}
|
||||
this.mydescr = ''
|
||||
})
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public selected(value, shared) {
|
||||
shared.numshared++
|
||||
tools.saveFieldToServer(this, 'sharewithus', shared._id, { numshared: shared.numshared })
|
||||
|
||||
}
|
||||
|
||||
public checkifICanRemove(shared) {
|
||||
// Controlla se questo è stato aggiunto da me
|
||||
const recfound = GlobalStore.state.sharewithus.find((rec) => rec.description.toLowerCase() === shared.description.toLowerCase())
|
||||
if (!!recfound)
|
||||
return recfound.userId === UserStore.state.my._id
|
||||
else
|
||||
return true
|
||||
}
|
||||
|
||||
public removeShared(shared) {
|
||||
this.$q.dialog({
|
||||
message: 'Vuoi cancellare "' + shared.description + '" dalla tua lista ?',
|
||||
ok: {
|
||||
label: this.$t('dialog.yes'),
|
||||
push: true
|
||||
},
|
||||
cancel: {
|
||||
label: this.$t('dialog.cancel')
|
||||
},
|
||||
title: this.$t('pages.sharedwithus')
|
||||
}).onOk(async () => {
|
||||
|
||||
const descr = shared.description
|
||||
|
||||
// Aggiorna Record Personale
|
||||
UserStore.state.my.profile.myshares = UserStore.state.my.profile.myshares.filter((rec) => rec.description !== descr)
|
||||
|
||||
const mydata = {
|
||||
'profile.myshares': UserStore.state.my.profile.myshares
|
||||
}
|
||||
tools.saveFieldToServer(this, 'users', UserStore.state.my._id, mydata)
|
||||
|
||||
const updatedexistingrec = this.updaterecnow(shared.description, false)
|
||||
if (!updatedexistingrec) {
|
||||
if (this.checkifICanRemove(shared)) {
|
||||
const myrec = GlobalStore.state.sharewithus.find((rec) => rec.description.toLowerCase() === descr.toLowerCase())
|
||||
if (!!myrec) {
|
||||
GlobalStore.actions.DeleteRec({ table: tools.TABSHAREWITHUS, id: myrec._id })
|
||||
.then((ris) => {
|
||||
console.log('DELETEREC ris=', ris)
|
||||
if (ris) {
|
||||
|
||||
// Aggiorna Array Globale
|
||||
GlobalStore.state.sharewithus = GlobalStore.state.sharewithus.filter((rec) => rec.description !== descr)
|
||||
this.myload()
|
||||
|
||||
console.log('GlobalStore.state.sharewithus', GlobalStore.state.sharewithus)
|
||||
tools.showPositiveNotif(this.$q, this.$t('db.deletedrecord'))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
public findrec(descr) {
|
||||
if (UserStore.state.my.profile.myshares.length === 0)
|
||||
return false
|
||||
return UserStore.state.my.profile.myshares.find((rec) => rec.description.toLowerCase() === descr.toLowerCase())
|
||||
}
|
||||
|
||||
public mycolorbtn(shared) {
|
||||
if (this.findrec(shared.description)) {
|
||||
return 'positive'
|
||||
} else {
|
||||
return 'primary'
|
||||
}
|
||||
}
|
||||
|
||||
public geticon(shared) {
|
||||
if (this.findrec(shared.description))
|
||||
return undefined
|
||||
else
|
||||
return 'fas fa-plus'
|
||||
}
|
||||
|
||||
public getifdisable(shared) {
|
||||
return this.findrec(shared.description)
|
||||
}
|
||||
}
|
||||
91
src/components/CShareWithUs/CShareWithUs.vue
Executable file
91
src/components/CShareWithUs/CShareWithUs.vue
Executable file
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<CTitleBanner v-if="listasharewithus && listasharewithus.length > 0" class="q-pa-xs"
|
||||
:title="$t('pages.sharewithus')"
|
||||
bgcolor="bg-white" clcolor="text-blue"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
|
||||
|
||||
<div class="flex flex-center">
|
||||
|
||||
<div class="row animazione justify-center q-gutter-xs">
|
||||
|
||||
<q-item v-for="(shared, index) in listamyshare" :key="shared._id"
|
||||
class="q-mb-xs animated clBorderShare q-pa-sm" v-ripple>
|
||||
|
||||
<transition name="fade" mode="out-in"
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
|
||||
<div class="row">
|
||||
<q-item-section class="text-center">
|
||||
<q-item-label class="title">{{ shared.description }}</q-item-label>
|
||||
<!--<q-item-label class="title">Condiviso: {{ shared.numshared }}</q-item-label>
|
||||
<q-item-label class="title">Rating: {{ shared.rating }}</q-item-label>-->
|
||||
</q-item-section>
|
||||
<!--<q-rating v-model="shared.rating" :max="5" size="16px" @input="change_rating(shared.rating, shared)"/>-->
|
||||
|
||||
|
||||
</div>
|
||||
</transition>
|
||||
<q-btn class="q-ml-sm" round icon="fas fa-times" color="white" text-color="grey" size="sm" @click="removeShared(shared)"></q-btn>
|
||||
|
||||
</q-item>
|
||||
</div>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
Scrivi cosa vorresti fare con noi:<br>
|
||||
<div class="row no-wrap justify-between q-pa-md q-gutter-sm">
|
||||
|
||||
<q-input v-model="mydescr" label="Cosa vorresti fare?" class="full-width">
|
||||
</q-input>
|
||||
<q-btn rounded label="Aggiungi" color="positive" @click="add_newshare(mydescr)" :disable="mydescr === ''"></q-btn>
|
||||
</div>
|
||||
|
||||
<CTitleBanner v-if="listasharewithus && listasharewithus.length > 0" class="q-pa-xs"
|
||||
title="Graduatoria Attuale"
|
||||
bgcolor="bg-white" clcolor="text-blue"
|
||||
mystyle="" myclass="myshad" canopen="true">
|
||||
|
||||
|
||||
<div class="flex flex-center text-center">
|
||||
|
||||
<div class="animazione justify-center q-gutter-xs">
|
||||
|
||||
<q-item v-for="(shared, index) in listasharewithus" :key="shared._id"
|
||||
class="animated" style="padding: 4px;" v-ripple>
|
||||
|
||||
<transition name="fade" mode="out-in"
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
|
||||
<div class="row no-wrap">
|
||||
|
||||
<q-btn dense size="md" :color="mycolorbtn(shared)" rounded :icon="geticon(shared)" :label="shared.description + ` (` + (shared.numshared + 1) + `)`"
|
||||
@click="add_newshare(shared.description)"></q-btn>
|
||||
<!--<q-item-label class="title">Condiviso: {{ shared.numshared }}</q-item-label>
|
||||
<q-item-label class="title">Rating: {{ shared.rating }}</q-item-label>-->
|
||||
<!--<q-rating v-model="shared.rating" :max="5" size="16px" @input="change_rating(shared.rating, shared)"/>-->
|
||||
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
</q-item>
|
||||
</div>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CShareWithUs.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CShareWithUs.scss';
|
||||
</style>
|
||||
1
src/components/CShareWithUs/index.ts
Executable file
1
src/components/CShareWithUs/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CShareWithUs} from './CShareWithUs.vue'
|
||||
@@ -53,16 +53,19 @@
|
||||
:disable="$v.$error || iswaitingforRes">{{$t('login.enter')}}
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="static_data.functionality.ENABLE_REGISTRATION && showregbutt" align="center" style="margin-top:10px;">
|
||||
<q-btn flat rounded size="md" color="primary" to="/signup" :label="$t('reg.submit')">
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="text-center" style="margin-bottom: 10px;">
|
||||
<a :href="getlinkforgetpwd()" style="color:gray;">{{$t('reg.forgetpassword')}}</a>
|
||||
</div>
|
||||
|
||||
<div v-if="static_data.functionality.ENABLE_REGISTRATION && showregbutt" align="center" style="margin-top:10px;">
|
||||
Se non sei ancora Registrato:<br>
|
||||
<q-btn rounded size="md" color="primary" to="/signup" :label="$t('reg.submit')">
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ import { validationMixin } from 'vuelidate'
|
||||
import { Logo } from '../../components/logo'
|
||||
import { DefaultProfile } from '../../store/Modules/UserStore'
|
||||
|
||||
import 'vue-country-code/dist/vue-country-code.css'
|
||||
// import 'vue-country-code/dist/vue-country-code.css'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
@@ -117,6 +117,7 @@ export default class CSignUp extends MixinBase {
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
console.log('item', item)
|
||||
// console.log('errorMsg', cosa, item)
|
||||
if (item.$params.email && !item.email) {
|
||||
return this.$t('reg.err.email')
|
||||
@@ -157,6 +158,8 @@ export default class CSignUp extends MixinBase {
|
||||
}
|
||||
} else if (cosa === 'username') {
|
||||
// console.log(item);
|
||||
console.log('username')
|
||||
console.log(item.$error)
|
||||
if (!item.isUnique) {
|
||||
return this.$t('reg.err.duplicate_username')
|
||||
}
|
||||
@@ -176,9 +179,22 @@ export default class CSignUp extends MixinBase {
|
||||
}
|
||||
}
|
||||
|
||||
public changeemail(value) {
|
||||
this.signup.email = tools.removespaces(this.signup.email)
|
||||
this.signup.email = this.signup.email.toLowerCase()
|
||||
this.$emit('update:value', this.signup.email)
|
||||
}
|
||||
|
||||
public changeusername(value) {
|
||||
this.signup.username = tools.removespaces(this.signup.username)
|
||||
this.$emit('update:value', this.signup.username)
|
||||
}
|
||||
|
||||
public submitOk() {
|
||||
this.$v.signup.$touch()
|
||||
|
||||
this.signup.email = tools.removespaces(this.signup.email)
|
||||
this.signup.email = this.signup.email.toLowerCase()
|
||||
this.signup.username = tools.removespaces(this.signup.username)
|
||||
|
||||
this.duplicate_email = false
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
v-model="signup.email"
|
||||
rounded outlined
|
||||
@blur="$v.signup.email.$touch"
|
||||
@input="changeemail"
|
||||
:error="$v.signup.email.$error"
|
||||
:error-message="errorMsg('email', $v.signup.email)"
|
||||
maxlength="50"
|
||||
@@ -29,8 +30,11 @@
|
||||
<q-input
|
||||
v-model="signup.username"
|
||||
rounded outlined
|
||||
@input="changeusername"
|
||||
@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"
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import { ISignupIscrizioneConacreisOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
|
||||
|
||||
export interface ISignupConacreis {
|
||||
signup: ISignupIscrizioneConacreisOptions,
|
||||
validationGroup: string[]
|
||||
}
|
||||
|
||||
export const validations = {
|
||||
signup: {
|
||||
name: {
|
||||
required
|
||||
},
|
||||
surname: {
|
||||
required
|
||||
},
|
||||
email: {
|
||||
email,
|
||||
required
|
||||
},
|
||||
fiscalcode: {
|
||||
required,
|
||||
minLength: minLength(16)
|
||||
},
|
||||
residency_address: {
|
||||
required
|
||||
},
|
||||
residency_city: {
|
||||
required
|
||||
},
|
||||
residency_province: {
|
||||
required
|
||||
},
|
||||
residency_zipcode: {
|
||||
required
|
||||
},
|
||||
dateofbirth: {
|
||||
required
|
||||
},
|
||||
born_city: {
|
||||
required
|
||||
},
|
||||
born_province: {
|
||||
required
|
||||
},
|
||||
born_country: {
|
||||
required
|
||||
},
|
||||
metodo_pagamento: {
|
||||
required
|
||||
},
|
||||
terms: {
|
||||
required
|
||||
},
|
||||
}
|
||||
}
|
||||
34
src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.scss
Executable file
34
src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.scss
Executable file
@@ -0,0 +1,34 @@
|
||||
.signup {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.clCellCode {
|
||||
border-radius: 32px;
|
||||
border-right: #2d2260;
|
||||
height: 50px;
|
||||
font-size: 1rem;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.clCell {
|
||||
border-radius: 32px;
|
||||
border-right: #2d2260;
|
||||
height: 50px;
|
||||
font-size: 1rem;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.vue-country-select{
|
||||
border-radius: 32px;
|
||||
}
|
||||
|
||||
|
||||
198
src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.ts
Executable file
198
src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.ts
Executable file
@@ -0,0 +1,198 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { UserStore } from '@store'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
import { ISignupIscrizioneConacreisOptions } from 'model'
|
||||
import { validations, ISignupConacreis } from './CSignUpIscrizioneConacreis-validate'
|
||||
|
||||
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 { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
import VueCountryCode from 'vue-country-code'
|
||||
import { registereduser } from '../../validation'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
import { CTitleBanner } from '../CTitleBanner'
|
||||
import { CDate } from '../../components/CDate'
|
||||
import { date } from 'quasar'
|
||||
import { CMyPage } from '@src/components/CMyPage'
|
||||
import MixinUsers from '@src/mixins/mixin-users'
|
||||
|
||||
Vue.use(VueCountryCode)
|
||||
// import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
||||
|
||||
@Component({
|
||||
name: 'CSignUpIscrizioneConacreis',
|
||||
mixins: [validationMixin],
|
||||
validations,
|
||||
components: { Logo, CTitleBanner, CDate, CMyPage }
|
||||
})
|
||||
|
||||
export default class CSignUpIscrizioneConacreis extends MixinUsers {
|
||||
public $v
|
||||
public $q
|
||||
public $t: any
|
||||
public countryname: string = ''
|
||||
public countryborn: string = ''
|
||||
public iamadult: boolean = false
|
||||
|
||||
public duplicate_email: boolean = false
|
||||
public duplicate_username: boolean = false
|
||||
|
||||
public signup: ISignupIscrizioneConacreisOptions = {
|
||||
accetta_carta_costituzionale_on: false,
|
||||
newsletter_on: false,
|
||||
terms: false
|
||||
}
|
||||
|
||||
public created() {
|
||||
if (!!this.getMyUsername() && (!UserStore.state.my.profile.socio)) {
|
||||
this.signup.name = UserStore.state.my.name
|
||||
this.signup.surname = this.mySurname.toString()
|
||||
this.signup.email = this.Email
|
||||
this.signup.cell_phone = this.myCell.toString()
|
||||
}
|
||||
this.$v.$reset()
|
||||
}
|
||||
|
||||
get allowSubmit() {
|
||||
|
||||
const error = this.$v.$error || this.$v.$invalid
|
||||
|
||||
// console.log('v', this.$v, 'error', error, 'terms', this.signup.terms, 'carta', this.signup.accetta_carta_costituzionale_on)
|
||||
return !error && this.signup.terms && this.signup.accetta_carta_costituzionale_on
|
||||
}
|
||||
|
||||
public env() {
|
||||
return process.env
|
||||
}
|
||||
|
||||
public setDateOfBirth(param) {
|
||||
console.log('param', param)
|
||||
// this.signup.dateofbirth = tools.convertstrtoDate(arguments[0])
|
||||
this.signup.dateofbirth = new Date(arguments[0])
|
||||
}
|
||||
|
||||
public errorMsg(cosa: string, item: any) {
|
||||
try {
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
console.log('item', item)
|
||||
// console.log('errorMsg', cosa, item)
|
||||
if (item.$params.email && !item.email) {
|
||||
return this.$t('reg.err.email')
|
||||
}
|
||||
|
||||
// console.log('item', item)
|
||||
|
||||
if (item.minLength !== undefined) {
|
||||
if (!item.minLength) {
|
||||
return this.$t('reg.err.atleast') + ` ${item.$params.minLength.min} ` + this.$t('reg.err.char')
|
||||
}
|
||||
}
|
||||
if (item.complexity !== undefined) {
|
||||
if (!item.complexity) {
|
||||
return this.$t('reg.err.complexity')
|
||||
}
|
||||
}
|
||||
// if (!item.maxLength) { return this.$t('reg.err.notmore') + ` ${item.$params.maxLength.max} ` + this.$t('reg.err.char') }
|
||||
|
||||
if (item.required !== undefined) {
|
||||
if (!item.required) {
|
||||
return this.$t('reg.err.required')
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(' ....avanti')
|
||||
if (cosa === 'email') {
|
||||
// console.log("EMAIL " + item.isUnique);
|
||||
// console.log(item);
|
||||
if (!item.isUnique) {
|
||||
return this.$t('reg.err.duplicate_email')
|
||||
}
|
||||
} else if (cosa === 'username') {
|
||||
// console.log(item);
|
||||
console.log('username')
|
||||
console.log(item.$error)
|
||||
if (!item.isUnique) {
|
||||
return this.$t('reg.err.duplicate_username')
|
||||
}
|
||||
} else if ((cosa === 'name') || (cosa === 'surname')) {
|
||||
// console.log(item);
|
||||
}
|
||||
|
||||
return ''
|
||||
} catch (error) {
|
||||
// console.log("ERR : " + error);
|
||||
}
|
||||
}
|
||||
|
||||
public submitOk() {
|
||||
this.$v.signup.$touch()
|
||||
|
||||
this.signup.email = tools.removespaces(this.signup.email)
|
||||
this.signup.email = this.signup.email.toLowerCase()
|
||||
|
||||
this.signup.residency_country = tools.CapitalizeAllWords(this.signup.residency_country)
|
||||
this.signup.residency_address = tools.CapitalizeAllWords(this.signup.residency_address)
|
||||
this.signup.residency_city = tools.CapitalizeAllWords(this.signup.residency_city)
|
||||
this.signup.residency_province = this.signup.residency_province.toUpperCase()
|
||||
this.signup.born_province = this.signup.born_province.toUpperCase()
|
||||
|
||||
this.duplicate_email = false
|
||||
this.duplicate_username = false
|
||||
|
||||
if (!this.signup.terms) {
|
||||
tools.showNotif(this.$q, this.$t('reg.err.terms'))
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.signup.accetta_carta_costituzionale_on) {
|
||||
tools.showNotif(this.$q, this.$t('reg.err.accetta_carta_costituzionale_on'))
|
||||
return
|
||||
}
|
||||
|
||||
if (this.$v.signup.$error) {
|
||||
tools.showNotif(this.$q, this.$t('reg.err.errore_generico'))
|
||||
return
|
||||
}
|
||||
|
||||
this.signup.name = tools.CapitalizeAllWords(this.signup.name)
|
||||
this.signup.surname = tools.CapitalizeAllWords(this.signup.surname)
|
||||
this.signup.annoTesseramento = 2021
|
||||
|
||||
this.$q.loading.show({ message: this.$t('reg.iscrizioneincorso') })
|
||||
|
||||
console.log(this.signup)
|
||||
return UserStore.actions.iscrivitiConacreis(tools.clone(this.signup))
|
||||
.then((ris) => {
|
||||
if (tools.SignUpcheckErrors(this, ris.code, ris.msg))
|
||||
this.$q.loading.hide()
|
||||
}).catch((error) => {
|
||||
console.log('ERROR = ' + error)
|
||||
this.$q.loading.hide()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public selectcountry({ name, iso2, dialCode }) {
|
||||
// console.log(name, iso2, dialCode)
|
||||
this.signup.residency_country = name
|
||||
this.countryname = name
|
||||
}
|
||||
|
||||
public selectcountryborn({ name, iso2, dialCode }) {
|
||||
// console.log(name, iso2, dialCode)
|
||||
this.signup.born_country = name
|
||||
this.countryborn = name
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
299
src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.vue
Executable file
299
src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.vue
Executable file
@@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-center">
|
||||
<logo></logo>
|
||||
<CTitleBanner :title="$t('pages.SignUpIscrizione')" :canopen="true" :visible="false">
|
||||
|
||||
<div class="q-gutter-xs">
|
||||
|
||||
<p class="q-ml-md text-center">
|
||||
Leggi
|
||||
<span class="underline"> <router-link to="/il-nostro-progetto" custom v-slot="{ navigate }">
|
||||
<span class="footer_link" @click="navigate" @keypress.enter="navigate" role="link">Il Nostro Progetto</span>
|
||||
</router-link></span>
|
||||
</p>
|
||||
|
||||
|
||||
<q-input
|
||||
v-model="signup.name"
|
||||
rounded outlined
|
||||
@blur="$v.signup.name.$touch"
|
||||
:error="$v.signup.name.$error"
|
||||
maxlength="30"
|
||||
:error-message="errorMsg('name', $v.signup.name)"
|
||||
:label="$t('reg.name')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.surname"
|
||||
rounded outlined
|
||||
@blur="$v.signup.surname.$touch"
|
||||
:error="$v.signup.surname.$error"
|
||||
maxlength="30"
|
||||
:error-message="errorMsg('surname', $v.signup.surname)"
|
||||
:label="$t('reg.surname')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.email"
|
||||
rounded outlined
|
||||
@blur="$v.signup.email.$touch"
|
||||
:error="$v.signup.email.$error"
|
||||
:error-message="errorMsg('email', $v.signup.email)"
|
||||
maxlength="50"
|
||||
debounce="1000"
|
||||
:label="$t('reg.email')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.fiscalcode"
|
||||
rounded outlined
|
||||
@blur="$v.signup.fiscalcode.$touch"
|
||||
:error="$v.signup.fiscalcode.$error"
|
||||
maxlength="20"
|
||||
mask="AAAAAA##A##A###A"
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('fiscalcode', $v.signup.fiscalcode)"
|
||||
:label="$t('reg.fiscalcode')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.residency_address"
|
||||
rounded outlined
|
||||
@blur="$v.signup.residency_address.$touch"
|
||||
:error="$v.signup.residency_address.$error"
|
||||
maxlength="60"
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('residency_address', $v.signup.residency_address)"
|
||||
:label="$t('reg.residency_address')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.residency_city"
|
||||
rounded outlined
|
||||
@blur="$v.signup.residency_city.$touch"
|
||||
:error="$v.signup.residency_city.$error"
|
||||
maxlength="60"
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('residency_city', $v.signup.residency_city)"
|
||||
:label="$t('reg.residency_city')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.residency_province"
|
||||
rounded outlined
|
||||
@blur="$v.signup.residency_province.$touch"
|
||||
:error="$v.signup.residency_province.$error"
|
||||
maxlength="3"
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('residency_province', $v.signup.residency_province)"
|
||||
:label="$t('reg.residency_province')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.residency_zipcode"
|
||||
rounded outlined
|
||||
@blur="$v.signup.residency_zipcode.$touch"
|
||||
:error="$v.signup.residency_zipcode.$error"
|
||||
maxlength="10"
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('residency_zipcode', $v.signup.residency_zipcode)"
|
||||
:label="$t('reg.residency_zipcode')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded outlined
|
||||
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<vue-country-code
|
||||
@onSelect="selectcountry"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }"
|
||||
>
|
||||
|
||||
</vue-country-code>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
|
||||
<vue-tel-input
|
||||
v-model="signup.cell_phone"
|
||||
:placeholder="$t('reg.cell')"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
:enabledCountryCode="true"
|
||||
inputClasses="clCell"
|
||||
wrapperClasses="clCellCode">
|
||||
</vue-tel-input>
|
||||
|
||||
<br>
|
||||
|
||||
<q-input
|
||||
v-model="signup.dateofbirth"
|
||||
debounce="1000"
|
||||
@blur="$v.signup.dateofbirth.$touch"
|
||||
:error="$v.signup.dateofbirth.$error"
|
||||
:error-message="errorMsg('dateofbirth', $v.signup.dateofbirth)"
|
||||
stack-label
|
||||
:label="$t('reg.dateofbirth')"
|
||||
rounded
|
||||
type="date"
|
||||
mask="date"
|
||||
fill-mask
|
||||
outlined>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.born_city"
|
||||
rounded outlined
|
||||
@blur="$v.signup.born_city.$touch"
|
||||
:error="$v.signup.born_city.$error"
|
||||
maxlength="60"
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('born_city', $v.signup.born_city)"
|
||||
:label="$t('reg.born_city')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="signup.born_province"
|
||||
rounded outlined
|
||||
@blur="$v.signup.born_province.$touch"
|
||||
:error="$v.signup.born_province.$error"
|
||||
maxlength="3"
|
||||
debounce="1000"
|
||||
:error-message="errorMsg('born_province', $v.signup.born_province)"
|
||||
:label="$t('reg.born_province')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<!--<CDate :mydate="signup.dateofbirth" @input="setDateOfBirth(arguments[0])"
|
||||
:rounded="true" :outlined="true"
|
||||
:dense="false"
|
||||
:label="$t('reg.dateofbirth')">
|
||||
</CDate>-->
|
||||
|
||||
|
||||
<q-input
|
||||
v-model="countryborn"
|
||||
:readonly="true"
|
||||
rounded outlined
|
||||
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality_born')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<vue-country-code
|
||||
@onSelect="selectcountryborn"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }"
|
||||
>
|
||||
|
||||
</vue-country-code>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
|
||||
<!--<div v-if="!tools.isMobile()"><br></div>-->
|
||||
|
||||
|
||||
<q-select
|
||||
rounded outlined v-model="signup.metodo_pagamento"
|
||||
:options="tools.SelectMetodiPagamento"
|
||||
:label="$t('reg.metodopagamento')" emit-value map-options>
|
||||
</q-select>
|
||||
|
||||
<q-checkbox
|
||||
v-model="signup.accetta_carta_costituzionale_on"
|
||||
color="secondary">
|
||||
<span v-html="$t('reg.accetta_carta_costituzionale_on')"></span>
|
||||
</q-checkbox>
|
||||
|
||||
<q-checkbox
|
||||
v-model="signup.terms"
|
||||
color="secondary"
|
||||
@blur="$v.signup.terms.$touch"
|
||||
:error="$v.signup.terms.$error"
|
||||
:error-message="`${errorMsg('terms', $v.signup.terms)}`"
|
||||
:label="$t('reg.terms')">
|
||||
|
||||
</q-checkbox>
|
||||
|
||||
|
||||
<div class="wrapper">
|
||||
<q-btn rounded size="lg" color="positive" @click="submitOk" :disabled='!allowSubmit'
|
||||
:label="$t('reg.iscriviti')">
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSignUpIscrizioneConacreis.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CSignUpIscrizioneConacreis.scss';
|
||||
</style>
|
||||
1
src/components/CSignUpIscrizioneConacreis/index.ts
Executable file
1
src/components/CSignUpIscrizioneConacreis/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CSignUpIscrizioneConacreis} from './CSignUpIscrizioneConacreis.vue'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user