SubAccounts !
This commit is contained in:
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
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
0
src/rootgen/admin/sendpushnotif/sendpushnotif.scss
Executable file
0
src/rootgen/admin/sendpushnotif/sendpushnotif.scss
Executable file
99
src/rootgen/admin/sendpushnotif/sendpushnotif.ts
Executable file
99
src/rootgen/admin/sendpushnotif/sendpushnotif.ts
Executable file
@@ -0,0 +1,99 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
|
||||
import { CGridTableRec } from '@components'
|
||||
import { CMyPage } from '../../../components/CMyPage/index'
|
||||
import { fieldsTable, func } from '@src/store/Modules/fieldsTable'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { GlobalStore, UserStore } from '../../../store/Modules'
|
||||
|
||||
@Component({
|
||||
components: { CMyPage }
|
||||
})
|
||||
|
||||
export default class Sendpushnotif extends Vue {
|
||||
public $t
|
||||
public incaricamento: boolean = false
|
||||
|
||||
public title: string = ''
|
||||
public content: string = ''
|
||||
public openUrl: string = ''
|
||||
public openUrl2: string = ''
|
||||
public opz1: string = ''
|
||||
public opz2: string = ''
|
||||
public tag: string = ''
|
||||
public actiontype: number = shared_consts.TypeMsg_Actions.NORMAL
|
||||
|
||||
public created() {
|
||||
this.title = this.$t('ws.sitename')
|
||||
this.openUrl = '/'
|
||||
this.openUrl2 = ''
|
||||
this.tag = 'msg'
|
||||
}
|
||||
|
||||
get shared_consts() {
|
||||
return shared_consts
|
||||
}
|
||||
|
||||
public async SendMsg(params) {
|
||||
this.$q.dialog({
|
||||
message: this.$t('dialog.continue') + ' ' + params.content + ' ?',
|
||||
cancel: {
|
||||
label: this.$t('dialog.cancel')
|
||||
},
|
||||
ok: {
|
||||
label: this.$t('dialog.yes'),
|
||||
push: true
|
||||
},
|
||||
title: params.title
|
||||
}).onOk(async () => {
|
||||
|
||||
this.incaricamento = true
|
||||
this.$q.loading.show({ message: this.$t('otherpages.update') })
|
||||
|
||||
const ris = await GlobalStore.actions.sendPushNotif({ params })
|
||||
|
||||
this.$q.loading.hide()
|
||||
|
||||
this.incaricamento = false
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
public SendMsgToParam(typemsg) {
|
||||
const param = {
|
||||
typemsg,
|
||||
title: this.title,
|
||||
content: this.content,
|
||||
openUrl: this.openUrl,
|
||||
openUrl2: this.openUrl2,
|
||||
tag: this.tag,
|
||||
actions: []
|
||||
}
|
||||
|
||||
param.actions = []
|
||||
|
||||
if (this.actiontype === shared_consts.TypeMsg_Actions.YESNO) {
|
||||
param.actions = [
|
||||
{ action: 'confirm', title: 'Si', icon: '/statics/icons/opz1-icon-96x96.png' },
|
||||
{ action: 'cancel', title: 'No', icon: '/statics/icons/opz2-icon-96x96.png' }
|
||||
]
|
||||
} else if (this.actiontype === shared_consts.TypeMsg_Actions.OPZ1_2) {
|
||||
param.actions = [
|
||||
{ action: 'opz1', title: this.opz1, icon: '/statics/icons/opz1-icon-96x96.png' },
|
||||
{ action: 'opz2', title: this.opz2, icon: '/statics/icons/opz2-icon-96x96.png' }
|
||||
]
|
||||
}
|
||||
|
||||
// action: A DOMString identifying a user action to be displayed on the notification.
|
||||
// title: A DOMString containing action text to be shown to the user.
|
||||
// icon: A USVString containing the URL of an icon to display with the action.
|
||||
|
||||
return this.SendMsg(param)
|
||||
}
|
||||
|
||||
public SendMsgToAll() {
|
||||
this.SendMsgToParam(shared_consts.TypeMsg.SEND_TO_ALL)
|
||||
}
|
||||
}
|
||||
46
src/rootgen/admin/sendpushnotif/sendpushnotif.vue
Executable file
46
src/rootgen/admin/sendpushnotif/sendpushnotif.vue
Executable file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<CMyPage img="" title="Invio Push Notifiche" keywords="" description="">
|
||||
<div class="q-ma-sm">
|
||||
<div class="row center_img clBorderSteps" style="max-width: 600px;">
|
||||
<div class="row">
|
||||
<q-input v-model="title" autofocus label="Titolo" style="width: 300px;"></q-input>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input v-model="content" type="textarea" autofocus label="Contenuto"
|
||||
input-class="myinput-area"
|
||||
style="height: 100px; width: 500px;"></q-input>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input v-model="openUrl" autofocus label="openUrl" style="width: 200px;"></q-input>
|
||||
<q-input v-model="openUrl2" autofocus label="openUrl2" style="width: 200px;"></q-input>
|
||||
<q-input v-model="tag" autofocus label="tag" style="width: 100px;"></q-input>
|
||||
</div>
|
||||
<q-select
|
||||
rounded outlined v-model="actiontype"
|
||||
:options="shared_consts.selectActions"
|
||||
label="Tipo Msg" emit-value map-options>
|
||||
</q-select>
|
||||
<div v-if="actiontype === shared_consts.TypeMsg_Actions.OPZ1_2" class="row">
|
||||
<q-input v-model="opz1" autofocus label="Opzione 1" style="width: 100px;"></q-input>
|
||||
<q-input v-model="opz2" autofocus label="Opzione 2" style="width: 100px;"></q-input>
|
||||
</div>
|
||||
<br />
|
||||
<div class="">
|
||||
<q-btn label="Invia Msg a Tutti" color="primary" @click="SendMsgToAll()"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<q-inner-loading id="spinner" :showing="incaricamento">
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em">
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./sendpushnotif.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './sendpushnotif.scss';
|
||||
</style>
|
||||
0
src/rootgen/sito_offline/sito_offline.scss
Executable file
0
src/rootgen/sito_offline/sito_offline.scss
Executable file
19
src/rootgen/sito_offline/sito_offline.ts
Executable file
19
src/rootgen/sito_offline/sito_offline.ts
Executable file
@@ -0,0 +1,19 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
|
||||
import { Screen } from 'quasar'
|
||||
|
||||
import { colmypage } from '../../store/Modules/fieldsTable'
|
||||
|
||||
import { CImgText } from '../../components/CImgText/index'
|
||||
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
|
||||
import MixinMetaTags from '../../mixins/mixin-metatags'
|
||||
import MixinBase from '../../mixins/mixin-base'
|
||||
|
||||
@Component({
|
||||
mixins: [MixinBase],
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner }
|
||||
})
|
||||
export default class Sito_offline extends MixinMetaTags {
|
||||
}
|
||||
29
src/rootgen/sito_offline/sito_offline.vue
Executable file
29
src/rootgen/sito_offline/sito_offline.vue
Executable file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<CMyPage img="statics/images/logo.png" title="Sito in Aggiornamento" sizes="max-height: 150px">
|
||||
<span>{{ setmeta({
|
||||
title: 'Pagine',
|
||||
description: "",
|
||||
keywords: '' } ) }}
|
||||
</span>
|
||||
|
||||
<div class="q-gutter-sm flex-center text-h5 text-center">
|
||||
<div class="">Il Sito è attualmente in fase di Aggiornamento! </div>
|
||||
<div class="">Si prega di riprovare più tardi. </div>
|
||||
<div class="">Grazie</div>
|
||||
|
||||
<div class="">
|
||||
<q-btn rounded type="a" to="/" color="primary" icon="event" size="lg"
|
||||
label="Riprova">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<br><br><br><br>
|
||||
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./sito_offline.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './sito_offline';
|
||||
</style>
|
||||
5
src/views/user/profile_sip/profile_sip.scss
Executable file
5
src/views/user/profile_sip/profile_sip.scss
Executable file
@@ -0,0 +1,5 @@
|
||||
.profile {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
67
src/views/user/profile_sip/profile_sip.ts
Executable file
67
src/views/user/profile_sip/profile_sip.ts
Executable file
@@ -0,0 +1,67 @@
|
||||
import { Component, Mixins, Prop, Watch } from 'vue-property-decorator'
|
||||
import MixinBase from '../../../mixins/mixin-base'
|
||||
import { CMyFieldDb, CTitleBanner, CProfile, CStatus } from '@components'
|
||||
import { UserStore } from '../../../store/Modules'
|
||||
import { GlobalStore } from '../../../store'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
|
||||
@Component({
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CStatus }
|
||||
})
|
||||
|
||||
export default class Profile_sip extends MixinBase {
|
||||
public $v
|
||||
public $q
|
||||
|
||||
get mythis() {
|
||||
return this
|
||||
}
|
||||
|
||||
get getpayment() {
|
||||
return UserStore.state.my.profile.paymenttypes
|
||||
}
|
||||
|
||||
get profile() {
|
||||
return UserStore.state.my.profile
|
||||
}
|
||||
|
||||
public eliminaAccount() {
|
||||
|
||||
this.$q.dialog({
|
||||
message: this.$t('reg.cancellami', { sitename: this.$t('ws.sitename') }),
|
||||
cancel: {
|
||||
label: this.$t('dialog.cancel')
|
||||
},
|
||||
ok: {
|
||||
label: this.$t('dialog.yes'),
|
||||
push: true
|
||||
},
|
||||
title: this.$t('pages.profile')
|
||||
}).onOk(async () => {
|
||||
this.$q.dialog({
|
||||
message: this.$t('reg.cancellami_2', { sitename: this.$t('ws.sitename') }),
|
||||
cancel: {
|
||||
label: this.$t('dialog.cancel')
|
||||
},
|
||||
ok: {
|
||||
label: this.$t('dialog.yes'),
|
||||
push: true
|
||||
},
|
||||
title: this.$t('pages.profile')
|
||||
})
|
||||
.onOk(async () => {
|
||||
GlobalStore.actions.DeleteRec({ table: tools.TABUSER, id: UserStore.state.my._id })
|
||||
.then((ris) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif(this.$q, this.$t('reg.account_cancellato'))
|
||||
UserStore.actions.logout()
|
||||
this.$router.replace('/')
|
||||
} else
|
||||
tools.showNegativeNotif(this.$q, this.$t('db.recfailed'))
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
134
src/views/user/profile_sip/profile_sip.vue
Executable file
134
src/views/user/profile_sip/profile_sip.vue
Executable file
@@ -0,0 +1,134 @@
|
||||
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
||||
<div class="q-gutter-sm q-pa-xs q-pb-md">
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.profile')" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
|
||||
|
||||
<div class="column">
|
||||
<div class="row">
|
||||
<CMyFieldDb :title="$t('reg.name')"
|
||||
table="users"
|
||||
mykey="name"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.surname')"
|
||||
table="users"
|
||||
mykey="surname"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb :title="$t('reg.username')"
|
||||
table="users"
|
||||
mykey="username"
|
||||
disable="true"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.email')"
|
||||
table="users"
|
||||
mykey="email"
|
||||
disable="true"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<CMyFieldDb :title="$t('reg.nationality')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="nationality"
|
||||
:type="tools.FieldType.nationality">
|
||||
</CMyFieldDb>
|
||||
<div class="row">
|
||||
<CMyFieldDb :title="$t('reg.intcode_cell')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="intcode_cell"
|
||||
:type="tools.FieldType.intcode">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.cell')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="cell"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<!--<CMyFieldDb :title="$t('reg.username_telegram')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="username_telegram"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>-->
|
||||
<!--<CMyFieldDb title="Telegram Id"
|
||||
table="users"
|
||||
:readonly="true"
|
||||
mykey="profile"
|
||||
mysubkey="teleg_id"
|
||||
:type="tools.FieldType.number">
|
||||
</CMyFieldDb>-->
|
||||
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('otherpages.biografia')" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
|
||||
<CMyFieldDb :title="$t('profile.chisei')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="chisei"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb :title="$t('profile.iltuoimpegno')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="iltuoimpegno"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb :title="$t('profile.come_aiutare')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="come_aiutare"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('otherpages.modifprof')" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
|
||||
<div class="row justify-center">
|
||||
<q-btn push
|
||||
rounded
|
||||
color="primary"
|
||||
size="md"
|
||||
to="/requestresetpwd"
|
||||
:label="$t('reg.modificapassword')">
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('reg.cancella_account')" bgcolor="bg-secondary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true" :visible="false">
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn rounded size="md" color="negative" @click="eliminaAccount"
|
||||
:label="$t('reg.cancella_account')">
|
||||
</q-btn>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</CTitleBanner>
|
||||
|
||||
<br/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./profile_sip.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './profile_sip.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user