- Gallery

- Popupedit semplificato
This commit is contained in:
Paolo Arena
2021-12-03 22:47:53 +01:00
parent c5283c804e
commit c517dedd47
20 changed files with 625 additions and 679 deletions

View File

@@ -40,6 +40,7 @@
"dotenv": "^10.0.0",
"echarts": "^5.2.2",
"eslint-plugin-quasar": "^1.0.0",
"eslint-plugin-standard": "^5.0.0",
"graphql": "^16.0.1",
"graphql-tag": "^2.12.6",
"gsap": "^3.8.0",
@@ -70,10 +71,10 @@
"vue2-dragula": "^2.5.5",
"vue3-tel-input": "^1.0.4",
"vuex": "^4.0.1",
"vuex-router-sync": "^6.0.0-rc.1",
"vuex-typex": "^3.1.9"
"vuex-router-sync": "^6.0.0-rc.1"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.3",
"@quasar/app": "^3.2.3",
"@quasar/quasar-app-extension-qcalendar": "^4.0.0-beta.6",
@@ -114,6 +115,7 @@
"typescript": "^4.5.2",
"vue-cli-plugin-element-ui": "^1.1.4",
"vueify": "^9.4.1",
"webpack": "^5.0.0",
"workbox-webpack-plugin": "^6.4.1"
},
"browser": {
@@ -134,6 +136,5 @@
"node": ">= 14.17.0",
"npm": ">= 6.14.8",
"yarn": ">= 1.21.1"
},
}
}

View File

@@ -25,7 +25,7 @@ export default defineComponent({
required: true,
},
imgGall: {
type: Object as PropType<IImgGallery | string | undefined | null>,
type: Object as PropType<IImgGallery[] | string | undefined | null>,
required: true,
},
},
@@ -55,7 +55,7 @@ export default defineComponent({
})
function created() {
console.log('created cgallery')
// console.log('created cgallery')
if (isValid(props.imgGall)) {
// @ts-ignore
let myarr: any = props.imgGall

View File

@@ -27,3 +27,11 @@
color: gray;
}
}
.newrec_fields{
display: flex;
padding: 2px;
margin: 2px;
align-items: center;
justify-content: center;
}

View File

