ticket debug store and show ticket

This commit is contained in:
saeid
2019-07-02 10:53:21 +04:30
parent 870d736281
commit 579cab4e33
8 changed files with 67025 additions and 33 deletions
@@ -48,6 +48,7 @@ export default {
const result = await ApiService.get(urls.userSearch(val));
if (result && result.data.data) {
this.items = result.data.data;
this.user_id = this.data.data.id;
this.loading = false;
}
}
@@ -8,13 +8,16 @@
class="mx-2 my-3"
v-for="item in items"
:key="item.id"
:style="(item.sender_user_id == user_id) ? '' : 'float:right' "
>
<span
v-if="item.sender_user_id == user_id"
class="Chat White"
>{{ item.text }}</span>
<span v-else class="Chat Cyan">{{ item.text }}</span>
<div class="Chat White" v-if="item.sender_user_id == user_id">
<span>{{ item.text }}</span>
<span class="caption"></span>
</div>
<div class="Chat Cyan" style="float:right" v-else>
<span >{{ item.text }}</span>
<span class="caption"></span>
</div>
</div>
</v-flex>
</v-layout>
@@ -58,6 +61,8 @@ export default {
padding: 10px 15px;
color: white;
border-radius: 10px;
width: fit-content;
display: block;
}
.Chat.Cyan {
background: cornflowerblue;
@@ -23,7 +23,7 @@
import { ApiService } from "@/services";
import { urls } from "@/config/urls";
import toast from "@/services/global/toast.service";
import { mapMutations } from "vuex";
export default {
data() {
return {
@@ -47,11 +47,10 @@ export default {
this.form.user_id = this.userId;
},
methods: {
...mapMutations("modal", ["closeModal"]),
async register() {
if(this.userId > 0) {
const result = await ApiService.post(
urls.showMessages(this.userId), this.form
);
const result = await ApiService.post( urls.storeMessages, this.form );
if (result && result.status == 200) {
this.closeModal();
}