Sorting fixed

- added tables Skills, Sectors,
This commit is contained in:
Paolo Arena
2021-10-05 00:19:17 +02:00
parent 1a9a81a1ba
commit 9121569809
22 changed files with 1323 additions and 1064 deletions

View File

@@ -266,6 +266,36 @@ export const colTableStorehouse = [
AddCol(DuplicateRec),
]
export const colSectors = [
AddCol({ name: 'descr', label_trans: 'store.description' }),
AddCol({ name: 'img', label_trans: 'store.img' }),
AddCol({ name: 'icon', label_trans: 'store.icon' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
export const colLevels = [
AddCol({ name: '_id', label_trans: 'index' }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
AddCol({ name: 'years_of_exp', label_trans: 'years_of_exp', fieldtype: costanti.FieldType.number }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
export const colSkills = [
AddCol({ name: 'descr', label_trans: 'store.description' }),
AddCol({ name: 'img', label_trans: 'store.img' }),
AddCol({ name: 'icon', label_trans: 'store.icon' }),
AddCol({
name: 'idSector',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.select,
jointable: 'sectors',
}),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
export const colTableSites = [
AddCol({ name: 'active', label_trans: 'sites.active', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'idapp', label_trans: 'sites.idapp', fieldtype: costanti.FieldType.string }),
@@ -1323,6 +1353,27 @@ export const fieldsTable = {
colkey: 'key',
collabel: 'key',
},
{
value: 'skills',
label: 'Competenze',
columns: colSkills,
colkey: '_id',
collabel: 'descr',
},
{
value: 'sectors',
label: 'Settori',
columns: colSectors,
colkey: '_id',
collabel: 'descr',
},
{
value: 'levels',
label: 'Livello',
columns: colLevels,
colkey: '_id',
collabel: 'descr',
},
],
}

View File

@@ -116,6 +116,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
TIMER_STATE: 0,
URL_RITORNA: '',
URL_RESTORE: '',
levels: [],
skills: [],
sectors: [],
}),
getters: {
@@ -217,6 +220,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
return messageStore.last_msgs
else if (table === 'settings')
return state.settings
else if (table === 'levels')
return state.levels
else if (table === 'skills')
return state.skills
else if (table === 'sectors')
return state.sectors
else return ris
return ris
@@ -1099,6 +1108,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
this.resps = (res.data.resps) ? [...res.data.resps] : []
this.workers = (res.data.workers) ? [...res.data.workers] : []
this.departments = (res.data.departments) ? [...res.data.departments] : []
this.levels = (res.data.levels) ? [...res.data.levels] : []
this.skills = (res.data.skills) ? [...res.data.skills] : []
this.sectors = (res.data.sectors) ? [...res.data.sectors] : []
// console.log('res.data.cart', res.data.cart)