Preparing backend integration

This commit is contained in:
Laurent
2025-03-11 11:16:04 +01:00
parent 242b186cb3
commit f7b3cdfea7
45 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { defineStore } from 'pinia'
import {TimeStamp} from "@/models/TimeStamp.ts";
export const datePickerStore = defineStore('datePicker', {
state: () => {
return { dates: [] as TimeStamp[] }
},
getters: {
value: (state) : TimeStamp[] => state.dates as TimeStamp[],
},
actions: {
getValue(){
return this.dates;
},
update(dates : Date[]) : void {
this.dates = dates.map(date => new TimeStamp(date));
},
clear() : void {
this.dates = [] as TimeStamp[];
},
},
})