fixed "Booking Users"
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
:dense="dense"
|
||||
mask="####-##-## ##:##"
|
||||
debounce="500"
|
||||
@input="changeval"
|
||||
@update:model-value="changeval"
|
||||
:input-class="getclass()"
|
||||
>
|
||||
</q-input>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { colors, Screen, Platform, date } from 'quasar'
|
||||
import { EState, IBookedEvent, IBookedEventPage, IEvents, IMessage, IMessagePage } from '@model'
|
||||
import { EState, IBookedEvent, IBookedEventPage, IEvents, IMessage, IMessagePage, IParamDialog } from '@model'
|
||||
import { Logo } from '../logo'
|
||||
import { Footer } from '../Footer'
|
||||
import { CTitle } from '../CTitle'
|
||||
@@ -25,6 +25,8 @@ import { useCalendarStore } from '@store/CalendarStore'
|
||||
import { func_tools, toolsext } from '@store/Modules/toolsext'
|
||||
import { useMessageStore } from '@store/MessageStore'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { lists } from '@store/Modules/lists'
|
||||
import translate from '@/globalroutines/util'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CEventsCalendar',
|
||||
@@ -441,6 +443,61 @@ export default defineComponent({
|
||||
tools.CancelEvent($q, eventparam)
|
||||
}
|
||||
|
||||
function executefunc(mythisq: any, table: string, func: number, par: IParamDialog) {
|
||||
|
||||
if (func === lists.MenuAction.DELETE) {
|
||||
// console.log('param1', par.param1)
|
||||
calendarStore.CancelBookingEvent({
|
||||
ideventbook: par.param1,
|
||||
notify: par.param2 === true ? '1' : '0',
|
||||
}).then((ris: any) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif(mythisq, t('cal.canceledbooking') + ' "' + par.param3 + '"')
|
||||
if (bookEventpage.value)
|
||||
bookEventpage.value.show = false
|
||||
} else {
|
||||
tools.showNegativeNotif(mythisq, t('cal.cancelederrorbooking'))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function CancelBookingEvent(mythisq: any, eventparam: IEvents, bookeventid: string, notify: boolean, mythis?: any) {
|
||||
|
||||
const mytitle = translate('cal.titlebooking')
|
||||
const mytext = translate('cal.cancelbooking') + ' ' + tools.gettextevent(eventparam) + '?'
|
||||
const ok = translate('dialog.yes')
|
||||
const funcok = lists.MenuAction.DELETE
|
||||
const table = ''
|
||||
const funccancel = 0
|
||||
const par = {
|
||||
param1: bookeventid,
|
||||
param2: notify,
|
||||
param3: eventparam.title,
|
||||
}
|
||||
|
||||
console.log('CancelBookingEvent ', eventparam)
|
||||
return $q.dialog({
|
||||
message: mytext,
|
||||
html: true,
|
||||
ok: {
|
||||
label: ok,
|
||||
push: true,
|
||||
},
|
||||
title: mytitle,
|
||||
cancel: true,
|
||||
persistent: false,
|
||||
}).onOk(() => {
|
||||
// console.log('OK')
|
||||
executefunc($q, table, funcok, par)
|
||||
return true
|
||||
}).onCancel(() => {
|
||||
// console.log('CANCEL')
|
||||
executefunc($q, table, funccancel, par)
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
function duplicateEvent(eventparam: any, numgg: number, numev = 1) {
|
||||
for (let i = 0; i < numev; ++i) {
|
||||
globalStore.DuplicateRec({ table: costanti.TABEVENTS, id: eventparam._id }).then((rec) => {
|
||||
@@ -962,6 +1019,8 @@ export default defineComponent({
|
||||
createContribType,
|
||||
static_data,
|
||||
editEvent,
|
||||
EState,
|
||||
CancelBookingEvent,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -465,12 +465,13 @@
|
||||
<q-btn
|
||||
v-if="bookEventpage.state === EState.Modifying" flat :label="$t('cal.cancelbooking')"
|
||||
color="negative"
|
||||
@click="tools.CancelBookingEvent($q, myevent, bookEventForm._id, true)"></q-btn>
|
||||
@click="CancelBookingEvent($q, myevent, bookEventForm._id, true)"></q-btn>
|
||||
<q-btn
|
||||
v-if="checkseinviaMsg" flat :label="$t('dialog.sendonlymsg')" color="primary"
|
||||
v-if="checkseinviaMsg()" flat :label="$t('dialog.sendonlymsg')" color="primary"
|
||||
@click="sendMsg(myevent)"></q-btn>
|
||||
<q-btn
|
||||
v-else :label="getTitleBtnBooking" color="primary" @click="saveBookEvent(myevent)"
|
||||
v-else
|
||||
:label="getTitleBtnBooking()" color="primary" @click="saveBookEvent(myevent)"
|
||||
:disable="!(bookEventpage.state === EState.Creating || hasModifiedBooking)"></q-btn>
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
label="Id"
|
||||
dense
|
||||
@keyup.enter.stop
|
||||
@input="save"
|
||||
@update:model-value="save"
|
||||
debounce="1000"
|
||||
autofocus>
|
||||
</q-input>
|
||||
@@ -71,7 +71,7 @@
|
||||
:label="$t('disc.order')"
|
||||
dense
|
||||
@keyup.enter.stop
|
||||
@input="save"
|
||||
@update:model-value="save"
|
||||
debounce="1000"
|
||||
autofocus>
|
||||
</q-input>-->
|
||||
@@ -79,7 +79,7 @@
|
||||
label="Alt"
|
||||
dense
|
||||
@keyup.enter.stop
|
||||
@input="save"
|
||||
@update:model-value="save"
|
||||
debounce="1000"
|
||||
autofocus>
|
||||
</q-input>-->
|
||||
@@ -89,7 +89,7 @@
|
||||
dense
|
||||
:label="$t('proj.longdescr')"
|
||||
@keyup.enter.stop
|
||||
@input="save"
|
||||
@update:model-value="save"
|
||||
debounce="1000"
|
||||
autofocus>
|
||||
</q-input>
|
||||
|
||||
@@ -532,27 +532,9 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
function executefunc(table: string, func: number, par: IParamDialog) {
|
||||
const globalStore = useGlobalStore()
|
||||
const calendarStore = useCalendarStore()
|
||||
function exec_func_table(table: string, func: number, par: IParamDialog) {
|
||||
|
||||
if (func === lists.MenuAction.DELETE) {
|
||||
// console.log('param1', par.param1)
|
||||
calendarStore.CancelBookingEvent({
|
||||
ideventbook: par.param1,
|
||||
notify: par.param2 === true ? '1' : '0',
|
||||
}).then((ris: any) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif($q, t('cal.canceledbooking') + ' "' + par.param3 + '"')
|
||||
//++Todo: Calendar FIX:
|
||||
// if (myself.bookEventpage)
|
||||
// myself.bookEventpage.show = false
|
||||
} else {
|
||||
tools.showNegativeNotif($q, t('cal.cancelederrorbooking'))
|
||||
}
|
||||
})
|
||||
} else if (func === lists.MenuAction.DELETE_RECTABLE) {
|
||||
// console.log('param1', par.param1)
|
||||
if (func === lists.MenuAction.DELETE_RECTABLE) {
|
||||
globalStore.DeleteRec({ table, id: par.param1 }).then((ris) => {
|
||||
if (ris) {
|
||||
ActionAfterYes(func, par.param2, null)
|
||||
@@ -562,7 +544,6 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
} else if (func === lists.MenuAction.DUPLICATE_RECTABLE) {
|
||||
// console.log('param1', par.param1)
|
||||
globalStore.DuplicateRec({ table, id: par.param1 }).then((ris) => {
|
||||
if (ris) {
|
||||
ActionAfterYes(func, par.param2, ris.data)
|
||||
@@ -598,11 +579,11 @@ export default defineComponent({
|
||||
persistent: false,
|
||||
}).onOk(() => {
|
||||
// console.log('OK')
|
||||
executefunc(table, col.action, par)
|
||||
exec_func_table(table, col.action, par)
|
||||
return true
|
||||
}).onCancel(() => {
|
||||
// console.log('CANCEL')
|
||||
executefunc(table, funccancel, par)
|
||||
exec_func_table(table, funccancel, par)
|
||||
return false
|
||||
})
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
<!--<vue-tel-input
|
||||
@country-changed="intcode_change"
|
||||
:value="myvalue"
|
||||
@input="onInput"
|
||||
@update:model-value="onInput"
|
||||
:disabledFetchingCountry="true"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:placeholder="$t('reg.cell')"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
v-model="myvalue"
|
||||
autogrow
|
||||
@keyup.enter.stop
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
autofocus
|
||||
:label="col.label">
|
||||
</q-input>
|
||||
@@ -20,7 +20,7 @@
|
||||
:readonly="false"
|
||||
:minuteinterval="minuteinterval"
|
||||
:dense="true"
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
canEdit="true"
|
||||
@savetoclose="SaveValueInt"
|
||||
@show="OpenEdit">
|
||||
@@ -34,7 +34,7 @@
|
||||
:readonly="false"
|
||||
:minuteinterval="minuteinterval"
|
||||
:dense="true"
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
canEdit="true"
|
||||
@savetoclose="SaveValueInt"
|
||||
@show="OpenEdit"
|
||||
@@ -45,7 +45,7 @@
|
||||
<q-input
|
||||
v-model="myvalue" type="number"
|
||||
autofocus
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
:label="col.label"
|
||||
>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<q-input
|
||||
v-model="myvalue" type="number"
|
||||
autofocus
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
style="max-width: 100px;"
|
||||
:label="col.label"
|
||||
>
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<!--<q-input v-model="myvalue" type="number"
|
||||
autofocus
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
:label="col.label">
|
||||
</q-input>
|
||||
-->
|
||||
@@ -86,7 +86,7 @@
|
||||
<CGallery
|
||||
:gall="row" :listimages="myvalue" :edit="isviewfield()"
|
||||
@showandsave="Savedb"
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
>
|
||||
|
||||
</CGallery>
|
||||
@@ -94,7 +94,7 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.image">
|
||||
<CGallery
|
||||
:gall="row" :listimages="myvalue" :edit="isviewfield()"
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
@showandsave="Savedb">
|
||||
|
||||
</CGallery>
|
||||
@@ -103,7 +103,7 @@
|
||||
<CMyChipList
|
||||
:type="costanti.FieldType.binary"
|
||||
:value="myvalue"
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
@@ -112,7 +112,7 @@
|
||||
<!-- Show Value -->
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
|
||||
<CMyChipList
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
:type="costanti.FieldType.multiselect"
|
||||
:value="myvalue"
|
||||
:options="globalStore.getTableJoinByName(col.jointable)"
|
||||
@@ -122,7 +122,7 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.select">
|
||||
<CMyChipList
|
||||
@input="changevalRec"
|
||||
@update:model-value="changevalRec"
|
||||
myclass="text-center"
|
||||
:type="costanti.FieldType.select"
|
||||
:value="myvalue"
|
||||
@@ -359,7 +359,7 @@
|
||||
<!-- <vue-tel-input
|
||||
@country-changed="intcode_change"
|
||||
:value="scope.value"
|
||||
@input="oninput"
|
||||
@update:model-value="oninput"
|
||||
:placeholder="$t('reg.cell')"
|
||||
:enabledCountryCode="true"
|
||||
inputClasses="clCell"
|
||||
@@ -385,7 +385,7 @@
|
||||
:option-label="fieldsTable.getLabelByTable(col.jointable)"
|
||||
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
||||
style="min-width: 150px"
|
||||
@input="changeCol">
|
||||
@update:model-value="changeCol">
|
||||
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
@@ -89,6 +89,7 @@ export default defineComponent({
|
||||
isEventEnabled,
|
||||
findEventIndex,
|
||||
UpdateDbByFields,
|
||||
selected,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<CMyPage
|
||||
v-if="myevent" :imgbackground="myevent.img" :title="myevent.title" keywords="" description=""
|
||||
nofooter="true">
|
||||
:nofooter="true">
|
||||
|
||||
<div class="q-mx-md">
|
||||
<div class="listaev__align_chips q-ma-md">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
dense
|
||||
label="Altezza"
|
||||
emit-value map-options
|
||||
@input="changedim"
|
||||
@update:model-value="changedim"
|
||||
></q-select>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<!--<q-item-label class="title">Condiviso: {{ shared.numshared }}</q-item-label>
|
||||
<q-item-label class="title">Rating: {{ shared.rating }}</q-item-label>-->
|
||||
</q-item-section>
|
||||
<!--<q-rating v-model="shared.rating" :max="5" size="16px" @input="change_rating(shared.rating, shared)"/>-->
|
||||
<!--<q-rating v-model="shared.rating" :max="5" size="16px" @update:model-value="change_rating(shared.rating, shared)"/>-->
|
||||
|
||||
|
||||
</div>
|
||||
@@ -80,7 +80,7 @@
|
||||
@click="add_newshare(shared.description)"></q-btn>
|
||||
<!--<q-item-label class="title">Condiviso: {{ shared.numshared }}</q-item-label>
|
||||
<q-item-label class="title">Rating: {{ shared.rating }}</q-item-label>-->
|
||||
<!--<q-rating v-model="shared.rating" :max="5" size="16px" @input="change_rating(shared.rating, shared)"/>-->
|
||||
<!--<q-rating v-model="shared.rating" :max="5" size="16px" @update:model-value="change_rating(shared.rating, shared)"/>-->
|
||||
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
v-model="signup.email"
|
||||
rounded outlined
|
||||
@blur="v$.email.$touch"
|
||||
@input="changeemail()"
|
||||
@update:model-value="changeemail()"
|
||||
:error="v$.email.$error"
|
||||
:error-message="tools.errorMsg( 'email', v$.email)"
|
||||
maxlength="50"
|
||||
@@ -31,7 +31,7 @@
|
||||
v-model="signup.username"
|
||||
rounded outlined
|
||||
@blur="v$.username.$touch"
|
||||
@input="changeusername"
|
||||
@update:model-value="changeusername"
|
||||
:error="v$.username.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<q-checkbox
|
||||
class="bg-grey-4"
|
||||
v-model="accetta_saw_video"
|
||||
@input="changeval"
|
||||
@update:model-value="changeval"
|
||||
color="primary"
|
||||
:label="$t('steps.saw_video_intro')">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user