Table MySkills

This commit is contained in:
Paolo Arena
2021-10-08 00:38:22 +02:00
parent eb4156fc89
commit 48128235f8
22 changed files with 1250 additions and 1184 deletions

View 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;
}

56
src/components/CSkill/CSkill.ts Executable file
View File

@@ -0,0 +1,56 @@
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'
export default defineComponent({
name: 'CSkill',
props: {
defaultnewrec: {
type: Function,
required: false,
},
},
components: {
CMyFieldDb, CGridTableRec,
},
setup(props, { attrs, slots, emit }) {
const mytable = 'users'
const globalStore = useGlobalStore()
const userStore = useUserStore()
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)
}
return {
tools,
costanti,
colmySkills,
}
},
})

View File

@@ -0,0 +1,46 @@
<template>
<div>
Competenze:<br>
<div class="q-ma-sm q-gutter-sm q-pa-xs">
<CGridTableRec
prop_mytable="myskills"
prop_mytitle="Mie Competenze"
:prop_mycolumns="colmySkills"
prop_colkey="idSkill"
nodataLabel="Nessuna Competenza inserita"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
</CGridTableRec>
</div>
<div class="row">
<!--
<q-btn
flat dense color="primary"
:label="$t('grid.addrecord')"
@click="createNewRecordInUserTable">
</q-btn>
<CMyFieldDb
title="Competenza"
table="users"
mykey="profile"
mysubkey="myskills"
indrec=0
mysubsubkey="idSkill"
:type="costanti.FieldType.binary">
</CMyFieldDb>
-->
</div>
</div>
Servizi:<br>
</template>
<script lang="ts" src="./CSkill.ts">
</script>
<style lang="scss" scoped>
@import './CSkill.scss';
</style>

1
src/components/CSkill/index.ts Executable file
View File

@@ -0,0 +1 @@
export { default as CSkill } from './CSkill.vue'