- Finish to fix IOperators
- Fixit Date not change correctly
This commit is contained in:
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IPerson } from '../../model/GlobalStore'
|
||||
import { IOperators } from '../../model/GlobalStore'
|
||||
|
||||
@Component({
|
||||
name: 'CBook',
|
||||
@@ -21,7 +21,7 @@ export default class CBook extends Vue {
|
||||
this.tab = 'two'
|
||||
}
|
||||
|
||||
@Prop({ required: true }) public op: IPerson
|
||||
@Prop({ required: true }) public op: IOperators
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
@@ -35,9 +35,9 @@ export default class CBook extends Vue {
|
||||
index: 0,
|
||||
tab: '',
|
||||
name: '',
|
||||
sub1: '',
|
||||
qualification: '',
|
||||
sub2: '',
|
||||
sub3: '',
|
||||
certifications: '',
|
||||
img: '',
|
||||
cell: '',
|
||||
email: '',
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<q-img :src="myop.img" class="myimg">
|
||||
<div class="absolute-bottom text-spacetrans text-shadow">
|
||||
<div class="text-h6 text-trans">{{myop.name}}</div>
|
||||
<div class="text-subtitle-carica text-trans">{{myop.sub1}}</div>
|
||||
<div class="text-subtitle-carica text-trans">{{myop.qualification}}</div>
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="one">
|
||||
<div class="text-subtitle-carica">{{myop.sub2}}</div>
|
||||
<div v-if="myop.sub3" class="text-subtitle-certificato">{{myop.sub3}}</div>
|
||||
<div class="text-subtitle-carica">{{myop.disciplines}}</div>
|
||||
<div v-if="myop.certifications" class="text-subtitle-certificato">{{myop.certifications}}</div>
|
||||
<div class="op__cell">
|
||||
<q-icon class="flex-icon" name="mobile_friendly"></q-icon>
|
||||
{{myop.cell}}
|
||||
@@ -33,7 +33,7 @@
|
||||
</q-tab-panels>
|
||||
|
||||
<!--<q-card-section>-->
|
||||
<!--<div class="text-subtitle3">{{myop.sub2}}</div>-->
|
||||
<!--<div class="text-subtitle3">{{myop.disciplines}}</div>-->
|
||||
<!--{{myop.info}}-->
|
||||
<!--</q-card-section>-->
|
||||
</q-card>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IPerson } from '../../model/GlobalStore'
|
||||
import { IOperators } from '../../model/GlobalStore'
|
||||
|
||||
@Component({
|
||||
name: 'CCard',
|
||||
@@ -16,28 +16,28 @@ import { IPerson } from '../../model/GlobalStore'
|
||||
|
||||
export default class CCard extends Vue {
|
||||
@Prop({ required: true, default: 'one' }) public tab
|
||||
@Prop({ required: true }) public op: IOperators
|
||||
|
||||
public clicca() {
|
||||
this.tab = 'two'
|
||||
}
|
||||
|
||||
@Prop({ required: true }) public op: IPerson
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
get myop() {
|
||||
get myop(): IOperators {
|
||||
if (!!this.op) {
|
||||
return this.op
|
||||
} else {
|
||||
return {
|
||||
index: 0,
|
||||
tab: '',
|
||||
username: '',
|
||||
name: '',
|
||||
sub1: '',
|
||||
sub2: '',
|
||||
sub3: '',
|
||||
surname: '',
|
||||
qualification: '',
|
||||
disciplines: '',
|
||||
certifications: '',
|
||||
img: '',
|
||||
cell: '',
|
||||
email: '',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<q-card class="my-card text-center">
|
||||
<q-img :src="myop.img" class="myimg">
|
||||
<q-img :src="`statics/images/` + myop.img" class="myimg">
|
||||
<div class="absolute-bottom text-spacetrans text-shadow">
|
||||
<div class="text-h6 text-trans">{{myop.name}}</div>
|
||||
<div class="text-subtitle-carica text-trans">{{myop.sub1}}</div>
|
||||
<div class="text-h6 text-trans">{{myop.name}} {{myop.surname}}</div>
|
||||
<div class="text-subtitle-carica text-trans">{{myop.qualification}}</div>
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="one">
|
||||
<div class="text-subtitle-carica">{{myop.sub2}}</div>
|
||||
<div v-if="myop.sub3" class="text-subtitle-certificato">{{myop.sub3}}</div>
|
||||
<div class="text-subtitle-carica">{{myop.disciplines}}</div>
|
||||
<div v-if="myop.certifications" class="text-subtitle-certificato">{{myop.certifications}}</div>
|
||||
<div class="op__cell">
|
||||
<q-icon class="flex-icon" name="mobile_friendly"></q-icon>
|
||||
{{myop.cell}}
|
||||
@@ -45,7 +45,7 @@
|
||||
</q-tab-panels>
|
||||
|
||||
<!--<q-card-section>-->
|
||||
<!--<div class="text-subtitle3">{{myop.sub2}}</div>-->
|
||||
<!--<div class="text-subtitle3">{{myop.disciplines}}</div>-->
|
||||
<!--{{myop.info}}-->
|
||||
<!--</q-card-section>-->
|
||||
</q-card>
|
||||
|
||||
@@ -15,7 +15,8 @@ import MixinBase from '../../mixins/mixin-base'
|
||||
export default class CDateTime extends Vue {
|
||||
public $q
|
||||
public $t
|
||||
@Prop() public value!: Date
|
||||
@Prop({ required: false, default: null }) public value: Date
|
||||
@Prop({ required: false, default: null }) public valueDate: Date
|
||||
@Prop({ required: true, default: 'Val:' }) public label: string
|
||||
@Prop({ required: false, default: '' }) public data_class!: string
|
||||
@Prop({ required: false, default: true }) public canEdit!: boolean
|
||||
@@ -33,22 +34,36 @@ export default class CDateTime extends Vue {
|
||||
return 'calendar_comp ' + this.data_class
|
||||
}
|
||||
|
||||
@Watch('showDateTimeScroller')
|
||||
// @Watch('showDateTimeScroller')
|
||||
|
||||
public Opening() {
|
||||
if (this.showDateTimeScroller) {
|
||||
this.saveit = false
|
||||
this.valueprec = this.myvalue
|
||||
this.$emit('show')
|
||||
} else {
|
||||
if (!this.saveit) {
|
||||
if (this.myvalue !== this.valueprec) {
|
||||
this.myvalue = this.valueprec
|
||||
tools.showNeutralNotif(this.$q, this.$t('db.reccanceled'))
|
||||
}
|
||||
// console.log('Opening', 'myvalue', this.myvalue, 'value', this.value)
|
||||
this.saveit = false
|
||||
this.valueprec = this.myvalue
|
||||
this.$emit('show')
|
||||
}
|
||||
|
||||
public Closing() {
|
||||
// console.log('Closing')
|
||||
if (!this.saveit) {
|
||||
if (this.myvalue !== this.valueprec) {
|
||||
this.myvalue = this.valueprec
|
||||
tools.showNeutralNotif(this.$q, this.$t('db.reccanceled'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Watch('valueDate')
|
||||
public changevalueDate() {
|
||||
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
||||
// console.log('changevalueDate myvalue', this.myvalue)
|
||||
}
|
||||
@Watch('value')
|
||||
public changevalue() {
|
||||
this.myvalue = this.value
|
||||
// console.log('changevalue myvalue', this.myvalue)
|
||||
}
|
||||
|
||||
public savetoclose() {
|
||||
this.saveit = true
|
||||
this.showDateTimeScroller = false
|
||||
@@ -74,13 +89,17 @@ export default class CDateTime extends Vue {
|
||||
return CalendarStore.state.locale
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
this.myvalue = this.value
|
||||
console.log('myvalue', this.myvalue)
|
||||
public created() {
|
||||
if (this.value !== null)
|
||||
this.myvalue = this.value
|
||||
else
|
||||
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
||||
|
||||
// console.log('myvalue', this.myvalue)
|
||||
}
|
||||
|
||||
public changeval(newval) {
|
||||
// console.log('changeval', newval)
|
||||
// console.log('changeval', newval, 'value=', this.value, 'myvalue=', this.myvalue)
|
||||
this.$emit('update:value', newval)
|
||||
}
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="canEdit" name="event" class="cursor-pointer">
|
||||
<q-popup-proxy v-model="showDateTimeScroller">
|
||||
<q-popup-proxy v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing">
|
||||
|
||||
<q-date-time-scroller
|
||||
v-model="myvalue"
|
||||
:locale="locale"
|
||||
:locale="toolsext.getLocale()"
|
||||
:hour24-format="true"
|
||||
:rounded-borders="true"
|
||||
border-color="#2196f3"
|
||||
|
||||
@@ -175,7 +175,7 @@ $graytext: #555;
|
||||
}
|
||||
|
||||
&__img {
|
||||
padding: 0.5rem !important;
|
||||
padding: 0.25rem !important;
|
||||
float: left;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
@@ -189,6 +189,14 @@ $graytext: #555;
|
||||
}
|
||||
}
|
||||
|
||||
&__img:hover {
|
||||
transition: transform .2s;
|
||||
transform: scale(1.05);
|
||||
border: inset;
|
||||
border-color: blue;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 718px) {
|
||||
@@ -246,6 +254,20 @@ $graytext: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.chipmodif {
|
||||
|
||||
position: absolute;
|
||||
margin-top: -10px;
|
||||
overflow: hidden;
|
||||
z-index: 9999;
|
||||
box-sizing: border-box;
|
||||
right: 0;
|
||||
@media (max-width: 400px) {
|
||||
position: initial;
|
||||
right: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.windowcol {
|
||||
background-color: #ffffff;
|
||||
// background: radial-gradient(circle, #ffffff 0%, #94dbfb 100%)
|
||||
|
||||
@@ -32,9 +32,10 @@ import { GlobalStore, MessageStore } from '../../store/Modules'
|
||||
import { IMessagePage, IMessage, IIdentity, MsgDefault } from '../../model'
|
||||
import MixinUsers from '../../mixins/mixin-users'
|
||||
import { CDateTime } from '../CDateTime'
|
||||
import MixinOperator from '../../mixins/mixin-operator'
|
||||
|
||||
@Component({
|
||||
mixins: [MixinUsers],
|
||||
mixins: [MixinOperator, MixinUsers],
|
||||
name: 'CEventsCalendar',
|
||||
components: { Logo, Footer, CTitle, CImgText, QDateTimeScroller, QDateScroller, CMySelect, CMyEditor, CDateTime }
|
||||
})
|
||||
@@ -399,6 +400,14 @@ export default class CEventsCalendar extends Vue {
|
||||
// console.log('showEvent - FINE ' + myevent)
|
||||
}
|
||||
|
||||
public selectEvent(eventparam: IEvents) {
|
||||
if (this.myevent === eventparam)
|
||||
this.myevent = null
|
||||
else
|
||||
this.myevent = eventparam
|
||||
|
||||
}
|
||||
|
||||
public onDateChanged(mydate) {
|
||||
this.calendarView = 'day'
|
||||
}
|
||||
@@ -1019,4 +1028,10 @@ export default class CEventsCalendar extends Vue {
|
||||
public getTitleEv(event: IEvents) {
|
||||
return (!!event.short_tit) ? event.short_tit : event.title
|
||||
}
|
||||
|
||||
public getStyleByEvent(event: IEvents) {
|
||||
if (event === this.myevent) {
|
||||
return 'border: inset; border-color: darkblue; border-width: 3px; padding: 5px !important; '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
@click="deleteEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="edit" v-close-popup
|
||||
@click="editEvent(myevent)"></q-btn>
|
||||
<q-btn flat round color="white" icon="cancel" v-close-popup></q-btn>
|
||||
<q-btn flat round color="white" icon="cancel" v-close-popup @click="myevent = null; displayEvent = false"></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-img :src="getImgEvent(myevent)"
|
||||
@@ -41,17 +41,17 @@
|
||||
<span class="cal__teacher-content">
|
||||
<q-chip>
|
||||
<q-avatar>
|
||||
<img :src="getImgByUsername(myevent.teacher)">
|
||||
<img :src="getImgTeacherByUsername(myevent.teacher)">
|
||||
</q-avatar>
|
||||
<span class="cal__teacher-content">{{getUserByUsername(myevent.teacher)}}</span>
|
||||
<span class="cal__teacher-content">{{getTeacherByUsername(myevent.teacher)}}</span>
|
||||
</q-chip>
|
||||
<span v-if="getImgByUsername(myevent.teacher2) && isValidUsername(myevent.teacher2)"
|
||||
<span v-if="getImgTeacherByUsername(myevent.teacher2) && isValidUsername(myevent.teacher2)"
|
||||
class="margin_avatar2"></span>
|
||||
<q-chip v-if="getImgByUsername(myevent.teacher2) && isValidUsername(myevent.teacher2)">
|
||||
<q-chip v-if="getImgTeacherByUsername(myevent.teacher2) && isValidUsername(myevent.teacher2)">
|
||||
<q-avatar>
|
||||
<img :src="getImgByUsername(myevent.teacher2)">
|
||||
<img :src="getImgTeacherByUsername(myevent.teacher2)">
|
||||
</q-avatar>
|
||||
<span class="cal__teacher-content">{{getUserByUsername(myevent.teacher2)}}</span>
|
||||
<span class="cal__teacher-content">{{getTeacherByUsername(myevent.teacher2)}}</span>
|
||||
</q-chip>
|
||||
</span>
|
||||
</div>
|
||||
@@ -114,7 +114,7 @@
|
||||
<q-input color="grey-1" v-model="eventForm.short_tit" autofocus
|
||||
:input-style="`background-color: ${eventForm.bgcolor} !important; color: white !important; font-weight: bold; `"
|
||||
borderless rounded dense :label="$t('event.short_tit')"
|
||||
></q-input>
|
||||
></q-input>
|
||||
|
||||
<q-input color="grey-1" v-model="eventForm.title" autofocus
|
||||
:input-style="`background-color: ${eventForm.bgcolor} !important; color: white !important; font-weight: bold; `"
|
||||
@@ -281,7 +281,8 @@
|
||||
</div>
|
||||
|
||||
<q-input v-model="bookEventForm.msgbooking" :label="$t('cal.msgbooking')+':'"
|
||||
autogrow>
|
||||
type="textarea" debounce="500"
|
||||
>
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
@@ -342,7 +343,7 @@
|
||||
<q-card class="text-white windowcol">
|
||||
<q-card-section>
|
||||
<q-input v-model="askInfoForm.message" :label="$t('cal.msgbooking')+':'"
|
||||
autogrow>
|
||||
autofocus debounce="500" type="textarea">
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
@@ -432,7 +433,6 @@
|
||||
<q-badge
|
||||
:key="index"
|
||||
style="width: 100%; cursor: pointer;"
|
||||
class=""
|
||||
:class="badgeClasses(event, 'day')"
|
||||
:style="badgeStyles(event, 'day')"
|
||||
@click.stop.prevent="showEvent(event)"
|
||||
@@ -446,7 +446,7 @@
|
||||
<span class="">{{ getTitleEv(event) }}</span>
|
||||
</q-badge>
|
||||
<div class="text-center"><img :src="getImgEvent(event)"
|
||||
class="text-center listaev__tdimg_small">
|
||||
class="text-center listaev__tdimg_small">
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
@@ -512,21 +512,33 @@
|
||||
<tbody>
|
||||
<tr v-for="(event, index) in getEventList()" class="listaev listaev__table">
|
||||
<td :class="clEvent(event)">
|
||||
<p class="listaev__align_chips">
|
||||
<div class="listaev__align_chips">
|
||||
<img :src="getImgEvent(event)"
|
||||
class="text-left padding_cell listaev__tdimg listaev__img">
|
||||
@click="selectEvent(event)"
|
||||
class="text-left padding_cell listaev__tdimg listaev__img cursor-pointer"
|
||||
:style="getStyleByEvent(event)">
|
||||
<q-chip dense v-if="isAlreadyBooked(event)" class="cltexth4 chipbooked shadow-5 q-mb-md"
|
||||
color="green" text-color="white"
|
||||
icon="event_available">{{$t('cal.booked')}}
|
||||
</q-chip>
|
||||
|
||||
<q-chip v-if="event === myevent && !displayEvent && editable" class="text-center shadow-5 glossy bg-blue chipmodif">
|
||||
<q-btn v-if="editable" flat round color="white" icon="fas fa-copy"
|
||||
@click="duplicateEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="delete"
|
||||
@click="deleteEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="edit"
|
||||
@click="editEvent(myevent)"></q-btn>
|
||||
<q-btn flat round color="white" icon="cancel" @click="selectEvent(null)"></q-btn>
|
||||
</q-chip>
|
||||
<q-chip v-if="event.news" class="cltexth4 chipnews shadow-5 glossy text-right" color="red"
|
||||
text-color="white" icon-right="star" icon="star" dense
|
||||
style="">
|
||||
{{$t('event.news')}}
|
||||
</q-chip>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="listaev__date listaev__align_center_mobile">
|
||||
<span v-html="tools.getstrDateTimeEvent(mythis(), event, true)"></span>
|
||||
</div>
|
||||
@@ -568,16 +580,17 @@
|
||||
|
||||
<q-chip>
|
||||
<q-avatar>
|
||||
<img :src="getImgByUsername(event.teacher)">
|
||||
<img :src="getImgTeacherByUsername(event.teacher)">
|
||||
</q-avatar>
|
||||
<span class="cal__teacher-content">{{getUserByUsername(event.teacher)}}</span>
|
||||
<span class="cal__teacher-content">{{getTeacherByUsername(event.teacher)}}</span>
|
||||
</q-chip>
|
||||
<span v-if="getImgByUsername(event.teacher2) && isValidUsername(event.teacher2)" class="margin_avatar2"></span>
|
||||
<q-chip v-if="getImgByUsername(event.teacher2) && isValidUsername(event.teacher2)">
|
||||
<span v-if="getImgTeacherByUsername(event.teacher2) && isValidUsername(event.teacher2)"
|
||||
class="margin_avatar2"></span>
|
||||
<q-chip v-if="getImgTeacherByUsername(event.teacher2) && isValidUsername(event.teacher2)">
|
||||
<q-avatar>
|
||||
<img :src="getImgByUsername(event.teacher2)">
|
||||
<img :src="getImgTeacherByUsername(event.teacher2)">
|
||||
</q-avatar>
|
||||
<span class="cal__teacher-content">{{getUserByUsername(event.teacher2)}}</span>
|
||||
<span class="cal__teacher-content">{{getTeacherByUsername(event.teacher2)}}</span>
|
||||
</q-chip>
|
||||
|
||||
<span v-if="event.wherecode" class="">
|
||||
|
||||
@@ -21,7 +21,7 @@ import { CMyChipList } from '../CMyChipList'
|
||||
export default class CGridTableRec extends Vue {
|
||||
@Prop({ required: false }) public prop_mytable: string
|
||||
@Prop({ required: true }) public prop_mytitle: string
|
||||
@Prop({ required: false, default: [] }) public prop_mycolumns: any[]
|
||||
@Prop({ required: false, default: null }) public prop_mycolumns: any[]
|
||||
@Prop({ required: false, default: '' }) public prop_colkey: string
|
||||
@Prop({ required: false, default: '' }) public nodataLabel: string
|
||||
@Prop({ required: false, default: '' }) public noresultLabel: string
|
||||
@@ -57,17 +57,13 @@ export default class CGridTableRec extends Vue {
|
||||
public filter: string = ''
|
||||
public rowsel: any
|
||||
public dark: boolean = true
|
||||
public funcActivated = []
|
||||
public canEdit: boolean = false
|
||||
|
||||
public returnedData
|
||||
public returnedCount
|
||||
public colVisib: any[] = []
|
||||
public colExtra: any[] = []
|
||||
|
||||
get canEdit() {
|
||||
return this.funcActivated.includes(lists.MenuAction.CAN_EDIT_TABLE)
|
||||
}
|
||||
|
||||
get lists() {
|
||||
return lists
|
||||
}
|
||||
@@ -79,7 +75,7 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public selItem(item, col: IColGridTable) {
|
||||
// console.log('item', item)
|
||||
console.log('selItem', item)
|
||||
this.rowsel = item
|
||||
this.idsel = item._id
|
||||
this.colsel = col
|
||||
@@ -317,6 +313,11 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
|
||||
this.canEdit = tools.getCookie(tools.CAN_EDIT) === 'true'
|
||||
|
||||
this.tablesel = tools.getCookie('tablesel')
|
||||
|
||||
this.changeTable(false)
|
||||
|
||||
}
|
||||
@@ -382,25 +383,34 @@ export default class CGridTableRec extends Vue {
|
||||
return '[]'
|
||||
} else {
|
||||
let mystr = tools.firstchars(val, tools.MAX_CHARACTERS)
|
||||
if (val.length > tools.MAX_CHARACTERS)
|
||||
mystr += '...'
|
||||
if (val) {
|
||||
if (val.length > tools.MAX_CHARACTERS)
|
||||
mystr += '...'
|
||||
} else {
|
||||
return val
|
||||
}
|
||||
return mystr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public changeCol(newval) {
|
||||
tools.setCookie(this.mytable, this.colVisib.join('|'))
|
||||
}
|
||||
|
||||
public changeTable(mysel) {
|
||||
// console.log('changeTable')
|
||||
if (this.tablesel === undefined || this.tablesel === '')
|
||||
return
|
||||
|
||||
console.log('changeTable mysel=', mysel, 'tablesel', this.tablesel)
|
||||
|
||||
let mytab = null
|
||||
if (this.tablesList) {
|
||||
if (!this.tablesel) {
|
||||
this.tablesel = this.tablesList[1].value
|
||||
}
|
||||
|
||||
mytab = this.tablesList.find((rec) => rec.value === this.tablesel)
|
||||
}
|
||||
|
||||
console.log('this.tablesel', this.tablesel)
|
||||
|
||||
if (mytab) {
|
||||
this.mytitle = mytab.label
|
||||
this.colkey = mytab.colkey
|
||||
@@ -416,7 +426,17 @@ export default class CGridTableRec extends Vue {
|
||||
this.mytable = mytab.value
|
||||
}
|
||||
|
||||
tools.setCookie('tablesel', this.tablesel)
|
||||
|
||||
this.updatedcol()
|
||||
|
||||
if (!!this.mytable) {
|
||||
const myselcol = tools.getCookie(this.mytable)
|
||||
if (!!myselcol && myselcol.length > 0) {
|
||||
this.colVisib = myselcol.split('|')
|
||||
}
|
||||
}
|
||||
|
||||
this.refresh()
|
||||
}
|
||||
|
||||
@@ -429,8 +449,11 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public doSearch() {
|
||||
|
||||
this.refresh()
|
||||
}
|
||||
|
||||
public changefuncAct(newval) {
|
||||
tools.setCookie(tools.CAN_EDIT, newval)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,13 +35,14 @@
|
||||
|
||||
<!--<p style="color:red"> Rows: {{ getrows }}</p>-->
|
||||
|
||||
<q-input v-model="search" filled dense type="search" hint="Search" v-on:keyup.enter="doSearch">
|
||||
<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="funcActivated" :val="lists.MenuAction.CAN_EDIT_TABLE" class="q-mx-sm"
|
||||
:label="$t('grid.editvalues')"></q-toggle>
|
||||
<q-toggle v-if="mytable" v-model="canEdit" :val="lists.MenuAction.CAN_EDIT_TABLE" class="q-mx-sm"
|
||||
:label="$t('grid.editvalues')" @input="changefuncAct"
|
||||
></q-toggle>
|
||||
|
||||
<q-btn v-if="mytable" flat dense color="primary" :disable="loading || !canEdit"
|
||||
:label="$t('grid.addrecord')"
|
||||
@@ -64,7 +65,8 @@
|
||||
map-options
|
||||
:options="mycolumns"
|
||||
option-value="name"
|
||||
style="min-width: 150px">
|
||||
style="min-width: 150px"
|
||||
@input="changeCol">
|
||||
|
||||
</q-select>
|
||||
|
||||
@@ -94,7 +96,8 @@
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
class="cursor-pointer"
|
||||
:value.sync="props.row[col.name]"
|
||||
:valueDate="props.row[col.name]"
|
||||
:readonly="false"
|
||||
:dense="true"
|
||||
:canEdit="canEdit"
|
||||
@savetoclose="SaveValue"
|
||||
@@ -145,13 +148,33 @@
|
||||
</q-popup-edit>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.string">
|
||||
<div :class="getclassCol(col)">
|
||||
{{ visuValByType(col, props.row[col.name]) }}
|
||||
<q-popup-edit v-if="canEdit" v-model="props.row[col.name]" :disable="col.disable"
|
||||
:title="col.title" buttons
|
||||
@save="SaveValue" @show="selItem(props.row, col)">
|
||||
<q-input v-model="props.row[col.name]"/>
|
||||
<q-input v-model="props.row[col.name]"
|
||||
autofocus
|
||||
>
|
||||
|
||||
</q-input>
|
||||
|
||||
</q-popup-edit>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.html">
|
||||
<div :class="getclassCol(col)">
|
||||
{{ visuValByType(col, props.row[col.name]) }}
|
||||
<q-popup-edit v-if="canEdit" v-model="props.row[col.name]" :disable="col.disable"
|
||||
:title="col.title" buttons
|
||||
@save="SaveValue" @show="selItem(props.row, col)">
|
||||
<q-input v-model="props.row[col.name]"
|
||||
autofocus
|
||||
@keyup.enter.stop
|
||||
type="textarea">
|
||||
|
||||
</q-input>
|
||||
|
||||
</q-popup-edit>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { IPerson } from '../../model/GlobalStore'
|
||||
import { IOperators } from '../../model/GlobalStore'
|
||||
|
||||
@Component({
|
||||
name: 'CMySelect'
|
||||
|
||||
Reference in New Issue
Block a user