Bug 33408: Add storeToRefs to ERMStore
It makes it so that any changes to the local property
is also reflected in the store and other components are
made aware of the new value. No need to explicitly
change both local property and store property values.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1610a1d163)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
9d2efd3ad6
commit
ac5e350ead
|
|
@ -138,7 +138,7 @@ export default {
|
|||
|
||||
const ERMStore = inject("ERMStore")
|
||||
|
||||
const { sysprefs, providers } = ERMStore
|
||||
const { sysprefs, providers } = storeToRefs(ERMStore)
|
||||
|
||||
return {
|
||||
vendorStore,
|
||||
|
|
@ -214,8 +214,7 @@ export default {
|
|||
promises.push(
|
||||
sysprefs_client.sysprefs.get("ERMProviders").then(
|
||||
providers => {
|
||||
this.ERMStore.providers = providers.value.split(",")
|
||||
this.providers = this.ERMStore.providers
|
||||
this.providers = providers.value.split(",")
|
||||
},
|
||||
error => {}
|
||||
)
|
||||
|
|
@ -227,7 +226,7 @@ export default {
|
|||
sysprefs_client.sysprefs
|
||||
.get("ERMModule")
|
||||
.then(value => {
|
||||
this.ERMStore.sysprefs.ERMModule = value.value
|
||||
this.sysprefs.ERMModule = value.value
|
||||
if (this.sysprefs.ERMModule != 1) {
|
||||
return this.setError(
|
||||
this.$__(
|
||||
|
|
|
|||
Loading…
Reference in New Issue