- add set cookies to table
- fix filters
This commit is contained in:
@@ -863,6 +863,7 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||
AddCol({ name: 'email', label_trans: 'reg.email' }),
|
||||
AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.dateofbirth', label_trans: 'reg.dateofbirth', fieldtype: costanti.FieldType.onlydate }),
|
||||
AddCol({
|
||||
name: 'profile.resplist',
|
||||
field: 'profile',
|
||||
|
||||
@@ -50,6 +50,8 @@ export const tools = {
|
||||
TABBED_HOME: 't-home',
|
||||
TABBED_NAVE: 't-nave',
|
||||
|
||||
COOK_SEARCH: 'SEARCH_',
|
||||
|
||||
getprefCountries: ['it', 'es', 'us'],
|
||||
|
||||
APORTADOR_NONE: '------',
|
||||
@@ -3276,7 +3278,7 @@ export const tools = {
|
||||
},
|
||||
getCookie(mytok: any, def?: any) {
|
||||
const ris = Cookies.get(mytok)
|
||||
// console.log('getCookie', ris)
|
||||
console.log('getCookie', mytok, ris)
|
||||
if (!!ris) {
|
||||
return ris
|
||||
} else {
|
||||
@@ -3285,6 +3287,7 @@ export const tools = {
|
||||
},
|
||||
|
||||
setCookie(mytok: any, value: string) {
|
||||
console.log('setCookie', mytok, value)
|
||||
return Cookies.set(mytok, value)
|
||||
},
|
||||
|
||||
|
||||
@@ -1250,7 +1250,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return ''
|
||||
},
|
||||
|
||||
getTableJoinByName(table: string, addall?: boolean) {
|
||||
getTableJoinByName(table: string, addall?: boolean, filter?: any) {
|
||||
if (table === 'permissions') return [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor, shared_consts.Permissions.Editor, shared_consts.Permissions.Zoomeri, shared_consts.Permissions.Department]
|
||||
if (table === 'accepted') return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
|
||||
if (table === 'fieldstype') return costanti.FieldTypeArr
|
||||
@@ -1262,9 +1262,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
// myarr = [costanti.FILTER_TUTTI, ...myarr]
|
||||
|
||||
if (!addall) {
|
||||
if (table === 'skills') {
|
||||
/*if (table === 'skills') {
|
||||
myarr = myarr.filter((rec: any) => rec._id > 0)
|
||||
}
|
||||
} */
|
||||
}
|
||||
if (filter) {
|
||||
myarr = myarr.filter(filter)
|
||||
}
|
||||
|
||||
return myarr
|
||||
|
||||
Reference in New Issue
Block a user