@@ -110,6 +110,11 @@ export default defineComponent({
type: Function,
required: false,
},
col_title: {
type: String,
required: false,
default: '',
},
},
components: { CMyPopupEdit, CTitleBanner },
setup(props, { emit }) {
@@ -605,7 +610,6 @@ export default defineComponent({
editRecordBool.value = true
} else {
return $q.dialog({
message: translate(col.askaction) + '?',
html: true,
@@ -613,7 +617,7 @@ export default defineComponent({
label: ok,
push: true,
},
title: 'Action',
title: translate(col.label_trans),
cancel: true,
persistent: false,
}).onOk(() => {
@@ -804,7 +808,30 @@ export default defineComponent({
}
}
function enableSaveNewRec() {
let ok = true
mycolumns.value.forEach((col: IColGridTable) => {
if (col.required) {
console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
if (!newRecord.value[col.name]) {
ok = false
}
}
})
return ok
}
async function saveNewRecord() {
// check if the field are setted
if (!enableSaveNewRec()){
return false
}
console.log('saveNewRecord')
const mydata = {
table: mytable.value,

View File

@@ -175,6 +175,22 @@
:style="props.selected ? 'transform: scale(0.95);' : ''"
>
<q-card :class="props.selected ? 'bg-grey-2' : ''">
<q-bar dense class="bg-primary text-white">
<span class="ellipsis"> {{ props.row[col_title] }} </span>
<q-space />
<q-btn
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>
<q-btn
flat round color="white" icon="fas fa-trash-alt" size="sm"
@click="clickFunz(props.row, prop_mycolumns.find((rec) => rec.action === lists.MenuAction.DELETE_RECTABLE))"></q-btn>
</q-bar>
<!--<q-toolbar dense v-if="col_title" class="bg-primary text-white centeritems">
<q-toolbar-title>
{{ props.row[col_title] }}
</q-toolbar-title>
</q-toolbar>-->
<q-card-section class="inset-shadow">
<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)">
@@ -204,27 +220,8 @@
</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-section>
</q-card>
</div>
</template>
@@ -283,18 +280,17 @@
</div>
<q-dialog v-model="newRecordBool" @hide="hidewindow">
<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-bar dense class="bg-primary text-white">
Nuovo:
<q-space />
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
</q-bar>
<q-card-section class="inset-shadow">
<div
v-for="col in mycolumns" :key="col.name">
v-for="col in mycolumns" :key="col.name" class="newrec_fields">
<div
v-if="colVisib.includes(col.field + col.subfield)">
<div>
<div class="">
<CMyPopupEdit
:table="prop_mytable"
@@ -303,8 +299,9 @@
v-model:row="newRecord"
:field="col.field"
:subfield="col.subfield"
:isInModif="true"
minuteinterval="1"
:visulabel="true"
:visulabel="false"
@save="SaveValue"
@show="selItem(newRecord, col)"
@showandsave="showandsel">
@@ -322,12 +319,12 @@
</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-bar dense class="bg-primary text-white">
<span v-if="mytitle">{{ mytitle }}</span>
<span v-else>{{ recModif[col_title] }}</span>
<q-space />
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
</q-bar>
<q-card-section class="inset-shadow">
<div
v-for="col in mycolumns" :key="col.name">

View File

@@ -53,7 +53,7 @@ export default defineComponent({
})
function refreshval() {
console.log('refreshval')
// console.log('refreshval')
myarrvalues.value = []
// console.log('options', props.options)

View File

@@ -1,7 +1,7 @@
<template>
<div>
<q-card :style="`min-width: `+ tools.myheight_dialog() + `px;` ">
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
<q-toolbar v-if="showButtons" class="bg-primary text-white" style="min-height: 30px;">
<q-toolbar-title>
Editor
</q-toolbar-title>

View File

@@ -1,5 +1,5 @@
.editor{
border: solid 2px #1c64aa;
border: solid 1px #257ed5;
border-radius: 5px;
padding: 2px;
height: 60px;

View File

@@ -14,6 +14,11 @@ import { CGallery } from '../CGallery'
import { tools } from '@store/Modules/tools'
import { costanti } from '@costanti'
// @ts-ignore
// import VueTelInput from 'vue3-tel-input'
// import 'vue3-tel-input/dist/vue3-tel-input.css'
import { fieldsTable } from '@store/Modules/fieldsTable'
import MixinBase from '@/mixins/mixin-base'
import MixinUsers from '@/mixins/mixin-users'
@@ -219,6 +224,9 @@ export default defineComponent({
console.log('popypedit: changevalRec', newval)
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
// console.log('row[col.value.name]', props.row[col.value.name])
if (props.type === costanti.FieldType.image) {
console.log('image', newval)
}
myrow.value[col.value.name] = newval
// console.log('changevalRec update:row', newval)
emit('update:row', props.row)
@@ -527,6 +535,14 @@ export default defineComponent({
SaveValueInt(myvalue.value, '')
}
function noPopupeditByCol(mycol: IColGridTable) {
return (mycol.fieldtype !== costanti.FieldType.html
&& mycol.fieldtype !== costanti.FieldType.image
&& mycol.fieldtype !== costanti.FieldType.listimages
&& mycol.fieldtype !== costanti.FieldType.number
)
}
onBeforeMount(mounted)
@@ -562,6 +578,7 @@ export default defineComponent({
isFieldDb,
col,
myImgGall,
noPopupeditByCol,
}
}
})

View File

@@ -1,8 +1,28 @@
<template>
<div :class="getclassCol(col)">
<div v-if="visulabel" class="flex">
<div v-if="visInNewRec(col)" style="flex-grow: 1;">
<div v-if="col.fieldtype === costanti.FieldType.string">
<div v-if="(visInNewRec(col) && visulabel) || !visulabel " style="flex-grow: 1;">
<div
:class="{ editor: (col.fieldtype === costanti.FieldType.html) && !isInModif, flex: true, 'justify-center': true }">
<div>
<!-- Edit Value -->
<div v-if="col.fieldtype === costanti.FieldType.boolean">
<div v-if="isInModif">
<q-checkbox
v-model="myvalue"
@update:model-value="changevalRec"
:label="col.title">
</q-checkbox>
<span v-html="visuValByType(myvalue, col, row)"></span>
</div>
<div v-else>
<q-toggle
dark color="green" v-model="myvalue" :label="col.title"
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
@update:model-value="Savedb"></q-toggle>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.string">
<div v-if="visulabel || isInModif" class="flex">
<q-input
v-model="myvalue"
autogrow
@@ -12,93 +32,64 @@
:label="col.label">
</q-input>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.date">
<CDateTime
:label="col.label"
class="cursor-pointer"
v-model:value="myvalue"
:readonly="false"
:minuteinterval="minuteinterval"
:dense="true"
@update:model-value="changevalRec"
canEdit="true"
@savetoclose="SaveValueInt"
@show="OpenEdit">
</CDateTime>
<div v-else>
<span v-html="visuValByType(myvalue, col, row)"></span>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
<CDateTime
:label="col.label"
class="cursor-pointer"
:valueDate="myvalue"
:readonly="false"
:minuteinterval="minuteinterval"
:dense="true"
@update:valueDate="changevalRec"
canEdit="true"
@savetoclose="SaveValueInt"
@show="OpenEdit"
view="date">
</CDateTime>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.number">
<div v-if="canEdit || isInModif">
<q-input
v-model="myvalue" type="number"
autofocus
@update:model-value="changevalRec"
:label="col.label"
>
v-model="myvalue"
@update:model-value="Savedb"
type="number"
autofocus>
</q-input>
</div>
<div v-else>
<span v-html="visuValByType(myvalue, col, row)"></span>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.hours">
<div class="row">
<q-input
v-model="myvalue" type="number"
autofocus
@update:model-value="changevalRec"
style="max-width: 100px;"
:label="col.label"
>
</q-input>
<div v-if="isFieldDb()">
<CMySelect
label="Ore" v-model:value="myvalue"
optval="value" optlab="label"
:dense="false"
:use-input="false"
@changeval="changevalRecHours"
style="max-width: 100px;"
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 v-model="myvalue" type="number"
autofocus
@update:model-value="changevalRec"
:label="col.label">
</q-input>
-->
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.listimages">
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.listimages" style="text-align: center;">
<p v-if="isInModif">
{{ $t('reg.images') }}:
</p>
<CGallery
:title="getTitleGall()"
:directory="getDirectoryGall()"
:imgGall="myvalue" :edit="isviewfield()"
@showandsave="Savedb"
@update:imgGall="changevalRec"
>
@showandsave="Savedb">
</CGallery>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.image">
<div v-if="canEdit">
{{ $t('reg.photo') }}
<CGallery
:title="getTitleGall()"
:directory="getDirectoryGall()"
:imgGall="myvalue" :edit="isviewfield()"
:imgGall="[{ imagefile: myvalue }]"
:edit="isviewfield()"
:single="isFieldDb()"
@update:imgGall="changevalRec"
@showandsave="Savedb">
@@ -130,94 +121,53 @@
</div>
</div>
<div v-if="col.fieldtype === costanti.FieldType.binary">
<CMyChipList
:type="costanti.FieldType.binary"
:value="myvalue"
@update:value="changevalRec"
:options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<!-- Show Value -->
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
<CMyChipList
@update:model-value="changevalRec"
:type="costanti.FieldType.multiselect"
v-model:value="myvalue"
:options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.select">
<CMyChipList
@update:model-value="changevalRec"
myclass="text-center"
:type="costanti.FieldType.select"
v-model:value="myvalue"
:options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</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">
<q-toggle
dark color="green"
v-model:value="myvalue" :label="col.title"
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
@update:model-value="changevalRec"></q-toggle>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.html" class="editor">
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
</div>
</div>
</div>
</div>
<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">
<CGallery
:title="getTitleGall()"
:directory="getDirectoryGall()"
:imgGall="myvalue" :edit="isviewfield()"
@showandsave="Savedb">
</CGallery>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.image">
<CGallery
:title="getTitleGall()"
:directory="getDirectoryGall()"
:single="isFieldDb()"
:imgGall="myImgGall" :edit="isviewfield()"
@showandsave="Savedb">
</CGallery>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.nationality">
<div>
<div v-if="isInModif" 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 v-else>
{{ myvalue }}
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.intcode">
<div>
<div v-if="isInModif">
<!-- <vue-tel-input
@country-changed="intcode_change"
:value="scope.value"
@update:model-value="oninput"
:placeholder="$t('reg.cell')"
:enabledCountryCode="true"
inputClasses="clCell"
wrapperClasses="clCellCode">
</vue-tel-input>
-->
</div>
<div v-else>
{{ myvalue }}
</div>
</div>
@@ -236,7 +186,6 @@
</CDateTime>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
<CDateTime
:label="col.label"
class="cursor-pointer"
@@ -252,18 +201,64 @@
</CDateTime>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
<div v-if="isInModif">
<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>
<CMyChipList
:type="costanti.FieldType.binary"
:value="myvalue"
@update:value="changevalRec"
:options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
</div>
<!-- Show Value -->
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
<div v-if="isInModif">
<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>
<CMyChipList
:type="costanti.FieldType.multiselect"
:type="col.fieldtype"
@update:value="changevalRec"
:value="myvalue"
:options="globalStore.getTableJoinByName(col.jointable)"
@@ -271,23 +266,48 @@
:optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.select">
<div v-if="isInModif">
<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>
<CMyChipList
myclass="text-center"
:type="costanti.FieldType.select"
@update:model-value="changevalRec"
:type="col.fieldtype"
@update:value="changevalRec"
v-model:value="myvalue"
:options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
<div v-if="isInModif">
<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>
<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"
@@ -295,13 +315,19 @@
:readonly="true"
/>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.boolean">
<q-toggle
dark color="green" v-model="myvalue" :label="col.title"
:disable="disable && col.name !== 'profile.saw_zoom_presentation'"
@update:model-value="Savedb"></q-toggle>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.html">
<div v-if="isInModif">
<div v-if="!isFieldDb()">
<CMyEditor
v-model:value="myvalue" :title="col.title" @keyup.enter.stop
:showButtons="false"
@update:value="changevalRec"
@showandsave="Savedb">
</CMyEditor>
</div>
</div>
<div v-else>
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"></div>
<div v-if="!isFieldDb()">
<q-dialog v-model="visueditor" no-backdrop-dismiss persistent full-height full-width>
@@ -317,11 +343,27 @@
</q-dialog>
</div>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.password">
<div v-if="isInModif">
<q-input
v-model="myvalue"
@update:model-value="changevalRec"
type="password"
@keyup.enter="scope.set"
autofocus>
</q-input>
</div>
<div v-else>
<span v-html="visuValByType(myvalue, col, row)"></span>
</div>
</div>
<div v-else>
<span v-html="visuValByType(myvalue, col, row)"></span>
</div>
<q-popup-edit
v-if="(canEdit && col.fieldtype !== costanti.FieldType.html)"
v-if="(!isInModif && canEdit && noPopupeditByCol(col))"
v-model="myvalue"
:disable="col.disable"
:title="col.title ? col.title : col.titlepopupedit"
@@ -345,30 +387,40 @@
</q-input>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.password">
<q-input
v-model="scope.value"
type="password"
@keyup.enter="scope.set"
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.number">
<div v-if="visulabel">
<q-input
v-model="scope.value" type="number"
autofocus>
autofocus
:label="visulabel ? col.label : ''">
</q-input>
</div>
<div v-else>
<span v-html="visuValByType(myvalue, col, row)"></span>
</div>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.hours">
<div v-if="visulabel">
<q-input
v-model="myvalue" type="number"
autofocus
@update:model-value="changevalRec"
style="max-width: 100px;"
:label="col.label">
</q-input>
</div>
<div v-if="isFieldDb()">
<CMySelect
label="Ore" v-model:value="myvalue"
optval="_id" optlab="label"
:useinput="false"
optval="value" optlab="label"
:dense="false"
:use-input="false"
@changeval="changevalRecHours"
style="max-width: 100px;"
:options="tools.SelectHours">
</CMySelect>
</div>
<div v-else>
<q-input
@@ -378,16 +430,6 @@
</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="scope.value"
: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"
@@ -398,16 +440,6 @@
:useinput="false">
</CMySelect>
</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 class="justify-center q-gutter-sm clgutter q-mt-sm">
<q-input
@@ -451,6 +483,16 @@
-->
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
<CMyToggleList
:label="col.titlepopupedit"
:options="globalStore.getTableJoinByName(col.jointable)"
v-model:value="scope.value"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)">
</CMyToggleList>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
<q-select
@@ -482,184 +524,27 @@
</q-select>
</div>
</q-popup-edit>
</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 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 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.password">
<q-input
v-model="myvalue"
@update:model-value="changevalRec"
v-model="scope.value"
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>
</q-popup-edit>
</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>

View File

@@ -6,6 +6,7 @@
prop_mytitle=""
:prop_mycolumns="colmySkills"
prop_colkey="idSkill"
col_title="subTitle"
:vertical="true"
nodataLabel="Nessuna Competenza inserita"
:prop_search="false"

View File

@@ -73,7 +73,7 @@ const msg_de = {
recfailed: 'Error during update Record',
reccanceled: 'Canceled Update. Restore previous value',
deleterecord: 'Delete Record',
deletetherecord: 'Delete the Record?',
deletetherecord: 'Delete the Record',
deletedrecord: 'Record Deleted',
recdelfailed: 'Error during deletion of the Record',
duplicatedrecord: 'Duplicate Record',

View File

@@ -147,7 +147,7 @@ const msg_enUs = {
recfailed: 'Error during update Record',
reccanceled: 'Canceled Update. Restore previous value',
deleterecord: 'Delete Record',
deletetherecord: 'Delete the Record?',
deletetherecord: 'Delete the Record',
deletedrecord: 'Record Deleted',
recdelfailed: 'Error during deletion of the Record',
duplicatedrecord: 'Duplicate Record',

View File

@@ -147,7 +147,7 @@ const msg_es = {
recfailed: 'Error durante el registro de actualización',
reccanceled: 'Actualización cancelada Restaurar valor anterior',
deleterecord: 'Eliminar registro',
deletetherecord: '¿Eliminar el registro?',
deletetherecord: '¿Eliminar el registro',
deletedrecord: 'Registro cancelado',
recdelfailed: 'Error durante la eliminación del registro',
duplicatedrecord: 'Registro Duplicado',

View File

@@ -147,7 +147,7 @@ const msg_fr = {
recfailed: 'Erreur lors de la mise à jour',
reccanceled: 'Mise à jour annulée. Restaurer la valeur précédente',
deleterecord: 'Supprimer l\'enregistrement',
deletetherecord: 'Supprimer l\'enregistrement?',
deletetherecord: 'Supprimer l\'enregistrement',
deletedrecord: 'Enregistrement annulé',
recdelfailed: 'Erreur lors de la suppression de l\'enregistrement',
duplicatedrecord: 'Enregistrement en double',

View File

@@ -171,7 +171,7 @@ const msg_it = {
recfailed: 'Errore durante aggiornamento Record',
reccanceled: 'Annullato Aggiornamento. Ripristinato valore precendente',
deleterecord: 'Elimina Record',
deletetherecord: 'Eliminare il Record?',
deletetherecord: 'Eliminare il Record',
deletedrecord: 'Record Cancellato',
recdelfailed: 'Errore durante la cancellazione del Record',
duplicatedrecord: 'Vuoi Duplicare il record',
@@ -458,6 +458,7 @@ const msg_it = {
altre_comunicazioni: 'Scrivi altre eventuali informazioni o comunicazioni:',
come_ci_hai_conosciuto: 'Come ci hai conosciuto?',
photo: 'Foto',
images: 'Immagini',
err: {
required: 'è richiesto',
email: 'inserire una email valida',
@@ -774,6 +775,15 @@ const msg_it = {
statusSkill: {
name: 'Stato',
},
store: {
description: 'Descrizione',
main: 'Principale',
img: 'Immagine',
icon: 'Icona',
},
sectors: {
name: 'Settore',
}
},
};

View File

@@ -157,7 +157,7 @@ const msg_pt = {
recfailed: 'Errore durante aggiornamento Record',
reccanceled: 'Annullato Aggiornamento. Ripristinato valore precendente',
deleterecord: 'Elimina Record',
deletetherecord: 'Eliminare il Record?',
deletetherecord: 'Eliminare il Record',
deletedrecord: 'Record Cancellato',
recdelfailed: 'Errore durante la cancellazione del Record',
duplicatedrecord: 'Record Duplicato',

View File

@@ -161,7 +161,7 @@ const msg_si = {
recfailed: 'Napaka pri posodabljanju zapisa',
reccanceled: 'Preklicana posodobitev. Obnovi prejšnjo vrednost',
deleterecord: 'Izbriši zapis',
deletetherecord: 'Želiš završti zapis?',
deletetherecord: 'Želiš završti zapis',
deletedrecord: 'Zapis je izbrisan',
recdelfailed: 'Napaka med brisanjem zapisa',
duplicatedrecord: 'Podvojen zapis',

View File

@@ -12,7 +12,7 @@ const DeleteRec = {
icon: 'fas fa-trash-alt',
action: lists.MenuAction.DELETE_RECTABLE,
askaction: 'db.deletetherecord',
required: true,
// required: true,
visuonlyEditVal: true,
}
@@ -25,7 +25,7 @@ const ModifRec = {
icon: 'fas fa-pencil-alt',
action: lists.MenuAction.CAN_EDIT_TABLE,
askaction: '',
required: true,
// required: true,
visuonlyEditVal: true,
}
@@ -346,12 +346,14 @@ export const colmySkills = [
name: 'idSkill',
label_trans: 'skill.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'skills',
}),
AddCol({
name: 'numLevel',
label_trans: 'level.name',
fieldtype: costanti.FieldType.star5,
required: true,
jointable: 'levels',
}),
AddCol({

View File

@@ -23,7 +23,7 @@
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e"
integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==
"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.9.0":
"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.3", "@babel/core@^7.16.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.9.0":
version "7.16.0"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4"
integrity sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==
@@ -5064,6 +5064,11 @@ eslint-plugin-quasar@^1.0.0:
requireindex "~1.2.0"
semver-compare "^1.0.0"
eslint-plugin-standard@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz#c43f6925d669f177db46f095ea30be95476b1ee4"
integrity sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg==
eslint-plugin-vue@^8.1.1:
version "8.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-8.1.1.tgz#8bb0a40520880cdd076b4a6faf8bc29110997a8c"
@@ -12657,13 +12662,6 @@ vuex-router-sync@^6.0.0-rc.1:
resolved "https://registry.yarnpkg.com/vuex-router-sync/-/vuex-router-sync-6.0.0-rc.1.tgz#d8d003bca3067194808e16fd145eefc46ac5ac10"
integrity sha512-pzVrX/rmQsDjJiKPAjgKxpkxWdiBBQmxATFA6eFyS2Tmo6jauq8iDk9BWxkw41/OA+pbq4wkONRC0aeErDw8GQ==
vuex-typex@^3.1.9:
version "3.1.9"
resolved "https://registry.yarnpkg.com/vuex-typex/-/vuex-typex-3.1.9.tgz#5bf6760b7e4f7a48186500adf76734fe61b519a0"
integrity sha512-9IBtlQ7mRqMxpa/caTdE1SJf/FcRuYjT/0oJhfKsbUD2xWMcZEq43yz+LjbO1Q7HGS27q6GIq2P6WnhroBe9iA==
dependencies:
vuex "^3.0.1"
vuex@^3.0.1:
version "3.6.2"
resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71"
@@ -12830,7 +12828,7 @@ webpack-sources@^3.2.2:
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.2.tgz#d88e3741833efec57c4c789b6010db9977545260"
integrity sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==
webpack@*, webpack@^5, webpack@^5.38.1, webpack@^5.51.0, webpack@^5.58.1:
webpack@*, webpack@^5, webpack@^5.0.0, webpack@^5.38.1, webpack@^5.51.0, webpack@^5.58.1:
version "5.64.4"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.64.4.tgz#e1454b6a13009f57cc2c78e08416cd674622937b"
integrity sha512-LWhqfKjCLoYJLKJY8wk2C3h77i8VyHowG3qYNZiIqD6D0ZS40439S/KVuc/PY48jp2yQmy0mhMknq8cys4jFMw==