Arno Kaimbacher
f403c3109f
All checks were successful
CI Pipeline / japa-tests (push) Successful in 54s
- npm updates - side menu with child items - flash messages via HttpContext response (extended via macro)
34 lines
862 B
TypeScript
34 lines
862 B
TypeScript
import { defineStore } from 'pinia';
|
|
// import axios from 'axios';
|
|
// import dayjs from 'dayjs';
|
|
|
|
export const TimeService = defineStore('map', {
|
|
state: () => ({
|
|
// dataset: {} as Dataset,
|
|
mapService: new Map<string, any>(),
|
|
}),
|
|
actions: {
|
|
getMap(id: string) {
|
|
return this.mapService.get(id);
|
|
},
|
|
|
|
setMap(id: string, map) {
|
|
this.mapService.set(id, map);
|
|
},
|
|
|
|
hasMap(id: string): boolean {
|
|
return this.mapService.has(id);
|
|
},
|
|
|
|
deleteMap(id: string): boolean {
|
|
return this.mapService.delete(id);
|
|
},
|
|
|
|
// getDuration(timespan: Timespan): dayjs. {
|
|
// const from = dayjs(timespan.from);
|
|
// const to = dayjs(timespan.to);
|
|
// return dayjs.duration(to.diff(from));
|
|
// },
|
|
},
|
|
});
|