SubAccounts !
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user