other components... (2)
This commit is contained in:
@@ -1,59 +1,80 @@
|
||||
import { defineComponent, onMounted, ref } from 'vue'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
|
||||
@Component({})
|
||||
export default class TableOnlyView extends Vue {
|
||||
public loading: boolean = false
|
||||
|
||||
public serverPagination: {
|
||||
page: number,
|
||||
rowsNumber: number // specifying this determines pagination is server-side
|
||||
} = {page: 1, rowsNumber: 10}
|
||||
|
||||
public serverData: any [] = []
|
||||
|
||||
public columns: any[] = [
|
||||
{
|
||||
name: 'chiave',
|
||||
required: true,
|
||||
label: 'Chiave',
|
||||
align: 'left',
|
||||
field: 'chiave',
|
||||
sortable: true,
|
||||
},
|
||||
{ name: 'valore', label: 'Valore', field: 'valore', sortable: false },
|
||||
]
|
||||
|
||||
public filter: string = ''
|
||||
|
||||
public selected: any[] = []
|
||||
|
||||
public request(props) {
|
||||
this.loading = true
|
||||
setTimeout(() => {
|
||||
this.serverPagination = props.pagination
|
||||
let table = this.$refs.table,
|
||||
rows = GlobalStore.state.cfgServer.slice(),
|
||||
{ page, rowsPerPage, sortBy, descending } = props.pagination
|
||||
|
||||
// if (props.filter) {
|
||||
// rows = table.filterMethod(rows, props.filter)
|
||||
// }
|
||||
// if (sortBy) {
|
||||
// rows = table.sortMethod(rows, sortBy, descending)
|
||||
// }
|
||||
|
||||
this.serverPagination.rowsNumber = rows.length
|
||||
if (rowsPerPage) {
|
||||
rows = rows.slice((page - 1) * rowsPerPage, page * rowsPerPage)
|
||||
}
|
||||
this.serverData = rows
|
||||
this.loading = false
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.request({
|
||||
pagination: this.serverPagination,
|
||||
filter: this.filter,
|
||||
})
|
||||
}
|
||||
interface IPagination {
|
||||
page: number,
|
||||
rowsNumber: number // specifying this determines pagination is server-side
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TableOnlyView',
|
||||
components: {},
|
||||
props: {},
|
||||
setup(props) {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
const serverPagination = ref(<IPagination> { page: 1, rowsNumber: 10 })
|
||||
|
||||
const serverData = ref(<any>[])
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
name: 'chiave',
|
||||
required: true,
|
||||
label: 'Chiave',
|
||||
align: 'left',
|
||||
field: 'chiave',
|
||||
sortable: true,
|
||||
},
|
||||
{ name: 'valore', label: 'Valore', field: 'valore', sortable: false },
|
||||
])
|
||||
|
||||
const filter = ''
|
||||
|
||||
const selected: any[] = []
|
||||
|
||||
function request(myprops: any) {
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
serverPagination.value = myprops.pagination
|
||||
|
||||
let rows = globalStore.cfgServer.slice(),
|
||||
{ page, rowsPerPage, sortBy, descending } = myprops.pagination
|
||||
|
||||
// if (props.filter) {
|
||||
// rows = table.filterMethod(rows, props.filter)
|
||||
// }
|
||||
// if (sortBy) {
|
||||
// rows = table.sortMethod(rows, sortBy, descending)
|
||||
// }
|
||||
|
||||
serverPagination.value.rowsNumber = rows.length
|
||||
if (rowsPerPage) {
|
||||
rows = rows.slice((page - 1) * rowsPerPage, page * rowsPerPage)
|
||||
}
|
||||
serverData.value = rows
|
||||
loading.value = false
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
request({
|
||||
pagination: serverPagination,
|
||||
filter: filter,
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
columns,
|
||||
selected,
|
||||
serverPagination,
|
||||
serverData,
|
||||
filter,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
@request="request"
|
||||
:loading="loading"
|
||||
>
|
||||
<template v-slot:top-right="props" >
|
||||
|
||||
<q-search hide-underline v-model="filter" />
|
||||
<!--<template v-slot:top-right="props" >
|
||||
<q-search hide-underline v-model="filter" />
|
||||
</template>
|
||||
</template>-->
|
||||
</q-table>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
@@ -24,9 +24,9 @@ export default defineComponent({
|
||||
paginationControl: {
|
||||
type: Object as PropType<IPageSrv>,
|
||||
required: true,
|
||||
default() {
|
||||
/*default() {
|
||||
return { page: 1, rowsPerPage: 20 }
|
||||
},
|
||||
},*/
|
||||
},
|
||||
pagination: {
|
||||
type: Object as PropType<IPageS>,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CDateTime } from '../../../components/CDateTime'
|
||||
import { CMyFieldDb } from '../../../components/CMyFieldDb'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useUserStore } from '@store/userStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
@@ -25,7 +25,7 @@ export default defineComponent({
|
||||
const placca = ref('')
|
||||
const incaricamento = ref(false)
|
||||
|
||||
async function EseguiFunz(miafunz: string) {
|
||||
function EseguiFunz(miafunz: string) {
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineComponent, PropType, ref } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import CTitleBanner from '@/components/CTitleBanner/CTitleBanner'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
6
src/views/email/unsubscribe/unsubscribe.scss
Executable file
6
src/views/email/unsubscribe/unsubscribe.scss
Executable file
@@ -0,0 +1,6 @@
|
||||
.mypanel {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
|
||||
}
|
||||
|
||||
76
src/views/email/unsubscribe/unsubscribe.ts
Executable file
76
src/views/email/unsubscribe/unsubscribe.ts
Executable file
@@ -0,0 +1,76 @@
|
||||
import { serv_constants } from '@store/Modules/serv_constants'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
import { 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',
|
||||
props: {
|
||||
mystr: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
myval: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
mybool: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const $route = useRoute()
|
||||
|
||||
const risultato = ref('...')
|
||||
const riscode = ref(0)
|
||||
|
||||
function disiscritto() {
|
||||
return riscode.value === serv_constants.RIS_UNSUBSCRIBED_OK
|
||||
}
|
||||
|
||||
function errore() {
|
||||
return riscode.value !== serv_constants.RIS_UNSUBSCRIBED_OK
|
||||
}
|
||||
|
||||
function email() {
|
||||
return $route.query.email
|
||||
}
|
||||
|
||||
function load() {
|
||||
// console.log('load')
|
||||
let param
|
||||
param = { em: $route.query.em, mc: $route.query.mc, locale: tools.getLocale() }
|
||||
console.log('idlink = ', param)
|
||||
return userStore.unsubscribe(param)
|
||||
.then((ris: any) => {
|
||||
riscode.value = ris.code
|
||||
risultato.value = ris.msg
|
||||
|
||||
}).catch((err) => {
|
||||
console.log('ERR = ' + err)
|
||||
})
|
||||
}
|
||||
|
||||
load()
|
||||
|
||||
return {
|
||||
disiscritto,
|
||||
errore,
|
||||
email,
|
||||
risultato,
|
||||
}
|
||||
}
|
||||
})
|
||||
48
src/views/email/unsubscribe/unsubscribe.vue
Executable file
48
src/views/email/unsubscribe/unsubscribe.vue
Executable file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<q-page 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
|
||||
|
||||
>
|
||||
|
||||
<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>
|
||||
</transition>
|
||||
|
||||
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./unsubscribe.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './unsubscribe.scss';
|
||||
</style>
|
||||
2
src/views/index.ts
Executable file
2
src/views/index.ts
Executable file
@@ -0,0 +1,2 @@
|
||||
export * from './admin/cfgServer'
|
||||
export * from './admin/extralist'
|
||||
12
src/views/login/iscrizioneconacreis/iscrizioneconacreis.scss
Executable file
12
src/views/login/iscrizioneconacreis/iscrizioneconacreis.scss
Executable file
@@ -0,0 +1,12 @@
|
||||
.signup {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
43
src/views/login/iscrizioneconacreis/iscrizioneconacreis.ts.off
Executable file
43
src/views/login/iscrizioneconacreis/iscrizioneconacreis.ts.off
Executable file
@@ -0,0 +1,43 @@
|
||||
import { defineComponent, ref, computed } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
import { CMyPage } from '../../../components/CMyPage'
|
||||
import { Footer } from '../../../components/Footer'
|
||||
import { CTitleBanner } from '../../../components/CTitleBanner'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Iscrizioneconacreis',
|
||||
props: {
|
||||
mystr: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
myval: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
mybool: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: { CSignUpIscrizioneConacreis, CMyPage, Footer, CTitleBanner },
|
||||
setup(props, { emit }) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
function isSocio() {
|
||||
return userStore.my.profile.socio
|
||||
}
|
||||
|
||||
return {
|
||||
isSocio,
|
||||
}
|
||||
}
|
||||
})
|
||||
26
src/views/login/iscrizioneconacreis/iscrizioneconacreis.vue.off
Executable file
26
src/views/login/iscrizioneconacreis/iscrizioneconacreis.vue.off
Executable file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<CMyPage mypath="/diventa_socio">
|
||||
</CMyPage>
|
||||
|
||||
<CTitleBanner v-if="isSocio()" title="Nota: Ci risulta che sei già Socio Iscritto !"
|
||||
bgcolor="bg-positive"
|
||||
clcolor="text-white"></CTitleBanner>
|
||||
|
||||
<q-page padding>
|
||||
<div class="signup">
|
||||
<CSignUpIscrizioneConacreis>
|
||||
|
||||
</CSignUpIscrizioneConacreis>
|
||||
</div>
|
||||
|
||||
<Footer></Footer>
|
||||
</q-page>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./iscrizioneconacreis.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './iscrizioneconacreis.scss';
|
||||
</style>
|
||||
90
src/views/login/logoData.ts
Executable file
90
src/views/login/logoData.ts
Executable file
@@ -0,0 +1,90 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
Digitalizer: `<g>
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M259.476,280.364V247.5c0-12.958-10.542-23.5-23.5-23.5s-23.5,10.542-23.5,23.5v29.672 c0,35.757-13.173,70.087-37.094,96.665l-32.981,36.646c-2.771,3.079-2.521,7.821,0.558,10.593c3.078,2.771,7.82,2.521,10.592-0.558 l32.981-36.646c26.403-29.338,40.944-67.231,40.944-106.7V247.5c0-4.687,3.813-8.5,8.5-8.5s8.5,3.813,8.5,8.5v32.864 c0,44.003-16.301,86.167-45.901,118.727l-32.149,35.364c-2.786,3.064-2.56,7.809,0.505,10.595c1.437,1.307,3.242,1.95,5.042,1.95 c2.04,0,4.072-0.827,5.552-2.455l32.148-35.364C241.789,373.854,259.476,328.106,259.476,280.364z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M291.476,247.5c0-30.603-24.897-55.5-55.5-55.5s-55.5,24.897-55.5,55.5v29.672c0,27.839-10.256,54.566-28.879,75.258 l-23.447,26.053c-2.771,3.079-2.521,7.821,0.558,10.593c3.079,2.771,7.82,2.519,10.592-0.558l23.447-26.053 c21.106-23.451,32.73-53.742,32.73-85.293V247.5c0-22.332,18.168-40.5,40.5-40.5c22.332,0,40.5,18.168,40.5,40.5v32.864 c0,51.979-19.256,101.789-54.223,140.252l-27.125,29.839c-2.787,3.064-2.561,7.809,0.504,10.595c1.437,1.307,3.242,1.95,5.042,1.95 c2.04,0,4.072-0.827,5.552-2.455l27.126-29.839c37.481-41.23,58.123-94.622,58.123-150.342V247.5z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M323.476,247.5c0-48.248-39.252-87.5-87.5-87.5s-87.5,39.252-87.5,87.5v29.672c0,19.92-7.339,39.045-20.665,53.851 l-21.112,23.458c-2.771,3.079-2.521,7.821,0.558,10.593c3.078,2.771,7.821,2.519,10.592-0.558l21.112-23.458 c15.809-17.565,24.515-40.254,24.515-63.886V247.5c0-39.977,32.523-72.5,72.5-72.5s72.5,32.523,72.5,72.5v32.864 c0,59.958-22.212,117.412-62.545,161.777l-7.507,8.258c-2.786,3.065-2.56,7.809,0.505,10.595c1.437,1.306,3.243,1.95,5.042,1.95 c2.04,0,4.072-0.827,5.552-2.455l7.506-8.258c42.848-47.133,66.446-108.169,66.446-171.867V247.5z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M116.476,247.5c0,4.143,3.358,7.5,7.5,7.5s7.5-3.357,7.5-7.5c0-25.255,9.169-49.651,25.819-68.695 c16.495-18.867,39.134-31.205,63.746-34.741c4.1-0.589,6.946-4.391,6.357-8.49c-0.589-4.1-4.394-6.942-8.49-6.357 c-28.16,4.046-54.052,18.15-72.906,39.716C126.962,190.71,116.476,218.613,116.476,247.5z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M131.476,277.172c0-4.143-3.358-7.5-7.5-7.5s-7.5,3.357-7.5,7.5c0,12.002-4.421,23.523-12.449,32.443l-18.779,20.867 c-2.771,3.078-2.521,7.82,0.558,10.592c1.434,1.29,3.227,1.925,5.015,1.925c2.052,0,4.097-0.838,5.577-2.483l18.779-20.866 C125.687,307.971,131.476,292.886,131.476,277.172z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M340.755,344.123c-4.009-1.044-8.105,1.351-9.155,5.357c-2.769,10.579-6.213,21.096-10.24,31.258 c-1.526,3.851,0.359,8.21,4.21,9.735c0.907,0.359,1.841,0.529,2.761,0.529c2.985,0,5.808-1.795,6.975-4.739 c4.249-10.725,7.884-21.822,10.806-32.986C347.16,349.271,344.761,345.172,340.755,344.123z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M315.791,158.632c-3.081-2.771-7.823-2.517-10.592,0.563s-2.517,7.822,0.563,10.591 c22.061,19.832,34.713,48.157,34.713,77.714v32.864c0,12.473-0.86,25.042-2.557,37.359c-0.565,4.104,2.303,7.888,6.406,8.453 c0.347,0.048,0.692,0.071,1.033,0.071c3.688,0,6.903-2.722,7.42-6.478c1.79-12.993,2.698-26.251,2.698-39.406V247.5 C355.476,213.695,341.011,181.304,315.791,158.632z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M280.729,153.076c1.041,0.496,2.138,0.73,3.219,0.73c2.803,0,5.492-1.579,6.777-4.278c1.781-3.739,0.192-8.215-3.547-9.995 c-10.806-5.145-22.291-8.616-34.136-10.317c-4.106-0.585-7.901,2.258-8.49,6.357s2.257,7.901,6.357,8.49 C261.257,145.55,271.289,148.582,280.729,153.076z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M235.976,96c-2.806,0-5.644,0.078-8.437,0.232c-4.136,0.228-7.304,3.766-7.076,7.901c0.229,4.136,3.763,7.321,7.902,7.075 c2.519-0.139,5.079-0.209,7.61-0.209c75.266,0,136.5,61.233,136.5,136.5v32.864c0,4.143,3.358,7.5,7.5,7.5s7.5-3.357,7.5-7.5V247.5 C387.476,163.963,319.513,96,235.976,96z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M153.972,136.693c1.477,0,2.97-0.436,4.275-1.343c12.478-8.677,26.182-15.155,40.733-19.258 c3.987-1.124,6.308-5.268,5.184-9.254s-5.269-6.304-9.254-5.184c-16.16,4.556-31.376,11.749-45.226,21.379 c-3.401,2.365-4.241,7.039-1.876,10.439C149.265,135.57,151.599,136.693,153.972,136.693z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M99.476,277.172V247.5c0-34.89,13.213-68.118,37.205-93.565c2.841-3.014,2.702-7.76-0.312-10.602 s-7.761-2.701-10.602,0.312C99.14,171.886,84.476,208.77,84.476,247.5v29.672c0,4.083-1.504,8.002-4.234,11.035l-9.248,10.275 c-2.771,3.079-2.521,7.821,0.558,10.592c1.433,1.291,3.227,1.926,5.015,1.926c2.052,0,4.096-0.837,5.577-2.482l9.248-10.275 C96.605,292.449,99.476,284.966,99.476,277.172z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M409.951,189.104c-8.226-24.446-21.299-46.531-38.856-65.642c-2.803-3.05-7.547-3.252-10.597-0.449 c-3.05,2.803-3.251,7.547-0.449,10.598c16.127,17.554,28.134,37.834,35.686,60.276c1.054,3.133,3.976,5.11,7.107,5.11 c0.793,0,1.6-0.127,2.393-0.394C409.16,197.282,411.272,193.029,409.951,189.104z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M295.247,73.822c-3.917-1.341-8.183,0.748-9.524,4.668c-1.341,3.919,0.749,8.183,4.668,9.523 c16.538,5.659,32.065,13.857,46.15,24.369c1.347,1.005,2.92,1.489,4.48,1.489c2.286,0,4.544-1.041,6.017-3.015 c2.478-3.319,1.794-8.019-1.525-10.496C330.176,88.916,313.264,79.986,295.247,73.822z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M119.442,125.908C150.991,95.659,192.377,79,235.976,79c8.096,0,16.237,0.583,24.196,1.731 c4.103,0.598,7.903-2.252,8.495-6.352c0.592-4.1-2.251-7.902-6.351-8.494C253.648,64.635,244.786,64,235.976,64 c-47.487,0-92.56,18.141-126.915,51.081c-34.248,32.838-54.277,76.905-56.397,124.084c-0.186,4.138,3.018,7.644,7.155,7.829 c0.115,0.006,0.229,0.008,0.343,0.008c3.987,0,7.306-3.14,7.487-7.163C69.594,196.527,87.988,156.066,119.442,125.908z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M235.976,32c-16.772,0-33.485,1.944-49.674,5.778c-4.031,0.954-6.524,4.996-5.57,9.026c0.955,4.03,4.997,6.524,9.027,5.569 C204.817,48.809,220.366,47,235.976,47c54.996,0,106.332,21.911,144.55,61.695c1.473,1.533,3.439,2.305,5.41,2.305 c1.869,0,3.741-0.694,5.195-2.091c2.987-2.87,3.083-7.618,0.213-10.604c-19.913-20.729-43.304-37.036-69.522-48.465 C294.666,38.002,265.783,32,235.976,32z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M67.507,125.404c1.372,1.074,3.001,1.595,4.619,1.595c2.227,0,4.431-0.987,5.91-2.876 c21.375-27.302,49.515-48.717,81.377-61.932c3.826-1.587,5.642-5.975,4.055-9.801s-5.977-5.644-9.801-4.055 c-34.241,14.201-64.478,37.21-87.441,66.539C63.672,118.137,64.246,122.851,67.507,125.404z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M131.983,38.725c1.094,0,2.205-0.24,3.255-0.748C166.816,22.73,200.709,15,235.976,15c18.378,0,36.682,2.162,54.401,6.426 c4.025,0.966,8.077-1.51,9.046-5.537c0.969-4.027-1.51-8.078-5.538-9.047C275.019,2.302,255.535,0,235.976,0 c-37.544,0-73.631,8.232-107.259,24.469c-3.73,1.801-5.294,6.285-3.493,10.015C126.517,37.163,129.195,38.725,131.983,38.725z" />
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M321.724,31.383c7.732,3.079,15.385,6.619,22.746,10.52c1.119,0.594,2.321,0.875,3.505,0.875 c2.688,0,5.287-1.449,6.633-3.99c1.939-3.66,0.545-8.199-3.115-10.139c-7.837-4.153-15.986-7.922-24.22-11.201 c-3.849-1.533-8.21,0.345-9.743,4.192C315.998,25.488,317.876,29.851,321.724,31.383z" />
|
||||
</svg>`,
|
||||
Keytronic:
|
||||
`<g>
|
||||
<g>
|
||||
<path fill="none" stroke-width="6" d="M478.665,72c0-39.704-32.296-72-72-72c-19.704,0-38.496,8.184-52,22.288C341.161,8.184,322.369,0,302.665,0 c-39.704,0-72,32.296-72,72c0,24.752,12.456,47.36,33.376,60.688L275.353,144L134.665,284.688l-26.344-26.344 c-3.128-3.128-8.184-3.128-11.312,0l-32,32c-3.128,3.128-3.128,8.184,0,11.312L91.353,328l-12.688,12.688l-26.344-26.344 c-3.128-3.128-8.184-3.128-11.312,0l-33,33c-3.128,3.128-3.128,8.184,0,11.312L34.353,385L4.345,415.008 c-3.128,3.128-3.128,8.184,0,11.312l52,52c1.56,1.56,3.608,2.344,5.656,2.344s4.096-0.784,5.656-2.344l51.008-51.008 l26.344,26.344c3.128,3.128,8.184,3.128,11.312,0l40-40c3.128-3.128,3.128-8.184,0-11.312L169.977,376l168.688-168.688 l7.312,7.312C359.305,235.544,381.913,248,406.665,248c39.704,0,72-32.296,72-72c0-19.704-8.184-38.496-22.288-52 C470.481,110.496,478.665,91.704,478.665,72z M462.665,176c0,30.872-25.128,56-56,56c-19.488,0-37.272-9.944-47.584-26.6 c-0.328-0.52-0.712-1.008-1.152-1.448l-13.608-13.608c-3.128-3.128-8.184-3.128-11.312,0l-180,180 c-3.128,3.128-3.128,8.184,0,11.312L179.353,408l-28.688,28.688l-26.344-26.344c-3.128-3.128-8.184-3.128-11.312,0l-51.008,51.008 l-40.688-40.688l30.008-30.008c3.128-3.128,3.128-8.184,0-11.312L24.977,353l21.688-21.688l26.344,26.344 c3.128,3.128,8.184,3.128,11.312,0l24-24c3.128-3.128,3.128-8.184,0-11.312L81.977,296l20.688-20.688l26.344,26.344 c3.128,3.128,8.184,3.128,11.312,0l152-152c3.128-3.128,3.128-8.184,0-11.312l-17.608-17.608c-0.44-0.44-0.92-0.824-1.448-1.152 c-16.656-10.312-26.6-28.096-26.6-47.584c0-30.872,25.128-56,56-56c17.96,0,34.968,8.768,45.504,23.456c3,4.184,10,4.184,13,0 C371.697,24.768,388.705,16,406.665,16c30.872,0,56,25.128,56,56c0,17.96-8.768,34.968-23.456,45.504 c-2.096,1.504-3.336,3.92-3.336,6.496s1.24,5,3.336,6.496C453.897,141.032,462.665,158.04,462.665,176z" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect fill="none" stroke-width="6" x="173.811" y="228.009" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -91.1265 252.0189)" width="169.678" height="16" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect fill="none" stroke-width="6" x="163.35" y="311.983" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -175.1045 217.2252)" width="22.624" height="16" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="none" stroke-width="6" d="M406.665,40c-17.648,0-32,14.352-32,32s14.352,32,32,32s32-14.352,32-32S424.313,40,406.665,40z M406.665,88 c-8.824,0-16-7.176-16-16s7.176-16,16-16c8.824,0,16,7.176,16,16S415.489,88,406.665,88z" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect fill="none" stroke-width="6" x="310.663" y="92.674" transform="matrix(0.7071 -0.7071 0.7071 0.7071 19.8046 255.7854)" width="16" height="22.624" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect fill="none" stroke-width="6" x="342.661" y="124.674" transform="matrix(0.7071 -0.7071 0.7071 0.7071 6.5493 287.7842)" width="16" height="22.624" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<rect fill="none" stroke-width="6" x="374.659" y="156.674" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -6.706 319.7831)" width="16" height="22.624" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="none" stroke-width="6" d="M470.665,344h-14.032c-0.44-1.112-0.896-2.216-1.392-3.328l9.928-9.928c3.128-3.128,3.128-8.184,0-11.312l-33.936-33.936 c-3.128-3.128-8.184-3.128-11.312,0l-9.928,9.928c-1.112-0.496-2.216-0.952-3.328-1.392V280c0-4.424-3.576-8-8-8h-48 c-4.424,0-8,3.576-8,8v14.032c-1.112,0.44-2.216,0.896-3.328,1.392l-9.928-9.928c-3.128-3.128-8.184-3.128-11.312,0 l-33.936,33.936c-3.128,3.128-3.128,8.184,0,11.312l9.928,9.928c-0.496,1.112-0.952,2.216-1.392,3.328h-14.032 c-4.424,0-8,3.576-8,8v48c0,4.424,3.576,8,8,8h14.032c0.44,1.112,0.896,2.216,1.392,3.328l-9.928,9.928 c-3.128,3.128-3.128,8.184,0,11.312l33.936,33.936c3.128,3.128,8.184,3.128,11.312,0l9.928-9.928 c1.112,0.496,2.216,0.952,3.328,1.392V472c0,4.424,3.576,8,8,8h48c4.424,0,8-3.576,8-8v-14.032 c1.112-0.44,2.216-0.896,3.328-1.392l9.928,9.928c3.128,3.128,8.184,3.128,11.312,0l33.936-33.936 c3.128-3.128,3.128-8.184,0-11.312l-9.928-9.928c0.496-1.112,0.952-2.216,1.392-3.328h14.032c4.424,0,8-3.576,8-8v-48 C478.665,347.576,475.089,344,470.665,344z M462.665,392h-11.672c-3.496,0-6.576,2.264-7.632,5.592 c-1.216,3.864-2.856,7.8-4.88,11.672c-1.616,3.104-1.032,6.888,1.44,9.36l8.288,8.288l-22.624,22.624l-8.288-8.288 c-2.472-2.472-6.256-3.056-9.36-1.44c-3.872,2.024-7.808,3.664-11.672,4.88c-3.336,1.064-5.6,4.144-5.6,7.64V464h-32v-11.672 c0-3.496-2.264-6.576-5.592-7.632c-3.864-1.216-7.8-2.856-11.672-4.88c-3.104-1.616-6.88-1.032-9.36,1.44l-8.288,8.288 l-22.624-22.624l8.288-8.288c2.472-2.472,3.056-6.256,1.44-9.36c-2.024-3.872-3.664-7.808-4.88-11.672 c-1.064-3.336-4.144-5.6-7.64-5.6h-11.672v-32h11.672c3.496,0,6.576-2.264,7.632-5.592c1.216-3.864,2.856-7.8,4.88-11.672 c1.616-3.104,1.032-6.888-1.44-9.36l-8.288-8.288l22.624-22.624l8.288,8.288c2.48,2.48,6.256,3.048,9.36,1.44 c3.872-2.024,7.808-3.664,11.672-4.88c3.336-1.064,5.6-4.144,5.6-7.64V288h32v11.672c0,3.496,2.264,6.576,5.592,7.632 c3.864,1.216,7.8,2.856,11.672,4.88c3.104,1.608,6.888,1.04,9.36-1.44l8.288-8.288l22.624,22.624l-8.288,8.288 c-2.472,2.472-3.056,6.256-1.44,9.36c2.024,3.872,3.664,7.808,4.88,11.672c1.064,3.336,4.144,5.6,7.64,5.6h11.672V392z" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="none" stroke-width="6" d="M374.665,328c-26.472,0-48,21.528-48,48s21.528,48,48,48s48-21.528,48-48S401.137,328,374.665,328z M374.665,408 c-17.648,0-32-14.352-32-32s14.352-32,32-32s32,14.352,32,32S392.313,408,374.665,408z" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="none" stroke-width="6" d="M54.665,168h-16c0,13.232-10.768,24-24,24v16c13.232,0,24,10.768,24,24h16c0-13.232,10.768-24,24-24v-16 C65.433,192,54.665,181.232,54.665,168z M46.665,208.248c-2.336-3.144-5.104-5.912-8.248-8.248 c3.144-2.336,5.912-5.104,8.248-8.248c2.336,3.144,5.104,5.912,8.248,8.248C51.769,202.336,49.001,205.104,46.665,208.248z" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="none" stroke-width="6" d="M150.665,120h-16c0,13.232-10.768,24-24,24v16c13.232,0,24,10.768,24,24h16c0-13.232,10.768-24,24-24v-16 C161.433,144,150.665,133.232,150.665,120z M142.665,160.248c-2.336-3.144-5.104-5.912-8.248-8.248 c3.144-2.336,5.912-5.104,8.248-8.248c2.336,3.144,5.104,5.912,8.248,8.248C147.769,154.336,145.001,157.104,142.665,160.248z" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="none" stroke-width="6" d="M70.665,48h-16c0,13.232-10.768,24-24,24v16c13.232,0,24,10.768,24,24h16c0-13.232,10.768-24,24-24V72 C81.433,72,70.665,61.232,70.665,48z M62.665,88.248c-2.336-3.144-5.104-5.912-8.248-8.248c3.144-2.336,5.912-5.104,8.248-8.248 c2.336,3.144,5.104,5.912,8.248,8.248C67.769,82.336,65.001,85.104,62.665,88.248z" stroke="#FFFFFF"/>
|
||||
</g>
|
||||
</g>
|
||||
`,
|
||||
Molectron: `
|
||||
<path stroke="#FFFFFF" fill="none" stroke-width="6" d="m398.559,166.02c-8.85-3.404-18.292-6.493-28.22-9.265 2.563-9.984 4.609-19.706 6.087-29.073 7.689-48.757-0.808-82.959-23.925-96.306-6.72-3.88-14.443-5.848-22.954-5.848-26.882,0-60.85,19.965-95.118,53.681-7.486-7.352-15.006-14.105-22.502-20.167-38.379-31.038-72.25-40.781-95.365-27.434-14.856,8.577-23.891,26.093-26.126,50.652-0.376,4.125 2.664,7.773 6.789,8.148 4.138,0.382 7.772-2.664 8.148-6.789 1.238-13.594 5.484-31.398 18.688-39.021 17.11-9.881 45.699-0.365 78.434,26.106 7.143,5.776 14.314,12.217 21.461,19.233-14.373,15.293-28.676,32.894-42.41,52.347-24.16,2.199-47.172,5.888-68.291,10.948-3.698-14.376-6.238-28.093-7.491-40.827-0.405-4.122-4.059-7.134-8.198-6.729-4.122,0.405-7.135,4.076-6.729,8.198 1.326,13.474 4.008,27.966 7.917,43.133-9.596,2.706-18.73,5.712-27.311,9.012-46.072,17.72-71.443,42.18-71.443,68.873s25.371,51.153 71.441,68.872c8.85,3.404 18.292,6.493 28.22,9.265-2.563,9.984-4.609,19.706-6.087,29.073-7.689,48.757 0.808,82.959 23.925,96.306 6.72,3.88 14.443,5.848 22.954,5.848 26.573,0 60.071-19.516 93.938-52.531 7.255,7.086 14.54,13.609 21.803,19.482 27.161,21.966 52.059,33.266 72.489,33.265 8.438-0.001 16.119-1.93 22.876-5.831 23.117-13.347 31.614-47.549 23.925-96.306-1.477-9.366-3.523-19.087-6.086-29.07 15.439-4.252 29.64-9.26 42.218-14.96 3.773-1.71 5.445-6.154 3.735-9.927-1.71-3.773-6.155-5.446-9.927-3.735-11.912,5.398-25.377,10.15-40.042,14.192-6.063-20.261-14.137-41.412-23.976-62.808 10.281-22.122 18.685-44.004 24.943-64.936 55.665,15.586 88.651,40.202 88.651,63.801 0,15.247-13.296,27.827-24.45,35.694-3.385,2.388-4.193,7.067-1.806,10.452 2.388,3.386 7.067,4.193 10.452,1.806 20.153-14.215 30.804-30.797 30.804-47.952 0-26.693-25.371-51.153-71.441-68.872zm-69.013-125.491c5.844,7.10543e-15 11.044,1.291 15.454,3.838 17.112,9.88 23.166,39.396 16.607,80.979-1.405,8.907-3.35,18.159-5.789,27.669-21.207-5.028-44.299-8.68-68.532-10.835-13.596-19.242-27.866-36.839-42.375-52.253 2.655-2.618 5.312-5.158 7.964-7.602 29.252-26.953 56.48-41.796 76.671-41.796zm-95.096,60.152c11.317,12.062 22.5,25.517 33.323,40.102-10.769-0.587-21.712-0.891-32.773-0.891-11.431,0-22.738,0.321-33.855,0.947 10.808-14.56 22.006-28.07 33.305-40.158zm-.053,269.657c-11.718-12.42-23.296-26.341-34.486-41.466 11.514,0.674 23.234,1.02 35.089,1.02 11.419,0 22.732-0.333 33.871-0.969-11.18,15.064-22.777,29.01-34.474,41.415zm.603-55.446c-16.115,0-31.578-0.624-46.314-1.784-8.277-12.076-16.284-24.78-23.907-37.984-7.503-12.995-14.405-26.107-20.657-39.155 6.49-13.661 13.707-27.412 21.596-41.077 7.64-13.232 15.75-26.063 24.177-38.307 14.374-1.099 29.429-1.693 45.105-1.693 15.273,0 29.956,0.564 43.994,1.609 8.434,12.267 16.59,25.185 24.349,38.623 7.85,13.597 15.034,27.279 21.5,40.873-6.219,12.942-13.091,25.957-20.56,38.894-7.625,13.207-15.72,26.015-24.13,38.239-14.716,1.158-29.83,1.762-45.153,1.762zm-65.615-3.655c-18.453-2.132-35.582-5.129-51.205-8.81 4.744-15.789 10.758-32.16 17.929-48.79 4.898,9.688 10.128,19.373 15.679,28.987 5.668,9.818 11.549,19.371 17.597,28.613zm1.19-152.829c-6.111,9.318-12.078,18.991-17.847,28.984-5.933,10.276-11.499,20.61-16.677,30.928-7.543-17.318-13.858-34.376-18.788-50.749 16.203-3.859 34.042-6.983 53.312-9.163zm-155.575,76.484c0-23.472 32.634-47.951 87.757-63.55 6.235,20.802 14.601,42.62 24.805,64.647-9.813,21.362-17.865,42.477-23.913,62.705-55.663-15.587-88.649-40.203-88.649-63.802zm125.454,194.363c-5.844,0-11.044-1.291-15.454-3.838-17.112-9.88-23.166-39.396-16.607-80.979 1.405-8.907 3.35-18.159 5.789-27.669 20.518,4.865 42.8,8.441 66.173,10.619 13.951,19.807 28.618,37.883 43.53,53.648-2.254,2.201-4.509,4.348-6.76,6.423-29.252,26.954-56.48,41.796-76.671,41.796zm220.214-84.584c6.559,41.583 0.505,71.099-16.607,80.979-17.113,9.879-45.699,0.364-78.434-26.106-6.893-5.574-13.814-11.767-20.712-18.499 14.761-15.578 29.462-33.603 43.563-53.579 23.432-2.151 45.822-5.697 66.389-10.509 2.445,9.526 4.394,18.793 5.801,27.714zm-9.83-42.153c-16.064,3.733-33.311,6.67-51.339,8.745 6.085-9.283 12.027-18.918 17.773-28.871 5.517-9.556 10.713-19.161 15.579-28.757 7.195,16.66 13.228,33.063 17.987,48.883zm-17.918-84.145c-5.152-10.259-10.688-20.532-16.587-30.749-5.818-10.078-11.859-19.878-18.077-29.348 19.355,2.146 37.276,5.243 53.564,9.081-4.955,16.493-11.302,33.623-18.9,51.016z"/>
|
||||
<path stroke="#FFFFFF" fill="none" stroke-width="6" d="m235,197.392c-20.678,0-37.5,16.822-37.5,37.5s16.822,37.5 37.5,37.5 37.5-16.822 37.5-37.5-16.822-37.5-37.5-37.5zm0,60c-12.406,0-22.5-10.094-22.5-22.5s10.094-22.5 22.5-22.5 22.5,10.094 22.5,22.5-10.094,22.5-22.5,22.5z"/>
|
||||
`
|
||||
|
||||
}
|
||||
0
src/views/login/regok/regok.scss
Executable file
0
src/views/login/regok/regok.scss
Executable file
24
src/views/login/regok/regok.ts
Executable file
24
src/views/login/regok/regok.ts
Executable file
@@ -0,0 +1,24 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Regok',
|
||||
components: { Footer },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
|
||||
function isEmailVerified() {
|
||||
if (userStore.my)
|
||||
return userStore.my.verified_email
|
||||
else
|
||||
return false
|
||||
}
|
||||
|
||||
return {
|
||||
isEmailVerified,
|
||||
}
|
||||
},
|
||||
})
|
||||
55
src/views/login/regok/regok.vue
Executable file
55
src/views/login/regok/regok.vue
Executable file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<q-page padding class="vreg">
|
||||
<div class="q-">
|
||||
<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('reg.reg_ok')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
<div class="text-center">
|
||||
<q-icon name="fas fa-exclamation-triangle" color="warning" size="md"></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
<q-banner
|
||||
v-if="!isEmailVerified"
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<div class="mybanner" v-html="$t('components.authentication.email_verification.link_sent', {botname: $t('site.botname') })">
|
||||
|
||||
</div>
|
||||
|
||||
</q-banner>
|
||||
<br>
|
||||
<q-banner
|
||||
v-if="!isEmailVerified"
|
||||
rounded
|
||||
class="bg-warning text-black"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<div class="mybanner" v-html="$t('components.authentication.email_verification.se_non_ricevo')">
|
||||
|
||||
</div>
|
||||
|
||||
</q-banner>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<Footer></Footer>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./regok.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './regok.scss';
|
||||
</style>
|
||||
5
src/views/login/signin/signin.scss
Executable file
5
src/views/login/signin/signin.scss
Executable file
@@ -0,0 +1,5 @@
|
||||
.signin {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
14
src/views/login/signin/signin.ts
Executable file
14
src/views/login/signin/signin.ts
Executable file
@@ -0,0 +1,14 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import { CSigninNoreg } from '@/components/CSigninNoreg'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Signin',
|
||||
components: { CSigninNoreg },
|
||||
props: {},
|
||||
setup() {
|
||||
|
||||
return {
|
||||
}
|
||||
},
|
||||
})
|
||||
15
src/views/login/signin/signin.vue
Executable file
15
src/views/login/signin/signin.vue
Executable file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<q-page padding class="signin">
|
||||
<CSigninNoreg :showregbutt="true">
|
||||
|
||||
</CSigninNoreg>
|
||||
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./signin.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './signin.scss';
|
||||
</style>
|
||||
5
src/views/login/signin_noreg/signin_noreg.scss
Executable file
5
src/views/login/signin_noreg/signin_noreg.scss
Executable file
@@ -0,0 +1,5 @@
|
||||
.signin {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
14
src/views/login/signin_noreg/signin_noreg.ts
Executable file
14
src/views/login/signin_noreg/signin_noreg.ts
Executable file
@@ -0,0 +1,14 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import { CSigninNoreg } from '@/components/CSigninNoreg'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'SigninNoreg',
|
||||
components: { CSigninNoreg },
|
||||
props: {},
|
||||
setup() {
|
||||
|
||||
return {
|
||||
}
|
||||
},
|
||||
})
|
||||
13
src/views/login/signin_noreg/signin_noreg.vue
Executable file
13
src/views/login/signin_noreg/signin_noreg.vue
Executable file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<q-page padding class="signin">
|
||||
<CSigninNoreg :showregbutt="false">
|
||||
</CSigninNoreg>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./signin_noreg.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './signin_noreg.scss';
|
||||
</style>
|
||||
37
src/views/login/signup/signup-validate.ts
Executable file
37
src/views/login/signup/signup-validate.ts
Executable file
@@ -0,0 +1,37 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from '@vuelidate/validators'
|
||||
import { complexity, registeredemail, registereduser } from '@src/validation'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
|
||||
export interface TSignup { signup: ISignupOptions, validationGroup: string[] }
|
||||
|
||||
export const validations = {
|
||||
signup: {
|
||||
repeatPassword: {
|
||||
required,
|
||||
sameAsPassword: sameAs('password'),
|
||||
},
|
||||
password: {
|
||||
complexity,
|
||||
required,
|
||||
},
|
||||
username: {
|
||||
registereduser,
|
||||
required,
|
||||
},
|
||||
name: {
|
||||
required,
|
||||
},
|
||||
surname: {
|
||||
required,
|
||||
},
|
||||
email: {
|
||||
email,
|
||||
registeredemail,
|
||||
required,
|
||||
},
|
||||
terms: {
|
||||
required,
|
||||
},
|
||||
},
|
||||
}
|
||||
12
src/views/login/signup/signup.scss
Executable file
12
src/views/login/signup/signup.scss
Executable file
@@ -0,0 +1,12 @@
|
||||
.signup {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
35
src/views/login/signup/signup.ts
Executable file
35
src/views/login/signup/signup.ts
Executable file
@@ -0,0 +1,35 @@
|
||||
import { computed, defineComponent, ref, watch } from 'vue'
|
||||
import { CSignUp } from '../../../components/CSignUp'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Signup',
|
||||
components: { CSignUp },
|
||||
props: {},
|
||||
setup() {
|
||||
const route = useRoute()
|
||||
|
||||
const adult = ref(false)
|
||||
const invited = computed(() => route.params.invited)
|
||||
|
||||
// @ts-ignore
|
||||
watch(invited, (newval, oldval) => {
|
||||
console.log('$route.params.invited')
|
||||
adult.value = !!route.params.invited
|
||||
})
|
||||
|
||||
function created() {
|
||||
// if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, ''))
|
||||
// tools.setCookie(tools.APORTADOR_SOLIDARIO, $route.params.invited)
|
||||
}
|
||||
|
||||
created()
|
||||
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
14
src/views/login/signup/signup.vue
Executable file
14
src/views/login/signup/signup.vue
Executable file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<q-page padding class="signup">
|
||||
<CSignUp :showcell="true">
|
||||
|
||||
</CSignUp>
|
||||
</q-page>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./signup.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './signup.scss';
|
||||
</style>
|
||||
6
src/views/login/vreg/vreg.scss
Executable file
6
src/views/login/vreg/vreg.scss
Executable file
@@ -0,0 +1,6 @@
|
||||
.mypanel {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
|
||||
}
|
||||
|
||||
78
src/views/login/vreg/vreg.ts
Executable file
78
src/views/login/vreg/vreg.ts
Executable file
@@ -0,0 +1,78 @@
|
||||
import { defineComponent, ref } from 'vue'
|
||||
|
||||
import { serv_constants } from '../../../store/Modules/serv_constants'
|
||||
|
||||
import './vreg.scss'
|
||||
import { ICallResult, ILinkReg } from '../../../model/other'
|
||||
import { CSigninNoreg } from '../../../components/CSigninNoreg'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Vreg',
|
||||
components: { CSigninNoreg },
|
||||
|
||||
setup(props) {
|
||||
const $q = useQuasar()
|
||||
const route = useRoute()
|
||||
const $router = useRouter()
|
||||
const { t } = useI18n()
|
||||
const globalStore = useGlobalStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const risultato = ref('---')
|
||||
const riscode = ref(0)
|
||||
|
||||
function myrisultato() {
|
||||
return risultato
|
||||
}
|
||||
|
||||
function giaverificato() {
|
||||
return riscode.value !== serv_constants.RIS_CODE_EMAIL_VERIFIED
|
||||
}
|
||||
|
||||
function verificatook() {
|
||||
return riscode.value === serv_constants.RIS_CODE_EMAIL_VERIFIED
|
||||
}
|
||||
|
||||
function load() {
|
||||
// console.log('load')
|
||||
let param: ILinkReg
|
||||
param = { idlink: route.query.idlink!.toString() }
|
||||
console.log('idlink = ', param)
|
||||
return userStore.vreg(param)
|
||||
.then((ris: any) => {
|
||||
riscode.value = ris.code
|
||||
risultato.value = ris.msg
|
||||
console.log('RIS = ', ris)
|
||||
|
||||
if (verificatook()) {
|
||||
setTimeout(() => {
|
||||
$router.replace('/signin')
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
}).catch((err: any) => {
|
||||
console.log('ERR = ' + err)
|
||||
})
|
||||
}
|
||||
|
||||
function openrighttoolbar() {
|
||||
globalStore.rightDrawerOpen = true
|
||||
}
|
||||
|
||||
load()
|
||||
|
||||
return {
|
||||
openrighttoolbar,
|
||||
verificatook,
|
||||
giaverificato,
|
||||
myrisultato,
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
50
src/views/login/vreg/vreg.vue
Executable file
50
src/views/login/vreg/vreg.vue
Executable file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<q-page 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('reg.title_verif_reg') }}</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="giaverificato"
|
||||
>
|
||||
<span class="mybanner">{{ myrisultato }}</span>
|
||||
</q-banner>
|
||||
<q-banner
|
||||
class="bg-positive text-white"
|
||||
style="text-align: center;"
|
||||
rounded
|
||||
v-if="verificatook"
|
||||
>
|
||||
<span class="mybanner">{{ myrisultato }}</span>
|
||||
</q-banner>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<div class="text-center q-mt-md">
|
||||
<q-btn rounded size="lg" color="primary" @click="openrighttoolbar">{{ $t('login.enter') }}
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./vreg.ts">
|
||||
</script>
|
||||
1
src/views/messages/index.ts
Executable file
1
src/views/messages/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as Messages} from './messages'
|
||||
47
src/views/messages/messages.scss
Executable file
47
src/views/messages/messages.scss
Executable file
@@ -0,0 +1,47 @@
|
||||
.messages_page{
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.title_msg{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.user{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.active-user{
|
||||
color:blue;
|
||||
background-color: rgba(174, 189, 241, 0.71);
|
||||
border-radius: 1rem !important;
|
||||
}
|
||||
|
||||
.chat-list{
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.chat_dest{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.chat_my{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.bottomfixed {
|
||||
// right: 0;
|
||||
// position: fixed;
|
||||
z-index: 9999;
|
||||
// box-sizing: border-box;
|
||||
margin-right: 0;
|
||||
margin-left: auto;
|
||||
// bottom: 0;
|
||||
}
|
||||
276
src/views/messages/messages.ts
Executable file
276
src/views/messages/messages.ts
Executable file
@@ -0,0 +1,276 @@
|
||||
import { defineComponent, ref, computed, watch } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
import { IChat, IMessage, IMsgUsers, StatusMessage } from 'model'
|
||||
import MixinUsers from '../../mixins/mixin-users'
|
||||
import { CMyAvatar } from '../../components/CMyAvatar'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useMessageStore } from '@store/MessageStore'
|
||||
import { func_tools } from '@store/Modules/toolsext'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Messages',
|
||||
props: {
|
||||
mystr: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
myval: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
mybool: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: { CMyAvatar },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const messageStore = useMessageStore()
|
||||
const $router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const {
|
||||
getUsernameChatByMsg, getNumMsg,
|
||||
getImgByMsg, getMsgText, Username
|
||||
} = MixinUsers()
|
||||
|
||||
const mydrawer = ref(true)
|
||||
const miniState = ref(false)
|
||||
const usernameloading = ref(<string | undefined>'')
|
||||
const widthdrawer = ref(300)
|
||||
const chatsel = ref(<IChat>{
|
||||
username: '',
|
||||
lasttimeActive: new Date()
|
||||
})
|
||||
const mytexttosend = ref('')
|
||||
const loading = ref(false)
|
||||
|
||||
const lasts_messages = computed(() => messageStore.getlasts_messages)
|
||||
|
||||
// function users_msg_saved: IMsgUsers[] = []
|
||||
|
||||
|
||||
function getLastUserChatted() {
|
||||
const lastmsg: IMessage = messageStore.getlasts_messages().slice(-1)[0]
|
||||
console.log('lastmsg', lastmsg)
|
||||
if (lastmsg) {
|
||||
return (lastmsg.origin!.username !== Username()) ? lastmsg.origin!.username : lastmsg.origin!.username
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function getlastdataread(username: string): any {
|
||||
const myrec = msgchat(username)
|
||||
// Get msg for this chat
|
||||
const lastdata: any = (myrec) ? myrec.lastdataread : tools.getLastDateReadReset()
|
||||
console.table(myrec)
|
||||
let mydate = ''
|
||||
if (!tools.isIsoDate(lastdata))
|
||||
mydate = lastdata.toISOString()
|
||||
else
|
||||
return lastdata
|
||||
|
||||
// console.log('getlastdataread', mydate)
|
||||
return mydate
|
||||
}
|
||||
|
||||
function refreshdata(username: string) {
|
||||
loading.value = true
|
||||
|
||||
chatsel.value.username = ''
|
||||
|
||||
return messageStore.updateMsgDataFromServer({
|
||||
username,
|
||||
lastdataread: getlastdataread(username)
|
||||
}).then((ris) => {
|
||||
usernameloading.value = username
|
||||
chatsel.value.username = username
|
||||
loading.value = false
|
||||
|
||||
const element = document.getElementById('last')
|
||||
tools.scrollToElement(element)
|
||||
|
||||
// changemsgs('', '')
|
||||
|
||||
}).catch((err) => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const changeusername = watch(() => route.params.un, (newval, oldval) => {
|
||||
if (route.params.un === undefined || route.params.un === ':un') {
|
||||
usernameloading.value = getLastUserChatted()
|
||||
} else {
|
||||
let mystr2: any = route.params.un ? route.params.un : ''
|
||||
usernameloading.value = mystr2
|
||||
}
|
||||
|
||||
if (!miniState.value && tools.isMobile()) {
|
||||
miniState.value = true
|
||||
}
|
||||
|
||||
if (usernameloading.value) {
|
||||
// Retrieve last msgs data from the server
|
||||
refreshdata(usernameloading.value)
|
||||
}
|
||||
})
|
||||
|
||||
function styletextbar() {
|
||||
|
||||
let mystr = ''
|
||||
|
||||
if (mydrawer.value) {
|
||||
if (!miniState.value)
|
||||
mystr = `left: ${widthdrawer.value}px;`
|
||||
else
|
||||
mystr = 'left: 57px;'
|
||||
} else {
|
||||
mystr = 'left: 0;'
|
||||
}
|
||||
|
||||
// console.log('tools.getwidth', tools.getwidth)
|
||||
|
||||
mystr += ` width: ${tools.getwidth($q) - widthdrawer.value - 40 - 300}px; `
|
||||
|
||||
return mystr
|
||||
}
|
||||
|
||||
function showNotif(msgcode: any) {
|
||||
tools.showNotif($q, (msgcode))
|
||||
}
|
||||
|
||||
function drawerClick(e: any) {
|
||||
// if in "mini" state and user
|
||||
// click on drawer, we switch it to "normal" mode
|
||||
if (miniState.value) {
|
||||
miniState.value = false
|
||||
|
||||
// notice we have registered an event with capture flag;
|
||||
// we need to stop further propagation as this click is
|
||||
// intended for switching drawer to "normal" mode only
|
||||
e.stopPropagation()
|
||||
}
|
||||
}
|
||||
|
||||
function getheight() {
|
||||
// return height()
|
||||
return $q.screen.height - 43 // .toolbar
|
||||
}
|
||||
|
||||
function isMenuActive(username: string) {
|
||||
return chatsel.value.username === username
|
||||
}
|
||||
|
||||
function selChat(mymsg: IMessage) {
|
||||
if (chatsel.value.username !== mymsg.dest!.username)
|
||||
$router.replace('/messages/' + mymsg.dest!.username)
|
||||
else {
|
||||
// refresh
|
||||
refreshdata(chatsel.value.username)
|
||||
}
|
||||
}
|
||||
|
||||
function msgchat(username: string): any {
|
||||
// Get msg for this chat
|
||||
if (messageStore.users_msg)
|
||||
return messageStore.users_msg.find((rec: IMsgUsers) => rec.username === username)
|
||||
// return users_msg_saved[username]
|
||||
}
|
||||
|
||||
function msgchat_records(): IMessage[] {
|
||||
const myrec = msgchat(chatsel.value.username)
|
||||
// console.log('msgchat_records', myrec)
|
||||
// Get msg for this chat
|
||||
return (myrec) ? myrec.msgs : []
|
||||
}
|
||||
|
||||
function sendMsg() {
|
||||
|
||||
const data: IMessage = {
|
||||
dest: {
|
||||
idapp: process.env.APP_ID,
|
||||
username: chatsel.value.username
|
||||
},
|
||||
message: mytexttosend.value
|
||||
}
|
||||
data.dest!.username = chatsel.value.username
|
||||
data.message = mytexttosend.value
|
||||
|
||||
mytexttosend.value = ''
|
||||
|
||||
messageStore.SendMsgEvent(data).then((ris) => {
|
||||
data.status = StatusMessage.Sending
|
||||
|
||||
const element = document.getElementById('last')
|
||||
tools.scrollToElement(element)
|
||||
|
||||
if (!ris)
|
||||
tools.showNegativeNotif($q, t('cal.sendmsg_error'))
|
||||
|
||||
// tools.showPositiveNotif(self.$q, self.('cal.sendmsg_sent'))
|
||||
// else
|
||||
})
|
||||
}
|
||||
|
||||
function loadMorePosts() {
|
||||
// ....
|
||||
}
|
||||
|
||||
|
||||
// @ts-ignore
|
||||
function myonScroll({ target: { scrollTop, clientHeight, scrollHeight } }: {scrollTop: number, clientHeight: number, scrollHeight: number}) {
|
||||
if (scrollTop + clientHeight >= scrollHeight) {
|
||||
loadMorePosts()
|
||||
}
|
||||
}
|
||||
|
||||
function created() {
|
||||
|
||||
changeusername()
|
||||
}
|
||||
|
||||
created()
|
||||
|
||||
return {
|
||||
msgchat_records,
|
||||
msgchat,
|
||||
sendMsg,
|
||||
selChat,
|
||||
isMenuActive,
|
||||
getheight,
|
||||
drawerClick,
|
||||
showNotif,
|
||||
styletextbar,
|
||||
lasts_messages,
|
||||
myonScroll,
|
||||
widthdrawer,
|
||||
chatsel,
|
||||
mytexttosend,
|
||||
loading,
|
||||
mydrawer,
|
||||
getUsernameChatByMsg,
|
||||
getNumMsg,
|
||||
getImgByMsg,
|
||||
getMsgText,
|
||||
Username,
|
||||
func_tools,
|
||||
tools,
|
||||
}
|
||||
}
|
||||
})
|
||||
179
src/views/messages/messages.vue
Executable file
179
src/views/messages/messages.vue
Executable file
@@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<div class="q-pr-md">
|
||||
<q-layout
|
||||
view="hHh Lpr lff" container :style="`height: ` + getheight + `px`"
|
||||
class="shadow-2 rounded-borders messages_page">
|
||||
<q-drawer
|
||||
v-model="mydrawer"
|
||||
|
||||
:mini="!mydrawer || miniState"
|
||||
@click.capture="drawerClick"
|
||||
|
||||
:width="widthdrawer"
|
||||
:breakpoint="300"
|
||||
bordered
|
||||
content-class="bg-grey-3">
|
||||
|
||||
<q-scroll-area class="fit">
|
||||
<q-list bordered class="rounded-borders chat-list">
|
||||
<q-item-label header class="title_msg">{{ $t('msgs.messages') }}</q-item-label>
|
||||
|
||||
<q-separator/>
|
||||
|
||||
<div v-if="getNumMsg() === 0">
|
||||
<q-item>
|
||||
{{ $t('msgs.nomessage') }}
|
||||
|
||||
</q-item>
|
||||
</div>
|
||||
|
||||
<q-item
|
||||
clickable
|
||||
|
||||
:active="isMenuActive(msg.dest.username)"
|
||||
active-class="active-user"
|
||||
v-for="(msg, index) in lasts_messages()"
|
||||
:key="index"
|
||||
@click="selChat(msg)">
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-avatar>
|
||||
<img :src="getImgByMsg(msg)" :alt="getUsernameChatByMsg(msg)">
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">{{ getUsernameChatByMsg(msg) }}</q-item-label>
|
||||
<q-item-label caption lines="2">
|
||||
{{ getMsgText(msg, false) }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side top>
|
||||
{{ tools.getstrDateTimeShort(msg.datemsg) }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-separator/>
|
||||
</q-list>
|
||||
</q-scroll-area>
|
||||
|
||||
<div class="q-mini-drawer-hide absolute" style="top: 15px; right: -17px">
|
||||
<q-btn
|
||||
dense
|
||||
round
|
||||
unelevated
|
||||
color="accent"
|
||||
icon="chevron_left"
|
||||
@click="miniState = true">
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-drawer>
|
||||
|
||||
<div class="row column">
|
||||
<div>
|
||||
<q-page-container style="">
|
||||
<q-page class="q-px-lg q-py-md">
|
||||
<div>
|
||||
<q-item clickable v-if="!!chatsel.username" @scroll="myonScroll">
|
||||
|
||||
<q-item-section avatar>
|
||||
<CMyAvatar :username="chatsel.username"></CMyAvatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">{{ getUserByUsername(chatsel.username) }}</q-item-label>
|
||||
<q-item-label caption lines="2">
|
||||
{{ func_tools.getDateTimeShortStr(chatsel.lasttimeActive) }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
<q-separator/>
|
||||
<div class="q-pa-md">
|
||||
<q-item
|
||||
clickable v-for="(msg, index) in msgchat_records()" :key="index">
|
||||
<div v-if="msg.dest">
|
||||
<div>
|
||||
<div class="chat_dest" v-if="msg.dest.username === Username()">
|
||||
<q-chat-message
|
||||
:name="getUsernameChatByMsg(msg)"
|
||||
:text="getMsgText(msg, true)"
|
||||
:stamp="tools.getstrDateTimeShort(msg.datemsg)"
|
||||
text-color="black"
|
||||
bg-color="grey-2">
|
||||
<template v-slot:avatar>
|
||||
<q-avatar size="sm">
|
||||
<img :src="getImgByMsg(msg)" :alt="getUsernameChatByMsg(msg)">
|
||||
</q-avatar>
|
||||
</template>
|
||||
</q-chat-message>
|
||||
</div>
|
||||
<div class="chat_my" v-else>
|
||||
<q-chat-message
|
||||
name="me"
|
||||
:text="getMsgText(msg, true)"
|
||||
:stamp="tools.getstrDateTimeShort(msg.datemsg)"
|
||||
sent
|
||||
bg-color="blue-2">
|
||||
<template v-slot:avatar>
|
||||
<CMyAvatar size="sm" :username="Username()"></CMyAvatar>
|
||||
</template>
|
||||
|
||||
</q-chat-message>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</q-item>
|
||||
<div id="last"></div>
|
||||
<q-inner-loading id="spinner" :showing="loading">
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em">
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
</div>
|
||||
</q-page>
|
||||
</q-page-container>
|
||||
</div>
|
||||
<div class="bottomfixed row" :style="styletextbar">
|
||||
<div class="" style="max-width: 50px; align-self: center; order: 1;">
|
||||
<q-btn
|
||||
rounded
|
||||
size="sm"
|
||||
icon="fas fa-smile">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="" style="max-height: 100px; flex-grow:1; order: 2;">
|
||||
<q-input
|
||||
bordered
|
||||
rounded
|
||||
v-model="mytexttosend"
|
||||
debounce="1000"
|
||||
filled
|
||||
autogrow
|
||||
input-style="max-height: 95px;">
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="" style="max-width: 50px; align-self: center; order: 3;">
|
||||
<q-btn
|
||||
push
|
||||
rounded
|
||||
size="sm"
|
||||
icon="send"
|
||||
@click="sendMsg">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./messages.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './messages.scss';
|
||||
</style>
|
||||
1
src/views/offline/index.ts
Executable file
1
src/views/offline/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as Offline} from './offline.vue'
|
||||
29
src/views/offline/offline.scss
Executable file
29
src/views/offline/offline.scss
Executable file
@@ -0,0 +1,29 @@
|
||||
.svgclass{
|
||||
color: white;
|
||||
transform: translateY(0px);
|
||||
|
||||
}
|
||||
|
||||
.svgclass_animate {
|
||||
transform: translateY(-70px);
|
||||
color: red;
|
||||
}
|
||||
|
||||
#sun {
|
||||
animation: gravity 5s infinite;
|
||||
|
||||
}
|
||||
|
||||
@keyframes gravity{
|
||||
0%{
|
||||
transform: rotateY(0deg);
|
||||
}
|
||||
100%{
|
||||
transform: rotateY(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#smile{
|
||||
opacity: 0.1 !important;
|
||||
fill: red;
|
||||
}
|
||||
14
src/views/offline/offline.ts
Executable file
14
src/views/offline/offline.ts
Executable file
@@ -0,0 +1,14 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Offline',
|
||||
setup() {
|
||||
function logoimg() {
|
||||
return 'º' + process.env.LOGO_REG
|
||||
}
|
||||
|
||||
return {
|
||||
logoimg,
|
||||
}
|
||||
},
|
||||
})
|
||||
11
src/views/offline/offline.vue
Executable file
11
src/views/offline/offline.vue
Executable file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div id="offline">
|
||||
TableOnlyView Page !
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./offline.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './offline';
|
||||
</style>
|
||||
26
src/views/pages/estimate/estimate.scss
Executable file
26
src/views/pages/estimate/estimate.scss
Executable file
@@ -0,0 +1,26 @@
|
||||
.est{
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
|
||||
&__price {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
&__totale_text {
|
||||
padding: 2px;
|
||||
font-size: 1.15rem;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
&__totale_numpag {
|
||||
padding: 2px;
|
||||
font-size: 1.15rem;
|
||||
color: red;
|
||||
}
|
||||
|
||||
&__totale_price {
|
||||
padding: 2px;
|
||||
font-size: 1.15rem;
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
286
src/views/pages/estimate/estimate.ts
Executable file
286
src/views/pages/estimate/estimate.ts
Executable file
@@ -0,0 +1,286 @@
|
||||
import { defineComponent, ref, onMounted } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { IEstimate } from '@src/model'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Estimate',
|
||||
props: {
|
||||
mystr: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
myval: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
mybool: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const arrEstimate = ref(<IEstimate[]>[])
|
||||
|
||||
const features: IEstimate[] = [
|
||||
{
|
||||
title: '5 pagine principali: 1) Home principale con testo + slideshow di immagini, 2) Chi siamo, 3) Dove Siamo, 4) Contatti, 5) Servizi',
|
||||
icon: 'looks_5',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
title: 'Ottimizzato con tecnologia Responsive, visualizzabile su cellulare',
|
||||
icon: 'devices_other',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
title: 'Possibilità di modificare, in maniera autonoma, i testi delle pagine esistenti (Sito Dinamico)',
|
||||
icon: 'edit',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
title: 'Galleria d\'immagini Slideshow',
|
||||
icon: 'photo_album',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
title: 'Certificato SSL / HTTPS di sicurezza incluso',
|
||||
icon: 'https',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
title: 'GDPR privacy e cookie',
|
||||
icon: 'verified_user',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
title: 'Posizionamento motori di ricerca (Google)',
|
||||
icon: 'search',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
title: 'Statistica Visualizzazioni sito web (Google Analytics)',
|
||||
icon: 'search',
|
||||
numpag: 0,
|
||||
price: 0,
|
||||
pricebase: 0,
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
const arrEstimateit: IEstimate[] = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Pagina Web Base', description: '',
|
||||
price: 250,
|
||||
advanced: false,
|
||||
qta: 1,
|
||||
icon: 'web',
|
||||
numpag: 5,
|
||||
viewlist: null,
|
||||
checksel: true,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
title: 'Hosting Base Dominio WWW (Servizio Esterno)',
|
||||
description: 'Servizio di Hosting linux base + Database Mysql + Servizio Mail + Dominio',
|
||||
advanced: false,
|
||||
icon: 'home',
|
||||
price: 80,
|
||||
qta: 1,
|
||||
numpag: 0,
|
||||
viewlist: null,
|
||||
checksel: false,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '+ 5 Pagine Aggiuntive',
|
||||
description: 'Inserisci il numero di pagine che si vuole creare',
|
||||
advanced: false,
|
||||
price: 50,
|
||||
qta: 1,
|
||||
numpag: 5,
|
||||
icon: 'description',
|
||||
viewlist: null,
|
||||
checksel: false,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '+ 10 Pagine Aggiuntive',
|
||||
description: 'pagine aggiuntive da creare',
|
||||
price: 85,
|
||||
qta: 1,
|
||||
numpag: 10,
|
||||
icon: 'description',
|
||||
viewlist: null,
|
||||
checksel: false,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: '+ 20 Pagine Aggiuntive',
|
||||
description: 'pagine aggiuntive da creare',
|
||||
advanced: false,
|
||||
price: 140,
|
||||
qta: 1,
|
||||
numpag: 20,
|
||||
icon: 'description',
|
||||
viewlist: null,
|
||||
checksel: false,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
id: tools.languageid,
|
||||
title: '+ 1 Lingua Aggiuntiva (con testi già tradotti)',
|
||||
description: 'Inserimento di 1 lingua straniera nel sito. Comprende le pagine selezionate',
|
||||
advanced: false,
|
||||
icon: 'language',
|
||||
price: 10,
|
||||
pricebase: 50,
|
||||
qta: 1,
|
||||
numpag: 0,
|
||||
viewlist: null,
|
||||
checksel: false
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
title: 'Gestione Newsletter integrata con MailChimp',
|
||||
advanced: true,
|
||||
description: 'All\'interno del sito l\'utente potrà lasciare la propria email e nome, e verrà inviata a MailChimp (Account Gratuito)',
|
||||
icon: 'contact_mail',
|
||||
price: 50,
|
||||
qta: 1,
|
||||
numpag: 0,
|
||||
viewlist: null,
|
||||
checksel: false,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
title: 'Calendario Eventi',
|
||||
advanced: true,
|
||||
description: 'Visualizzazione Mensile e Settimanale di un calendario Eventi Personalizzato',
|
||||
icon: 'event',
|
||||
price: 100,
|
||||
qta: 1,
|
||||
numpag: 0,
|
||||
viewlist: null,
|
||||
checksel: false,
|
||||
pricebase: 0,
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
title: 'Galleria Immagini Personalizzata',
|
||||
advanced: true,
|
||||
description: 'Possibilità di aggiungere/eliminare foto autonomamente dalla galleria Immagini (Richiede Hosting Base)',
|
||||
icon: 'perm_media',
|
||||
price: 100,
|
||||
qta: 1,
|
||||
numpag: 0,
|
||||
viewlist: null,
|
||||
checksel: false,
|
||||
pricebase: 0,
|
||||
}
|
||||
// {
|
||||
// id: 7,
|
||||
// title: 'Servizio di Assistenza e modifica pagine (dal 2° anno)',
|
||||
// description: '',
|
||||
// icon: 'perm_media',
|
||||
// price: 100,
|
||||
// qta: 1,
|
||||
// numpag: 0,
|
||||
// viewlist: null,
|
||||
// checksel: false
|
||||
// },
|
||||
]
|
||||
|
||||
function mounted() {
|
||||
arrEstimate.value = arrEstimateit
|
||||
}
|
||||
|
||||
function getPrice(rec: IEstimate) {
|
||||
let myprice = 0
|
||||
if (rec.id === tools.languageid) {
|
||||
myprice = (rec.price * getNumpagTotal()) + rec.pricebase
|
||||
} else {
|
||||
myprice = rec.price
|
||||
}
|
||||
|
||||
return myprice
|
||||
}
|
||||
|
||||
function getNumpagTotal() {
|
||||
let numpag = 0
|
||||
let rec: IEstimate
|
||||
|
||||
for (rec of arrEstimateit) {
|
||||
if (rec.checksel) {
|
||||
numpag += rec.numpag
|
||||
}
|
||||
}
|
||||
|
||||
return numpag
|
||||
}
|
||||
|
||||
function getTotal() {
|
||||
let tot = 0
|
||||
let rec: IEstimate
|
||||
|
||||
const numpagtot = getNumpagTotal()
|
||||
|
||||
for (rec of arrEstimateit) {
|
||||
if (rec.checksel)
|
||||
tot += getPrice(rec) * rec.qta!
|
||||
}
|
||||
|
||||
return tot
|
||||
}
|
||||
|
||||
function getColor(rec: IEstimate) {
|
||||
if (rec.advanced) {
|
||||
return 'red'
|
||||
} else {
|
||||
return 'blue'
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
arrEstimate,
|
||||
arrEstimateit,
|
||||
features,
|
||||
getPrice,
|
||||
getNumpagTotal,
|
||||
getTotal,
|
||||
getColor,
|
||||
}
|
||||
}
|
||||
})
|
||||
74
src/views/pages/estimate/estimate.vue
Executable file
74
src/views/pages/estimate/estimate.vue
Executable file
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-list bordered padding>
|
||||
<q-item-label header class="text-subtitle1 text-blue text-center text-bold">Preventivo Sito Web
|
||||
</q-item-label>
|
||||
<p class="q-ml-md">
|
||||
<q-chip color="primary" text-color="white" icon="">
|
||||
Funzionalità Incluse
|
||||
</q-chip>
|
||||
</p>
|
||||
<!--<q-item-label header class="text-subtitle1 text-blue">Funzionalità Incluse</q-item-label>-->
|
||||
|
||||
<q-item tag="label" v-for="rec in features" :key="rec.title">
|
||||
<q-item-section avatar top>
|
||||
<q-avatar :icon="rec.icon" color="green" text-color="white"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{rec.title}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
</q-list>
|
||||
<q-list bordered padding>
|
||||
<p class="q-ml-md">
|
||||
<q-chip color="orange" text-color="white" icon="">
|
||||
Funzionalità Aggiuntive
|
||||
</q-chip>
|
||||
</p>
|
||||
|
||||
<div style="text-align: right;">
|
||||
<span class="est__totale_text">Pagine:</span>
|
||||
<span class="est__totale_numpag">{{getNumpagTotal()}}</span>
|
||||
<span style="margin-left: 20px;"></span>
|
||||
<span class="est__totale_text">Totale:</span>
|
||||
<span class="est__totale_price">{{getTotal()}} €</span>
|
||||
</div>
|
||||
|
||||
<q-item tag="label" v-for="rec in arrEstimateit" :key="rec.title">
|
||||
|
||||
<q-item-section avatar top>
|
||||
<q-avatar :icon="rec.icon" :color="getColor(rec)" text-color="white"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{rec.title}}</q-item-label>
|
||||
<q-item-label caption v-html="rec.description"></q-item-label>
|
||||
<q-item-label>
|
||||
<span class="est__price">{{getPrice(rec)}} €</span>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side top>
|
||||
<q-checkbox v-model="rec.checksel"/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
</q-list>
|
||||
|
||||
<div class="q-ml-md">
|
||||
<span class="est__totale_text">Pagine:</span>
|
||||
<span class="est__totale_numpag">{{getNumpagTotal()}}</span>
|
||||
<span style="padding-left: 20px;"></span>
|
||||
<span class="est__totale_text">Totale:</span>
|
||||
<span class="est__totale_price">{{getTotal()}} €</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./estimate.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './estimate';
|
||||
</style>
|
||||
1
src/views/pages/estimate/index.ts
Executable file
1
src/views/pages/estimate/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as estimate} from './estimate.vue'
|
||||
198
src/views/projects/proj-list/proj-list.scss
Executable file
198
src/views/projects/proj-list/proj-list.scss
Executable file
@@ -0,0 +1,198 @@
|
||||
$heightBtn: 100%;
|
||||
|
||||
.clMain {
|
||||
min-width: 350px;
|
||||
}
|
||||
|
||||
.clVista {
|
||||
max-height: 400px !important;
|
||||
}
|
||||
|
||||
|
||||
.flex-container, .flex-container_col {
|
||||
background-color: rgb(250, 250, 250);
|
||||
padding: 2px 4px 2px 4px;
|
||||
margin: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.q-tab-panel {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.flex-container_col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.flex-item {
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.q-tab-panel {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.mycard {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.myitemdrag {
|
||||
padding: 2px;
|
||||
//margin-top: 4px;
|
||||
border-width: 1px 0px 0px 0px;
|
||||
//border: solid 1px #ccc;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
transition: all .4s;
|
||||
}
|
||||
|
||||
.titlePriority, .titleCompleted {
|
||||
border-width: 0px 0px 1px 0px;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.titleCompleted {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.high_priority {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
||||
.medium_priority {
|
||||
background-color: #3846af;
|
||||
}
|
||||
|
||||
.low_priority {
|
||||
background-color: #af2218;
|
||||
}
|
||||
|
||||
|
||||
.myitemdrag-enter, .myitemdrag-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.drag {
|
||||
//background-color: green;
|
||||
}
|
||||
|
||||
.dragArea {
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
|
||||
.categorytitle {
|
||||
color: blue;
|
||||
background-color: lightblue;
|
||||
font-size: 1.25rem !important;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.projecttitle {
|
||||
color: white;
|
||||
// color:blue;
|
||||
background-color: rgba(65, 152, 239, 0.6);
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.itemdescr {
|
||||
font-size: 1rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.itemstatus {
|
||||
flex: 1;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.itemdata {
|
||||
font-size: 1rem;
|
||||
flex: 1;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.progress-item {
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
flex: 1;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.progrbar-item {
|
||||
//height: 10px
|
||||
padding-top: 7px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.flex-icon {
|
||||
padding: 3px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.titleSubMenu {
|
||||
font-size: 0.7rem;
|
||||
font-weight: 350;
|
||||
}
|
||||
|
||||
.draggatodraggato2 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.non-draggato {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
transform: translateY(-100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
.divdrag {
|
||||
animation: fadeIn 0.2s ease-in 1 forwards;
|
||||
min-height: 50px;
|
||||
background-color: #9f9f9f;
|
||||
}
|
||||
|
||||
.menuInputCompleted > div:nth-child(2) > div > input {
|
||||
min-width: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.percProgress {
|
||||
padding-top: 3px;
|
||||
color: #888;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
//line-height: $heightitem;
|
||||
}
|
||||
|
||||
.endwork_estimate {
|
||||
color: blue;
|
||||
}
|
||||
1112
src/views/projects/proj-list/proj-list.ts.off
Executable file
1112
src/views/projects/proj-list/proj-list.ts.off
Executable file
File diff suppressed because it is too large
Load Diff
665
src/views/projects/proj-list/proj-list.vue.off
Executable file
665
src/views/projects/proj-list/proj-list.vue.off
Executable file
@@ -0,0 +1,665 @@
|
||||
<template>
|
||||
<q-page>
|
||||
<div class="panel">
|
||||
|
||||
<q-dialog v-model="shownewsubproj">
|
||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
Nuovo
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-input
|
||||
color="blue-12" v-model="newSubProj" label="Inserisci il Nuovo sotto Progetto:"
|
||||
style="margin-left: 6px;"
|
||||
autofocus
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="add"/>
|
||||
</template>
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
rounded color="primary" v-close-popup label="Aggiungi"
|
||||
@click="insertSubProj()"></q-btn>
|
||||
<q-btn flat rounded color="negative" v-close-popup label="Annulla"></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
|
||||
</q-dialog>
|
||||
|
||||
<div>
|
||||
<div class="flex-container clMain">
|
||||
|
||||
<div class="q-ml-md">
|
||||
<div v-if="canShow">
|
||||
<q-btn
|
||||
v-if="!isRootProjectAtt" size="md" push
|
||||
color="secondary" round
|
||||
icon="arrow_back"
|
||||
@click="clickrouteup"
|
||||
:to="getrouteup()">
|
||||
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="classTitleProjSelBread">
|
||||
|
||||
<div v-if="canShow">
|
||||
<q-breadcrumbs gutter="xs">
|
||||
<q-breadcrumbs-el
|
||||
v-for="(crumb, index) in listacrumb"
|
||||
:key="index"
|
||||
:label="crumb.description"
|
||||
:to="getroutebyid(crumb.idelem)"/>
|
||||
</q-breadcrumbs>
|
||||
</div>
|
||||
<div v-else>
|
||||
Progetti:
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<q-btn
|
||||
push
|
||||
size="md"
|
||||
icon="settings">
|
||||
<q-menu id="popconfig" self="top right">
|
||||
<q-list link separator no-border class="todo-menu">
|
||||
<div v-for="field in menuPopupConfigProject" :key="field.value">
|
||||
<q-item clickable v-if="(field.value === 150)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{ field.label }}</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-icon name="keyboard_arrow_right"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-menu auto-close anchor="bottom middle" self="top middle">
|
||||
<q-list dense>
|
||||
<q-item side clickable :icon="field.icon">
|
||||
|
||||
<q-item-section>
|
||||
<q-list dense>
|
||||
<q-item
|
||||
clickable v-ripple
|
||||
v-for="opt in listOptionShowTask"
|
||||
:key="opt.value"
|
||||
@click="showtype = opt.value">
|
||||
<q-item-section avatar>
|
||||
<q-icon
|
||||
:name="opt.icon" inverted
|
||||
color="primary"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ opt.label }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-else v-close-popup clickable :icon="field.icon" :disable="field.disable"
|
||||
@click="clickMenuProjList(field.value)">
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{ field.label }}</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="flex-item categorytitle" v-if="(whatisSel === tools.WHAT_TODO)"> {{ showDescr }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<q-splitter
|
||||
v-model="splitterModel"
|
||||
:horizontal="isHorizontal"
|
||||
:style="myStyle"
|
||||
:limits="[50, 100]"
|
||||
<template v-slot:before>
|
||||
>-->
|
||||
|
||||
<q-tab-panels v-model="tabproj" animated>
|
||||
<q-tab-panel name="lista">
|
||||
<div>
|
||||
<!--idProjAtt: {{ idProjAtt }}-->
|
||||
<div style="display: none">{{ prior = 0, priorcomplet = false }}</div>
|
||||
|
||||
<div>
|
||||
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
||||
<!--<div class="container" v-dragula="projs_dacompletare(idProjAtt, gettipoProj)" drake="second"> -->
|
||||
<div class="container">
|
||||
<q-list bordered>
|
||||
<div
|
||||
:id="tools.getmyid(myproj._id)" :index="index"
|
||||
v-for="(myproj, index) in projs_dacompletare(idProjAtt, gettipoProj)"
|
||||
:key="myproj._id" class="myitemdrag">
|
||||
|
||||
<SingleProject
|
||||
ref="singleproject" @deleteItemproj="mydeleteitemproj(myproj._id)"
|
||||
@eventupdateproj="updateitemproj"
|
||||
@idsel="setidsel"
|
||||
@deselectAllRowsproj="deselectAllRowsproj"
|
||||
@deselectAllRowstodo="deselectAllRowstodo" @onEnd="onEndproj"
|
||||
:itemproject='myproj'>
|
||||
|
||||
</SingleProject>
|
||||
|
||||
</div>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator></q-separator>
|
||||
|
||||
<!--<q-input v-model="projbottom"
|
||||
style="margin-left: 6px;"
|
||||
color="blue-12"
|
||||
:label="$t('proj.insertbottom')"
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||
>
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
<q-separator></q-separator>
|
||||
-->
|
||||
|
||||
|
||||
<!--CanIModifyPanelPrivacy = {{CanIModifyPanelPrivacy}}<br>-->
|
||||
<!--CanIModifyPanelPrivacySel = {{CanIModifyPanelPrivacySel}}<br>-->
|
||||
<!--CanISeeProject = {{CanISeeProject}}<br>-->
|
||||
<!--CanISeeProjectSel = {{CanISeeProjectSel}}-->
|
||||
|
||||
<CTodo
|
||||
ref="ctodo" @setitemsel="setitemsel" :categoryAtt="idProjAtt" title="" backcolor="white"
|
||||
forecolor="black" :viewtaskTop="false" @deselectAllRowsproj="deselectAllRowsproj"
|
||||
@deselectAllRowstodo="deselectAllRowstodo"
|
||||
:CanIModifyTodo="CanIModifyPanelPrivacy"
|
||||
>
|
||||
</CTodo>
|
||||
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="info">
|
||||
<div v-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)">
|
||||
<div class="q-pa-xs q-mb-xl clMain">
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<q-input
|
||||
ref="input"
|
||||
v-model="itemselproj.longdescr"
|
||||
:label="$t('proj.longdescr')"
|
||||
outlined
|
||||
debounce="1000"
|
||||
@input="modifyfieldproj('privacywrite')"
|
||||
autogrow
|
||||
style="flex: auto">
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="fas fa-sort-amount-up-alt"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<q-input
|
||||
v-model="itemselproj.pos"
|
||||
type="number"
|
||||
rounded outlined
|
||||
debounce="500"
|
||||
style="max-width: 100px;"
|
||||
:label="$t('dashboard.posizione')"></q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="group"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 200px"
|
||||
:readonly="readonly_PanelPrivacySel"
|
||||
rounded outlined v-model="itemselproj.groupId" :options="selectGroup"
|
||||
:label="$t('proj.group')" emit-value map-options
|
||||
@input="modifyfieldproj('groupId')">
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 200px"
|
||||
:readonly="readonly_PanelPrivacySel"
|
||||
rounded outlined v-model="itemselproj.respUsername" :options="selectResp"
|
||||
:label="$t('proj.respUsername')" emit-value map-options
|
||||
@input="modifyfieldproj('respUsername')">
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<q-select
|
||||
style="min-width: 200px"
|
||||
:readonly="readonly_PanelPrivacySel"
|
||||
rounded outlined v-model="itemselproj.viceRespUsername" :options="selectResp"
|
||||
:label="$t('proj.viceRespUsername')" emit-value map-options
|
||||
@input="modifyfieldproj('viceRespUsername')">
|
||||
</q-select>
|
||||
<q-select
|
||||
style="min-width: 200px"
|
||||
:readonly="readonly_PanelPrivacySel"
|
||||
rounded outlined v-model="itemselproj.vice2RespUsername" :options="selectResp"
|
||||
:label="$t('proj.vice2RespUsername')" emit-value map-options
|
||||
@input="modifyfieldproj('vice2RespUsername')">
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 150px" :readonly="readonly_PanelPrivacySel" rounded outlined
|
||||
v-model="itemselproj.tipovisu"
|
||||
:options="selectTipoVisu"
|
||||
@input="modifyfieldproj('tipovisu')"
|
||||
:label="$t('proj.tipovisu')" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="lock"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 200px"
|
||||
:readonly="readonly_PanelPrivacySel"
|
||||
rounded outlined v-model="itemselproj.privacyread" :options="selectPrivacy"
|
||||
:label="$t('proj.privacyread')" emit-value map-options
|
||||
@input="modifyfieldproj('privacyread')">
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="edit"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 200px" :readonly="readonly_PanelPrivacySel" rounded outlined
|
||||
v-model="itemselproj.privacywrite" :options="selectPrivacy"
|
||||
:label="$t('proj.privacywrite')" emit-value map-options
|
||||
@input="modifyfieldproj('privacywrite')">
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="edit"/>
|
||||
<div class="flex-item itemstatus">
|
||||
|
||||
{{ $t('proj.createdby') }} {{ getCreatedBy(itemselproj) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="(whatisSel === tools.WHAT_TODO) && (!!itemtodosel.descr)">
|
||||
<div class="q-pa-xs q-mb-xl clMain">
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<!--<q-icon size="md" :name="iconPriority" color="primary"/>-->
|
||||
<q-input
|
||||
ref="input4"
|
||||
v-model="itemtodosel.descr"
|
||||
:class="classTitleTodoSel"
|
||||
:label="$t('proj.longdescr')"
|
||||
outlined
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
@input="modifyfieldtodo('descr')"
|
||||
debounce="1000"
|
||||
autogrow
|
||||
style="flex: auto">
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<!--<q-icon size="md" :name="iconPriority" color="primary"/>-->
|
||||
<q-input
|
||||
ref="input4"
|
||||
v-model="itemtodosel.note"
|
||||
:label="$t('proj.note')"
|
||||
outlined
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
@input="modifyfieldtodo('note')"
|
||||
debounce="1000"
|
||||
autogrow
|
||||
style="flex: auto">
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="fas fa-sort-amount-up-alt"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<q-input
|
||||
v-model="itemtodosel.pos"
|
||||
type="number"
|
||||
debounce="500"
|
||||
@input="modifyfieldtodo('pos')"
|
||||
rounded outlined
|
||||
style="max-width: 100px;"
|
||||
:label="$t('dashboard.posizione')">
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 200px"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
@input="modifyfieldtodo('assigned_to_userId')"
|
||||
rounded outlined v-model="itemtodosel.assigned_to_userId" :options="selectWorkers"
|
||||
:label="$t('todo.assigned_to_userId')" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
<div class="flex-item itemstatus">
|
||||
<CMyFieldDb
|
||||
:title="$t('todo.workers')"
|
||||
:id="itemtodosel._id"
|
||||
:idmain="itemtodosel.category"
|
||||
table="todos"
|
||||
mykey="assignedToUsers"
|
||||
@input="modifyfieldtodo('assignedToUsers')"
|
||||
:type="tools.FieldType.multiselect"
|
||||
jointable="workers">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="done_outline"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
rounded outlined v-model="itemtodosel.statustodo" :options="selectStatus"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
:label="$t('todo.status')" emit-value map-options
|
||||
@input="modifyfieldtodo('statustodo')">
|
||||
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="ore">
|
||||
<div v-if="(whatisSel === tools.WHAT_TODO) && (!!itemtodosel.descr)">
|
||||
<!--<CHours v-if="!!itemtodosel" :todoId="itemtodosel._id"></CHours>-->
|
||||
|
||||
<div v-if="!!itemtodosel">
|
||||
<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="itemtodosel._id"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
labelBtnAddRow="Aggiungi Ore"
|
||||
:extraparams="extraparams">
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)">
|
||||
<!--<CHours v-if="!!itemtodosel" :todoId="itemtodosel._id"></CHours>-->
|
||||
|
||||
<div v-if="!!itemselproj">
|
||||
<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="itemselproj._id"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
labelBtnAddRow="Aggiungi Ore"
|
||||
:extraparams="extraparams">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-ma-lg"></div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="stat">
|
||||
<div v-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)">
|
||||
<div v-if="CanISeeProjectSel">
|
||||
<div v-if="!!itemselproj">
|
||||
<!-- itemselproj._id: {{ itemselproj._id }} -->
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="work_outline"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<q-input
|
||||
ref="input2"
|
||||
readonly
|
||||
v-model="itemselproj.hoursworked"
|
||||
type="number"
|
||||
rounded outlined
|
||||
:label="$t('proj.hoursworked')"
|
||||
debounce="500"></q-input>
|
||||
<CProgress descr="Fatte" :progressval="getCalcHoursWorked"></CProgress>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="CanISeeProjectSel" class="flex-item items-center">
|
||||
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
||||
<div class="flex-item itemdata content-center q-mx-sm">
|
||||
<q-input
|
||||
ref="input3"
|
||||
type="number"
|
||||
readonly
|
||||
v-model="itemselproj.hoursplanned"
|
||||
rounded outlined
|
||||
@input="modifyfieldproj('hoursplanned')"
|
||||
:label="$t('proj.hoursplanned')"
|
||||
debounce="500">
|
||||
|
||||
</q-input>
|
||||
<CProgress
|
||||
:descr="$t('proj.progresstask')"
|
||||
:progressval="itemselproj.progressCalc"></CProgress>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="developer_mode"/>
|
||||
<div class="flex-item itemdata">
|
||||
<CDate
|
||||
:readonly="readonly_PanelPrivacySel" :mydate="itemselproj.begin_development"
|
||||
@input="itemselproj.begin_development = new Date(arguments[0]); modifyfieldproj('begin_development')"
|
||||
:label="$t('proj.begin_development')">
|
||||
</CDate>
|
||||
</div>
|
||||
<div style="margin: 10px;"></div>
|
||||
<div class="flex-item itemdata">
|
||||
<CDate
|
||||
:readonly="readonly_PanelPrivacySel" :mydate="itemselproj.begin_test"
|
||||
@input="itemselproj.begin_test = new Date(arguments[0]); modifyfieldproj('begin_test')"
|
||||
:label="$t('proj.begin_test')">
|
||||
</CDate>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 150px" :readonly="readonly_PanelPrivacySel" rounded outlined
|
||||
v-model="itemselproj.actualphase"
|
||||
:options="selectPhase"
|
||||
@input="modifyfieldproj('actualphase')"
|
||||
:label="$t('proj.actualphase')" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
style="min-width: 150px"
|
||||
:readonly="readonly_PanelPrivacySel" rounded outlined v-model="itemselproj.totalphases"
|
||||
:options="selectPhase"
|
||||
@input="modifyfieldproj('totalphases')"
|
||||
:label="$t('proj.totalphases')" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
||||
<div class="flex-item itemdata content-center">
|
||||
<q-input
|
||||
:readonly="readonly_PanelPrivacySel"
|
||||
ref="input3"
|
||||
type="number"
|
||||
v-model="itemselproj.hoursweeky_plannedtowork"
|
||||
rounded outlined
|
||||
maxlength="2"
|
||||
:label="$t('proj.hoursweeky_plannedtowork')"
|
||||
debounce="500">
|
||||
|
||||
</q-input>
|
||||
<CProgress :progressval="calcprogressWeekly"></CProgress>
|
||||
</div>
|
||||
<q-icon class="flex-item flex-icon" name="developer_mode"/>
|
||||
<div class="flex-item itemdata">
|
||||
<CDate
|
||||
color="green-2" :mydate="calcEndWork_Estimate" :readonly="true"
|
||||
:label="$t('proj.endwork_estimate')">
|
||||
</CDate>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="(whatisSel === tools.WHAT_TODO) && (!!itemtodosel.descr)">
|
||||
<div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="work_outline"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<q-input
|
||||
ref="input5"
|
||||
:readonly="true"
|
||||
v-model="itemtodosel.hoursworked"
|
||||
type="number"
|
||||
rounded outlined
|
||||
:label="$t('proj.hoursworked')"
|
||||
debounce="500">
|
||||
|
||||
</q-input>
|
||||
<CProgress descr="" :progressval="getCalcTodoHoursWorked"></CProgress>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
||||
<div class="flex-item itemdata content-center">
|
||||
<q-input
|
||||
ref="input6"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
type="number"
|
||||
v-model="itemtodosel.hoursplanned"
|
||||
rounded outlined
|
||||
:label="$t('proj.hoursplanned')"
|
||||
debounce="500">
|
||||
|
||||
</q-input>
|
||||
|
||||
<CProgress
|
||||
:descr="$t('proj.progresstask')"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
:progressval="itemtodosel.progress"
|
||||
:slider="true" @input="itemtodosel.progress = arguments[0]"></CProgress>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="developer_mode"/>
|
||||
<div class="flex-item itemdata">
|
||||
<CDate
|
||||
:mydate="itemtodosel.start_date"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
@input="itemtodosel.start_date = new Date(arguments[0]); modifyfieldtodo('start_date')"
|
||||
:label="$t('todo.start_date')">
|
||||
|
||||
</CDate>
|
||||
</div>
|
||||
<div style="margin: 10px;"></div>
|
||||
<q-icon class="flex-item flex-icon" name="event"/>
|
||||
<div class="flex-item itemdata">
|
||||
<CDate
|
||||
:readonly="((itemtodosel.statustodo !== tools.Status.COMPLETED) || readonly_PanelPrivacy)"
|
||||
:mydate="itemtodosel.completed_at"
|
||||
@input="itemtodosel.completed_at = new Date(arguments[0]); modifyfieldtodo('completed_at')"
|
||||
:label="$t('todo.completed_at')">
|
||||
</CDate>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select
|
||||
rounded outlined v-model="itemtodosel.phase" :options="selectPhase"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
@input="modifyfieldtodo('phase')"
|
||||
:label="$t('todo.phase')" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
<q-page-sticky position="bottom-right" :offset="[9, 9]" padding="md">
|
||||
<q-btn
|
||||
fab icon="fas fa-list-alt" color="orange" @click="tabproj = 'lista'"
|
||||
:disable="!whatisSel && !isRootProjectAtt"/>
|
||||
<q-btn
|
||||
fab icon="fas fa-info" color="blue" @click="tabproj = 'info'"
|
||||
:disable="!whatisSel && !isRootProjectAtt"/>
|
||||
<q-btn
|
||||
fab icon="fas fa-hourglass" color="green" @click="tabproj = 'ore'"
|
||||
:disable="!whatisSel && !isRootProjectAtt"/>
|
||||
<q-btn
|
||||
fab icon="fas fa-chart-line" color="accent" @click="tabproj = 'stat'"
|
||||
:disable="!whatisSel && !isRootProjectAtt"/>
|
||||
<q-btn fab icon="add" color="blue" @click="tabproj = 'lista'; clickMenuProjList(200)"/>
|
||||
</q-page-sticky>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./proj-list.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './proj-list';
|
||||
</style>
|
||||
13
src/views/requestresetpwd/request-resetpwd-validate.ts
Executable file
13
src/views/requestresetpwd/request-resetpwd-validate.ts
Executable file
@@ -0,0 +1,13 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from '@vuelidate/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
|
||||
export const validations = {
|
||||
form: {
|
||||
email: {
|
||||
email,
|
||||
required
|
||||
}
|
||||
}
|
||||
}
|
||||
0
src/views/requestresetpwd/requestresetpwd.scss
Executable file
0
src/views/requestresetpwd/requestresetpwd.scss
Executable file
118
src/views/requestresetpwd/requestresetpwd.ts
Executable file
118
src/views/requestresetpwd/requestresetpwd.ts
Executable file
@@ -0,0 +1,118 @@
|
||||
import { serv_constants } from '@store/Modules/serv_constants'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { Logo } from '../../components/logo'
|
||||
import { CTitleBanner } from '../../components/CTitleBanner'
|
||||
|
||||
import { 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 useValidate from '@vuelidate/core'
|
||||
|
||||
// https://learnvue.co/2020/01/getting-smart-with-vue-form-validation-vuelidate-tutorial/
|
||||
|
||||
export default defineComponent({
|
||||
name: 'RequestResetPwd',
|
||||
props: {
|
||||
mystr: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
myval: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
mybool: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: { Logo, CTitleBanner },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const v$ = useValidate()
|
||||
|
||||
const emailsent = ref(false)
|
||||
const form = ref({
|
||||
email: '',
|
||||
tokenforgot: ''
|
||||
})
|
||||
|
||||
function emailinviata() {
|
||||
return emailsent.value
|
||||
}
|
||||
|
||||
function submit() {
|
||||
// v$.form.touch()
|
||||
|
||||
/*if (v$.form.$error) {
|
||||
tools.showNotif($q, t('reg.err.errore_generico'))
|
||||
return
|
||||
}*/
|
||||
|
||||
$q.loading.show({ message: t('reset.incorso') })
|
||||
|
||||
form.value.tokenforgot = ''
|
||||
|
||||
console.log(form.value)
|
||||
userStore.requestpwd(form.value)
|
||||
.then((ris: any) => {
|
||||
if (ris.code === serv_constants.RIS_CODE_OK)
|
||||
emailsent.value = true
|
||||
else if (ris.code === serv_constants.RIS_CODE_EMAIL_NOT_EXIST)
|
||||
tools.showNegativeNotif($q, t('reg.err.email_not_exist'))
|
||||
$q.loading.hide()
|
||||
}).catch((err) => {
|
||||
console.log('ERROR = ' + err.error)
|
||||
$q.loading.hide()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function errorMsg(cosa: string, item: any) {
|
||||
try {
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
if (item.$params.email && !item.email) {
|
||||
return t('reg.err.email')
|
||||
}
|
||||
|
||||
if (item.required !== undefined) {
|
||||
if (!item.required) {
|
||||
return t('reg.err.required')
|
||||
}
|
||||
}
|
||||
|
||||
if (cosa === 'email') {
|
||||
if (!item.isUnique) {
|
||||
return t('reg.err.duplicate_email')
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
} catch (error) {
|
||||
// console.log("ERR : " + error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
emailinviata,
|
||||
errorMsg,
|
||||
submit,
|
||||
form,
|
||||
v$,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
65
src/views/requestresetpwd/requestresetpwd.vue
Executable file
65
src/views/requestresetpwd/requestresetpwd.vue
Executable file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div class="row justify-center text-center padding">
|
||||
<div class="q-gutter-sm q-ma-sm" style="max-width: 800px; margin: auto;">
|
||||
|
||||
<div v-if="!emailinviata">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.title_reset_pwd') }}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<q-input
|
||||
v-model="form.email"
|
||||
rounded outlined
|
||||
autocomplete="email"
|
||||
:error="v$.form.email.$error"
|
||||
:error-message="errorMsg('email', v$.form.email)"
|
||||
maxlength="50"
|
||||
debounce="1000"
|
||||
:label="$t('reg.email')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="center q-ma-sm">
|
||||
<q-btn
|
||||
rounded size="lg" color="primary" @click="submit" :disable="v$.$error">
|
||||
{{ $t('reset.send_reset_pwd') }}
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-positive text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.email_sent') }}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<strong>{{ $t('reset.check_email') }}</strong>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./requestresetpwd.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './requestresetpwd';
|
||||
</style>
|
||||
1
src/views/todo-list/index.ts
Executable file
1
src/views/todo-list/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as TodoList} from './todo-list.vue'
|
||||
108
src/views/todo-list/todo-list.scss
Executable file
108
src/views/todo-list/todo-list.scss
Executable file
@@ -0,0 +1,108 @@
|
||||
.flex-container{
|
||||
background-color: rgb(250, 250, 250);
|
||||
padding: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.mycard {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.myitemdrag {
|
||||
padding: 2px;
|
||||
//margin-top: 4px;
|
||||
border-width: 1px 0px 0px 0px;
|
||||
//border: solid 1px #ccc;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
transition: all .4s;
|
||||
}
|
||||
|
||||
.titlePriority, .titleCompleted{
|
||||
border-width: 0px 0px 1px 0px;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.titleCompleted {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.high_priority {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
||||
.medium_priority {
|
||||
background-color: #3846af;
|
||||
}
|
||||
|
||||
.low_priority {
|
||||
background-color: #af2218;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.myitemdrag-enter, .myitemdrag-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.drag {
|
||||
//background-color: green;
|
||||
}
|
||||
|
||||
.dragArea {
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
.divtitlecat {
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.categorytitle{
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.titleSubMenu {
|
||||
font-size: 0.7rem;
|
||||
font-weight: 350;
|
||||
}
|
||||
|
||||
.draggatodraggato2 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.non-draggato {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
transform: translateY(-100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
.divdrag{
|
||||
animation: fadeIn 0.2s ease-in 1 forwards;
|
||||
min-height: 50px;
|
||||
background-color: #9f9f9f;
|
||||
}
|
||||
|
||||
.menuInputCompleted > div:nth-child(2) > div > input {
|
||||
min-width: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
30
src/views/todo-list/todo-list.ts.off
Executable file
30
src/views/todo-list/todo-list.ts.off
Executable file
@@ -0,0 +1,30 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Watch } from 'vue-property-decorator'
|
||||
import { CTodo } from '@src/components/todos/CTodo'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
components: { CTodo },
|
||||
filters: {
|
||||
capitalize(value) {
|
||||
return tools.capitalize(value)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
export default class TodoList extends Vue {
|
||||
public categoryAtt = ''
|
||||
|
||||
@Watch('$route.params.category')
|
||||
public changecat() {
|
||||
this.categoryAtt = this.$route.params.category
|
||||
console.log('this.categoryAtt', this.categoryAtt)
|
||||
}
|
||||
|
||||
public created() {
|
||||
console.log('LOAD TODO-LIST....')
|
||||
|
||||
this.changecat()
|
||||
}
|
||||
}
|
||||
12
src/views/todo-list/todo-list.vue.off
Executable file
12
src/views/todo-list/todo-list.vue.off
Executable file
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<CTodo :categoryAtt="categoryAtt" :title="categoryAtt">
|
||||
|
||||
</CTodo>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./todo-list.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './todo-list.scss';
|
||||
</style>
|
||||
17
src/views/updatepassword/request-resetpwd-validate.ts
Executable file
17
src/views/updatepassword/request-resetpwd-validate.ts
Executable file
@@ -0,0 +1,17 @@
|
||||
import { ISignupOptions } from 'model'
|
||||
import { email, minLength, required, sameAs } from '@vuelidate/validators'
|
||||
// import { ValidationRuleset } from 'vuelidate'
|
||||
import { complexity, registeredemail, registereduser, aportadorexist } from '../../validation'
|
||||
import { computed } from 'vue'
|
||||
|
||||
export const validations = computed(() => ({
|
||||
repeatPassword: {
|
||||
required,
|
||||
sameAsPassword: sameAs('password')
|
||||
},
|
||||
password: {
|
||||
required,
|
||||
minLength: minLength(8),
|
||||
complexity
|
||||
}
|
||||
}))
|
||||
0
src/views/updatepassword/updatepassword.scss
Executable file
0
src/views/updatepassword/updatepassword.scss
Executable file
156
src/views/updatepassword/updatepassword.ts
Executable file
156
src/views/updatepassword/updatepassword.ts
Executable file
@@ -0,0 +1,156 @@
|
||||
import { serv_constants } from '@store/Modules/serv_constants'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { Logo } from '../../components/logo'
|
||||
import { CTitleBanner } from '../../components/CTitleBanner'
|
||||
import { validations } from './request-resetpwd-validate'
|
||||
|
||||
import { defineComponent, ref, reactive } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Updatepassword',
|
||||
props: {
|
||||
mystr: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
myval: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
mybool: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: { Logo, CTitleBanner },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const $router = useRouter()
|
||||
const $route = useRoute()
|
||||
|
||||
const emailsent = ref(false)
|
||||
const form = reactive({
|
||||
password: '',
|
||||
repeatPassword: '',
|
||||
tokenforgot: '',
|
||||
email: '',
|
||||
idapp: ''
|
||||
})
|
||||
|
||||
// @ts-ignore
|
||||
const v$ = useVuelidate(validations, form)
|
||||
|
||||
function created() {
|
||||
// load()
|
||||
}
|
||||
|
||||
|
||||
function submit() {
|
||||
v$.value.$touch()
|
||||
|
||||
if (v$.value.$error) {
|
||||
tools.showNotif($q, t('reg.err.errore_generico'))
|
||||
return
|
||||
}
|
||||
|
||||
$q.loading.show({ message: t('reset.incorso') })
|
||||
|
||||
// console.log('$route.query', $route.query)
|
||||
if ($route.query.tokenforgot) {
|
||||
form.tokenforgot = $route.query.tokenforgot.toString()
|
||||
}
|
||||
if ($route.query.email) {
|
||||
form.email = $route.query.email.toString()
|
||||
}
|
||||
form.idapp = process.env.APP_ID ? process.env.APP_ID : '1'
|
||||
|
||||
console.log(form)
|
||||
userStore.resetpwd(form)
|
||||
.then((ris) => {
|
||||
console.log('ris', ris)
|
||||
if (ris.code === serv_constants.RIS_CODE_OK)
|
||||
$router.push('/signin')
|
||||
else if (ris.code === serv_constants.RIS_CODE_TOKEN_RESETPASSWORD_NOT_FOUND)
|
||||
tools.showNegativeNotif($q, t('reset.token_scaduto'))
|
||||
else
|
||||
tools.showNegativeNotif($q, t('fetch.errore_server'))
|
||||
|
||||
$q.loading.hide()
|
||||
}).catch(error => {
|
||||
console.log('ERROR = ' + error)
|
||||
$q.loading.hide()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function errorMsg(cosa: string, item: any) {
|
||||
try {
|
||||
if (!item.$error) {
|
||||
return ''
|
||||
}
|
||||
// console.log('errorMsg', cosa, item)
|
||||
if (item.$params.email && !item.email) {
|
||||
return t('reg.err.email')
|
||||
}
|
||||
|
||||
if (cosa === 'repeatpassword') {
|
||||
if (!item.sameAsPassword) {
|
||||
return t('reg.err.sameaspassword')
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('item', item)
|
||||
|
||||
if (item.minLength !== undefined) {
|
||||
if (!item.minLength) {
|
||||
return t('reg.err.atleast') + ` ${item.$params.minLength.min} ` + t('reg.err.char')
|
||||
}
|
||||
}
|
||||
if (item.complexity !== undefined) {
|
||||
if (!item.complexity) {
|
||||
return t('reg.err.complexity')
|
||||
}
|
||||
}
|
||||
// if (!item.maxLength) { return t('reg.err.notmore') + ` ${item.$params.maxLength.max} ` + t('reg.err.char') }
|
||||
|
||||
if (item.required !== undefined) {
|
||||
if (!item.required) {
|
||||
return t('reg.err.required')
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(' ....avanti')
|
||||
if (cosa === 'email') {
|
||||
// console.log("EMAIL " + item.isUnique);
|
||||
// console.log(item);
|
||||
if (!item.isUnique) {
|
||||
return t('reg.err.duplicate_email')
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
} catch (error) {
|
||||
// console.log("ERR : " + error);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
form,
|
||||
emailsent,
|
||||
submit,
|
||||
errorMsg,
|
||||
}
|
||||
}
|
||||
})
|
||||
81
src/views/updatepassword/updatepassword.vue
Executable file
81
src/views/updatepassword/updatepassword.vue
Executable file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div class="mypanel">
|
||||
|
||||
<div v-if="!emailsent">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.title_update_pwd')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<div class="column">
|
||||
|
||||
<q-input
|
||||
v-model="form.password"
|
||||
type="password"
|
||||
rounded outlined
|
||||
@blur="$v.form.password.$touch"
|
||||
:error="$v.form.password.$error"
|
||||
:error-message="`${errorMsg('password', $v.form.password)}`"
|
||||
maxlength="30"
|
||||
:label="$t('reg.password')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-model="form.repeatPassword"
|
||||
type="password"
|
||||
maxlength="30"
|
||||
rounded outlined
|
||||
@blur="$v.form.repeatPassword.$touch"
|
||||
:error="$v.form.repeatPassword.$error"
|
||||
:error-message="`${errorMsg('repeatpassword', $v.form.repeatPassword)}`"
|
||||
|
||||
:label="$t('reg.repeatPassword')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key"/>
|
||||
</template>
|
||||
|
||||
</q-input>
|
||||
|
||||
|
||||
<div align="center">
|
||||
<q-btn rounded size="lg" color="primary" @click="submit" :disable="$v.$error">
|
||||
{{$t('reset.update_password')}}
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-primary text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">{{ $t('reset.email_sent')}}</span>
|
||||
</q-banner>
|
||||
<br>
|
||||
|
||||
<div>
|
||||
{{ $t('reset.check_email')}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./updatepassword.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './updatepassword';
|
||||
</style>
|
||||
5
src/views/user/profile/profile.scss
Executable file
5
src/views/user/profile/profile.scss
Executable file
@@ -0,0 +1,5 @@
|
||||
.profile {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
79
src/views/user/profile/profile.ts
Executable file
79
src/views/user/profile/profile.ts
Executable file
@@ -0,0 +1,79 @@
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { defineComponent } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Profile',
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
const $router = useRouter()
|
||||
const globalStore = useGlobalStore()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n();
|
||||
|
||||
function getpayment() {
|
||||
return userStore.my.profile.paymenttypes
|
||||
}
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
}
|
||||
|
||||
function eliminaAccount() {
|
||||
|
||||
$q.dialog({
|
||||
message: t('reg.cancellami', { sitename: t('ws.sitename') }),
|
||||
cancel: {
|
||||
label: t('dialog.cancel')
|
||||
},
|
||||
ok: {
|
||||
label: t('dialog.yes'),
|
||||
push: true
|
||||
},
|
||||
title: t('pages.profile')
|
||||
}).onOk(() => {
|
||||
$q.dialog({
|
||||
message: t('reg.cancellami_2', { sitename: t('ws.sitename') }),
|
||||
cancel: {
|
||||
label: t('dialog.cancel')
|
||||
},
|
||||
ok: {
|
||||
label: t('dialog.yes'),
|
||||
push: true
|
||||
},
|
||||
title: t('pages.profile')
|
||||
})
|
||||
.onOk(() => {
|
||||
globalStore.DeleteRec({ table: toolsext.TABUSER, id: userStore.my._id })
|
||||
.then((ris: any) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif($q, t('reg.account_cancellato'))
|
||||
userStore.logout()
|
||||
$router.replace('/')
|
||||
} else
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
eliminaAccount,
|
||||
profile,
|
||||
getpayment,
|
||||
tools,
|
||||
}
|
||||
}
|
||||
})
|
||||
240
src/views/user/profile/profile.vue
Executable file
240
src/views/user/profile/profile.vue
Executable file
@@ -0,0 +1,240 @@
|
||||
<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>-->
|
||||
|
||||
<br/>
|
||||
<div class="row justify-center">
|
||||
<q-btn
|
||||
push
|
||||
rounded
|
||||
color="primary"
|
||||
size="md"
|
||||
to="/requestresetpwd"
|
||||
:label="$t('reg.modificapassword')">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</CTitleBanner>
|
||||
|
||||
<CTitleBanner
|
||||
class="q-pa-xs" title="Informazioni su di te" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
|
||||
|
||||
<div class="column">
|
||||
<div class="row">
|
||||
<CMyFieldDb
|
||||
title="Motivazioni"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="motivazioni"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb
|
||||
title="Competenze e Professionalità"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="competenze_professionalita"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb
|
||||
title="Cosa potrei offrire?"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="cosa_offrire"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb
|
||||
title="Cosa vorrei ricevere?"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="cosa_ricevere"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb
|
||||
title="Altre Comunicazioni"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="altre_comunicazioni"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div class="row">
|
||||
<CMyFieldDb
|
||||
title="Come ci hai conosciuto?"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="come_ci_hai_conosciuto"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
<!--
|
||||
<CTitleBanner class="q-pa-xs" :title="$t('pages.payment')" bgcolor="bg-primary" clcolor="text-white"
|
||||
myclass="myshad" :canopen="true">
|
||||
<div class="row fa-border justify-center items-center">
|
||||
|
||||
<CMyFieldDb v-if="tools.isselectPayeer()"
|
||||
:title="$t('reg.payeer_id')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
myimg="statics/images/payeer.jpg"
|
||||
mysubkey="payeer_id"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb v-if="tools.isselectAdvCash()"
|
||||
:title="$t('reg.advcash_id')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="advcash_id"
|
||||
myimg="statics/images/advcash.jpg"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb v-if="tools.isselectRevolut()"
|
||||
:title="$t('reg.revolut')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="revolut"
|
||||
myimg="statics/images/revolut.jpg"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="tools.isselectPaypal()"
|
||||
:title="$t('reg.email_paypal')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="email_paypal"
|
||||
myimg="statics/images/paypal.jpg"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb v-if="tools.isselectPaypal()"
|
||||
:title="$t('reg.link_payment')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="link_payment"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
<CMyFieldDb :title="$t('reg.country_pay')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="country_pay"
|
||||
:type="tools.FieldType.nationality">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb :title="$t('reg.note_payment')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="note_payment"
|
||||
:type="tools.FieldType.string">
|
||||
</CMyFieldDb>
|
||||
|
||||
</div>
|
||||
|
||||
<CMyFieldDb :title="$t('reg.paymenttype')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="paymenttypes"
|
||||
:type="tools.FieldType.multiselect"
|
||||
jointable="paymenttypes">
|
||||
</CMyFieldDb>
|
||||
|
||||
</CTitleBanner>
|
||||
-->
|
||||
|
||||
<br><br>
|
||||
<div class="text-center">
|
||||
<q-btn rounded size="md" color="negative" @click="eliminaAccount" :label="$t('reg.cancella_account')">
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./profile.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './profile.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user