diff --git a/src/components/CMyDashboard/CMyDashboard-validate.ts b/src/components/CMyDashboard/CMyDashboard-validate.ts new file mode 100755 index 0000000..e4f1ed7 --- /dev/null +++ b/src/components/CMyDashboard/CMyDashboard-validate.ts @@ -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 + } +} diff --git a/src/components/CMyNave/CMyNave-validate.ts b/src/components/CMyNave/CMyNave-validate.ts new file mode 100755 index 0000000..528f948 --- /dev/null +++ b/src/components/CMyNave/CMyNave-validate.ts @@ -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 + } +} diff --git a/src/rootgen/admin/sendpushnotif/sendpushnotif.scss b/src/rootgen/admin/sendpushnotif/sendpushnotif.scss new file mode 100755 index 0000000..e69de29 diff --git a/src/rootgen/admin/sendpushnotif/sendpushnotif.ts b/src/rootgen/admin/sendpushnotif/sendpushnotif.ts new file mode 100755 index 0000000..7551cb3 --- /dev/null +++ b/src/rootgen/admin/sendpushnotif/sendpushnotif.ts @@ -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) + } +} diff --git a/src/rootgen/admin/sendpushnotif/sendpushnotif.vue b/src/rootgen/admin/sendpushnotif/sendpushnotif.vue new file mode 100755 index 0000000..e78b50a --- /dev/null +++ b/src/rootgen/admin/sendpushnotif/sendpushnotif.vue @@ -0,0 +1,46 @@ + + + + diff --git a/src/rootgen/sito_offline/sito_offline.scss b/src/rootgen/sito_offline/sito_offline.scss new file mode 100755 index 0000000..e69de29 diff --git a/src/rootgen/sito_offline/sito_offline.ts b/src/rootgen/sito_offline/sito_offline.ts new file mode 100755 index 0000000..78736b1 --- /dev/null +++ b/src/rootgen/sito_offline/sito_offline.ts @@ -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 { +} diff --git a/src/rootgen/sito_offline/sito_offline.vue b/src/rootgen/sito_offline/sito_offline.vue new file mode 100755 index 0000000..8824874 --- /dev/null +++ b/src/rootgen/sito_offline/sito_offline.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/views/user/profile_sip/profile_sip.scss b/src/views/user/profile_sip/profile_sip.scss new file mode 100755 index 0000000..eccfdb6 --- /dev/null +++ b/src/views/user/profile_sip/profile_sip.scss @@ -0,0 +1,5 @@ +.profile { + width: 100%; + margin: 0 auto; + max-width: 450px; +} diff --git a/src/views/user/profile_sip/profile_sip.ts b/src/views/user/profile_sip/profile_sip.ts new file mode 100755 index 0000000..1ae2c6f --- /dev/null +++ b/src/views/user/profile_sip/profile_sip.ts @@ -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')) + + }) + }) + }) + } + +} diff --git a/src/views/user/profile_sip/profile_sip.vue b/src/views/user/profile_sip/profile_sip.vue new file mode 100755 index 0000000..1076274 --- /dev/null +++ b/src/views/user/profile_sip/profile_sip.vue @@ -0,0 +1,134 @@ + + + + +