- Added TablesList page
- Added Insert Record empty
This commit is contained in:
@@ -17,7 +17,6 @@ import { GlobalStore, Projects, Todos, UserStore } from '@store'
|
||||
import messages from '../../statics/i18n'
|
||||
import globalroutines from './../../globalroutines/index'
|
||||
|
||||
|
||||
import { cfgrouter } from '../../router/route-config'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
import { IParamsQuery } from '@src/model/GlobalStore'
|
||||
@@ -41,6 +40,7 @@ const state: IGlobalState = {
|
||||
mobileMode: false,
|
||||
menuCollapse: true,
|
||||
leftDrawerOpen: true,
|
||||
RightDrawerOpen: false,
|
||||
stateConnection: stateConnDefault,
|
||||
networkDataReceived: false,
|
||||
cfgServer: [],
|
||||
@@ -504,15 +504,30 @@ namespace Actions {
|
||||
}
|
||||
|
||||
async function loadTable(context, params: IParamsQuery) {
|
||||
console.log('loadTable', params)
|
||||
// console.log('loadTable', params)
|
||||
|
||||
return await Api.SendReq('/gettable', 'POST', params)
|
||||
.then((res) => {
|
||||
console.table(res)
|
||||
// console.table(res)
|
||||
return res.data
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('error loadUsersList', error)
|
||||
console.log('error loadTable', error)
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
async function saveTable(context, mydata: object) {
|
||||
// console.log('saveTable', mydata)
|
||||
|
||||
return await Api.SendReq('/settable', 'POST', mydata)
|
||||
.then((res) => {
|
||||
// console.table(res)
|
||||
return res.data
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('error saveTable', error)
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return null
|
||||
})
|
||||
@@ -551,7 +566,6 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export const actions = {
|
||||
setConta: b.dispatch(setConta),
|
||||
createPushSubscription: b.dispatch(createPushSubscription),
|
||||
@@ -563,6 +577,7 @@ namespace Actions {
|
||||
checkUpdates: b.dispatch(checkUpdates),
|
||||
saveFieldValue: b.dispatch(saveFieldValue),
|
||||
loadTable: b.dispatch(loadTable),
|
||||
saveTable: b.dispatch(saveTable),
|
||||
DeleteRec: b.dispatch(DeleteRec)
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface INotify {
|
||||
}
|
||||
|
||||
export const tools = {
|
||||
MAX_CHARACTERS: 60,
|
||||
projects: 'projects',
|
||||
todos: 'todos',
|
||||
EMPTY: 0,
|
||||
@@ -1681,7 +1682,11 @@ export const tools = {
|
||||
if (!value) {
|
||||
return ''
|
||||
}
|
||||
return value.substring(0, numchars) + '...'
|
||||
try {
|
||||
return value.substring(0, numchars) + '...'
|
||||
}catch (e) {
|
||||
return value
|
||||
}
|
||||
},
|
||||
|
||||
getDateNow() {
|
||||
@@ -1877,8 +1882,8 @@ export const tools = {
|
||||
|
||||
const maxh2 = this.heightGallVal()
|
||||
|
||||
console.log('maxh2', maxh2)
|
||||
console.log('maxheight', maxheight)
|
||||
// console.log('maxh2', maxh2)
|
||||
// console.log('maxheight', maxheight)
|
||||
|
||||
let ris = 0
|
||||
|
||||
@@ -1892,7 +1897,7 @@ export const tools = {
|
||||
ris = parseInt(myheightmobile, 10)
|
||||
}
|
||||
|
||||
console.log('ris', ris)
|
||||
// console.log('ris', ris)
|
||||
return ris
|
||||
},
|
||||
|
||||
@@ -2199,7 +2204,8 @@ export const tools = {
|
||||
tools.showNotif(mythis.$q, mythis.$t('login.errato'), { color: 'negative', icon: 'notifications' })
|
||||
mythis.iswaitingforRes = false
|
||||
if (ispageLogin) {
|
||||
mythis.$router.push('/signin')
|
||||
GlobalStore.state.RightDrawerOpen = true
|
||||
// mythis.$router.push('/signin')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user