- add Duplicate Event in Calendar
This commit is contained in:
@@ -492,6 +492,17 @@ export default class CEventsCalendar extends Vue {
|
||||
tools.CancelEvent(this, eventparam)
|
||||
}
|
||||
|
||||
public duplicateEvent(eventparam) {
|
||||
GlobalStore.actions.DuplicateRec({ table: tools.TABEVENTS, id: eventparam._id }).then((rec) => {
|
||||
rec.dateTimeStart = new Date()
|
||||
rec.dateTimeEnd = new Date()
|
||||
CalendarStore.state.eventlist.push(rec)
|
||||
this.editEvent(rec)
|
||||
|
||||
})
|
||||
// tools.ActionRecTable(this, lists.MenuAction.DUPLICATE_RECTABLE, tools.TABEVENTS, eventparam._id, eventparam, 'db.duplicatedrecord')
|
||||
}
|
||||
|
||||
public findEventIndex(eventparam) {
|
||||
for (let i = 0; i < CalendarStore.state.eventlist.length; ++i) {
|
||||
if (eventparam) {
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
<q-toolbar-title>
|
||||
{{ $t('cal.event') }}
|
||||
</q-toolbar-title>
|
||||
<q-btn v-if="editable" flat round color="white" icon="fas fa-copy" v-close-popup
|
||||
@click="duplicateEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="delete" v-close-popup
|
||||
@click="deleteEvent(myevent)"></q-btn>
|
||||
<q-btn v-if="editable" flat round color="white" icon="edit" v-close-popup
|
||||
|
||||
@@ -338,7 +338,6 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ActionAfterYes(action, item, data) {
|
||||
if (action === lists.MenuAction.DELETE_RECTABLE) {
|
||||
if (this.serverData.length > 0)
|
||||
|
||||
Reference in New Issue
Block a user