introduce vuex
This commit is contained in:
@ -58,8 +58,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RequestMixin from "@/mixins/request.mixin"
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import RequestMixin from "@/mixins/request.mixin"
|
||||
import ProfileList from "@/components/ProfileList";
|
||||
|
||||
export default {
|
||||
@ -87,6 +88,9 @@ export default {
|
||||
showErrorMessage: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(['currentUserId'])
|
||||
},
|
||||
methods: {
|
||||
addResult(result = false) {
|
||||
if (!result) result = this.searchResults[0];
|
||||
@ -98,7 +102,7 @@ export default {
|
||||
|
||||
let changeValues = Object.assign(this.values);
|
||||
let newValue = {
|
||||
profile_id: localStorage.getItem("user_id"),
|
||||
profile_id: this.currentUserId,
|
||||
};
|
||||
if (this.type != "contacttype") {
|
||||
newValue.level = 1;
|
||||
|
Reference in New Issue
Block a user