introduce vuex
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2021-09-19 17:30:37 +02:00
parent 94d2a98b96
commit a408cae686
10 changed files with 129 additions and 46 deletions

View File

@ -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;