mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 00:21:15 +03:30
change Ticket
This commit is contained in:
@@ -30,54 +30,6 @@
|
||||
layout
|
||||
py-2
|
||||
>
|
||||
<!-- <v-menu
|
||||
v-model="menu"
|
||||
:close-on-content-click="false"
|
||||
:nudge-width="200"
|
||||
offset-x
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn
|
||||
class="default v-btn--simple"
|
||||
dark
|
||||
icon
|
||||
v-on="on"
|
||||
>
|
||||
<v-icon color="tertiary">mdi-account</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-card>
|
||||
<v-list>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-avatar>
|
||||
<img src="https://cdn.vuetifyjs.com/images/john.jpg" alt="John">
|
||||
</v-list-tile-avatar>
|
||||
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ name }}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ cell_number }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-list>
|
||||
<v-list-tile>
|
||||
<v-list-tile-title>Enable messages</v-list-tile-title>
|
||||
</v-list-tile>
|
||||
|
||||
<v-list-tile>
|
||||
<v-list-tile-title>Enable hints</v-list-tile-title>
|
||||
</v-list-tile>
|
||||
|
||||
<v-list-tile>
|
||||
<v-list-tile-title>Enable hints</v-list-tile-title>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-menu> -->
|
||||
<!-- <v-text-field
|
||||
v-if="responsiveInput"
|
||||
class="mr-4 mt-2 purple-input"
|
||||
@@ -106,7 +58,7 @@
|
||||
<v-list>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-avatar>
|
||||
<img src="https://cdn.vuetifyjs.com/images/john.jpg" alt="John">
|
||||
<img src="https://cdn.vuetifyjs.com/images/john.jpg" :alt="name">
|
||||
</v-list-tile-avatar>
|
||||
|
||||
<v-list-tile-content>
|
||||
@@ -133,7 +85,7 @@
|
||||
<router-link
|
||||
v-ripple
|
||||
class="toolbar-items"
|
||||
:to="{name: 'MyTicket'}"
|
||||
:to="{name: 'Tickets'}"
|
||||
>
|
||||
<v-list-tile >
|
||||
<v-list-tile-title class="black--text" >My Ticket</v-list-tile-title>
|
||||
@@ -143,7 +95,7 @@
|
||||
</v-card>
|
||||
</v-menu>
|
||||
|
||||
<!-- <v-menu
|
||||
<v-menu
|
||||
bottom
|
||||
left
|
||||
content-class="dropdown-menu"
|
||||
@@ -242,4 +194,4 @@ export default {
|
||||
.Pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -1,96 +1,59 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<v-container >
|
||||
<material-card class color="black" title="New Message" text>
|
||||
<!-- <v-card> -->
|
||||
|
||||
<!-- <v-card-title>
|
||||
<span class="headline"></span>
|
||||
</v-card-title> -->
|
||||
<v-layout wrap class="px-4 mb-3">
|
||||
<!-- <v-toolbar-title>Search User</v-toolbar-title> -->
|
||||
<v-flex xs12 sm12 md12>
|
||||
<v-autocomplete
|
||||
v-model="model"
|
||||
:items="items"
|
||||
:loading="loading"
|
||||
:search-input.sync="search"
|
||||
label="Search"
|
||||
persistent-hint
|
||||
prepend-icon="fas fa-search"
|
||||
color="black"
|
||||
>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-card-text>
|
||||
<v-container grid-list-md>
|
||||
<v-flex xs12 sm12 md12>
|
||||
<v-textarea
|
||||
name="input-7-1"
|
||||
color="black"
|
||||
label="Default style"
|
||||
value="The Woodman set to work at once, and so sharp was his axe that the tree was soon chopped nearly through."
|
||||
hint="Hint text"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-layout row wrap>
|
||||
<v-btn color="pink" class="WM-ActionButton text-lg-left">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span>Cancel</span>
|
||||
</v-btn>
|
||||
<v-btn color="black" class="mr-2 WM-ActionButton">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-chevron-right</v-icon>
|
||||
<span>Send</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-card-actions>
|
||||
<!-- </v-card> -->
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</div>
|
||||
<div>
|
||||
<v-container>
|
||||
<material-card class color="black" title="New Message" text>
|
||||
<v-layout wrap class="px-4 mb-3">
|
||||
<v-flex xs12 sm12 md12>
|
||||
<v-autocomplete
|
||||
:items="items"
|
||||
:loading="loading"
|
||||
:search-input.sync="search"
|
||||
v-model="user_id"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
label="Search"
|
||||
persistent-hint
|
||||
prepend-icon="fas fa-search"
|
||||
color="black"
|
||||
></v-autocomplete>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<ticket-send-message :user-id="user_id" />
|
||||
</material-card>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
items: [],
|
||||
search: null,
|
||||
select: null,
|
||||
states: [
|
||||
'Ali',
|
||||
'Fatemeh',
|
||||
'Mohsen',
|
||||
'Sara',
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
|
||||
]
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
items: [],
|
||||
search: "",
|
||||
user_id: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
search (val) {
|
||||
val && val !== this.select && this.querySelections(val)
|
||||
}
|
||||
search(val) {
|
||||
val && this.querySelections(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
querySelections (v) {
|
||||
this.loading = true
|
||||
// Simulated ajax query
|
||||
setTimeout(() => {
|
||||
this.items = this.states.filter(e => {
|
||||
return (e || '').toLowerCase().indexOf((v || '').toLowerCase()) > -1
|
||||
})
|
||||
this.loading = false
|
||||
}, 500)
|
||||
}
|
||||
async querySelections(val) {
|
||||
if (!this.loading) {
|
||||
this.loading = true;
|
||||
const result = await ApiService.get(urls.userSearch(val));
|
||||
if (result && result.data.data) {
|
||||
this.items = result.data.data;
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,72 +1,71 @@
|
||||
<template>
|
||||
<div id="">
|
||||
<v-container >
|
||||
<material-card class color="black" title="Show Message" text max-width="600px">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<div class="mx-2 my-3">
|
||||
<span class="Chat White">Listen to your favorite artists and albums.</span>
|
||||
</div>
|
||||
<div class="mx-2 my-3" style="float:right">
|
||||
<span class="Chat Cyan ">Listen to your favorite artists and albums.</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-card-text>
|
||||
<v-container grid-list-md>
|
||||
<h5>Send Message</h5>
|
||||
<v-flex xs12 sm12 md12>
|
||||
<v-textarea
|
||||
name="input-7-1"
|
||||
color="black"
|
||||
label="Default style"
|
||||
value="The Woodman set to work at once, and so sharp was his axe that the tree was soon chopped nearly through."
|
||||
hint="Hint text"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-layout row wrap>
|
||||
<v-btn color="pink" class="WM-ActionButton text-lg-left">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span>Cancel</span>
|
||||
</v-btn>
|
||||
<v-btn color="black" class="mr-2 WM-ActionButton">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-chevron-right</v-icon>
|
||||
<span>Send</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-card-actions>
|
||||
<!-- </v-card> -->
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</div>
|
||||
<div>
|
||||
<v-container>
|
||||
<material-card class color="black" title="Show Message" text max-width="600px">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<div
|
||||
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>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<ticket-send-message :user-id="user_id" />
|
||||
</material-card>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
name: "",
|
||||
data: () => ({
|
||||
|
||||
})
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
user_id: 0,
|
||||
items: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.user_id = this.getModalProperties.user_id;
|
||||
this.load();
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
},
|
||||
methods: {
|
||||
async load() {
|
||||
const result = await ApiService.get(
|
||||
urls.showMessages(this.user_id)
|
||||
);
|
||||
if (result && result.data.data) {
|
||||
this.items = result.data.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.Chat {
|
||||
|
||||
padding: 10px 15px;
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
padding: 10px 15px;
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.Chat.Cyan {
|
||||
background: cornflowerblue;
|
||||
box-shadow: 5px 15px 20px rgba(0,0,0,.2)
|
||||
background: cornflowerblue;
|
||||
box-shadow: 5px 15px 20px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.Chat.White {
|
||||
background: #fff;
|
||||
color:black;
|
||||
box-shadow: 5px 15px 20px rgba(0,0,0,.2)
|
||||
background: #fff;
|
||||
color: black;
|
||||
box-shadow: 5px 15px 20px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-card-text>
|
||||
<v-container grid-list-md>
|
||||
<v-flex xs12 sm12 md12>
|
||||
<v-textarea name="input-7-1" v-model="form.message" color="black" label="Message" hint="Hint text"></v-textarea>
|
||||
</v-flex>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-layout row wrap>
|
||||
<v-btn color="black" class="mr-2 WM-ActionButton" @click="register()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-chevron-right</v-icon>
|
||||
<span>Send</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-card-actions>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import toast from "@/services/global/toast.service";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form : {
|
||||
message: '',
|
||||
user_id : '',
|
||||
}
|
||||
};
|
||||
},
|
||||
props: {
|
||||
userId: {
|
||||
type : Number,
|
||||
default : 0
|
||||
},
|
||||
message: {
|
||||
type : String,
|
||||
default : ''
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.form.user_id = this.userId;
|
||||
},
|
||||
methods: {
|
||||
async register() {
|
||||
if(this.userId > 0) {
|
||||
const result = await ApiService.post(
|
||||
urls.showMessages(this.userId), this.form
|
||||
);
|
||||
if (result && result.status == 200) {
|
||||
this.closeModal();
|
||||
}
|
||||
} else {
|
||||
toast.error('please Select User');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
Vendored
+8
@@ -14,6 +14,14 @@ const urls = {
|
||||
forgotPassword : `/password/phone`,
|
||||
sendVerifyCode : `/password/verifyCode`,
|
||||
changePassword : `/password/reset`,
|
||||
storeMessages : `/Messages`,
|
||||
listMessages : `/Messages`,
|
||||
userSearch : function(val) {
|
||||
return `/users/search?name=${val}`;
|
||||
},
|
||||
showMessages : function(user_id) {
|
||||
return "/Messages/" + user_id;
|
||||
},
|
||||
listTestType : function(filter) {
|
||||
return "/TestTypes" + filter;
|
||||
},
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<!-- <template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black">
|
||||
<v-layout row wrap>
|
||||
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "",
|
||||
data: () => ({
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style> -->
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user