mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 09:57:09 +00:00
Navigate to events log from calendar.
* When clicking on a date, shows events for that date. * When clicking on a sequence, shows that sequence's events.
This commit is contained in:
@@ -79,6 +79,8 @@
|
||||
:locale-first-day-of-year="4"
|
||||
:weekdays="weekdays"
|
||||
:show-week="true"
|
||||
@click:date="showLogForDate"
|
||||
@click:event="showLogForEvent"
|
||||
></v-calendar>
|
||||
</v-sheet>
|
||||
</div>
|
||||
@@ -129,6 +131,7 @@ export default {
|
||||
const e = {};
|
||||
//e.start = s.ts0.substring(0,10)+" "+s.ts0.substring(11,19)
|
||||
//e.end = s.ts1.substring(0,10)+" "+s.ts1.substring(11,19)
|
||||
e.routerLink = { name: "logBySequence", params: { sequence: s.sequence } };
|
||||
e.start = new Date(s.ts0);
|
||||
e.end = new Date(s.ts1);
|
||||
e.timed = true;
|
||||
@@ -164,6 +167,16 @@ export default {
|
||||
this.$refs.calendar.next()
|
||||
},
|
||||
|
||||
showLogForDate ({ date }) {
|
||||
this.$router.push({name: "logByDate", params: {date0: date}});
|
||||
},
|
||||
|
||||
showLogForEvent ({event}) {
|
||||
if (event.routerLink) {
|
||||
this.$router.push(event.routerLink);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
...mapActions(["api"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user