change Ticket

This commit is contained in:
saeid
2019-07-01 15:46:22 +04:30
parent f0eefd4f0a
commit 506ddf74f0
65 changed files with 368 additions and 115734 deletions
+15 -25
View File
@@ -28,12 +28,12 @@
</template>
<template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light WM-NoLetterSpacing">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.created_at }}</td>
<td class="title font-weight-light">{{ item.users_count }} Operator</td>
<td class="title font-weight-light">{{ item.messages_count }}</td>
<td class="title font-weight-light">{{ item.unread_messages_count }}</td>
<td class="text-xs-right">
<v-btn color="pink" @click="showmessages" class="WM-ActionButton">
<v-btn color="pink" @click="showmessages(item.id)" class="WM-ActionButton">
<v-icon class="white--text mr-2 caption">fas fa-chevron-right</v-icon>
<span>Send Message</span>
<span>Show Message</span>
</v-btn>
</td>
</template>
@@ -65,17 +65,17 @@ export default {
headers: [
{
sortable: false,
text: "Hospital Name",
text: "Name",
value: "name"
},
{
sortable: false,
text: "Date",
value: "date"
text: "Count Messages",
value: "operator"
},
{
sortable: false,
text: "Operator",
text: "Unread Message",
value: "operator"
},
{
@@ -97,29 +97,19 @@ export default {
},
methods: {
async load(page = 1) {
let filter = `?page=${page}&name=${this.filter.name}`;
const result = await ApiService.get(urls.listMedicalCenter(filter));
this.items = result.data.data.data;
this.currentPage = result.data.data.current_page;
this.lastPage = result.data.data.last_page;
},
async remove(id) {
const result = await ApiService.delete(urls.deleteMedicalCenter(id));
if (result && result.status == 200) {
for (const key in this.items) {
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
this.items.splice(key, 1);
}
}
const result = await ApiService.get(urls.listMessages);
if(result && result.data.data) {
this.items = result.data.data.data;
this.currentPage = result.data.data.current_page;
this.lastPage = result.data.data.last_page;
}
},
...mapMutations('modal',['changeCurrentModal']),
newmessage() {
this.changeCurrentModal({ modal: "modal-ticket-new-message" });
},
...mapMutations('modal',['changeCurrentModal']),
showmessages() {
this.changeCurrentModal({ modal: "modal-ticket-show-messages" });
showmessages(user_id) {
this.changeCurrentModal({ modal: "modal-ticket-show-messages", properties: { user_id : user_id } });
},
},
watch: {