Lines 1-9
Link Here
|
1 |
import { defineStore } from "pinia"; |
1 |
import { defineStore } from "pinia"; |
2 |
|
2 |
import { reactive, toRefs } from "vue"; |
3 |
import { withAuthorisedValueActions } from "../composables/authorisedValues"; |
3 |
import { withAuthorisedValueActions } from "../composables/authorisedValues"; |
4 |
|
4 |
|
5 |
export const useERMStore = defineStore("erm", { |
5 |
export const useERMStore = defineStore("erm", () => { |
6 |
state: () => ({ |
6 |
const store = reactive({ |
7 |
config: { |
7 |
config: { |
8 |
settings: { |
8 |
settings: { |
9 |
ERMModule: false, |
9 |
ERMModule: false, |
Lines 60-67
export const useERMStore = defineStore("erm", {
Link Here
|
60 |
{ value: "related_to", description: __("related to") }, |
60 |
{ value: "related_to", description: __("related to") }, |
61 |
], |
61 |
], |
62 |
}, |
62 |
}, |
63 |
}), |
63 |
}); |
64 |
actions: { |
64 |
const sharedActions = withAuthorisedValueActions(store); |
65 |
...withAuthorisedValueActions(this), |
65 |
|
66 |
}, |
66 |
return { |
|
|
67 |
...toRefs(store), |
68 |
...sharedActions, |
69 |
}; |
67 |
}); |
70 |
}); |
68 |
- |
|
|