- aggiornato sistema per inviare le newsletter !
This commit is contained in:
@@ -634,6 +634,14 @@
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-btn
|
||||
label="AbilitaNewsletterALL"
|
||||
color="primary"
|
||||
@click="EseguiFunz('AbilitaNewsletterALL')"
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./dbop.ts">
|
||||
</script>
|
||||
|
||||
@@ -38,7 +38,10 @@ export default defineComponent({
|
||||
// console.log('load')
|
||||
param.value = { em: $route.query.em, mc: $route.query.mc, locale: tools.getLocale() }
|
||||
console.log('idlink = ', param.value)
|
||||
return userStore.unsubscribe(param.value)
|
||||
const vecchio_sistema = false;
|
||||
let ris = null;
|
||||
ris = userStore.unsubscribe(param.value)
|
||||
return ris
|
||||
.then((ris: any) => {
|
||||
riscode.value = ris.code
|
||||
risultato.value = ris.msg
|
||||
|
||||
6
src/views/unsubscribe_user/unsubscribe_user.scss
Executable file
6
src/views/unsubscribe_user/unsubscribe_user.scss
Executable file
@@ -0,0 +1,6 @@
|
||||
.mypanel {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
|
||||
}
|
||||
|
||||
63
src/views/unsubscribe_user/unsubscribe_user.ts
Executable file
63
src/views/unsubscribe_user/unsubscribe_user.ts
Executable file
@@ -0,0 +1,63 @@
|
||||
import { serv_constants } from '@store/Modules/serv_constants'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
import { computed, defineComponent, ref } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'unsubscribe_user',
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const $route = useRoute()
|
||||
|
||||
const risultato = ref('...')
|
||||
const riscode = ref(0)
|
||||
const param = ref(<any>null)
|
||||
|
||||
const disiscritto = computed(() => {
|
||||
return riscode.value === serv_constants.RIS_UNSUBSCRIBED_OK
|
||||
})
|
||||
|
||||
const errore = computed(() => {
|
||||
return riscode.value !== serv_constants.RIS_UNSUBSCRIBED_OK
|
||||
})
|
||||
|
||||
const email = computed(() => {
|
||||
return $route.query.email
|
||||
})
|
||||
|
||||
function load() {
|
||||
// console.log('load')
|
||||
param.value = { em: $route.query.em, mc: $route.query.mc, locale: tools.getLocale(), email: $route.query.email }
|
||||
console.log('idlink = ', param.value)
|
||||
let ris = null;
|
||||
ris = userStore.unsubscribe_news_on_fielduser(param.value)
|
||||
return ris
|
||||
.then((ris: any) => {
|
||||
riscode.value = ris.code
|
||||
risultato.value = ris.msg
|
||||
|
||||
}).catch((err: any) => {
|
||||
console.log('ERR = ' + err)
|
||||
})
|
||||
}
|
||||
|
||||
load()
|
||||
|
||||
return {
|
||||
disiscritto,
|
||||
errore,
|
||||
email,
|
||||
risultato,
|
||||
param,
|
||||
}
|
||||
}
|
||||
})
|
||||
57
src/views/unsubscribe_user/unsubscribe_user.vue
Executable file
57
src/views/unsubscribe_user/unsubscribe_user.vue
Executable file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<q-page v-if="param && param.em" padding class="vreg">
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<span class="mybanner"
|
||||
>{{
|
||||
$t(
|
||||
'components.authentication.email_verification.title_unsubscribe'
|
||||
)
|
||||
}}: {{ email }}</span
|
||||
>
|
||||
</q-banner>
|
||||
<br />
|
||||
|
||||
<transition
|
||||
enter-active-class="animated fadeIn"
|
||||
leave-active-class="animated fadeOut"
|
||||
appear
|
||||
>
|
||||
<div>
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
style="text-align: center"
|
||||
v-if="errore"
|
||||
>
|
||||
<span class="mybanner">{{ risultato }}</span>
|
||||
</q-banner>
|
||||
<q-banner
|
||||
class="bg-positive text-white"
|
||||
style="text-align: center"
|
||||
rounded
|
||||
v-if="disiscritto"
|
||||
>
|
||||
<span class="mybanner">{{
|
||||
$t(
|
||||
'components.authentication.email_verification.title_unsubscribe_done'
|
||||
)
|
||||
}}</span>
|
||||
</q-banner>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./unsubscribe_user.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './unsubscribe_user.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user