diff --git a/.env.development b/.env.development index cf696866..bcfab9b1 100755 --- a/.env.development +++ b/.env.development @@ -15,9 +15,9 @@ MONGODB_HOST="http://localhost:3000" LOGO_REG="freeplanet-logo-full.svg" TEST_NAME="Paolo" TEST_SURNAME="Arena" -TEST_EMAIL="paolo.arena77@gmail.com" -TEST_USERNAME="" -TEST_PASSWORD="" +TEST_EMAIL="paolo@freeplanet.app" +TEST_USERNAME="paoloar77" +TEST_PASSWORD="passpao1fr@1A" TEST_APORTADOR="" PUBLICKEY_PUSH='BGxRrFWnPoa_ImUaWXmeEOFVI9VNKVKaAPsvsM1XY6wn24yxp9MyOQ4crNYCJKxSXV65Y1GblW5_VLoamedcZ1I' IN_CONSTRUCTION="0" diff --git a/.file.out.txt.kate-swp b/.file.out.txt.kate-swp deleted file mode 100644 index aa12db24..00000000 Binary files a/.file.out.txt.kate-swp and /dev/null differ diff --git a/package.json b/package.json index 611f0ba5..b84dc405 100755 --- a/package.json +++ b/package.json @@ -22,19 +22,19 @@ "generate-sw": "workbox generateSW workbox-config.js" }, "dependencies": { - "@quasar/extras": "^1.10.12", - "@vue/compat": "^3.2.10", - "@vue/compiler-sfc": "^3.2.10", + "@quasar/extras": "^1.11.0", + "@vue/compat": "^3.2.12", + "@vue/compiler-sfc": "^3.2.12", "@vue/eslint-config-standard": "^6.1.0", - "@vuelidate/core": "^2.0.0-alpha.25", - "@vuelidate/validators": "^2.0.0-alpha.21", + "@vuelidate/core": "^2.0.0-alpha.26", + "@vuelidate/validators": "^2.0.0-alpha.22", "acorn": "^8.5.0", "autoprefixer": "^10.3.4", "axios": "^0.21.4", "bcryptjs": "^2.4.3", - "core-js": "^3.17.2", + "core-js": "^3.17.3", "crypto": "^1.0.1", - "date-fns": "^2.23.0", + "date-fns": "^2.24.0", "dotenv": "^10.0.0", "eslint-plugin-quasar": "^1.0.0", "graphql": "^15.5.3", @@ -45,20 +45,20 @@ "localforage": "^1.10.0", "lodash": "^4.17.21", "normalize.css": "^8.0.1", - "npm": "^7.22.0", + "npm": "^7.24.0", "nprogress": "^0.2.0", - "pinia": "^2.0.0-rc.6", + "pinia": "^2.0.0-rc.9", "prerender-spa-plugin": "^3.4.0", - "quasar": "^2.0.4", + "quasar": "^2.1.0", "quasar-extras": "^2.0.9", "register-service-worker": "^1.7.2", "vee-validate": "^4.4.10", - "vue": "^3.2.10", + "vue": "^3.2.12", "vue-class-component": "^8.0.0-rc.1", "vue-country-code": "^1.1.2", "vue-i18n": "^9.1.7", "vue-idb": "^0.2.0", - "vue-loader": "^16.0.0", + "vue-loader": "^16.5.0", "vue-property-decorator": "^10.0.0-rc.3", "vue-router": "^4.0.11", "vue-scroll-reveal": "^1.0.11", @@ -70,7 +70,7 @@ "vuex-typex": "^3.1.9" }, "devDependencies": { - "@babel/eslint-parser": "^7.15.4", + "@babel/eslint-parser": "^7.15.7", "@quasar/app": "^3.1.0", "@types/bcryptjs": "^2.4.2", "@types/googlemaps": "^3.43.3", @@ -79,21 +79,21 @@ "@types/dotenv": "^8.2.0", "@types/jest": "^27.0.1", "@types/js-cookie": "^2.2.7", - "@types/node": "^16.7.13", + "@types/node": "^16.9.2", "@types/nprogress": "^0.2.0", - "@typescript-eslint/eslint-plugin": "^4.31.0", - "@typescript-eslint/parser": "^4.31.0", + "@typescript-eslint/eslint-plugin": "^4.31.1", + "@typescript-eslint/parser": "^4.31.1", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.24.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^5.1.0", - "eslint-plugin-vue": "^7.17.0", + "eslint-plugin-vue": "^7.18.0", "eslint-webpack-plugin": "^3.0.1", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.3.2", "http-proxy-middleware": "^2.0.1", - "jest": "^27.1.1", + "jest": "^27.2.0", "json-loader": "^0.5.7", "node-sass": "^6.0.1", "npm-check-updates": "^11.8.5", @@ -101,17 +101,17 @@ "postcss": "^8.3.6", "postcss-loader": "^6.1.1", "sass-loader": "^12.1.0", - "strip-ansi": "=7.0.0", + "strip-ansi": "=7.0.1", "ts-jest": "^27.0.5", "ts-loader": "^9.2.5", "tslint": "^6.1.3", "tslint-config-standard": "^9.0.0", "tslint-loader": "^3.5.4", - "typescript": "^4.4.2", + "typescript": "^4.4.3", "vue-cli-plugin-element-ui": "^1.1.4", "vueify": "^9.4.1", - "workbox-cli": "^6.2.4", - "workbox-webpack-plugin": "^6.2.4" + "workbox-cli": "^6.3.0", + "workbox-webpack-plugin": "^6.3.0" }, "browser": { "crypto": false diff --git a/src/App.ts b/src/App.ts index 2a6db6eb..ae2618fe 100755 --- a/src/App.ts +++ b/src/App.ts @@ -5,8 +5,6 @@ import { useI18n } from '@src/boot/i18n' import { useGlobalStore } from '@store/globalStore' import { useUserStore } from '@store/UserStore' import { Header } from '@/components/Header' -import { toolsext } from '@store/Modules/toolsext' -import globalroutines from './globalroutines/index' import { computed } from 'vue' import { CProvaPao } from '@/components/CProvaPao' @@ -63,7 +61,7 @@ export default { if (chiamaautologin) { // console.log('CHIAMA autologin_FromLocalStorage') userStore.autologin_FromLocalStorage($router) - .then((loadstorage) => { + .then((loadstorage: any) => { if (loadstorage) { diff --git a/src/components/CMyFieldDb/CMyFieldDb.ts b/src/components/CMyFieldDb/CMyFieldDb.ts index 72035e76..292c5059 100755 --- a/src/components/CMyFieldDb/CMyFieldDb.ts +++ b/src/components/CMyFieldDb/CMyFieldDb.ts @@ -9,6 +9,11 @@ import { tools } from '@store/Modules/tools' import { toolsext } from '@store/Modules/toolsext' import { costanti } from '@costanti' import MixinBase from '../../mixins/mixin-base' +import { CMyEditor } from '@/components/CMyEditor' +import { CMySelect } from '@/components/CMySelect' +import { CMyChipList } from '@/components/CMyChipList' +import { CMyToggleList } from '@/components/CMyToggleList' +import { CDateTime } from '@/components/CDateTime' export default defineComponent({ name: 'CMyFieldDb', @@ -66,7 +71,7 @@ export default defineComponent({ default: '', }, }, - // components: { CMyEditor, CMySelect, CMyChipList, CMyToggleList, CDateTime }, + components: { CMyEditor, CMySelect, CMyChipList, CMyToggleList, CDateTime }, setup(props, { emit }) { const $q = useQuasar() const { t } = useI18n() @@ -172,7 +177,7 @@ export default defineComponent({ } function myvalprinted() { - return visuValByType(myvalue) + return visuValByType(myvalue.value) } function savefield(value: any, initialval: any) { @@ -220,6 +225,9 @@ export default defineComponent({ col, countryname, onInput, + tools, + costanti, + } }, }) diff --git a/src/components/CMyFieldDb/CMyFieldDb.vue b/src/components/CMyFieldDb/CMyFieldDb.vue index 198c467c..e9080e14 100755 --- a/src/components/CMyFieldDb/CMyFieldDb.vue +++ b/src/components/CMyFieldDb/CMyFieldDb.vue @@ -8,10 +8,10 @@
+ :src="myimg" + class="text-center" + style="height: 50px; width: 50px;" + :alt="title">
{{ title }}
@@ -20,7 +20,7 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
+ dark color="green" v-model="myvalue" :label="col.title" + @input="savefieldboolean">
-
+
-
+
-
+
+ v-model="myvalue" + autogrow + @keyup.enter.stop + autofocus>
-
+
+ v-model="myvalue" + type="password" + @keyup.enter.stop + autofocus>
-
+
+ v-model="myvalue" type="number" + autofocus>
-
+
+ label="Ore" v-model:value="myvalue" + optval="_id" optlab="label" + :useinput="false" + o :options="tools.SelectHours">
-
+
+ :label="col.title" + :options="db_fieldsTable.getTableJoinByName(col.jointable)" + v-model:value="myvalue" + :optval="db_fieldsTable.getKeyByTable(col.jointable)" + :optlab="db_fieldsTable.getLabelByTable(col.jointable)">
-
+
-
+
+ :label="col.title" + v-model:value="myvalue" + :optval="db_fieldsTable.getKeyByTable(col.jointable)" + :optlab="db_fieldsTable.getLabelByTable(col.jointable)" + :options="db_fieldsTable.getTableJoinByName(col.jointable)" + :useinput="false">
-
+
- - + -->
@@ -215,10 +214,10 @@ label="Ore" v-model:value="myvalue"
-
+
- - + -->
-
+
+ :label="col.title" + :options="db_fieldsTable.getTableJoinByName(col.jointable)" + v-model:value="myvalue" + :optval="db_fieldsTable.getKeyByTable(col.jointable)" + :optlab="db_fieldsTable.getLabelByTable(col.jointable)" + :isarray="true">
-
+
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.ts b/src/components/CMyPopupEdit/CMyPopupEdit.ts index 4737f974..36f0673b 100755 --- a/src/components/CMyPopupEdit/CMyPopupEdit.ts +++ b/src/components/CMyPopupEdit/CMyPopupEdit.ts @@ -170,7 +170,7 @@ export default defineComponent({ function SaveValueInt(newVal: any, valinitial: any) { - // console.log('SaveValueInt', newVal, valinitial) + console.log('SaveValueInt', newVal, valinitial) // Update value in table memory if (props.subfield !== '') { @@ -192,6 +192,7 @@ export default defineComponent({ } function Savedb(newVal: any, valinitial: any) { + console.log('Savedb') if (props.col.fieldtype === costanti.FieldType.boolean) { // console.log('myvalue', myvalue, newVal, myvalueprec) @@ -330,6 +331,7 @@ export default defineComponent({ selectcountry, intcode_change, tools, + costanti, fieldsTable, onInput, } diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.vue b/src/components/CMyPopupEdit/CMyPopupEdit.vue index 79ff411b..725ea8c9 100755 --- a/src/components/CMyPopupEdit/CMyPopupEdit.vue +++ b/src/components/CMyPopupEdit/CMyPopupEdit.vue @@ -2,7 +2,7 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -145,33 +145,33 @@
-
+
-
+
-
+
{{ myvalue }}
-
+
{{ myvalue }}
- + - +
-
+
-
+
-
+
-
+
-
+
@@ -245,7 +245,7 @@
-
+
+ + myvalue: {{ myvalue}} -
+
{{ visuValByType(myvalue, col, row) }}
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
join: {{ col.jointable }}
rec.description !== descr) + userStore.my.profile.myshares = userStore.my.profile.myshares.filter((rec: any) => rec.description !== descr) const mydata = { 'profile.myshares': userStore.my.profile.myshares @@ -222,7 +222,7 @@ export default defineComponent({ if (userStore.my.profile.myshares) { if (userStore.my.profile.myshares.length === 0) return false - return userStore.my.profile.myshares.find((rec) => rec.description.toLowerCase() === descr.toLowerCase()) + return userStore.my.profile.myshares.find((rec: any) => rec.description.toLowerCase() === descr.toLowerCase()) } return null } diff --git a/src/components/CSignIn/CSignIn-validate.ts b/src/components/CSignIn/CSignIn-validate.ts index 52f32587..391ed568 100755 --- a/src/components/CSignIn/CSignIn-validate.ts +++ b/src/components/CSignIn/CSignIn-validate.ts @@ -1,17 +1,20 @@ import { ISigninOptions } from 'model' import { required, minLength } from '@vuelidate/validators' +import { computed } from 'vue' export type TSignin = { signin: ISigninOptions, validationGroup: string[] } -export const validations = { - signin: { - password: { - required, - minLength: minLength(8), +export const validations = computed(() => { + return { + signin: { + password: { + required, + minLength: minLength(8), + }, + username: { + required, + minLength: minLength(6), + }, }, - username: { - required, - minLength: minLength(6), - }, - }, -} + } +}) diff --git a/src/components/CSignUp/CSignUp-validate.ts b/src/components/CSignUp/CSignUp-validate.ts deleted file mode 100755 index bac28fe9..00000000 --- a/src/components/CSignUp/CSignUp-validate.ts +++ /dev/null @@ -1,41 +0,0 @@ -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 interface TSignup { - signup: ISignupOptions, - validationGroup: string[] -} - -export const validations = { - repeatPassword: { - required, - sameAsPassword: sameAs('password'), - }, - password: { - required, - minLength: minLength(8), - complexity, - }, - username: { - required, - minLength: minLength(6), - registereduser, - }, - name: { - required, - }, - surname: { - required, - }, - email: { - email, - registeredemail, - required, - }, - terms: { - required, - }, -} diff --git a/src/components/CSignUp/CSignUp.ts b/src/components/CSignUp/CSignUp.ts index 3914ee52..436e7d07 100755 --- a/src/components/CSignUp/CSignUp.ts +++ b/src/components/CSignUp/CSignUp.ts @@ -1,7 +1,6 @@ import { tools } from '@store/Modules/tools' import { ISignupOptions } from 'model' -import { validations, TSignup } from './CSignUp-validate' import { Logo } from '../../components/logo' @@ -16,8 +15,11 @@ import { DefaultProfile, useUserStore } from '@store/UserStore' import useValidate from '@vuelidate/core' import useVuelidate from '@vuelidate/core' -import 'vue3-tel-input/dist/vue3-tel-input.css' +import { email, minLength, required, sameAs } from '@vuelidate/validators' +// import { ValidationRuleset } from 'vuelidate' +import { complexity, registeredemail, registereduser } from '../../validation' +import 'vue3-tel-input/dist/vue3-tel-input.css' // import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar' @@ -63,6 +65,39 @@ export default defineComponent({ aportador_solidario: '', }) + const validations: any = computed(() => { + return { + repeatPassword: { + required, + repeatPassword: sameAs(signup.password), + }, + password: { + required, + minLength: minLength(8), + complexity, + }, + username: { + required, + minLength: minLength(6), + registereduser, + }, + name: { + required, + }, + surname: { + required, + }, + email: { + email, + registeredemail, + required, + }, + terms: { + required, + }, + } + }) + // @ts-ignore const v$ = useVuelidate(validations, signup) diff --git a/src/components/CTitleBanner/CTitleBanner.vue b/src/components/CTitleBanner/CTitleBanner.vue index 711e9f43..53be5661 100755 --- a/src/components/CTitleBanner/CTitleBanner.vue +++ b/src/components/CTitleBanner/CTitleBanner.vue @@ -3,7 +3,7 @@ @@ -12,7 +12,7 @@ {{ title }} diff --git a/src/components/Header/Header.ts b/src/components/Header/Header.ts index 8da307a2..bd49e52c 100755 --- a/src/components/Header/Header.ts +++ b/src/components/Header/Header.ts @@ -473,6 +473,7 @@ export default defineComponent({ getNumMsgUnread, getMsgText, paotest, + logoutHandler, } }, diff --git a/src/mixins/mixin-base.ts b/src/mixins/mixin-base.ts index e7f09506..f385abb7 100755 --- a/src/mixins/mixin-base.ts +++ b/src/mixins/mixin-base.ts @@ -45,7 +45,7 @@ export default function () { const $q = useQuasar() const { t } = useI18n() - // console.log('setValDb', key, value, serv, table, subkey) + console.log('setValDb', key, value, serv, table, subkey) let mydatatosave: IDataPass | null = null if (table === 'users') { const myid = userStore.my._id @@ -121,7 +121,7 @@ export default function () { }, ) } - // console.log('myrec', myrec) + console.log('myrec', myrec) mydatatosave = { // @ts-ignore @@ -149,7 +149,7 @@ export default function () { } } - // console.log('mydatatosave', mydatatosave) + console.log('mydatatosave', mydatatosave) // @ts-ignore globalStore.saveFieldValue(mydatatosave).then((esito) => { diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js index 3993b6d2..79937064 100755 --- a/src/statics/lang/it.js +++ b/src/statics/lang/it.js @@ -345,7 +345,7 @@ const msg_it = { you: 'Tu', cancella_invitato: 'Elimina Invitato', cancella_account: 'Elimina Profilo', - cancellami: 'Sei sicuro di voler Eliminare completamente la tua Registrazione su {sitename}, uscendo così dal movimento? Non potrai piu\' accedere al sito tramite i tuoi dati, Perderai la tua POSIZIONE e i Tuoi Invitati verranno REGALATI a chi ti ha invitato.', + cancellami: 'Sei sicuro di voler Eliminare completamente la tua Registrazione ed i tuoi dati su {sitename}. Non potrai piu\' accedere al sito tramite le tue credenziali.', cancellami_2: 'ULTIMO AVVISO! Vuoi uscire Definitivamente da {sitename} ?', account_cancellato: 'Il tuo Profilo è stato cancellato correttamente', regala_invitato: 'Regala Invitato', diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index f0368e71..1bdaa148 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -4260,14 +4260,6 @@ export const tools = { } console.log('errorMsg', cosa, item) - if (cosa === 'repeatpassword') { - if (item.sameAsPassword) { - if (item.sameAsPassword.$invalid) { - return t('reg.err.sameaspassword') - } - } - } - if (item.email) { if (item.email.$invalid) return t('reg.err.email') @@ -4310,6 +4302,12 @@ export const tools = { } } else if ((cosa === 'name') || (cosa === 'surname')) { // console.log(item); + } else if (cosa === 'repeatpassword') { + if (item.matchText) { + if (item.matchText.$invalid) { + return t('reg.err.sameaspassword') + } + } } return '' diff --git a/src/store/Modules/toolsext.ts b/src/store/Modules/toolsext.ts index 9fb2c93b..f797d888 100755 --- a/src/store/Modules/toolsext.ts +++ b/src/store/Modules/toolsext.ts @@ -141,10 +141,13 @@ export const toolsext = { const globalStore = useGlobalStore() if (table === 'users') { if (keystr === 'profile') { - if (subkey) { // @ts-ignore + if (subkey) { + console.log('userStore.my.profile', userStore.my.profile, 'subkey', subkey, ) + // @ts-ignore return userStore.my.profile[subkey] } } else if (keystr) { // @ts-ignore + // @ts-ignore return userStore.my[keystr] } } else if (table === 'todos') { diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts index de4a8cdd..0cc9db20 100755 --- a/src/store/UserStore.ts +++ b/src/store/UserStore.ts @@ -108,28 +108,6 @@ export const useUserStore = defineStore('UserStore', { getters: { - getUserByUsername: (state: IUserState) => (username: string): IUserFields | null => { - // Check if is this User! - if (state.my.username === username) return state.my - - let trovato = null - if (state.usersList) trovato = state.usersList.find((item) => item.username === username) - - return (trovato) || null - }, - - getImgByUsername: (state: IUserState) => (username: string): string => { - if (username === '') return '' - // Check if is this User! - // @ts-ignore - const myrec = this.getUserByUsername(username) - // console.log('myrec', myrec) - if (myrec && myrec.profile && !!myrec.profile.img && myrec.profile.img !== '' && myrec.profile.img !== 'undefined') { - return myrec.profile.img - } - return '' - }, - isServerError(): boolean { return (this.servercode === toolsext.ERR_SERVERFETCH) }, @@ -137,21 +115,6 @@ export const useUserStore = defineStore('UserStore', { getServerCode: (state: IUserState): number => (state.servercode ? state.servercode : 0), getMsg: (state: IUserState): string => (state.msg ? state.msg : ''), - getNameSurnameByUserId: (state: IUserState) => (userId: string): string => { - - // @ts-ignore - const user = this.getUserByUserId(state, userId) - if (user) return `${user.name} ${user.surname}` - return `(${userId})` - }, - - getNameSurnameByUsername: (state: IUserState) => (username: string): string => { - // @ts-ignore - const user = this.getUserByUsername(state, username) - if (user) return `${user.name} ${user.surname}` - return `(${username})` - }, - getUsersList: (mystate: IUserState) => { return mystate.usersList }, @@ -169,17 +132,6 @@ export const useUserStore = defineStore('UserStore', { }, - getUserByUserId: (state: IUserState) => (userId: string): IUserFields | null => { - // Check if is this User! - if (state.my._id === userId) return state.my - - let trovato = null - - if (state.usersList) trovato = state.usersList.find((item) => item._id === userId) - - return (trovato) || null - }, - isTokenInvalid: (state: IUserState) => { try { return (state.my.tokens!.length <= 0) @@ -196,11 +148,60 @@ export const useUserStore = defineStore('UserStore', { } }, - getMsgError: (state: IUserState) => (err: number): string => { + }, + + actions: { + getUserByUsername(username: string): IUserFields | null { + // Check if is this User! + if (this.my.username === username) return this.my + + let trovato = null + if (this.usersList) trovato = this.usersList.find((item: any) => item.username === username) + + return (trovato) || null + }, + + + getImgByUsername(username: string): string { + if (username === '') return '' + // Check if is this User! + const myrec = this.getUserByUsername(username) + // console.log('myrec', myrec) + if (myrec && myrec.profile && !!myrec.profile.img && myrec.profile.img !== '' && myrec.profile.img !== 'undefined') { + return myrec.profile.img + } + return '' + }, + + getNameSurnameByUserId(userId: string): string { + + const user = this.getUserByUserId(userId) + if (user) return `${user.name} ${user.surname}` + return `(${userId})` + }, + + getNameSurnameByUsername(username: string): string { + const user = this.getUserByUsername(username) + if (user) return `${user.name} ${user.surname}` + return `(${username})` + }, + + getUserByUserId(userId: string): IUserFields | null { + // Check if is this User! + if (this.my._id === userId) return this.my + + let trovato = null + + if (this.usersList) trovato = this.usersList.find((item: any) => item._id === userId) + + return (trovato) || null + }, + + getMsgError(err: number): string { let msgerrore = '' if (err !== tools.OK) { - msgerrore = `Error [${state.servercode}]: ` - if (state.servercode === toolsext.ERR_SERVERFETCH) { + msgerrore = `Error [${this.servercode}]: ` + if (this.servercode === toolsext.ERR_SERVERFETCH) { msgerrore = translate('fetch.errore_server') } else { msgerrore = translate('fetch.errore_generico') @@ -215,9 +216,7 @@ export const useUserStore = defineStore('UserStore', { return msgerrore }, - }, - actions: { clearAuthData() { this.my = DefaultUser // resetArrToken(mystate.my.tokens) @@ -232,18 +231,6 @@ export const useUserStore = defineStore('UserStore', { return true }, - setErrorCatch(axerr: Types.AxiosError) { - try { - if (this.servercode !== toolsext.ERR_SERVERFETCH) { - this.servercode = axerr.getCode() - } - // this.msg = axerr.getMsg() - console.log('Err catch: (servercode:', axerr.getCode(), axerr.getMsgError(), ')') - } catch (e) { - console.log('Err catch:', axerr) - } - }, - async resetpwd(paramquery: any) { const mydata = { ...paramquery } @@ -265,6 +252,18 @@ export const useUserStore = defineStore('UserStore', { }, + setErrorCatch(axerr: Types.AxiosError) { + try { + if (this.servercode !== toolsext.ERR_SERVERFETCH) { + this.servercode = axerr.getCode() + } + // this.msg = axerr.getMsg() + console.log('Err catch: (servercode:', axerr.getCode(), axerr.getMsgError(), ')') + } catch (e) { + console.log('Err catch:', axerr) + } + }, + async setLangServer() { const mydata = { username: this.my.username, diff --git a/src/views/admin/dbop/dbop.vue b/src/views/admin/dbop/dbop.vue index c45a6713..1ab23758 100755 --- a/src/views/admin/dbop/dbop.vue +++ b/src/views/admin/dbop/dbop.vue @@ -6,7 +6,7 @@ title="SITO_ONLINE" mykey="SITO_ONLINE" :serv="false" - :type="tools.FieldType.boolean"> + :type="costanti.FieldType.boolean">
@@ -14,7 +14,7 @@ title="SITO_ONLINE" title="ABILITA CRONTAB (1 ora)" mykey="CRONTAB" :serv="false" - :type="tools.FieldType.boolean"> + :type="costanti.FieldType.boolean">
@@ -98,22 +98,22 @@ title="ABILITA CRONTAB (1 ora)" + :type="costanti.FieldType.number"> + :type="costanti.FieldType.number"> + :type="costanti.FieldType.boolean"> + :type="costanti.FieldType.boolean">
diff --git a/src/views/email/unsubscribe/unsubscribe.ts b/src/views/email/unsubscribe/unsubscribe.ts index 8be868d3..afb7bc46 100755 --- a/src/views/email/unsubscribe/unsubscribe.ts +++ b/src/views/email/unsubscribe/unsubscribe.ts @@ -59,7 +59,7 @@ export default defineComponent({ riscode.value = ris.code risultato.value = ris.msg - }).catch((err) => { + }).catch((err: any) => { console.log('ERR = ' + err) }) } diff --git a/src/views/login/signup/signup-validate.ts b/src/views/login/signup/signup-validate.ts deleted file mode 100755 index f8e3a58e..00000000 --- a/src/views/login/signup/signup-validate.ts +++ /dev/null @@ -1,37 +0,0 @@ -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, - }, - }, -} diff --git a/src/views/login/signup/signup.vue b/src/views/login/signup/signup.vue index 9afb8aad..497481ba 100755 --- a/src/views/login/signup/signup.vue +++ b/src/views/login/signup/signup.vue @@ -1,6 +1,6 @@