Files
lucia-frontend/src/stores/conformanceData.js
2024-06-06 15:16:43 +08:00

39 lines
889 B
JavaScript

import { defineStore } from "pinia";
export default defineStore('conformanceDataStore', {
state: () => ({
dataToSave: {
start: null,
end: null,
min: null,
max: null,
type: null,
task: null,
},
}),
getters: {
},
actions: {
/**
* Set conformance input data which are fed to backend later.
* @param {object} userInputObj
*/
setConformanceData(userInputObj){
this.dataToSave = {...userInputObj};
},
/**
* Set the starting time of time range to be saved later
* @param {string} startStr
*/
setConformanceDataStart(startStr){
this.dataToSave.start = startStr;
},
/**
* Set the ending time of time range to be saved later
* @param {string} startStr
*/
setConformanceDataEnd(endStr){
this.dataToSave.end = endStr;
},
},
})