Quando si inserisce un evento, su giunge alla fine, si salva, NON SI MEMORIZZANO foto, data e orario!
This commit is contained in:
@@ -68,6 +68,8 @@ export default defineComponent({
|
||||
const showDateTimeScroller = ref(false)
|
||||
const saveit = ref(false)
|
||||
const myvalue = ref('')
|
||||
const mydate = ref(false)
|
||||
const mytime = ref(false)
|
||||
const valueprec = ref('')
|
||||
// const myvalueDate = toRef(props, 'valueDate')
|
||||
|
||||
@@ -88,6 +90,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function Closing() {
|
||||
mydate.value = false
|
||||
mytime.value = false
|
||||
// console.log('Closing')
|
||||
if (!saveit.value) {
|
||||
if (myvalue.value !== valueprec.value) {
|
||||
@@ -143,6 +147,16 @@ export default defineComponent({
|
||||
emit('savetoclose', myvalue.value, valueprec.value)
|
||||
}
|
||||
|
||||
function replacevalue() {
|
||||
// console.log('changeval', newval, 'value=', value, 'myvalue=', myvalue)
|
||||
if (valueprec.value) {
|
||||
emit('update:value', valueprec.value)
|
||||
saveit.value = true
|
||||
showDateTimeScroller.value = false
|
||||
emit('savetoclose', valueprec.value, valueprec.value)
|
||||
}
|
||||
}
|
||||
|
||||
function mystyle() {
|
||||
if (props.label !== '')
|
||||
return ''
|
||||
@@ -172,6 +186,10 @@ export default defineComponent({
|
||||
getclass,
|
||||
myvalue,
|
||||
showDateTimeScroller,
|
||||
replacevalue,
|
||||
mydate,
|
||||
mytime,
|
||||
tools,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -27,33 +27,106 @@
|
||||
color="blue-6"
|
||||
:bg-color="bgcolor"
|
||||
debounce="500"
|
||||
:input-class="getclass()">
|
||||
|
||||
:input-class="getclass()"
|
||||
>
|
||||
<template v-slot:control>
|
||||
<div style="">
|
||||
<div class="self-center full-width no-outline" :style="mystyle()" tabindex="0">
|
||||
<div
|
||||
class="self-center full-width no-outline"
|
||||
:style="mystyle()"
|
||||
tabindex="0"
|
||||
>
|
||||
{{ getstrDate(myvalue) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="canEdit" name="event" class="cursor-pointer">
|
||||
<q-popup-proxy transition-show="flip-up" v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing">
|
||||
|
||||
<div class="q-gutter-md row items-start">
|
||||
<q-btn
|
||||
dense
|
||||
color="primary"
|
||||
v-if="canEdit"
|
||||
icon="fas fa-calendar-day"
|
||||
class="cursor-pointer"
|
||||
@click="mydate = !mydate"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
dense
|
||||
color="primary"
|
||||
v-if="canEdit"
|
||||
icon="fas fa-clock"
|
||||
class="cursor-pointer"
|
||||
@click="mytime = !mytime"
|
||||
>
|
||||
</q-btn>
|
||||
<q-popup-proxy
|
||||
v-if="mydate"
|
||||
transition-show="flip-up"
|
||||
v-model="showDateTimeScroller"
|
||||
@before-show="Opening"
|
||||
@before-hide="Closing"
|
||||
>
|
||||
<q-card class="justify-center">
|
||||
<div class="q-gutter-md justify-center">
|
||||
<q-date
|
||||
v-model="myvalue" mask="YYYY-MM-DD HH:mm" color="purple"
|
||||
v-model="myvalue"
|
||||
mask="YYYY-MM-DD HH:mm"
|
||||
color="purple"
|
||||
@update:model-value="changeval"
|
||||
@close="() => { savetoclose(); }"
|
||||
/>
|
||||
<q-time
|
||||
v-model="myvalue" mask="YYYY-MM-DD HH:mm" color="purple"
|
||||
@update:model-value="changeval"
|
||||
@close="() => { savetoclose(); }"
|
||||
@close="
|
||||
() => {
|
||||
savetoclose();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<div class="row justify-center">
|
||||
<q-btn
|
||||
:label="$t('dialog.cancel')"
|
||||
@click="replacevalue"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
:label="'Imposta a ' + tools.getstrDateLong(myvalue)"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</q-card>
|
||||
</q-popup-proxy>
|
||||
<q-popup-proxy
|
||||
v-if="mytime"
|
||||
transition-show="flip-up"
|
||||
v-model="showDateTimeScroller"
|
||||
@before-show="Opening"
|
||||
@before-hide="Closing"
|
||||
>
|
||||
<q-card class="justify-center">
|
||||
<div class="q-gutter-md justify-center">
|
||||
<q-time
|
||||
v-model="myvalue"
|
||||
mask="YYYY-MM-DD HH:mm"
|
||||
color="purple"
|
||||
@update:model-value="changeval"
|
||||
@close="
|
||||
() => {
|
||||
savetoclose();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<div class="row justify-center">
|
||||
<q-btn
|
||||
:label="$t('dialog.cancel')"
|
||||
@click="replacevalue"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
:label="'Imposta a ' + tools.getstrTime(myvalue)"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-popup-proxy>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
@@ -1447,7 +1447,7 @@ export default defineComponent({
|
||||
// @ts-ignore
|
||||
newRecord.value = props.defaultnewrec
|
||||
} else {
|
||||
newRecord.value = tools.getdefaultnewrec(mytable.value, {groupname: props.groupname})
|
||||
newRecord.value = tools.getdefaultnewrec(mytable.value, { groupname: props.groupname })
|
||||
}
|
||||
if (!newRecord.value) {
|
||||
newRecord.value = {}
|
||||
@@ -1862,9 +1862,11 @@ export default defineComponent({
|
||||
|
||||
const showmsg = true
|
||||
|
||||
let myrec = recModif.value
|
||||
let myrec = null
|
||||
if (newrec) {
|
||||
myrec = newRecord.value
|
||||
myrec = { ...newRecord.value }
|
||||
} else {
|
||||
myrec = { ...recModif.value }
|
||||
}
|
||||
|
||||
// mycolumns.value.forEach((col: IColGridTable) => {
|
||||
@@ -2237,6 +2239,19 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function update_col(col: string, value: string) {
|
||||
console.log('update_col', col, value)
|
||||
|
||||
if (col) {
|
||||
if (newRecordBool.value) {
|
||||
newRecord.value[col] = value
|
||||
} else {
|
||||
recModif.value[col] = value
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*function showNotification() {
|
||||
$router.push('/notifs')
|
||||
} */
|
||||
@@ -2344,6 +2359,7 @@ export default defineComponent({
|
||||
rowsel,
|
||||
showInnerDialog,
|
||||
lengthopt,
|
||||
update_col,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -550,6 +550,7 @@
|
||||
@save="SaveValue"
|
||||
@show="selItem(row, col)"
|
||||
@showandsave="showandsel"
|
||||
|
||||
>
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
@@ -1194,6 +1195,7 @@
|
||||
@show="selItem(rowclicksel, mycol)"
|
||||
@showandsave="showandsel"
|
||||
@annulla="annulla"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
@@ -1214,6 +1216,7 @@
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
<q-card-section class="inset-shadow">
|
||||
newRecord: {{newRecord}}
|
||||
<div
|
||||
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"
|
||||
v-for="col in mycolumns"
|
||||
@@ -1252,6 +1255,7 @@
|
||||
@save="SaveValue"
|
||||
@show="selItem(newRecord, col)"
|
||||
@showandsave="showandsel"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
@@ -1390,6 +1394,7 @@
|
||||
@save="SaveValue"
|
||||
@show="selItem(recModif, col, true)"
|
||||
@showandsave="showandsel"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
|
||||
@@ -277,6 +277,28 @@
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="myrec.idStatusSkill && myrec.idStatusSkill.length > 0 && JSON.stringify(myrec.idStatusSkill) !== '[1]'">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="green" name="mood" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<span
|
||||
v-for="(recstatus, index) in myrec.idStatusSkill"
|
||||
:key="index"
|
||||
>
|
||||
<q-chip
|
||||
dense
|
||||
:color="globalStore.getColByStatusSkills(recstatus)"
|
||||
text-color="white"
|
||||
>
|
||||
{{ globalStore.getStatusSkillById(recstatus) }}
|
||||
</q-chip>
|
||||
</span>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item v-if="myrec.dateTimeStart">
|
||||
<q-item-section avatar>
|
||||
|
||||
@@ -33,7 +33,7 @@ import { useRouter } from 'vue-router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyPopupEdit',
|
||||
emits: ['showandsave', 'update:row', 'show', 'save', 'annulla'],
|
||||
emits: ['showandsave', 'update:row', 'show', 'save', 'annulla', 'update_col'],
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
@@ -337,8 +337,6 @@ export default defineComponent({
|
||||
}
|
||||
if (props.isInModif)
|
||||
OpenEdit()
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getrealval(newval: any) {
|
||||
@@ -369,25 +367,30 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function changevalRec(newval: any) {
|
||||
if (!props.insertMode || (props.insertMode && col.value.fieldtype !== costanti.FieldType.multioption)) {
|
||||
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
myvalue.value = tools.removespaces_slash(newval)
|
||||
}
|
||||
// console.log('popuppedit: changevalRec', newval, 'COLName', col.value.name)
|
||||
|
||||
// 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', myrow.value)
|
||||
emit('update:row', myrow.value)
|
||||
if (props.isInModif)
|
||||
OpenEdit()
|
||||
// console.log('changevalRec', newval)
|
||||
// if (!props.insertMode || (props.insertMode && col.value.fieldtype !== costanti.FieldType.multioption)) {
|
||||
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
myvalue.value = tools.removespaces_slash(newval)
|
||||
}
|
||||
// console.log('popuppedit: changevalRec', newval, 'COLName', col.value.name)
|
||||
|
||||
// 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', myrow.value)
|
||||
// emit('update:row', myrow.value)
|
||||
emit('update_col', col.value.name, newval)
|
||||
if (props.isInModif)
|
||||
OpenEdit()
|
||||
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
function changevalRecHours(newval: any) {
|
||||
@@ -501,7 +504,7 @@ export default defineComponent({
|
||||
|
||||
function SaveValueInt(newVal: any, valinitial: any) {
|
||||
|
||||
//console.log('SaveValueInt', newVal, valinitial)
|
||||
console.log('SaveValueInt', newVal, valinitial)
|
||||
|
||||
if (props.tablesel) {
|
||||
if (true) {
|
||||
|
||||
@@ -1139,6 +1139,7 @@ const msg_it = {
|
||||
cancel_ask: 'Annulla la richiesta',
|
||||
refuse_ask: 'Rifiuta la richiesta',
|
||||
profile: 'Apri Profilo',
|
||||
edit_profile: 'Modifica Profilo',
|
||||
cancel_ask_short: 'Annulla richiesta',
|
||||
refuse_ask_short: 'Rifiuta la richiesta',
|
||||
member: 'membro',
|
||||
|
||||
@@ -1385,13 +1385,14 @@ export const colmyBachecas = [
|
||||
AddCol({
|
||||
name: 'idStatusSkill',
|
||||
label_trans: 'statusSkill.name',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
fieldtype: costanti.FieldType.multioption,
|
||||
jointable: 'statusSkills',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
noshowlabel: true,
|
||||
icon: 'mood',
|
||||
isadvanced_field: true,
|
||||
sortable: false,
|
||||
typeobj: 'checkbox',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'descr',
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
IParamsQuery,
|
||||
ISettings,
|
||||
ISites,
|
||||
IStatusSkill,
|
||||
StateConnection,
|
||||
} from '@model'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
@@ -198,6 +199,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
testpao1_getter_contatore: (state: IGlobalState) => (param1: number) => state.testp1.contatore + 100 + param1,
|
||||
testpao1_getter_array: (state: IGlobalState) => (param1: number) => state.testp1.mioarray.filter((item) => item).map((item) => item.valore),
|
||||
|
||||
|
||||
getConfigbyId: (state: IGlobalState) => (id: string) => state.arrConfig.find((item) => item._id === id),
|
||||
getConfigStringbyId: (state: IGlobalState) => (params: any) => {
|
||||
const config = state.arrConfig.find((item) => item._id === params.id)
|
||||
@@ -207,6 +209,19 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return params.default
|
||||
}
|
||||
},
|
||||
|
||||
getColByStatusSkills: (state: IGlobalState) => (id: number) => {
|
||||
const ctrec = state.statusSkills.find((mystatus: IStatusSkill) => mystatus._id === id)
|
||||
return (ctrec && ctrec.color) ? ctrec.color : 'green'
|
||||
|
||||
},
|
||||
|
||||
getStatusSkillById: (state: IGlobalState) => (id: number) => {
|
||||
const ctrec = state.statusSkills.find((mystatus: IStatusSkill) => mystatus._id === id)
|
||||
return (ctrec) ? ctrec.descr : ''
|
||||
|
||||
},
|
||||
|
||||
isNewVersionAvailable: (state: IGlobalState) => {
|
||||
// console.log('cfgServer', cfgServer)
|
||||
const serversrec = state.cfgServer.find((x) => (x.chiave === toolsext.SERVKEY_VERS) && (x.idapp === process.env.APP_ID))
|
||||
|
||||
@@ -58,7 +58,7 @@ export default defineComponent({
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
const isDebugOn = computed(() => tools.isDebugOn())
|
||||
|
||||
|
||||
const $router = useRouter()
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
const caricato = ref(false)
|
||||
@@ -170,6 +170,10 @@ export default defineComponent({
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
function gotoPage(link: string) {
|
||||
$router.push(link)
|
||||
}
|
||||
|
||||
return {
|
||||
username,
|
||||
profile,
|
||||
@@ -205,6 +209,7 @@ export default defineComponent({
|
||||
handshake_inCommon,
|
||||
globalStore,
|
||||
getLinkWebSite,
|
||||
gotoPage,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -201,6 +201,24 @@
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ userStore.userprofile.username }}
|
||||
</div>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="gotoPage('/editprofile')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="fas fa-pencil-alt" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('shared.edit_profile')
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<div class="col-12 text-h7">
|
||||
<span
|
||||
@@ -284,7 +302,10 @@
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="userStore.userprofile.username !== myusername()" class="row justify-center">
|
||||
<div
|
||||
v-if="userStore.userprofile.username !== myusername()"
|
||||
class="row justify-center"
|
||||
>
|
||||
<q-chip
|
||||
v-if="
|
||||
userStore.IsHandShakeByMe(userStore.userprofile) &&
|
||||
@@ -502,7 +523,10 @@
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-handshake-slash" />
|
||||
<q-icon
|
||||
color="negative"
|
||||
name="fas fa-handshake-slash"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{
|
||||
$t('handshake.remove_from_myhandshake')
|
||||
@@ -616,12 +640,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
userStore.userprofile &&
|
||||
userStore.userprofile._id
|
||||
"
|
||||
>
|
||||
<div v-if="userStore.userprofile && userStore.userprofile._id">
|
||||
<CTitleBanner
|
||||
class=""
|
||||
:title="$t('dashboard.info')"
|
||||
@@ -639,7 +658,11 @@
|
||||
v-if="!!userStore.userprofile.profile.resid_province"
|
||||
v-bind="$attrs"
|
||||
:copy="false"
|
||||
:value="globalStore.getProvinceByProv(userStore.userprofile.profile.resid_province)"
|
||||
:value="
|
||||
globalStore.getProvinceByProv(
|
||||
userStore.userprofile.profile.resid_province
|
||||
)
|
||||
"
|
||||
label="Provincia"
|
||||
/>
|
||||
<CDateTime
|
||||
@@ -658,11 +681,11 @@
|
||||
:copy="false"
|
||||
label="Sito Web"
|
||||
>
|
||||
<span
|
||||
v-html="
|
||||
tools.getlinkhref(getLinkWebSite(), getLinkWebSite())
|
||||
"
|
||||
/>
|
||||
<span
|
||||
v-html="
|
||||
tools.getlinkhref(getLinkWebSite(), getLinkWebSite())
|
||||
"
|
||||
/>
|
||||
</CLabel>
|
||||
|
||||
<CLabel
|
||||
|
||||
Reference in New Issue
Block a user