39 lines
889 B
JavaScript
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;
|
|
},
|
|
},
|
|
}) |