- CMyPopupEdit
- Star - Insert and Edit - Update quasar 3.2.4
This commit is contained in:
12
.eslintrc.js
12
.eslintrc.js
@@ -93,14 +93,8 @@ module.exports = {
|
|||||||
// 'multiline-ternary': 'off',
|
// 'multiline-ternary': 'off',
|
||||||
'vue/max-attributes-per-line': [
|
'vue/max-attributes-per-line': [
|
||||||
'error', {
|
'error', {
|
||||||
'singleline': {
|
'singleline': 15,
|
||||||
'max': 6,
|
'multiline': 15
|
||||||
'allowFirstLine': true,
|
|
||||||
},
|
|
||||||
'multiline': {
|
|
||||||
'max': 6,
|
|
||||||
'allowFirstLine': false,
|
|
||||||
},
|
|
||||||
}],
|
}],
|
||||||
'import/first': 'off',
|
'import/first': 'off',
|
||||||
'import/named': 'off',
|
'import/named': 'off',
|
||||||
@@ -124,6 +118,7 @@ module.exports = {
|
|||||||
'@typescript-eslint/semi': 'off',
|
'@typescript-eslint/semi': 'off',
|
||||||
'@typescript-eslint/object-curly-spacing': 'off',
|
'@typescript-eslint/object-curly-spacing': 'off',
|
||||||
'@typescript-eslint/restrict-plus-operands': 'off',
|
'@typescript-eslint/restrict-plus-operands': 'off',
|
||||||
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
||||||
|
|
||||||
// allow debugger during development only
|
// allow debugger during development only
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
@@ -153,6 +148,7 @@ module.exports = {
|
|||||||
'no-extra-boolean-cast': 'off',
|
'no-extra-boolean-cast': 'off',
|
||||||
'max-attributes-per-line': 'off',
|
'max-attributes-per-line': 'off',
|
||||||
'vue/no-v-model-argument': 'off',
|
'vue/no-v-model-argument': 'off',
|
||||||
|
'vue/multi-word-component-names': 'off',
|
||||||
'@typescript-eslint/ban-types': [
|
'@typescript-eslint/ban-types': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
|
|||||||
74
package.json
74
package.json
@@ -23,36 +23,36 @@
|
|||||||
"generate-sw": "workbox generateSW workbox-config.js"
|
"generate-sw": "workbox generateSW workbox-config.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "^1.11.1",
|
"@quasar/extras": "^1.12.1",
|
||||||
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.6",
|
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.6",
|
||||||
"@vue/compat": "^3.2.19",
|
"@vue/compat": "^3.2.22",
|
||||||
"@vue/compiler-sfc": "^3.2.19",
|
"@vue/compiler-sfc": "^3.2.22",
|
||||||
"@vue/eslint-config-standard": "^6.1.0",
|
"@vue/eslint-config-standard": "^5.1.2",
|
||||||
"@vuelidate/core": "^2.0.0-alpha.27",
|
"@vuelidate/core": "^2.0.0-alpha.32",
|
||||||
"@vuelidate/validators": "^2.0.0-alpha.23",
|
"@vuelidate/validators": "^2.0.0-alpha.25",
|
||||||
"acorn": "^8.5.0",
|
"acorn": "^8.6.0",
|
||||||
"autoprefixer": "^10.3.7",
|
"autoprefixer": "^10.4.0",
|
||||||
"axios": "0.21.4",
|
"axios": "0.21.4",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"core-js": "^3.18.2",
|
"core-js": "^3.19.1",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"date-fns": "^2.25.0",
|
"date-fns": "^2.26.0",
|
||||||
"dotenv": "^10.0.0",
|
"dotenv": "^10.0.0",
|
||||||
"echarts": "^5.2.1",
|
"echarts": "^5.2.2",
|
||||||
"eslint-plugin-quasar": "^1.0.0",
|
"eslint-plugin-quasar": "^1.0.0",
|
||||||
"graphql": "^15.6.1",
|
"graphql": "^16.0.1",
|
||||||
"graphql-tag": "^2.12.5",
|
"graphql-tag": "^2.12.6",
|
||||||
"gsap": "^3.8.0",
|
"gsap": "^3.8.0",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"npm": "^7.24.2",
|
"npm": "^8.1.4",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.0-rc.11",
|
"pinia": "^2.0.4",
|
||||||
"prerender-spa-plugin": "^3.4.0",
|
"prerender-spa-plugin": "^3.4.0",
|
||||||
"quasar": "^2.1.0",
|
"quasar": "^2.3.3",
|
||||||
"quasar-extras": "^2.0.9",
|
"quasar-extras": "^2.0.9",
|
||||||
"register-service-worker": "^1.7.2",
|
"register-service-worker": "^1.7.2",
|
||||||
"vee-validate": "^4.4.10",
|
"vee-validate": "^4.4.10",
|
||||||
@@ -74,47 +74,47 @@
|
|||||||
"vuex-typex": "^3.1.9"
|
"vuex-typex": "^3.1.9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "^7.15.7",
|
"@babel/eslint-parser": "^7.16.3",
|
||||||
"@quasar/app": "^3.1.2",
|
"@quasar/app": "^3.2.3",
|
||||||
"@quasar/quasar-app-extension-qcalendar": "^4.0.0-beta.6",
|
"@quasar/quasar-app-extension-qcalendar": "^4.0.0-beta.6",
|
||||||
"@types/bcryptjs": "^2.4.2",
|
"@types/bcryptjs": "^2.4.2",
|
||||||
"@types/dotenv": "^8.2.0",
|
"@types/dotenv": "^8.2.0",
|
||||||
"@types/googlemaps": "^3.43.3",
|
"@types/googlemaps": "^3.43.3",
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^27.0.3",
|
||||||
"@types/js-cookie": "^3.0.0",
|
"@types/js-cookie": "^3.0.1",
|
||||||
"@types/node": "14.14.45",
|
"@types/node": "16.11.10",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"@types/vue-tel-input": "^2.1.2",
|
"@types/vue-tel-input": "^2.1.2",
|
||||||
"@types/vuelidate": "^0.7.15",
|
"@types/vuelidate": "^0.7.15",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||||
"@typescript-eslint/parser": "^4.33.0",
|
"@typescript-eslint/parser": "^5.4.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^8.3.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-import": "^2.24.2",
|
"eslint-plugin-import": "^2.25.3",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^5.1.0",
|
"eslint-plugin-promise": "^5.1.1",
|
||||||
"eslint-plugin-vue": "^7.19.1",
|
"eslint-plugin-vue": "^8.1.1",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"html-webpack-plugin": "^5.3.2",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
"http-proxy-middleware": "^2.0.1",
|
"http-proxy-middleware": "^2.0.1",
|
||||||
"jest": "^27.2.4",
|
"jest": "^27.3.1",
|
||||||
"json-loader": "^0.5.7",
|
"json-loader": "^0.5.7",
|
||||||
"node-sass": "^6.0.1",
|
"node-sass": "^6.0.1",
|
||||||
"npm-check-updates": "^11.8.5",
|
"npm-check-updates": "^12.0.2",
|
||||||
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
||||||
"postcss": "^8.3.9",
|
"postcss": "^8.3.11",
|
||||||
"postcss-loader": "^6.1.1",
|
"postcss-loader": "^6.2.0",
|
||||||
"sass-loader": "^12.1.0",
|
"sass-loader": "^12.3.0",
|
||||||
"strip-ansi": "=7.0.1",
|
"strip-ansi": "=7.0.1",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^27.0.7",
|
||||||
"ts-loader": "^9.2.6",
|
"ts-loader": "^9.2.6",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-standard": "^9.0.0",
|
"tslint-config-standard": "^9.0.0",
|
||||||
"tslint-loader": "^3.5.4",
|
"tslint-loader": "^3.5.4",
|
||||||
"typescript": "^4.4.3",
|
"typescript": "^4.5.2",
|
||||||
"vue-cli-plugin-element-ui": "^1.1.4",
|
"vue-cli-plugin-element-ui": "^1.1.4",
|
||||||
"vueify": "^9.4.1",
|
"vueify": "^9.4.1",
|
||||||
"workbox-webpack-plugin": "^6.3.0"
|
"workbox-webpack-plugin": "^6.4.1"
|
||||||
},
|
},
|
||||||
"browser": {
|
"browser": {
|
||||||
"crypto": false
|
"crypto": false
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
"last 5 Opera versions"
|
"last 5 Opera versions"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14.15.0",
|
"node": ">= 14.17.0",
|
||||||
"npm": ">= 6.14.8",
|
"npm": ">= 6.14.8",
|
||||||
"yarn": ">= 1.21.1"
|
"yarn": ">= 1.21.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export * from './pattern'
|
export * from './pattern'
|
||||||
export * from './axios'
|
// export * from './axios'
|
||||||
export * from './debounce'
|
export * from './debounce'
|
||||||
export * from './message'
|
export * from './message'
|
||||||
export { default as GlobalConfig } from '../config'
|
export { default as GlobalConfig } from '../config'
|
||||||
|
|||||||
@@ -44,10 +44,12 @@ $grayshadow: #555;
|
|||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
padding: 1rem 1rem;
|
padding: 1rem 1rem;
|
||||||
height: 350px;
|
height: 350px;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-card-gallery-view {
|
.my-card-gallery-view {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
padding: 0.5rem 0.5rem;
|
padding: 0.5rem 0.5rem;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default defineComponent({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
imgGall: {
|
imgGall: {
|
||||||
type: Object as PropType<IImgGallery | string | undefined>,
|
type: Object as PropType<IImgGallery | string | undefined | null>,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
v-model="order">-->
|
v-model="order">-->
|
||||||
|
|
||||||
<div v-for="(mygallery, index) in getlistimages()" :key="index">
|
<div v-for="(mygallery, index) in getlistimages()" :key="index">
|
||||||
mygallery : {{ mygallery }}
|
|
||||||
<div
|
<div
|
||||||
class="q-pa-sm q-gutter-sm"
|
class="q-pa-sm q-gutter-sm"
|
||||||
@dragenter="onDragEnter"
|
@dragenter="onDragEnter"
|
||||||
|
|||||||
@@ -20,3 +20,10 @@
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-table {
|
||||||
|
&__col {
|
||||||
|
font-size: 1rem;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,16 @@ import { useI18n } from '@src/boot/i18n'
|
|||||||
|
|
||||||
import { tools } from '../../store/Modules/tools'
|
import { tools } from '../../store/Modules/tools'
|
||||||
|
|
||||||
import { IColGridTable, IFilter, ITableRec, IPagination, IParamDialog, IEvents, IDataToSet } from '../../model'
|
import {
|
||||||
|
IColGridTable,
|
||||||
|
IFilter,
|
||||||
|
ITableRec,
|
||||||
|
IPagination,
|
||||||
|
IParamDialog,
|
||||||
|
IEvents,
|
||||||
|
IDataToSet,
|
||||||
|
IMySkill
|
||||||
|
} from '../../model'
|
||||||
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'
|
||||||
@@ -39,6 +48,16 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
prop_search: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
vertical: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
prop_codeId: {
|
prop_codeId: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -105,8 +124,9 @@ export default defineComponent({
|
|||||||
const addRow = ref('Aggiungi')
|
const addRow = ref('Aggiungi')
|
||||||
|
|
||||||
const newRecordBool = ref(false)
|
const newRecordBool = ref(false)
|
||||||
|
const editRecordBool = ref(false)
|
||||||
const newRecord: any = ref({})
|
const newRecord: any = ref({})
|
||||||
const savenewRec = ref(false)
|
const recModif: any = ref({})
|
||||||
|
|
||||||
const mytable = ref('')
|
const mytable = ref('')
|
||||||
const mytitle = ref('')
|
const mytitle = ref('')
|
||||||
@@ -275,6 +295,12 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function refresh_arr() {
|
||||||
|
const myarr = [...serverData.value]
|
||||||
|
serverData.value = []
|
||||||
|
serverData.value = [...myarr]
|
||||||
|
}
|
||||||
|
|
||||||
function refresh_table() {
|
function refresh_table() {
|
||||||
onRequest({
|
onRequest({
|
||||||
pagination: pagination.value
|
pagination: pagination.value
|
||||||
@@ -327,11 +353,14 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function selItem(item: any, col: IColGridTable) {
|
function selItem(item: any, col: IColGridTable, inmodif?: boolean) {
|
||||||
console.log('selItem', item)
|
console.log('selItem', item, col)
|
||||||
rowsel = item
|
rowsel = item
|
||||||
idsel = item._id
|
idsel = item._id
|
||||||
colsel.value = col
|
colsel.value = col
|
||||||
|
if (inmodif) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function undoVal() {
|
function undoVal() {
|
||||||
@@ -373,12 +402,17 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function annulla(val: any) {
|
function annulla(val: any) {
|
||||||
// console.log('annulla')
|
console.log('annulla')
|
||||||
|
if (newRecord.value) {
|
||||||
globalStore.DeleteRec({ table: mytable.value, id: newRecord.value._id })
|
globalStore.DeleteRec({ table: mytable.value, id: newRecord.value._id })
|
||||||
.then((ris) => {
|
.then((ris) => {
|
||||||
|
// console.log('deleted', ris)
|
||||||
|
serverData.value.pop(ris)
|
||||||
|
newRecord.value = null
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function SaveValue(newVal: any, valinitial: any) {
|
function SaveValue(newVal: any, valinitial: any) {
|
||||||
// console.log('SaveValue', newVal)
|
// console.log('SaveValue', newVal)
|
||||||
@@ -391,11 +425,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (myfield) {
|
if (myfield) {
|
||||||
if (colsel.value) {
|
|
||||||
// console.log('rowsel[myfield]', rowsel[myfield], 'field', myfield)
|
|
||||||
// console.log('subf', subf)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (colsel.value) {
|
if (colsel.value) {
|
||||||
// Update value in table memory
|
// Update value in table memory
|
||||||
if (subf !== '') {
|
if (subf !== '') {
|
||||||
@@ -465,18 +494,13 @@ export default defineComponent({
|
|||||||
|
|
||||||
const mydata: any = {
|
const mydata: any = {
|
||||||
table: mytable.value,
|
table: mytable.value,
|
||||||
data: function () {
|
data: {}
|
||||||
return {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mydata.data = props.defaultnewrec
|
if (props.defaultnewrec)
|
||||||
|
mydata.data = props.defaultnewrec()
|
||||||
|
|
||||||
// const mykey = fieldsTable.getKeyByTable(mytable)
|
// console.log('DATA=', mydata.data)
|
||||||
|
|
||||||
// mydata.data[mykey] = ''
|
|
||||||
|
|
||||||
// console.log('mydata', mydata)
|
|
||||||
|
|
||||||
newRecord.value = await globalStore.saveTable(mydata)
|
newRecord.value = await globalStore.saveTable(mydata)
|
||||||
newRecordBool.value = true
|
newRecordBool.value = true
|
||||||
@@ -484,26 +508,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createNewRecord() {
|
async function createNewRecord() {
|
||||||
console.log('createNewRecord')
|
|
||||||
loading.value = true
|
|
||||||
|
|
||||||
const mydata: any = {
|
await createNewRecordDialog()
|
||||||
table: mytable.value,
|
|
||||||
data: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (props.defaultnewrec) {
|
serverData.value.push(newRecord.value)
|
||||||
mydata.data = props.defaultnewrec
|
|
||||||
}
|
|
||||||
|
|
||||||
// const mykey = fieldsTable.getKeyByTable(mytable)
|
|
||||||
|
|
||||||
// mydata.data[mykey] = ''
|
|
||||||
|
|
||||||
console.log('mydata', mydata)
|
|
||||||
const data = await globalStore.saveTable(mydata)
|
|
||||||
|
|
||||||
serverData.value.push(data)
|
|
||||||
pagination.value.rowsNumber++
|
pagination.value.rowsNumber++
|
||||||
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@@ -549,7 +557,7 @@ export default defineComponent({
|
|||||||
tablesel.value = mytable.value
|
tablesel.value = mytable.value
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('2) tablesel', tablesel.value)
|
// console.log('2) tablesel', tablesel.value)
|
||||||
|
|
||||||
changeTable(tablesel.value)
|
changeTable(tablesel.value)
|
||||||
|
|
||||||
@@ -590,6 +598,14 @@ export default defineComponent({
|
|||||||
param2: item,
|
param2: item,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (col.action === lists.MenuAction.CAN_EDIT_TABLE) {
|
||||||
|
console.log('Edit', item)
|
||||||
|
selItem(item, col)
|
||||||
|
recModif.value = item
|
||||||
|
editRecordBool.value = true
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
return $q.dialog({
|
return $q.dialog({
|
||||||
message: translate(col.askaction) + '?',
|
message: translate(col.askaction) + '?',
|
||||||
html: true,
|
html: true,
|
||||||
@@ -609,6 +625,7 @@ export default defineComponent({
|
|||||||
exec_func_table(table, funccancel, par)
|
exec_func_table(table, funccancel, par)
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -617,7 +634,7 @@ export default defineComponent({
|
|||||||
if (action === lists.MenuAction.DELETE_RECTABLE) {
|
if (action === lists.MenuAction.DELETE_RECTABLE) {
|
||||||
if ((serverData.value.length > 0) && item) {
|
if ((serverData.value.length > 0) && item) {
|
||||||
serverData.value.splice(serverData.value.indexOf(item), 1)
|
serverData.value.splice(serverData.value.indexOf(item), 1)
|
||||||
refresh_table()
|
refresh_arr()
|
||||||
}
|
}
|
||||||
} else if (action === lists.MenuAction.DUPLICATE_RECTABLE) {
|
} else if (action === lists.MenuAction.DUPLICATE_RECTABLE) {
|
||||||
// Add record duplicated
|
// Add record duplicated
|
||||||
@@ -638,6 +655,21 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clByCol(col: IColGridTable) {
|
||||||
|
if (!visuIntestazCol(col)) {
|
||||||
|
return 'row justify-center vertical-middle'
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function visuIntestazCol(col: IColGridTable) {
|
||||||
|
if (col.fieldtype === costanti.FieldType.html || col.fieldtype === costanti.FieldType.listimages) {
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeCol(newval: any) {
|
function changeCol(newval: any) {
|
||||||
// console.log('changecol', mytable.value)
|
// console.log('changecol', mytable.value)
|
||||||
if (!!mytable.value) {
|
if (!!mytable.value) {
|
||||||
@@ -666,7 +698,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('tablesel', tablesel.value, 'mytab', mytab)
|
// console.log('tablesel', tablesel.value, 'mytab', mytab)
|
||||||
|
|
||||||
if (mytab) {
|
if (mytab) {
|
||||||
mytitle.value = mytab.label
|
mytitle.value = mytab.label
|
||||||
@@ -774,30 +806,56 @@ export default defineComponent({
|
|||||||
|
|
||||||
async function saveNewRecord() {
|
async function saveNewRecord() {
|
||||||
console.log('saveNewRecord')
|
console.log('saveNewRecord')
|
||||||
savenewRec.value = true
|
|
||||||
const mydata = {
|
const mydata = {
|
||||||
table: mytable.value,
|
table: mytable.value,
|
||||||
data: {}
|
data: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
mydata.data = newRecord
|
mydata.data = newRecord.value
|
||||||
|
|
||||||
const data = await globalStore.saveTable(mydata)
|
const data = await globalStore.saveTable(mydata)
|
||||||
.then((ris) => {
|
.then((ris) => {
|
||||||
if (ris) {
|
if (ris) {
|
||||||
// console.log('ris', ris)
|
// console.log('ris', ris)
|
||||||
newRecordBool.value = false
|
newRecordBool.value = false
|
||||||
refresh()
|
const indrec = serverData.value.findIndex((rec: IMySkill) => rec._id === ris._id)
|
||||||
|
console.log('indrec', indrec, serverData.value[indrec])
|
||||||
|
if (indrec >= 0)
|
||||||
|
serverData.value[indrec] = ris
|
||||||
|
else
|
||||||
|
serverData.value.push(ris)
|
||||||
|
|
||||||
|
newRecord.value = null
|
||||||
|
// refresh()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function saverecModif() {
|
||||||
|
console.log('saverecModif')
|
||||||
|
const mydata = {
|
||||||
|
table: mytable.value,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
mydata.data = recModif.value
|
||||||
|
|
||||||
|
const data = await globalStore.saveTable(mydata)
|
||||||
|
.then((ris) => {
|
||||||
|
if (ris) {
|
||||||
|
// console.log('ris', ris)
|
||||||
|
editRecordBool.value = false
|
||||||
|
const indrec = serverData.value.findIndex((rec: IMySkill) => rec._id === ris._id)
|
||||||
|
console.log('indrec', indrec, serverData.value[indrec])
|
||||||
|
if (indrec >= 0)
|
||||||
|
serverData.value[indrec] = ris
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidewindow() {
|
function hidewindow() {
|
||||||
console.log('hidewindow')
|
|
||||||
if (!savenewRec.value) {
|
|
||||||
annulla(0)
|
annulla(0)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function getlabelAddRow() {
|
function getlabelAddRow() {
|
||||||
return props.labelBtnAddRow
|
return props.labelBtnAddRow
|
||||||
@@ -826,6 +884,8 @@ export default defineComponent({
|
|||||||
saveFieldValue,
|
saveFieldValue,
|
||||||
clickFunz,
|
clickFunz,
|
||||||
visCol,
|
visCol,
|
||||||
|
visuIntestazCol,
|
||||||
|
clByCol,
|
||||||
changeCol,
|
changeCol,
|
||||||
changeTable,
|
changeTable,
|
||||||
doSearch,
|
doSearch,
|
||||||
@@ -836,6 +896,7 @@ export default defineComponent({
|
|||||||
selectionclick,
|
selectionclick,
|
||||||
getusernamesel,
|
getusernamesel,
|
||||||
saveNewRecord,
|
saveNewRecord,
|
||||||
|
saverecModif,
|
||||||
hidewindow,
|
hidewindow,
|
||||||
isfinishLoading,
|
isfinishLoading,
|
||||||
getlabelAddRow,
|
getlabelAddRow,
|
||||||
@@ -858,11 +919,15 @@ export default defineComponent({
|
|||||||
myfilter,
|
myfilter,
|
||||||
disabilita,
|
disabilita,
|
||||||
newRecordBool,
|
newRecordBool,
|
||||||
|
editRecordBool,
|
||||||
|
newRecord,
|
||||||
|
recModif,
|
||||||
lists,
|
lists,
|
||||||
refresh,
|
refresh,
|
||||||
spinner_visible,
|
spinner_visible,
|
||||||
tablesel,
|
tablesel,
|
||||||
myfilterand,
|
myfilterand,
|
||||||
|
tools,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,7 +8,61 @@
|
|||||||
@click="createNewRecordDialog"></q-btn>
|
@click="createNewRecordDialog"></q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="prop_search"
|
||||||
|
class="row justify-center vertical-middle">
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
v-model="search" filled dense type="search" debounce="500" hint="Cerca"
|
||||||
|
v-on:keyup.enter="doSearch">
|
||||||
|
<template v-slot:after>
|
||||||
|
<q-btn v-if="mytable" dense label="" color="primary" @click="refresh" icon="search"></q-btn>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
|
<q-space></q-space>
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
v-if="mytable"
|
||||||
|
v-model="colVisib"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
multiple
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$t('grid.columns')"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="mycolumns"
|
||||||
|
option-value="name"
|
||||||
|
@update:model-value="changeCol">
|
||||||
|
|
||||||
|
</q-select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="q-gutter-md q-ma-xs row">
|
||||||
|
<div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div>
|
||||||
|
<q-space></q-space>
|
||||||
|
<q-btn
|
||||||
|
v-if="mytable" rounded dense size="sm" flat :color="canEdit ? 'positive' : 'light-gray'"
|
||||||
|
:disable="disabilita()"
|
||||||
|
:val="lists.MenuAction.CAN_EDIT_TABLE"
|
||||||
|
icon="fas fa-pencil-alt" @update:model-value="changefuncAct"
|
||||||
|
@click="canEdit = !canEdit">
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
v-if="mytable" rounded dense size="sm" flat color="light-gray"
|
||||||
|
:disable="loading"
|
||||||
|
icon="fas fa-plus"
|
||||||
|
@click="createNewRecord">
|
||||||
|
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<q-inner-loading :showing="spinner_visible">
|
||||||
|
<q-spinner-tail size="2em" color="primary"/>
|
||||||
|
</q-inner-loading>
|
||||||
<q-table
|
<q-table
|
||||||
|
:grid="vertical"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
class="my-sticky-header-table"
|
class="my-sticky-header-table"
|
||||||
@@ -32,7 +86,6 @@
|
|||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th>
|
<q-th>
|
||||||
|
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th
|
<q-th
|
||||||
v-for="col in props.cols" :key="col.name"
|
v-for="col in props.cols" :key="col.name"
|
||||||
@@ -47,53 +100,7 @@
|
|||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:top-right v-if="tablesList || arrfilters">
|
||||||
<template v-slot:top-right>
|
|
||||||
<div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div>
|
|
||||||
|
|
||||||
<!--<p style="color:red"> Rows: {{ getrows }}</p>-->
|
|
||||||
|
|
||||||
<q-input
|
|
||||||
v-model="search" filled dense type="search" debounce="500" hint="Search"
|
|
||||||
v-on:keyup.enter="doSearch">
|
|
||||||
<template v-slot:after>
|
|
||||||
<q-btn v-if="mytable" label="" color="primary" @click="refresh" icon="search"></q-btn>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<q-toggle
|
|
||||||
v-if="mytable" v-model="canEdit" :disable="disabilita()" :val="lists.MenuAction.CAN_EDIT_TABLE"
|
|
||||||
class="q-mx-sm"
|
|
||||||
:label="$t('grid.editvalues')" @update:model-value="changefuncAct">
|
|
||||||
</q-toggle>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="mytable" flat dense color="primary" :disable="loading || !canEdit"
|
|
||||||
:label="$t('grid.addrecord')"
|
|
||||||
@click="createNewRecord">
|
|
||||||
|
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-space/>
|
|
||||||
|
|
||||||
<!--<q-toggle v-for="(mycol, index) in mycolumns" v-model="colVisib" :val="rec.field" :label="mycol.label"></q-toggle>-->
|
|
||||||
|
|
||||||
<q-select
|
|
||||||
v-if="mytable"
|
|
||||||
v-model="colVisib"
|
|
||||||
rounded
|
|
||||||
outlined
|
|
||||||
multiple
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$t('grid.columns')"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="mycolumns"
|
|
||||||
option-value="name"
|
|
||||||
@update:model-value="changeCol">
|
|
||||||
|
|
||||||
</q-select>
|
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-if="tablesList"
|
v-if="tablesList"
|
||||||
v-model="tablesel"
|
v-model="tablesel"
|
||||||
@@ -107,12 +114,6 @@
|
|||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
|
|
||||||
<q-inner-loading :showing="spinner_visible">
|
|
||||||
<q-spinner-tail size="2em" color="primary"/>
|
|
||||||
</q-inner-loading>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
v-for="(filter, index) of arrfilters"
|
v-for="(filter, index) of arrfilters"
|
||||||
@@ -135,7 +136,6 @@
|
|||||||
<div
|
<div
|
||||||
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="prop_mytable"
|
||||||
:canEdit="canEdit"
|
:canEdit="canEdit"
|
||||||
@@ -169,6 +169,66 @@
|
|||||||
<br>
|
<br>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item="props">
|
||||||
|
<div
|
||||||
|
class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
|
||||||
|
:style="props.selected ? 'transform: scale(0.95);' : ''"
|
||||||
|
>
|
||||||
|
<q-card :class="props.selected ? 'bg-grey-2' : ''">
|
||||||
|
<q-list dense>
|
||||||
|
<div v-for="col in mycolumns" :key="col.name">
|
||||||
|
<q-item v-if="colVisib.includes(col.field + col.subfield)" :class="clByCol(col)">
|
||||||
|
<q-item-section avatar v-if="visuIntestazCol(col)">
|
||||||
|
<q-item-label class="q-table__col">{{ col.label }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
<div class="tdclass">
|
||||||
|
<div :class="getclrow(props.row)">
|
||||||
|
|
||||||
|
<CMyPopupEdit
|
||||||
|
:table="prop_mytable"
|
||||||
|
:canEdit="canEdit"
|
||||||
|
:disable="disabilita()"
|
||||||
|
:mycol="col"
|
||||||
|
v-model:row="props.row"
|
||||||
|
:field="col.field"
|
||||||
|
:subfield="col.subfield"
|
||||||
|
minuteinterval="1"
|
||||||
|
@save="SaveValue"
|
||||||
|
@show="selItem(props.row, col)"
|
||||||
|
@showandsave="showandsel">
|
||||||
|
|
||||||
|
</CMyPopupEdit>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label class="q-table__col"></q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item class="row justify-center">
|
||||||
|
<q-item-section side>
|
||||||
|
<q-item-label caption>
|
||||||
|
<q-item>
|
||||||
|
<div v-for="col in mycolumns" :key="col.name">
|
||||||
|
<div v-if="colExtra.includes(col.name) && col.action" class="tdclass">
|
||||||
|
<q-btn
|
||||||
|
flat round color="red" :icon="col.icon" size="sm"
|
||||||
|
@click="clickFunz(props.row, col)"></q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-item>
|
||||||
|
</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</div>
|
||||||
|
</q-list>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<q-btn
|
<q-btn
|
||||||
flat round dense
|
flat round dense
|
||||||
@@ -223,7 +283,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<q-dialog v-model="newRecordBool" @hide="hidewindow">
|
<q-dialog v-model="newRecordBool" @hide="hidewindow">
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white centeritems">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
{{ mytitle }}
|
{{ mytitle }}
|
||||||
</q-toolbar-title>
|
</q-toolbar-title>
|
||||||
@@ -260,6 +320,44 @@
|
|||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
<q-dialog v-model="editRecordBool">
|
||||||
|
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
||||||
|
<q-toolbar class="bg-primary text-white centeritems">
|
||||||
|
<q-toolbar-title>
|
||||||
|
{{ mytitle }}
|
||||||
|
</q-toolbar-title>
|
||||||
|
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||||
|
</q-toolbar>
|
||||||
|
<q-card-section class="inset-shadow">
|
||||||
|
<div
|
||||||
|
v-for="col in mycolumns" :key="col.name">
|
||||||
|
<div
|
||||||
|
v-if="colVisib.includes(col.field + col.subfield)">
|
||||||
|
<div>
|
||||||
|
<CMyPopupEdit
|
||||||
|
:table="prop_mytable"
|
||||||
|
:canEdit="true"
|
||||||
|
:mycol="col"
|
||||||
|
:isInModif="true"
|
||||||
|
v-model:row="recModif"
|
||||||
|
:field="col.field"
|
||||||
|
:subfield="col.subfield"
|
||||||
|
minuteinterval="1"
|
||||||
|
@save="SaveValue"
|
||||||
|
@show="selItem(recModif, col, true)"
|
||||||
|
@showandsave="showandsel">
|
||||||
|
|
||||||
|
</CMyPopupEdit>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-card-actions align="center">
|
||||||
|
<q-btn flat :label="$t('dialog.ok')" color="primary" @click="saverecModif"></q-btn>
|
||||||
|
<q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup></q-btn>
|
||||||
|
</q-card-actions>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" src="./CGridTableRec.ts">
|
<script lang="ts" src="./CGridTableRec.ts">
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
function refreshval() {
|
function refreshval() {
|
||||||
|
console.log('refreshval')
|
||||||
myarrvalues.value = []
|
myarrvalues.value = []
|
||||||
|
|
||||||
// console.log('options', props.options)
|
// console.log('options', props.options)
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default defineComponent({
|
|||||||
])
|
])
|
||||||
|
|
||||||
function changeval(newval: any) {
|
function changeval(newval: any) {
|
||||||
// console.log('changeval', newval)
|
console.log('myEditor: changeval', newval)
|
||||||
emit('update:value', newval)
|
emit('update:value', newval)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
toolbar-toggle-color="yellow-8"
|
toolbar-toggle-color="yellow-8"
|
||||||
toolbar-bg="primary"
|
toolbar-bg="primary"
|
||||||
:toolbar="toolbarcomp"
|
:toolbar="toolbarcomp"
|
||||||
debounce="500"
|
|
||||||
:fonts="myfonts"
|
:fonts="myfonts"
|
||||||
@update:model-value="changeval"
|
@update:model-value="changeval"
|
||||||
@paste="evt => pasteCapture(evt)"
|
@paste="evt => pasteCapture(evt)"
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
.editor{
|
||||||
|
border: solid 2px #1c64aa;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 2px;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineComponent, onMounted, PropType, ref, toRef, watch } from 'vue'
|
import { defineComponent, onMounted, onBeforeMount, PropType, ref, toRef, watch } 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'
|
||||||
@@ -40,6 +40,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
isInModif: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
field: {
|
field: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -143,7 +148,12 @@ export default defineComponent({
|
|||||||
const { setValDb, getValDb } = MixinBase()
|
const { setValDb, getValDb } = MixinBase()
|
||||||
const { getMyUsername } = MixinUsers()
|
const { getMyUsername } = MixinUsers()
|
||||||
|
|
||||||
|
watch(() => props.row, (newval, oldval) => {
|
||||||
|
refresh()
|
||||||
|
})
|
||||||
|
|
||||||
function crea() {
|
function crea() {
|
||||||
|
// console.log('crea', isFieldDb())
|
||||||
|
|
||||||
if (isFieldDb()) {
|
if (isFieldDb()) {
|
||||||
// mykey -> field
|
// mykey -> field
|
||||||
@@ -170,7 +180,7 @@ export default defineComponent({
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('col', col.value);
|
// console.log('col', col.value);
|
||||||
} else {
|
} else {
|
||||||
col.value = {...props.mycol}
|
col.value = {...props.mycol}
|
||||||
}
|
}
|
||||||
@@ -192,8 +202,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeval(newval: any) {
|
function changeval(newval: any) {
|
||||||
// console.log('changeval update:row', newval)
|
console.log('changeval update:row', newval)
|
||||||
emit('update:row', props.row)
|
emit('update:row', props.row)
|
||||||
|
if (props.isInModif)
|
||||||
|
OpenEdit()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getrealval(newval: any) {
|
function getrealval(newval: any) {
|
||||||
@@ -203,11 +216,14 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changevalRec(newval: any) {
|
function changevalRec(newval: any) {
|
||||||
|
console.log('popypedit: changevalRec', newval)
|
||||||
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
|
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
|
||||||
// console.log('row[col.value.name]', props.row[col.value.name])
|
// console.log('row[col.value.name]', props.row[col.value.name])
|
||||||
myrow.value[col.value.name] = newval
|
myrow.value[col.value.name] = newval
|
||||||
// console.log('changevalRec update:row', newval)
|
// console.log('changevalRec update:row', newval)
|
||||||
emit('update:row', props.row)
|
emit('update:row', props.row)
|
||||||
|
if (props.isInModif)
|
||||||
|
OpenEdit()
|
||||||
}
|
}
|
||||||
|
|
||||||
function changevalRecHours(newval: any) {
|
function changevalRecHours(newval: any) {
|
||||||
@@ -224,7 +240,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
// console.log('mounted')
|
|
||||||
|
// console.log('mounted', 'isFieldDb()', isFieldDb())
|
||||||
if (isFieldDb()) {
|
if (isFieldDb()) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -245,9 +262,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log('popupedit: myvalue.value', myvalue.value)
|
||||||
|
|
||||||
if (col.value.fieldtype === costanti.FieldType.listimages) {
|
if (col.value.fieldtype === costanti.FieldType.listimages) {
|
||||||
if (myvalue.value === '' || myvalue.value === undefined) {
|
if (myvalue.value === '' || myvalue.value === undefined) {
|
||||||
console.log('set default myvalue.value ')
|
// console.log('set default myvalue.value ')
|
||||||
myvalue.value = {
|
myvalue.value = {
|
||||||
title: 'Galleria',
|
title: 'Galleria',
|
||||||
directory: 'none',
|
directory: 'none',
|
||||||
@@ -261,6 +280,11 @@ export default defineComponent({
|
|||||||
// console.log('myvalueprec', myvalueprec)
|
// console.log('myvalueprec', myvalueprec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refresh() {
|
||||||
|
mounted()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function OpenEdit() {
|
function OpenEdit() {
|
||||||
// console.log('OpenEdit')
|
// console.log('OpenEdit')
|
||||||
emit('show')
|
emit('show')
|
||||||
@@ -504,7 +528,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(mounted)
|
onBeforeMount(mounted)
|
||||||
|
|
||||||
crea()
|
crea()
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
:readonly="false"
|
:readonly="false"
|
||||||
:minuteinterval="minuteinterval"
|
:minuteinterval="minuteinterval"
|
||||||
:dense="true"
|
:dense="true"
|
||||||
@update:model-value="changevalRec"
|
@update:valueDate="changevalRec"
|
||||||
canEdit="true"
|
canEdit="true"
|
||||||
@savetoclose="SaveValueInt"
|
@savetoclose="SaveValueInt"
|
||||||
@show="OpenEdit"
|
@show="OpenEdit"
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
:directory="getDirectoryGall()"
|
:directory="getDirectoryGall()"
|
||||||
:imgGall="myvalue" :edit="isviewfield()"
|
:imgGall="myvalue" :edit="isviewfield()"
|
||||||
@showandsave="Savedb"
|
@showandsave="Savedb"
|
||||||
@update:model-value="changevalRec"
|
@update:imgGall="changevalRec"
|
||||||
>
|
>
|
||||||
|
|
||||||
</CGallery>
|
</CGallery>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
:directory="getDirectoryGall()"
|
:directory="getDirectoryGall()"
|
||||||
:imgGall="myvalue" :edit="isviewfield()"
|
:imgGall="myvalue" :edit="isviewfield()"
|
||||||
:single="isFieldDb()"
|
:single="isFieldDb()"
|
||||||
@update:model-value="changevalRec"
|
@update:imgGall="changevalRec"
|
||||||
@showandsave="Savedb">
|
@showandsave="Savedb">
|
||||||
|
|
||||||
</CGallery>
|
</CGallery>
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
<CMyChipList
|
<CMyChipList
|
||||||
:type="costanti.FieldType.binary"
|
:type="costanti.FieldType.binary"
|
||||||
:value="myvalue"
|
:value="myvalue"
|
||||||
@update:model-value="changevalRec"
|
@update:value="changevalRec"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
@@ -152,7 +152,6 @@
|
|||||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.select">
|
<div v-else-if="col.fieldtype === costanti.FieldType.select">
|
||||||
myvalue: {{ myvalue }}
|
|
||||||
<CMyChipList
|
<CMyChipList
|
||||||
@update:model-value="changevalRec"
|
@update:model-value="changevalRec"
|
||||||
myclass="text-center"
|
myclass="text-center"
|
||||||
@@ -163,6 +162,19 @@
|
|||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
|
||||||
|
<q-rating
|
||||||
|
:model-value="`${myvalue}` - 1"
|
||||||
|
@update:model-value="changevalRec"
|
||||||
|
size="1.5rem"
|
||||||
|
style="display: block !important;"
|
||||||
|
:color="tools.getColByLevel(myvalue)"
|
||||||
|
icon="star_border"
|
||||||
|
icon-selected="star"
|
||||||
|
:max="5"
|
||||||
|
:readonly="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.boolean">
|
<div v-else-if="col.fieldtype === costanti.FieldType.boolean">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
dark color="green"
|
dark color="green"
|
||||||
@@ -170,13 +182,15 @@
|
|||||||
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
|
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
|
||||||
@update:model-value="changevalRec"></q-toggle>
|
@update:model-value="changevalRec"></q-toggle>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.html">
|
<div v-else-if="col.fieldtype === costanti.FieldType.html" class="editor">
|
||||||
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
|
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else class="flex justify-center" :class="{ editor: (col.fieldtype === costanti.FieldType.html) && !isInModif }">
|
||||||
|
<div v-if="!isInModif">
|
||||||
|
<!-- Edit Value -->
|
||||||
<div v-if="col.fieldtype === costanti.FieldType.listimages">
|
<div v-if="col.fieldtype === costanti.FieldType.listimages">
|
||||||
<CGallery
|
<CGallery
|
||||||
:title="getTitleGall()"
|
:title="getTitleGall()"
|
||||||
@@ -207,9 +221,7 @@
|
|||||||
{{ myvalue }}
|
{{ myvalue }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else-if="col.fieldtype === costanti.FieldType.date">
|
||||||
<!-- Edit Value -->
|
|
||||||
<span v-if="col.fieldtype === costanti.FieldType.date">
|
|
||||||
<CDateTime
|
<CDateTime
|
||||||
v-if="myvalue"
|
v-if="myvalue"
|
||||||
:label="col.label"
|
:label="col.label"
|
||||||
@@ -222,8 +234,8 @@
|
|||||||
@savetoclose="SaveValueInt"
|
@savetoclose="SaveValueInt"
|
||||||
@show="OpenEdit">
|
@show="OpenEdit">
|
||||||
</CDateTime>
|
</CDateTime>
|
||||||
</span>
|
</div>
|
||||||
<span v-else-if="col.fieldtype === costanti.FieldType.onlydate">
|
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
|
||||||
|
|
||||||
<CDateTime
|
<CDateTime
|
||||||
:label="col.label"
|
:label="col.label"
|
||||||
@@ -238,10 +250,8 @@
|
|||||||
@show="OpenEdit"
|
@show="OpenEdit"
|
||||||
view="date">
|
view="date">
|
||||||
</CDateTime>
|
</CDateTime>
|
||||||
</span>
|
</div>
|
||||||
<div v-else>
|
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
|
||||||
<div>
|
|
||||||
<div v-if="col.fieldtype === costanti.FieldType.binary">
|
|
||||||
<CMyChipList
|
<CMyChipList
|
||||||
:type="costanti.FieldType.binary"
|
:type="costanti.FieldType.binary"
|
||||||
:value="myvalue"
|
:value="myvalue"
|
||||||
@@ -254,6 +264,7 @@
|
|||||||
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
|
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
|
||||||
<CMyChipList
|
<CMyChipList
|
||||||
:type="costanti.FieldType.multiselect"
|
:type="costanti.FieldType.multiselect"
|
||||||
|
@update:value="changevalRec"
|
||||||
:value="myvalue"
|
:value="myvalue"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
@@ -264,12 +275,26 @@
|
|||||||
<CMyChipList
|
<CMyChipList
|
||||||
myclass="text-center"
|
myclass="text-center"
|
||||||
:type="costanti.FieldType.select"
|
:type="costanti.FieldType.select"
|
||||||
:value="myvalue"
|
@update:model-value="changevalRec"
|
||||||
|
v-model:value="myvalue"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
|
||||||
|
<q-rating
|
||||||
|
:model-value="`${myvalue}` - 1"
|
||||||
|
@update:model-value="changevalRec"
|
||||||
|
size="1.5rem"
|
||||||
|
style="display: block !important;"
|
||||||
|
:color="tools.getColByLevel(myvalue)"
|
||||||
|
icon="star_border"
|
||||||
|
icon-selected="star"
|
||||||
|
:max="5"
|
||||||
|
:readonly="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.boolean">
|
<div v-else-if="col.fieldtype === costanti.FieldType.boolean">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
dark color="green" v-model="myvalue" :label="col.title"
|
dark color="green" v-model="myvalue" :label="col.title"
|
||||||
@@ -277,10 +302,8 @@
|
|||||||
@update:model-value="Savedb"></q-toggle>
|
@update:model-value="Savedb"></q-toggle>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.html">
|
<div v-else-if="col.fieldtype === costanti.FieldType.html">
|
||||||
<div v-if="isFieldDb()">
|
|
||||||
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"></div>
|
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"></div>
|
||||||
</div>
|
<div v-if="!isFieldDb()">
|
||||||
<div v-else>
|
|
||||||
<q-dialog v-model="visueditor" no-backdrop-dismiss persistent full-height full-width>
|
<q-dialog v-model="visueditor" no-backdrop-dismiss persistent full-height full-width>
|
||||||
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;`">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
@@ -297,9 +320,8 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<span v-html="visuValByType(myvalue, col, row)"></span>
|
<span v-html="visuValByType(myvalue, col, row)"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-popup-edit
|
<q-popup-edit
|
||||||
v-if="canEdit && col.fieldtype !== costanti.FieldType.html"
|
v-if="(canEdit && col.fieldtype !== costanti.FieldType.html)"
|
||||||
v-model="myvalue"
|
v-model="myvalue"
|
||||||
:disable="col.disable"
|
:disable="col.disable"
|
||||||
:title="col.title ? col.title : col.titlepopupedit"
|
:title="col.title ? col.title : col.titlepopupedit"
|
||||||
@@ -376,6 +398,16 @@
|
|||||||
:useinput="false">
|
:useinput="false">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
|
||||||
|
<CMySelect
|
||||||
|
:label="col.label"
|
||||||
|
v-model:value="scope.value"
|
||||||
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
|
:useinput="false">
|
||||||
|
</CMySelect>
|
||||||
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.nationality">
|
<div v-else-if="col.fieldtype === costanti.FieldType.nationality">
|
||||||
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
|
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
|
||||||
<q-input
|
<q-input
|
||||||
@@ -452,7 +484,182 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-popup-edit>
|
</q-popup-edit>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<!-- IN MODIFICA !-->
|
||||||
|
<div v-if="col.fieldtype === costanti.FieldType.boolean">
|
||||||
|
<q-checkbox
|
||||||
|
v-model="myvalue"
|
||||||
|
@update:model-value="changevalRec"
|
||||||
|
:label="col.title">
|
||||||
|
</q-checkbox>
|
||||||
|
<span v-html="visuValByType(myvalue, col, row)"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.string">
|
||||||
|
<q-input
|
||||||
|
v-model="myvalue"
|
||||||
|
@update:model-value="changevalRec"
|
||||||
|
autogrow
|
||||||
|
@keyup.enter.stop
|
||||||
|
autofocus>
|
||||||
|
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.password">
|
||||||
|
<q-input
|
||||||
|
v-model="myvalue"
|
||||||
|
@update:model-value="changevalRec"
|
||||||
|
type="password"
|
||||||
|
@keyup.enter="scope.set"
|
||||||
|
autofocus>
|
||||||
|
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.number">
|
||||||
|
<q-input
|
||||||
|
v-model="myvalue" @update:model-value="changevalRec"
|
||||||
|
type="number"
|
||||||
|
autofocus>
|
||||||
|
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.hours">
|
||||||
|
<div v-if="isFieldDb()">
|
||||||
|
<CMySelect
|
||||||
|
label="Ore"
|
||||||
|
v-model:value="myvalue"
|
||||||
|
@update:value="changevalRec"
|
||||||
|
optval="_id" optlab="label"
|
||||||
|
:useinput="false"
|
||||||
|
:options="tools.SelectHours">
|
||||||
|
</CMySelect>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<q-input
|
||||||
|
v-model="myvalue" type="number"
|
||||||
|
@update:value="changevalRec"
|
||||||
|
autofocus>
|
||||||
|
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
|
||||||
|
|
||||||
|
<CMyToggleList
|
||||||
|
:label="col.titlepopupedit"
|
||||||
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
|
v-model:value="myvalue"
|
||||||
|
@update:value="changevalRec"
|
||||||
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
|
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
||||||
|
</CMyToggleList>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.select">
|
||||||
|
<CMySelect
|
||||||
|
:label="col.label"
|
||||||
|
v-model:value="myvalue"
|
||||||
|
@update:value="changevalRec"
|
||||||
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
|
:useinput="false">
|
||||||
|
</CMySelect>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
|
||||||
|
<CMySelect
|
||||||
|
:label="col.label"
|
||||||
|
v-model:value="myvalue"
|
||||||
|
@update:value="changevalRec"
|
||||||
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
|
:useinput="false">
|
||||||
|
</CMySelect>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.nationality">
|
||||||
|
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
|
||||||
|
<q-input
|
||||||
|
v-model:value="countryname"
|
||||||
|
@update:value="changevalRec"
|
||||||
|
:readonly="true"
|
||||||
|
rounded dense
|
||||||
|
debounce="1000"
|
||||||
|
@keyup.enter="scope.set"
|
||||||
|
:label="title"
|
||||||
|
>
|
||||||
|
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<div style="font-size: 1rem;">
|
||||||
|
<!--<vue-country-code
|
||||||
|
:defaultCountry="myvalue"
|
||||||
|
:disabledFetchingCountry="true"
|
||||||
|
@onSelect="selectcountry"
|
||||||
|
:preferredCountries="tools.getprefCountries"
|
||||||
|
:dropdownOptions="{ disabledDialCode: true }">
|
||||||
|
|
||||||
|
</vue-country-code>-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<div style="height: 180px;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.intcode">
|
||||||
|
|
||||||
|
<!-- <vue-tel-input
|
||||||
|
@country-changed="intcode_change"
|
||||||
|
:value="myvalue"
|
||||||
|
@update:model-value="oninput"
|
||||||
|
:placeholder="$t('reg.cell')"
|
||||||
|
:enabledCountryCode="true"
|
||||||
|
inputClasses="clCell"
|
||||||
|
wrapperClasses="clCellCode">
|
||||||
|
</vue-tel-input>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
v-model="myvalue"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
multiple
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||||
|
style="min-width: 150px"
|
||||||
|
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
|
@update:model-value="changevalRec">
|
||||||
|
|
||||||
|
<template v-slot:option="{ itemProps, opt, selected, toggleOption }">
|
||||||
|
<q-item v-bind="itemProps">
|
||||||
|
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>{{ opt[fieldsTable.getLabelByTable(col.jointable)] }}</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 v-else-if="col.fieldtype === costanti.FieldType.html">
|
||||||
|
<div v-if="!isFieldDb()">
|
||||||
|
<CMyEditor
|
||||||
|
v-model:value="myvalue" :title="col.title" @keyup.enter.stop
|
||||||
|
@update:value="changevalRec"
|
||||||
|
@showandsave="Savedb">
|
||||||
|
</CMyEditor>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { useQuasar } from 'quasar'
|
|||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMySelect',
|
name: 'CMySelect',
|
||||||
|
emits: ['update:value', 'changeval'],
|
||||||
props: {
|
props: {
|
||||||
options: {
|
options: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -67,16 +68,15 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
console.log('mounted', mounted)
|
// console.log('mounted myselect', props.options)
|
||||||
if (props.options) {
|
if (props.options) {
|
||||||
const rec: any = props.options.find((myrec: any) => myrec[`${props.optval}`] === props.value)
|
const rec: any = props.options.find((myrec: any) => myrec[`${props.optval}`] === props.value)
|
||||||
/*
|
|
||||||
console.log('rec', rec, 'props.useinput', props.useinput)
|
/*console.log('rec', rec, 'props.useinput', props.useinput)
|
||||||
console.log('props.value', props.value)
|
console.log('props.value', props.value)
|
||||||
console.log('options', props.options)
|
console.log('options', props.options)
|
||||||
console.log('optval', props.optval)
|
console.log('optval', props.optval)
|
||||||
console.log('optlab', props.optlab)
|
console.log('optlab', props.optlab)*/
|
||||||
*/
|
|
||||||
|
|
||||||
if (rec) {
|
if (rec) {
|
||||||
if (props.funcgetvaluebyid)
|
if (props.funcgetvaluebyid)
|
||||||
@@ -84,7 +84,7 @@ export default defineComponent({
|
|||||||
else
|
else
|
||||||
myvalue.value = rec[`${props.optlab}`]
|
myvalue.value = rec[`${props.optlab}`]
|
||||||
|
|
||||||
// console.log('myvalue', myvalue, 'optval', optval, 'rec', rec[`${optval}`])
|
// console.log('myvalue', myvalue, 'optval', props.optval, 'rec', rec[`${props.optval}`])
|
||||||
} else {
|
} else {
|
||||||
if (!props.useinput) {
|
if (!props.useinput) {
|
||||||
if (props.value) {
|
if (props.value) {
|
||||||
@@ -93,6 +93,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// console.log('cmyselect: myvalue.value', myvalue.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
:option-label="optlab"
|
:option-label="optlab"
|
||||||
@update:model-value="changeval"
|
@update:model-value="changeval"
|
||||||
:label="label"
|
:label="label"
|
||||||
:dense="dense"
|
:dense="dense">
|
||||||
>
|
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -35,9 +34,7 @@
|
|||||||
:label="label"
|
:label="label"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
style="min-width: 170px; max-width: 400px;"
|
style="min-width: 170px; max-width: 400px;">
|
||||||
>
|
|
||||||
|
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { useGlobalStore } from '@store/globalStore'
|
|||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { colmySkills } from '@store/Modules/fieldsTable'
|
import { colmySkills } from '@store/Modules/fieldsTable'
|
||||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||||
|
import { IMySkill, ISkill } from 'model'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CSkill',
|
name: 'CSkill',
|
||||||
@@ -47,10 +48,25 @@ export default defineComponent({
|
|||||||
const data = await globalStore.saveSubRec(mydata)
|
const data = await globalStore.saveSubRec(mydata)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getdefaultnewrec(): any {
|
||||||
|
return {
|
||||||
|
_id: 0,
|
||||||
|
idSkill: 0,
|
||||||
|
idStatusSkill: [],
|
||||||
|
idCity: [],
|
||||||
|
NumLevel: 0,
|
||||||
|
photos: [],
|
||||||
|
note: '',
|
||||||
|
subTitle: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tools,
|
tools,
|
||||||
costanti,
|
costanti,
|
||||||
colmySkills,
|
colmySkills,
|
||||||
|
getdefaultnewrec,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,41 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
Competenze:<br>
|
|
||||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
prop_mytable="myskills"
|
prop_mytable="myskills"
|
||||||
prop_mytitle="Mie Competenze"
|
prop_mytitle=""
|
||||||
:prop_mycolumns="colmySkills"
|
:prop_mycolumns="colmySkills"
|
||||||
prop_colkey="idSkill"
|
prop_colkey="idSkill"
|
||||||
|
:vertical="true"
|
||||||
nodataLabel="Nessuna Competenza inserita"
|
nodataLabel="Nessuna Competenza inserita"
|
||||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
:prop_search="false"
|
||||||
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||||
|
:defaultnewrec="getdefaultnewrec">
|
||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
|
||||||
|
|
||||||
Servizi:<br>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
<q-page class="">
|
<q-page class="">
|
||||||
<h1>Inizio:</h1>
|
<h1>Inizio:</h1>
|
||||||
|
|
||||||
<CSkill>
|
|
||||||
|
|
||||||
</CSkill>
|
|
||||||
|
|
||||||
<!--<CChartMap
|
<!--<CChartMap
|
||||||
title="Mappa"
|
title="Mappa"
|
||||||
subtitle="cartina..."
|
subtitle="cartina..."
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ const msg_it = {
|
|||||||
deletetherecord: 'Eliminare il Record?',
|
deletetherecord: 'Eliminare il Record?',
|
||||||
deletedrecord: 'Record Cancellato',
|
deletedrecord: 'Record Cancellato',
|
||||||
recdelfailed: 'Errore durante la cancellazione del Record',
|
recdelfailed: 'Errore durante la cancellazione del Record',
|
||||||
duplicatedrecord: 'Record Duplicato',
|
duplicatedrecord: 'Vuoi Duplicare il record',
|
||||||
recdupfailed: 'Errore durante la duplicazione del Record',
|
recdupfailed: 'Errore durante la duplicazione del Record',
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export const Api = {
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
return new Promise((resolve, reject) => sendRequest(url, method, mydataout)
|
return new Promise((resolve, reject) => sendRequest(url, method, mydataout)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log('status:', res.status)
|
// console.log('status:', res.status)
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (method === 'get') {
|
if (method === 'get') {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export const costanti = {
|
|||||||
binary: 8,
|
binary: 8,
|
||||||
html: 16,
|
html: 16,
|
||||||
select: 32,
|
select: 32,
|
||||||
|
star5: 40,
|
||||||
number: 64,
|
number: 64,
|
||||||
typeinrec: 128,
|
typeinrec: 128,
|
||||||
multiselect: 256,
|
multiselect: 256,
|
||||||
|
|||||||
@@ -16,6 +16,19 @@ const DeleteRec = {
|
|||||||
visuonlyEditVal: true,
|
visuonlyEditVal: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ModifRec = {
|
||||||
|
name: 'modifrec',
|
||||||
|
label_trans: 'reg.edit',
|
||||||
|
align: 'right',
|
||||||
|
field: costanti.NOFIELD,
|
||||||
|
sortable: false,
|
||||||
|
icon: 'fas fa-pencil-alt',
|
||||||
|
action: lists.MenuAction.CAN_EDIT_TABLE,
|
||||||
|
askaction: '',
|
||||||
|
required: true,
|
||||||
|
visuonlyEditVal: true,
|
||||||
|
}
|
||||||
|
|
||||||
const DuplicateRec = {
|
const DuplicateRec = {
|
||||||
name: 'copyrec',
|
name: 'copyrec',
|
||||||
label_trans: 'event.duplicate',
|
label_trans: 'event.duplicate',
|
||||||
@@ -321,8 +334,8 @@ export const colSkills = [
|
|||||||
}),
|
}),
|
||||||
AddCol({ name: 'color', label_trans: 'products.color' }),
|
AddCol({ name: 'color', label_trans: 'products.color' }),
|
||||||
AddCol({ name: 'theme', label_trans: 'products.theme' }),
|
AddCol({ name: 'theme', label_trans: 'products.theme' }),
|
||||||
AddCol(DeleteRec),
|
|
||||||
AddCol(DuplicateRec),
|
AddCol(DuplicateRec),
|
||||||
|
AddCol(DeleteRec),
|
||||||
]
|
]
|
||||||
|
|
||||||
export const colmySkills = [
|
export const colmySkills = [
|
||||||
@@ -338,7 +351,7 @@ export const colmySkills = [
|
|||||||
AddCol({
|
AddCol({
|
||||||
name: 'numLevel',
|
name: 'numLevel',
|
||||||
label_trans: 'level.name',
|
label_trans: 'level.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.star5,
|
||||||
jointable: 'levels',
|
jointable: 'levels',
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
@@ -361,8 +374,9 @@ export const colmySkills = [
|
|||||||
}),
|
}),
|
||||||
AddCol({ name: 'subTitle', label_trans: 'event.title' }),
|
AddCol({ name: 'subTitle', label_trans: 'event.title' }),
|
||||||
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html }),
|
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html }),
|
||||||
AddCol(DeleteRec),
|
|
||||||
AddCol(DuplicateRec),
|
AddCol(DuplicateRec),
|
||||||
|
AddCol(ModifRec),
|
||||||
|
AddCol(DeleteRec),
|
||||||
]
|
]
|
||||||
|
|
||||||
export const colStatusSkills = [
|
export const colStatusSkills = [
|
||||||
|
|||||||
@@ -4340,6 +4340,23 @@ export const tools = {
|
|||||||
arr.splice(new_index, 0, arr.splice(old_index, 1)[0])
|
arr.splice(new_index, 0, arr.splice(old_index, 1)[0])
|
||||||
return arr // for testing
|
return arr // for testing
|
||||||
},
|
},
|
||||||
|
getColByLevel(level: number) {
|
||||||
|
let col = ''
|
||||||
|
if (level === 0){
|
||||||
|
col = 'grey-5'
|
||||||
|
} else if (level === 1){
|
||||||
|
col = 'red-5'
|
||||||
|
} else if (level === 2){
|
||||||
|
col = 'orange-5'
|
||||||
|
} else if (level === 3){
|
||||||
|
col = 'yellow-5'
|
||||||
|
} else if (level === 4){
|
||||||
|
col = 'blue-5'
|
||||||
|
} else if (level === 5){
|
||||||
|
col = 'green-5'
|
||||||
|
}
|
||||||
|
return col
|
||||||
|
}
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
// if (navigator.languages && navigator.languages.length > 0) {
|
// if (navigator.languages && navigator.languages.length > 0) {
|
||||||
// return navigator.languages[0]
|
// return navigator.languages[0]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useUserStore } from '@store/UserStore'
|
|||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Signup',
|
name: 'SignUp',
|
||||||
components: { CSignUp },
|
components: { CSignUp },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
@@ -21,15 +21,6 @@ export default defineComponent({
|
|||||||
adult.value = !!$route.params.invited
|
adult.value = !!$route.params.invited
|
||||||
})
|
})
|
||||||
|
|
||||||
function created() {
|
return {}
|
||||||
// if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, ''))
|
|
||||||
// tools.setCookie(tools.APORTADOR_SOLIDARIO, $route.params.invited)
|
|
||||||
}
|
|
||||||
|
|
||||||
created()
|
|
||||||
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { IEstimate } from '@src/model'
|
|||||||
import { tools } from '@src/store/Modules/tools'
|
import { tools } from '@src/store/Modules/tools'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Estimate',
|
name: 'EstimateMy',
|
||||||
props: {
|
props: {
|
||||||
mystr: {
|
mystr: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import { complexity } from '../../validation'
|
|||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Updatepassword',
|
name: 'UpdatePassword',
|
||||||
components: { Logo, CTitleBanner },
|
components: { Logo, CTitleBanner },
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||||
import { CProfile } from '@/components/CProfile'
|
import { CProfile } from '@/components/CProfile'
|
||||||
|
import { CSkill } from '@/components/CSkill'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
@@ -13,8 +14,8 @@ import { costanti } from '@costanti'
|
|||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Profile',
|
name: 'ProfileMy',
|
||||||
components: { CProfile, CTitleBanner, CMyFieldDb },
|
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|||||||
@@ -84,6 +84,16 @@
|
|||||||
|
|
||||||
</CTitleBanner>
|
</CTitleBanner>
|
||||||
|
|
||||||
|
<CTitleBanner
|
||||||
|
class="q-pa-xs" title="Competenze e Talenti" bgcolor="bg-primary" clcolor="text-white"
|
||||||
|
myclass="myshad" :canopen="true">
|
||||||
|
|
||||||
|
<CSkill>
|
||||||
|
|
||||||
|
</CSkill>
|
||||||
|
|
||||||
|
|
||||||
|
</CTitleBanner>
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
class="q-pa-xs" title="Informazioni su di te" bgcolor="bg-primary" clcolor="text-white"
|
class="q-pa-xs" title="Informazioni su di te" bgcolor="bg-primary" clcolor="text-white"
|
||||||
myclass="myshad" :canopen="true">
|
myclass="myshad" :canopen="true">
|
||||||
|
|||||||
Reference in New Issue
Block a user