- Update the way to use the data records on Vuex with Getters!
- Fix: mongodb call passing array todos and categiroes already splitted
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
|
||||
import {mapActions} from 'vuex'
|
||||
import * as types from '../../store/mutation-types'
|
||||
import { rescodes } from '../../../store/Modules/rescodes'
|
||||
import { rescodes } from '../../../store/Modules/tools'
|
||||
|
||||
import {serv_constants} from '../../store/Modules/serv_constants'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
import { rescodes } from '../../../store/Modules/rescodes'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { serv_constants } from '../../../store/Modules/serv_constants'
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ export default class Signin extends Vue {
|
||||
checkErrors(riscode) {
|
||||
// console.log('checkErrors: ', riscode)
|
||||
try {
|
||||
if (riscode === rescodes.OK) {
|
||||
if (riscode === tools.OK) {
|
||||
this.showNotif({ type: 'positive', message: this.$t('login.completato') })
|
||||
this.$router.push('/')
|
||||
} else if (riscode === serv_constants.RIS_CODE_LOGIN_ERR) {
|
||||
@@ -97,9 +97,9 @@ export default class Signin extends Vue {
|
||||
this.$router.push('/signin')
|
||||
})
|
||||
|
||||
} else if (riscode === rescodes.ERR_SERVERFETCH) {
|
||||
} else if (riscode === tools.ERR_SERVERFETCH) {
|
||||
this.showNotif(this.$t('fetch.errore_server'))
|
||||
} else if (riscode === rescodes.ERR_GENERICO) {
|
||||
} else if (riscode === tools.ERR_GENERICO) {
|
||||
let msg = this.$t('fetch.errore_generico') + UserStore.mutations.getMsgError(riscode)
|
||||
this.showNotif(msg)
|
||||
} else {
|
||||
@@ -155,7 +155,7 @@ export default class Signin extends Vue {
|
||||
UserStore.actions.signin(this.signin)
|
||||
.then((riscode) => {
|
||||
// console.log('signin FINITO CALL: riscode=', riscode)
|
||||
if (riscode === rescodes.OK) {
|
||||
if (riscode === tools.OK) {
|
||||
router.push('/signin')
|
||||
}
|
||||
return riscode
|
||||
@@ -171,7 +171,7 @@ export default class Signin extends Vue {
|
||||
return riscode
|
||||
})
|
||||
.then((riscode) => {
|
||||
if (riscode === rescodes.OK) {
|
||||
if (riscode === tools.OK) {
|
||||
GlobalStore.actions.createPushSubscription()
|
||||
.then(rissub => {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { UserStore } from '@store'
|
||||
import { rescodes } from '../../../store/Modules/rescodes'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
|
||||
import { ISignupOptions, IUserState } from 'model'
|
||||
import { validations, TSignup } from './signup-validate'
|
||||
@@ -125,16 +125,16 @@ export default class Signup extends Vue {
|
||||
|
||||
checkErrors(riscode: number) {
|
||||
console.log('checkErrors', riscode)
|
||||
if (riscode === rescodes.DUPLICATE_EMAIL_ID) {
|
||||
if (riscode === tools.DUPLICATE_EMAIL_ID) {
|
||||
this.showNotif(this.$t('reg.err.duplicate_email'))
|
||||
} else if (riscode === rescodes.DUPLICATE_USERNAME_ID) {
|
||||
} else if (riscode === tools.DUPLICATE_USERNAME_ID) {
|
||||
this.showNotif(this.$t('reg.err.duplicate_username'))
|
||||
} else if (riscode === rescodes.ERR_SERVERFETCH) {
|
||||
} else if (riscode === tools.ERR_SERVERFETCH) {
|
||||
this.showNotif(this.$t('fetch.errore_server'))
|
||||
} else if (riscode === rescodes.ERR_GENERICO) {
|
||||
} else if (riscode === tools.ERR_GENERICO) {
|
||||
let msg = this.$t('fetch.errore_generico') + UserStore.mutations.getMsgError(riscode)
|
||||
this.showNotif(msg)
|
||||
} else if (riscode === rescodes.OK) {
|
||||
} else if (riscode === tools.OK) {
|
||||
this.$router.push('/signin')
|
||||
this.showNotif({type: 'warning', textColor: 'black', message: this.$t('components.authentication.email_verification.link_sent')})
|
||||
} else {
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
import {mapActions} from 'vuex'
|
||||
import * as types from '../../store/mutation-types'
|
||||
//import {rescodes} from '../../store/Modules/user'
|
||||
//import {tools} from '../../store/Modules/user'
|
||||
|
||||
import {serv_constants} from '../../store/Modules/serv_constants';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user