- Aggiunto Filtri
- Finder
This commit is contained in:
@@ -27,7 +27,6 @@ export const shared_consts = {
|
|||||||
FILTER_USER_CODICE_AUTH_TELEGRAM: 64,
|
FILTER_USER_CODICE_AUTH_TELEGRAM: 64,
|
||||||
FILTER_USER_NO_EMAIL_VERIFICATA: 128,
|
FILTER_USER_NO_EMAIL_VERIFICATA: 128,
|
||||||
FILTER_USER_NO_DREAM: 256,
|
FILTER_USER_NO_DREAM: 256,
|
||||||
FILTER_EXTRALIST_DELETED: 512,
|
|
||||||
FILTER_USER_TELEGRAM_BLOCKED: 1024,
|
FILTER_USER_TELEGRAM_BLOCKED: 1024,
|
||||||
FILTER_ATTIVI: 2048,
|
FILTER_ATTIVI: 2048,
|
||||||
FILTER_NASCOSTI: 4096,
|
FILTER_NASCOSTI: 4096,
|
||||||
@@ -40,6 +39,8 @@ export const shared_consts = {
|
|||||||
FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
|
FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
|
||||||
FILTER_MEMBERSHIP_CARD_OK: 1048576,
|
FILTER_MEMBERSHIP_CARD_OK: 1048576,
|
||||||
|
|
||||||
|
FILTER_MYSKILL_SKILL: 1,
|
||||||
|
|
||||||
REPORT_FILT_RESP: 1,
|
REPORT_FILT_RESP: 1,
|
||||||
REPORT_FILT_ATTIVITA: 2,
|
REPORT_FILT_ATTIVITA: 2,
|
||||||
|
|
||||||
|
|||||||
29
src/components/CFinder/CFinder.scss
Executable file
29
src/components/CFinder/CFinder.scss
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
.cltitlebg{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.titletext {
|
||||||
|
color: white;
|
||||||
|
font-size: 3rem;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 3rem;
|
||||||
|
text-shadow: .25rem .25rem .5rem black;
|
||||||
|
letter-spacing: .00937em;
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 718px) {
|
||||||
|
// PER VERSIONE MOBILE
|
||||||
|
.titletext {
|
||||||
|
color: white;
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 2rem;
|
||||||
|
text-shadow: .25rem .25rem .5rem black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-img__content > div{
|
||||||
|
background: rgba(0,0,0,0.17) !important;
|
||||||
|
}
|
||||||
148
src/components/CFinder/CFinder.ts
Executable file
148
src/components/CFinder/CFinder.ts
Executable file
@@ -0,0 +1,148 @@
|
|||||||
|
import {
|
||||||
|
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch,
|
||||||
|
} from 'vue'
|
||||||
|
|
||||||
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { colmySkills } from '@store/Modules/fieldsTable'
|
||||||
|
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||||
|
import { IMySkill, ISearchList, ISkill } from 'model'
|
||||||
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'CFinder',
|
||||||
|
props: {
|
||||||
|
defaultnewrec: {
|
||||||
|
type: Function,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
CMyFieldDb, CGridTableRec,
|
||||||
|
},
|
||||||
|
setup(props, { attrs, slots, emit }) {
|
||||||
|
const mytable = 'users'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
const arrfilterand: any = ref([])
|
||||||
|
const filtercustom: any = ref([])
|
||||||
|
const searchList = ref(<ISearchList[]>[])
|
||||||
|
|
||||||
|
function mounted() {
|
||||||
|
/*arrfilterand.value = [
|
||||||
|
{
|
||||||
|
label: 'Competenze',
|
||||||
|
value: shared_consts.FILTER_MYSKILL_SKILL
|
||||||
|
},
|
||||||
|
|
||||||
|
]*/
|
||||||
|
|
||||||
|
searchList.value = [
|
||||||
|
{
|
||||||
|
label: 'Settore',
|
||||||
|
table: 'sectors',
|
||||||
|
key: 'idSector',
|
||||||
|
value: costanti.FILTER_TUTTI,
|
||||||
|
type: costanti.FieldType.select,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Competenza',
|
||||||
|
table: 'skills',
|
||||||
|
key: 'idSkill',
|
||||||
|
value: costanti.FILTER_TUTTI,
|
||||||
|
type: costanti.FieldType.select,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Citta',
|
||||||
|
table: 'cities',
|
||||||
|
key: 'idCity',
|
||||||
|
value: costanti.FILTER_TUTTI,
|
||||||
|
type: costanti.FieldType.multiselect,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Livello',
|
||||||
|
table: 'levels',
|
||||||
|
key: 'numLevel',
|
||||||
|
value: costanti.FILTER_TUTTI,
|
||||||
|
type: costanti.FieldType.select,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Stato',
|
||||||
|
table: 'statusSkills',
|
||||||
|
key: 'idStatusSkill',
|
||||||
|
value: costanti.FILTER_TUTTI,
|
||||||
|
type: costanti.FieldType.multiselect,
|
||||||
|
},
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
filtercustom.value = []
|
||||||
|
}
|
||||||
|
|
||||||
|
async function createNewRecordInUserTable() {
|
||||||
|
console.log('createNewRecordInUserTable')
|
||||||
|
|
||||||
|
let mydata = {
|
||||||
|
table: mytable,
|
||||||
|
data: {
|
||||||
|
userId: userStore.my._id,
|
||||||
|
data: {},
|
||||||
|
field: 'myskills'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (props.defaultnewrec) {
|
||||||
|
|
||||||
|
mydata.data.data = props.defaultnewrec
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('mydata', mydata)
|
||||||
|
const data = await globalStore.saveSubRec(mydata)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getdefaultnewrec(): any {
|
||||||
|
return {
|
||||||
|
_id: 0,
|
||||||
|
idSkill: 0,
|
||||||
|
idStatusSkill: [],
|
||||||
|
idCity: [],
|
||||||
|
NumLevel: 0,
|
||||||
|
photos: [],
|
||||||
|
note: '',
|
||||||
|
subTitle: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function extraparams() {
|
||||||
|
return {
|
||||||
|
lk_tab: 'users',
|
||||||
|
lk_LF: 'userId',
|
||||||
|
lk_FF: '_id',
|
||||||
|
lk_as: 'user',
|
||||||
|
af_objId_tab: 'myId',
|
||||||
|
lk_proj: {
|
||||||
|
idSkill: 1, idStatusSkill: 1, idCity: 1, numLevel: 1, photos: 1, note: 1, subTitle: 1, date_created:1, date_updated: 1,
|
||||||
|
userId: 1, username: 1, name: 1, surname: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(mounted)
|
||||||
|
|
||||||
|
return {
|
||||||
|
tools,
|
||||||
|
costanti,
|
||||||
|
colmySkills,
|
||||||
|
getdefaultnewrec,
|
||||||
|
extraparams,
|
||||||
|
arrfilterand,
|
||||||
|
filtercustom,
|
||||||
|
searchList,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
32
src/components/CFinder/CFinder.vue
Executable file
32
src/components/CFinder/CFinder.vue
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
|
<CGridTableRec
|
||||||
|
prop_mytable="myskills"
|
||||||
|
prop_mytitle=""
|
||||||
|
:prop_mycolumns="colmySkills"
|
||||||
|
prop_colkey="idSkill"
|
||||||
|
col_title="subTitle"
|
||||||
|
:vertical="true"
|
||||||
|
nodataLabel="Nessuna Competenza inserita"
|
||||||
|
:prop_search="true"
|
||||||
|
:finder="true"
|
||||||
|
:butt_modif_new="false"
|
||||||
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||||
|
:arrfilters="arrfilterand"
|
||||||
|
:filtercustom="filtercustom"
|
||||||
|
:prop_searchList="searchList"
|
||||||
|
:defaultnewrec="getdefaultnewrec"
|
||||||
|
:extraparams="extraparams()">
|
||||||
|
|
||||||
|
</CGridTableRec>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./CFinder.ts">
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './CFinder.scss';
|
||||||
|
</style>
|
||||||
1
src/components/CFinder/index.ts
Executable file
1
src/components/CFinder/index.ts
Executable file
@@ -0,0 +1 @@
|
|||||||
|
export { default as CFinder } from './CFinder.vue'
|
||||||
@@ -71,6 +71,7 @@ export default defineComponent({
|
|||||||
gallerylist.value = [
|
gallerylist.value = [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showandsave(value: any) {
|
function showandsave(value: any) {
|
||||||
|
|||||||
@@ -3,10 +3,13 @@ import { useI18n } from '@src/boot/i18n'
|
|||||||
|
|
||||||
import { tools } from '../../store/Modules/tools'
|
import { tools } from '../../store/Modules/tools'
|
||||||
|
|
||||||
|
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IColGridTable,
|
IColGridTable,
|
||||||
IFilter,
|
IFilter,
|
||||||
ITableRec,
|
ITableRec,
|
||||||
|
ISearchList,
|
||||||
IPagination,
|
IPagination,
|
||||||
IParamDialog,
|
IParamDialog,
|
||||||
IEvents,
|
IEvents,
|
||||||
@@ -16,6 +19,8 @@ import {
|
|||||||
import { lists } from '../../store/Modules/lists'
|
import { lists } from '../../store/Modules/lists'
|
||||||
import { IParamsQuery } from '../../model/GlobalStore'
|
import { IParamsQuery } from '../../model/GlobalStore'
|
||||||
import { CMyPopupEdit } from '../CMyPopupEdit'
|
import { CMyPopupEdit } from '../CMyPopupEdit'
|
||||||
|
import { CMyFieldDb } from '../CMyFieldDb'
|
||||||
|
import { CMySelect } from '../CMySelect'
|
||||||
import { CTitleBanner } from '../CTitleBanner'
|
import { CTitleBanner } from '../CTitleBanner'
|
||||||
|
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
@@ -53,6 +58,16 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
butt_modif_new: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
finder: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
vertical: {
|
vertical: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -83,6 +98,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
prop_searchList: {
|
||||||
|
type: Object as PropType<ISearchList[]>,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
arrfilters: {
|
arrfilters: {
|
||||||
type: Object as PropType<IFilter[]>,
|
type: Object as PropType<IFilter[]>,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -95,6 +115,13 @@ export default defineComponent({
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
filtercustom: {
|
||||||
|
type: Array,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
extraparams: {
|
extraparams: {
|
||||||
required: false,
|
required: false,
|
||||||
default: {},
|
default: {},
|
||||||
@@ -116,7 +143,7 @@ export default defineComponent({
|
|||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: { CMyPopupEdit, CTitleBanner },
|
components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect },
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@@ -145,6 +172,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const serverData: any = ref([])
|
const serverData: any = ref([])
|
||||||
const spinner_visible = ref(false)
|
const spinner_visible = ref(false)
|
||||||
|
const searchList = toRef(props, 'prop_searchList')
|
||||||
|
|
||||||
let idsel = ''
|
let idsel = ''
|
||||||
let colsel = ref(<IColGridTable | null>{ name: '', field: '' })
|
let colsel = ref(<IColGridTable | null>{ name: '', field: '' })
|
||||||
@@ -153,6 +181,7 @@ export default defineComponent({
|
|||||||
let separator: 'horizontal'
|
let separator: 'horizontal'
|
||||||
const myfilter = ref('')
|
const myfilter = ref('')
|
||||||
const myfilterand: any = ref([])
|
const myfilterand: any = ref([])
|
||||||
|
const myfiltercustom: any = ref([])
|
||||||
let rowsel: any = {}
|
let rowsel: any = {}
|
||||||
let dark = true
|
let dark = true
|
||||||
const canEdit = ref(false)
|
const canEdit = ref(false)
|
||||||
@@ -169,6 +198,15 @@ export default defineComponent({
|
|||||||
|
|
||||||
const mycodeid = toRef(props, 'prop_codeId')
|
const mycodeid = toRef(props, 'prop_codeId')
|
||||||
|
|
||||||
|
watch(searchList.value, (to: any, from: any) => {
|
||||||
|
refresh()
|
||||||
|
})
|
||||||
|
|
||||||
|
function searchval(newval: any) {
|
||||||
|
console.log('searchval')
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
|
||||||
// emulate 'SELECT count(*) FROM ...WHERE...'
|
// emulate 'SELECT count(*) FROM ...WHERE...'
|
||||||
function getRowsNumberCount(myfilter?: any) {
|
function getRowsNumberCount(myfilter?: any) {
|
||||||
|
|
||||||
@@ -188,7 +226,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
// emulate ajax call
|
// emulate ajax call
|
||||||
// SELECT * FROM ... WHERE...LIMIT...
|
// SELECT * FROM ... WHERE...LIMIT...
|
||||||
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) {
|
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, filtercustom: any, sortBy: any, descending: any) {
|
||||||
|
|
||||||
let myobj: any = {}
|
let myobj: any = {}
|
||||||
if (sortBy) {
|
if (sortBy) {
|
||||||
@@ -202,12 +240,29 @@ export default defineComponent({
|
|||||||
|
|
||||||
// console.log('sortBy', sortBy)
|
// console.log('sortBy', sortBy)
|
||||||
|
|
||||||
|
let filtersearch: ISearchList[] = []
|
||||||
|
|
||||||
|
if (searchList.value) {
|
||||||
|
searchList.value.forEach((item: ISearchList) => {
|
||||||
|
if (item.value > 0) {
|
||||||
|
let myarr: ISearchList
|
||||||
|
let objitem: any = {}
|
||||||
|
objitem[item.key] = item.value
|
||||||
|
filtersearch.push(objitem)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let params: IParamsQuery = {
|
let params: IParamsQuery = {
|
||||||
table: mytable.value,
|
table: mytable.value,
|
||||||
startRow,
|
startRow,
|
||||||
endRow,
|
endRow,
|
||||||
filter: param_myfilter,
|
filter: param_myfilter,
|
||||||
filterand: param_myfilterand,
|
filterand: param_myfilterand,
|
||||||
|
// @ts-ignore
|
||||||
|
filtersearch: filtersearch,
|
||||||
|
filtercustom,
|
||||||
sortBy: myobj,
|
sortBy: myobj,
|
||||||
descending,
|
descending,
|
||||||
userId: userStore.my._id,
|
userId: userStore.my._id,
|
||||||
@@ -217,6 +272,7 @@ export default defineComponent({
|
|||||||
params.codeId = mycodeid.value
|
params.codeId = mycodeid.value
|
||||||
|
|
||||||
// console.log('params', params)
|
// console.log('params', params)
|
||||||
|
console.log('props.extraparams', props.extraparams)
|
||||||
|
|
||||||
params = { ...params, ...props.extraparams }
|
params = { ...params, ...props.extraparams }
|
||||||
|
|
||||||
@@ -243,6 +299,7 @@ export default defineComponent({
|
|||||||
const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination
|
const { page, rowsPerPage, rowsNumber, sortBy, descending } = props.pagination
|
||||||
const myfilternow = myfilter.value
|
const myfilternow = myfilter.value
|
||||||
const myfilterandnow = myfilterand.value
|
const myfilterandnow = myfilterand.value
|
||||||
|
const myfiltercustomnow = myfiltercustom.value
|
||||||
|
|
||||||
savefilter()
|
savefilter()
|
||||||
|
|
||||||
@@ -269,7 +326,7 @@ export default defineComponent({
|
|||||||
serverData.value = []
|
serverData.value = []
|
||||||
|
|
||||||
// fetch data from "server"
|
// fetch data from "server"
|
||||||
return fetchFromServer(startRow, endRow, myfilternow, myfilterandnow, sortBy, descending).then((ris: any) => {
|
return fetchFromServer(startRow, endRow, myfilternow, myfilterandnow, myfiltercustomnow, sortBy, descending).then((ris: any) => {
|
||||||
|
|
||||||
pagination.value.rowsNumber = getRowsNumberCount(myfilter)
|
pagination.value.rowsNumber = getRowsNumberCount(myfilter)
|
||||||
|
|
||||||
@@ -340,6 +397,10 @@ export default defineComponent({
|
|||||||
refresh()
|
refresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(() => myfiltercustom.value, (newval, oldval) => {
|
||||||
|
refresh()
|
||||||
|
})
|
||||||
|
|
||||||
function isTutor() {
|
function isTutor() {
|
||||||
return userStore.isTutor
|
return userStore.isTutor
|
||||||
}
|
}
|
||||||
@@ -542,7 +603,6 @@ export default defineComponent({
|
|||||||
mycolumns.value = props.prop_mycolumns
|
mycolumns.value = props.prop_mycolumns
|
||||||
colkey.value = props.prop_colkey
|
colkey.value = props.prop_colkey
|
||||||
pagination.value = props.prop_pagination
|
pagination.value = props.prop_pagination
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
@@ -553,6 +613,7 @@ export default defineComponent({
|
|||||||
tablesel.value = tools.getCookie('tablesel', tablesel.value)
|
tablesel.value = tools.getCookie('tablesel', tablesel.value)
|
||||||
}
|
}
|
||||||
myfilterand.value = props.filterdef
|
myfilterand.value = props.filterdef
|
||||||
|
myfiltercustom.value = props.filtercustom
|
||||||
// console.log('tablesel', tablesel)
|
// console.log('tablesel', tablesel)
|
||||||
|
|
||||||
if (tablesel.value === '') {
|
if (tablesel.value === '') {
|
||||||
@@ -867,6 +928,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
mydata.data = recModif.value
|
mydata.data = recModif.value
|
||||||
|
|
||||||
|
const oldrec = serverData.value.find((rec: IMySkill) => rec._id === recModif.value._id)
|
||||||
|
|
||||||
const data = await globalStore.saveTable(mydata)
|
const data = await globalStore.saveTable(mydata)
|
||||||
.then((ris) => {
|
.then((ris) => {
|
||||||
if (ris) {
|
if (ris) {
|
||||||
@@ -874,6 +937,11 @@ export default defineComponent({
|
|||||||
editRecordBool.value = false
|
editRecordBool.value = false
|
||||||
const indrec = serverData.value.findIndex((rec: IMySkill) => rec._id === ris._id)
|
const indrec = serverData.value.findIndex((rec: IMySkill) => rec._id === ris._id)
|
||||||
console.log('indrec', indrec, serverData.value[indrec])
|
console.log('indrec', indrec, serverData.value[indrec])
|
||||||
|
mycolumns.value.forEach((col:IColGridTable) => {
|
||||||
|
if (!col.foredit) {
|
||||||
|
ris[col.name] = oldrec[col.name]
|
||||||
|
}
|
||||||
|
})
|
||||||
if (indrec >= 0)
|
if (indrec >= 0)
|
||||||
serverData.value[indrec] = ris
|
serverData.value[indrec] = ris
|
||||||
}
|
}
|
||||||
@@ -954,7 +1022,13 @@ export default defineComponent({
|
|||||||
spinner_visible,
|
spinner_visible,
|
||||||
tablesel,
|
tablesel,
|
||||||
myfilterand,
|
myfilterand,
|
||||||
|
myfiltercustom,
|
||||||
tools,
|
tools,
|
||||||
|
costanti,
|
||||||
|
fieldsTable,
|
||||||
|
globalStore,
|
||||||
|
searchList,
|
||||||
|
searchval,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -43,20 +43,22 @@
|
|||||||
<div class="q-gutter-md q-ma-xs row">
|
<div class="q-gutter-md q-ma-xs row">
|
||||||
<div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div>
|
<div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div>
|
||||||
<q-space></q-space>
|
<q-space></q-space>
|
||||||
<q-btn
|
<div v-if="butt_modif_new">
|
||||||
v-if="mytable" rounded dense size="sm" flat :color="canEdit ? 'positive' : 'light-gray'"
|
<q-btn
|
||||||
:disable="disabilita()"
|
v-if="mytable" rounded dense size="sm" flat :color="canEdit ? 'positive' : 'light-gray'"
|
||||||
:val="lists.MenuAction.CAN_EDIT_TABLE"
|
:disable="disabilita()"
|
||||||
icon="fas fa-pencil-alt" @update:model-value="changefuncAct"
|
:val="lists.MenuAction.CAN_EDIT_TABLE"
|
||||||
@click="canEdit = !canEdit">
|
icon="fas fa-pencil-alt" @update:model-value="changefuncAct"
|
||||||
</q-btn>
|
@click="canEdit = !canEdit">
|
||||||
<q-btn
|
</q-btn>
|
||||||
v-if="mytable" rounded dense size="sm" flat color="light-gray"
|
<q-btn
|
||||||
:disable="loading"
|
v-if="mytable" rounded dense size="sm" flat color="light-gray"
|
||||||
icon="fas fa-plus"
|
:disable="loading"
|
||||||
@click="createNewRecord">
|
icon="fas fa-plus"
|
||||||
|
@click="createNewRecord">
|
||||||
|
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-inner-loading :showing="spinner_visible">
|
<q-inner-loading :showing="spinner_visible">
|
||||||
<q-spinner-tail size="2em" color="primary"/>
|
<q-spinner-tail size="2em" color="primary"/>
|
||||||
@@ -126,6 +128,55 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<template v-slot:top-left v-if="searchList">
|
||||||
|
<div class="row">
|
||||||
|
<div v-for="(item, index) in searchList" :key="index">
|
||||||
|
<CMySelect
|
||||||
|
v-if="item.type === costanti.FieldType.select"
|
||||||
|
:label="item.label"
|
||||||
|
v-model:value="item.value"
|
||||||
|
@update:value="searchval"
|
||||||
|
:addall="true"
|
||||||
|
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||||
|
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||||
|
:options="globalStore.getTableJoinByName(item.table, true)"
|
||||||
|
:useinput="false">
|
||||||
|
</CMySelect>
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
v-if="item.type === costanti.FieldType.multiselect"
|
||||||
|
v-model="item.value"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
multiple
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="fieldsTable.getTitleByTable(item.table)"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="globalStore.getTableJoinByName(item.table)"
|
||||||
|
style="min-width: 150px"
|
||||||
|
:option-value="fieldsTable.getKeyByTable(item.table)"
|
||||||
|
@update:model-value="searchval">
|
||||||
|
|
||||||
|
<template v-slot:option="{ itemProps, opt, selected, toggleOption }">
|
||||||
|
<q-item v-bind="itemProps">
|
||||||
|
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>{{ opt[fieldsTable.getLabelByTable(item.table)] }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section side>
|
||||||
|
<q-toggle :model-value="selected" @update:value="toggleOption(opt)"/>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="trclass">
|
<q-tr :props="props" class="trclass">
|
||||||
<q-td auto-width class="tdclass">
|
<q-td auto-width class="tdclass">
|
||||||
@@ -137,7 +188,7 @@
|
|||||||
v-if="colVisib.includes(col.field + col.subfield)" class="tdclass">
|
v-if="colVisib.includes(col.field + col.subfield)" class="tdclass">
|
||||||
<div :class="getclrow(props.row)">
|
<div :class="getclrow(props.row)">
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="prop_mytable"
|
:table="mytable"
|
||||||
:canEdit="canEdit"
|
:canEdit="canEdit"
|
||||||
:disable="disabilita()"
|
:disable="disabilita()"
|
||||||
:mycol="col"
|
:mycol="col"
|
||||||
@@ -177,7 +228,7 @@
|
|||||||
<q-card :class="props.selected ? 'bg-grey-2' : ''">
|
<q-card :class="props.selected ? 'bg-grey-2' : ''">
|
||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar dense class="bg-primary text-white">
|
||||||
<span class="ellipsis"> {{ props.row[col_title] }} </span>
|
<span class="ellipsis"> {{ props.row[col_title] }} </span>
|
||||||
<q-space />
|
<q-space/>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat round color="white" icon="fas fa-pencil-alt" size="sm"
|
flat round color="white" icon="fas fa-pencil-alt" size="sm"
|
||||||
@click="clickFunz(props.row, prop_mycolumns.find((rec) => rec.action === lists.MenuAction.CAN_EDIT_TABLE))"></q-btn>
|
@click="clickFunz(props.row, prop_mycolumns.find((rec) => rec.action === lists.MenuAction.CAN_EDIT_TABLE))"></q-btn>
|
||||||
@@ -202,7 +253,7 @@
|
|||||||
<div :class="getclrow(props.row)">
|
<div :class="getclrow(props.row)">
|
||||||
|
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="prop_mytable"
|
:table="mytable"
|
||||||
:canEdit="canEdit"
|
:canEdit="canEdit"
|
||||||
:disable="disabilita()"
|
:disable="disabilita()"
|
||||||
:mycol="col"
|
:mycol="col"
|
||||||
@@ -258,7 +309,7 @@
|
|||||||
@click="colclicksel = mycol">
|
@click="colclicksel = mycol">
|
||||||
|
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="prop_mytable"
|
:table="mytable"
|
||||||
:canEdit="true"
|
:canEdit="true"
|
||||||
:disable="disabilita()"
|
:disable="disabilita()"
|
||||||
view="field"
|
view="field"
|
||||||
@@ -282,18 +333,18 @@
|
|||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar dense class="bg-primary text-white">
|
||||||
Nuovo:
|
Nuovo:
|
||||||
<q-space />
|
<q-space/>
|
||||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||||
</q-bar>
|
</q-bar>
|
||||||
<q-card-section class="inset-shadow">
|
<q-card-section class="inset-shadow">
|
||||||
<div
|
<div
|
||||||
v-for="col in mycolumns" :key="col.name" class="newrec_fields">
|
v-for="col in mycolumns" :key="col.name" class="newrec_fields">
|
||||||
<div
|
<div
|
||||||
v-if="colVisib.includes(col.field + col.subfield)">
|
v-if="colVisib.includes(col.field + col.subfield) && col.foredit">
|
||||||
<div class="">
|
<div class="">
|
||||||
|
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="prop_mytable"
|
:table="mytable"
|
||||||
:canEdit="true"
|
:canEdit="true"
|
||||||
:mycol="col"
|
:mycol="col"
|
||||||
v-model:row="newRecord"
|
v-model:row="newRecord"
|
||||||
@@ -322,17 +373,17 @@
|
|||||||
<q-bar dense class="bg-primary text-white">
|
<q-bar dense class="bg-primary text-white">
|
||||||
<span v-if="mytitle">{{ mytitle }}</span>
|
<span v-if="mytitle">{{ mytitle }}</span>
|
||||||
<span v-else>{{ recModif[col_title] }}</span>
|
<span v-else>{{ recModif[col_title] }}</span>
|
||||||
<q-space />
|
<q-space/>
|
||||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||||
</q-bar>
|
</q-bar>
|
||||||
<q-card-section class="inset-shadow">
|
<q-card-section class="inset-shadow">
|
||||||
<div
|
<div
|
||||||
v-for="col in mycolumns" :key="col.name">
|
v-for="col in mycolumns" :key="col.name">
|
||||||
<div
|
<div
|
||||||
v-if="colVisib.includes(col.field + col.subfield)">
|
v-if="colVisib.includes(col.field + col.subfield) && col.foredit">
|
||||||
<div>
|
<div>
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="prop_mytable"
|
:table="mytable"
|
||||||
:canEdit="true"
|
:canEdit="true"
|
||||||
:mycol="col"
|
:mycol="col"
|
||||||
:isInModif="true"
|
:isInModif="true"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
:filterdef="myfilterdef"
|
:filterdef="myfilterdef"
|
||||||
:prop_codeId="todoId"
|
:prop_codeId="todoId"
|
||||||
:defaultnewrec="getdefaultnewrec"
|
:defaultnewrec="getdefaultnewrec"
|
||||||
:extraparams="extraparams"
|
:extraparams="extraparams()"
|
||||||
labeladd="Aggiungi Ora">
|
labeladd="Aggiungi Ora">
|
||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
|
|||||||
@@ -509,14 +509,18 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getDirectoryGall() {
|
function getDirectoryGall() {
|
||||||
|
let ris = ''
|
||||||
if (fieldsTable.tableForUsers.includes(props.table)) {
|
if (fieldsTable.tableForUsers.includes(props.table)) {
|
||||||
return 'profile/' + userStore.my.username + '/' + props.table
|
console.log('1')
|
||||||
|
ris = 'profile/' + myrow.value['username'] + '/' + props.table
|
||||||
}else if (props.table === 'users') {
|
}else if (props.table === 'users') {
|
||||||
return 'profile/' + userStore.my.username
|
console.log('2')
|
||||||
|
ris = 'profile/' + userStore.my.username
|
||||||
} else {
|
} else {
|
||||||
return props.table
|
console.log('3')
|
||||||
|
ris = props.table
|
||||||
}
|
}
|
||||||
|
return ris
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploaded(info: any) {
|
function uploaded(info: any) {
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
:directory="getDirectoryGall()"
|
:directory="getDirectoryGall()"
|
||||||
:imgGall="myvalue" :edit="isviewfield()"
|
:imgGall="myvalue" :edit="isviewfield()"
|
||||||
@showandsave="Savedb">
|
@showandsave="Savedb">
|
||||||
|
|
||||||
</CGallery>
|
</CGallery>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.image">
|
<div v-else-if="col.fieldtype === costanti.FieldType.image">
|
||||||
@@ -93,7 +92,6 @@
|
|||||||
:single="isFieldDb()"
|
:single="isFieldDb()"
|
||||||
@update:imgGall="changevalRec"
|
@update:imgGall="changevalRec"
|
||||||
@showandsave="Savedb">
|
@showandsave="Savedb">
|
||||||
|
|
||||||
</CGallery>
|
</CGallery>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { defineComponent, onMounted, ref } from 'vue'
|
import { computed, defineComponent, onMounted, ref } from 'vue'
|
||||||
import { useI18n } from '@src/boot/i18n'
|
import { useI18n } from '@src/boot/i18n'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { useGlobalStore } from '@store/globalStore'
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMySelect',
|
name: 'CMySelect',
|
||||||
@@ -32,6 +33,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
addall: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
dense: {
|
dense: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -60,6 +66,21 @@ export default defineComponent({
|
|||||||
|
|
||||||
const myvalue = ref(<string | number>'')
|
const myvalue = ref(<string | number>'')
|
||||||
|
|
||||||
|
const valori = computed(() => {
|
||||||
|
let myarr = props.options
|
||||||
|
if (props.addall) {
|
||||||
|
let myobj: any = {}
|
||||||
|
if (typeof props.optlab === 'string') {
|
||||||
|
myobj[props.optlab] = '(Tutti)'
|
||||||
|
myobj[props.optval] = costanti.FILTER_TUTTI
|
||||||
|
}
|
||||||
|
|
||||||
|
myarr = [myobj, ...myarr]
|
||||||
|
}
|
||||||
|
|
||||||
|
return myarr
|
||||||
|
})
|
||||||
|
|
||||||
function changeval(newval: any) {
|
function changeval(newval: any) {
|
||||||
console.log('changeval', newval)
|
console.log('changeval', newval)
|
||||||
myvalue.value = newval
|
myvalue.value = newval
|
||||||
@@ -101,6 +122,7 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
changeval,
|
changeval,
|
||||||
myvalue,
|
myvalue,
|
||||||
|
valori,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
@new-value="newvaluefunc"
|
@new-value="newvaluefunc"
|
||||||
new-value-mode="add-unique"
|
new-value-mode="add-unique"
|
||||||
:options="options"
|
:options="valori"
|
||||||
:option-value="optval"
|
:option-value="optval"
|
||||||
:option-label="optlab"
|
:option-label="optlab"
|
||||||
@update:model-value="changeval"
|
@update:model-value="changeval"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
:dense="dense"
|
:dense="dense"
|
||||||
:input-class="myclass"
|
:input-class="myclass"
|
||||||
:model-value="myvalue"
|
:model-value="myvalue"
|
||||||
:options="options"
|
:options="valori"
|
||||||
:option-value="optval"
|
:option-value="optval"
|
||||||
:option-label="optlab"
|
:option-label="optlab"
|
||||||
@update:model-value="changeval"
|
@update:model-value="changeval"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ export default defineComponent({
|
|||||||
endRow: 10000,
|
endRow: 10000,
|
||||||
filter: '',
|
filter: '',
|
||||||
filterand: '',
|
filterand: '',
|
||||||
|
filtersearch: '',
|
||||||
|
filtercustom: '',
|
||||||
sortBy: myobj,
|
sortBy: myobj,
|
||||||
descending,
|
descending,
|
||||||
userId: userStore.my._id
|
userId: userStore.my._id
|
||||||
|
|||||||
@@ -62,11 +62,26 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function extraparams() {
|
||||||
|
return {
|
||||||
|
lk_tab: 'users',
|
||||||
|
lk_LF: 'userId',
|
||||||
|
lk_FF: '_id',
|
||||||
|
lk_as: 'user',
|
||||||
|
af_objId_tab: 'myId',
|
||||||
|
lk_proj: {
|
||||||
|
idSkill: 1, idStatusSkill: 1, idCity: 1, numLevel: 1, photos: 1, note: 1, subTitle: 1, date_created:1, date_updated: 1,
|
||||||
|
userId: 1, username: 1, name: 1, surname: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tools,
|
tools,
|
||||||
costanti,
|
costanti,
|
||||||
colmySkills,
|
colmySkills,
|
||||||
getdefaultnewrec,
|
getdefaultnewrec,
|
||||||
|
extraparams,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
nodataLabel="Nessuna Competenza inserita"
|
nodataLabel="Nessuna Competenza inserita"
|
||||||
:prop_search="false"
|
:prop_search="false"
|
||||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||||
:defaultnewrec="getdefaultnewrec">
|
:defaultnewrec="getdefaultnewrec"
|
||||||
|
:extraparams="extraparams()">
|
||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -432,7 +432,9 @@ export interface IParamsQuery {
|
|||||||
endRow: number
|
endRow: number
|
||||||
filter: string
|
filter: string
|
||||||
filterand: string
|
filterand: string
|
||||||
sortBy: any
|
filtersearch: string
|
||||||
|
filtercustom: string
|
||||||
|
sortBy: string
|
||||||
descending: number
|
descending: number
|
||||||
userId: string
|
userId: string
|
||||||
codeId?: string
|
codeId?: string
|
||||||
@@ -479,6 +481,14 @@ export interface ITableRec {
|
|||||||
noshow: boolean
|
noshow: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ISearchList {
|
||||||
|
label: string
|
||||||
|
table: string
|
||||||
|
key: string
|
||||||
|
value: any
|
||||||
|
type: number
|
||||||
|
}
|
||||||
|
|
||||||
export interface IFilter {
|
export interface IFilter {
|
||||||
label: string
|
label: string
|
||||||
value: string
|
value: string
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ import {
|
|||||||
|
|
||||||
import { tools } from '@src/store/Modules/tools'
|
import { tools } from '@src/store/Modules/tools'
|
||||||
import { CSkill } from '@/components/CSkill'
|
import { CSkill } from '@/components/CSkill'
|
||||||
|
import { CFinder } from '@/components/CFinder'
|
||||||
import { CChartMap } from '@src/components/CChartMap'
|
import { CChartMap } from '@src/components/CChartMap'
|
||||||
import { CMapsEsempio } from '@src/components/CMapsEsempio'
|
import { CMapsEsempio } from '@src/components/CMapsEsempio'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
components: { CSkill, CChartMap, CMapsEsempio },
|
components: { CSkill, CChartMap, CMapsEsempio, CFinder },
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-page class="">
|
<q-page class="">
|
||||||
<h1>Inizio:</h1>
|
|
||||||
|
|
||||||
<!--<CChartMap
|
<!--<CChartMap
|
||||||
title="Mappa"
|
title="Mappa"
|
||||||
@@ -12,6 +11,8 @@
|
|||||||
|
|
||||||
<!--<CMapsEsempio></CMapsEsempio>-->
|
<!--<CMapsEsempio></CMapsEsempio>-->
|
||||||
|
|
||||||
|
<CFinder />
|
||||||
|
|
||||||
</q-page>
|
</q-page>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -64,6 +64,13 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
} else if (tools.appid() === tools.IDAPP_FREEPLANET) {
|
||||||
|
arrfilterand.value = [
|
||||||
|
{
|
||||||
|
label: 'Attivi',
|
||||||
|
value: shared_consts.FILTER_ATTIVI
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -405,7 +405,8 @@ const msg_it = {
|
|||||||
elimina: 'Elimina',
|
elimina: 'Elimina',
|
||||||
deleted: 'Nascosto',
|
deleted: 'Nascosto',
|
||||||
sospeso: 'Sospeso',
|
sospeso: 'Sospeso',
|
||||||
username: 'Username (Pseudonimo)',
|
username: 'Username',
|
||||||
|
username_pseudonimo: 'Username (Pseudonimo)',
|
||||||
username_short: 'Username',
|
username_short: 'Username',
|
||||||
name: 'Nome',
|
name: 'Nome',
|
||||||
surname: 'Cognome',
|
surname: 'Cognome',
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ export const costanti = {
|
|||||||
CONFIG_ID_STATE_CONN: '2',
|
CONFIG_ID_STATE_CONN: '2',
|
||||||
CONFIG_ID_SHOW_TYPE_TODOS: '3',
|
CONFIG_ID_SHOW_TYPE_TODOS: '3',
|
||||||
|
|
||||||
|
FILTER_TUTTI: -100,
|
||||||
|
|
||||||
FuncDialog: {
|
FuncDialog: {
|
||||||
CANCEL_BOOKING: 1,
|
CANCEL_BOOKING: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -339,9 +339,12 @@ export const colSkills = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const colmySkills = [
|
export const colmySkills = [
|
||||||
//AddCol({
|
AddCol({
|
||||||
// name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.select, jointable: 'users',
|
name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.select, jointable: 'users',
|
||||||
//}),
|
}),
|
||||||
|
//AddCol({ name: 'name', label_trans: 'reg.name', fieldtype: costanti.FieldType.string }),
|
||||||
|
//AddCol({ name: 'surname', label_trans: 'reg.surname', fieldtype: costanti.FieldType.string }),
|
||||||
|
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false }),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idSkill',
|
name: 'idSkill',
|
||||||
label_trans: 'skill.name',
|
label_trans: 'skill.name',
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export const tools = {
|
|||||||
IDAPP_AYNI: '7',
|
IDAPP_AYNI: '7',
|
||||||
IDAPP_SIP: '9',
|
IDAPP_SIP: '9',
|
||||||
IDAPP_CNM: '10',
|
IDAPP_CNM: '10',
|
||||||
|
IDAPP_FREEPLANET: '1',
|
||||||
|
|
||||||
TipoMsg: {
|
TipoMsg: {
|
||||||
SEND_LINK_CHAT_DONATORI: 1,
|
SEND_LINK_CHAT_DONATORI: 1,
|
||||||
|
|||||||
@@ -1250,12 +1250,24 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
getTableJoinByName(table: string) {
|
getTableJoinByName(table: string, addall?: boolean) {
|
||||||
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 === '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 === 'accepted') return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
|
||||||
if (table === 'fieldstype') return costanti.FieldTypeArr
|
if (table === 'fieldstype') return costanti.FieldTypeArr
|
||||||
if (table === 'metodo_pagamento') return tools.SelectMetodiPagamento
|
if (table === 'metodo_pagamento') return tools.SelectMetodiPagamento
|
||||||
return this.getListByTable(table)
|
|
||||||
|
let myarr = this.getListByTable(table)
|
||||||
|
|
||||||
|
// if (addall)
|
||||||
|
// myarr = [costanti.FILTER_TUTTI, ...myarr]
|
||||||
|
|
||||||
|
if (!addall) {
|
||||||
|
if (table === 'skills') {
|
||||||
|
myarr = myarr.filter((rec: any) => rec._id > 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return myarr
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user