feat ticket to list

This commit is contained in:
zeinab.ashrafi
2025-05-22 10:21:53 +03:30
parent 12623018d6
commit 3342c259f4
3 changed files with 289 additions and 305 deletions
+9 -9
View File
@@ -1,24 +1,24 @@
<template>
<v-navigation-drawer id="app-drawer" v-model="inputValue" class="black" app absolute dark floating persistent
mobile-break-point="991" width="260">
<v-navigation-drawer id="app-drawer" v-model="inputValue" absolute app class="black" dark floating mobile-break-point="991"
persistent width="260">
<v-img :src="image" height="100%">
<v-layout class="fill-height px-3" tag="v-list" column>
<v-layout class="fill-height px-3" column tag="v-list">
<v-list-tile avatar class="px-3 pt-4">
<v-list-tile-title class="title ">
<p class="user-name mb-0">{{ $store.state.user.name }}</p>
<p class="hospital-name mb-0">{{ $store.state.user.medical_center?.name }}</p>
<v-chip small class="user-role mx-0" color="#323232" text-color="#dcdcdc">
<v-chip class="user-role mx-0" color="#323232" small text-color="#dcdcdc">
{{ $store.state.roles[0] }}
</v-chip>
</v-list-tile-title>
</v-list-tile>
<v-divider class="mb-1"/>
<v-list-tile v-if="responsive">
<v-text-field class="purple-input search-input" label="Search..." color="purple"/>
<v-text-field class="purple-input search-input" color="purple" label="Search..."/>
</v-list-tile>
<template v-for="(link, i) in links">
<v-list-tile v-if="!link.role || $hasRole(link.role)" :key="i" :to="link.to" :active-class="color"
<v-list-tile v-if="!link.role || $hasRole(link.role)" :key="i" :active-class="color" :to="link.to"
avatar
class="v-list-item ">
<!-- <v-list-tile-action>-->
@@ -26,7 +26,7 @@
<!-- </v-list-tile-action>-->
<v-list-tile-title v-text="link.text"/>
</v-list-tile>
<v-divider class="my-1" v-if="(!link.role || $hasRole(link.role)) && link.line"/>
<v-divider v-if="(!link.role || $hasRole(link.role)) && link.line" class="my-1"/>
</template>
</v-layout>
</v-img>
@@ -57,8 +57,8 @@ export default {
{to: {name: 'ManageMedicalCenter'}, icon: 'far fa-building', text: 'Medical Center', role: 'Admin',},
{to: {name: 'ManageUsers'}, icon: 'far fa-address-book', text: 'Users', role: 'Admin|Supervisor',},
{to: {name: 'ListTestType'}, icon: 'fas fa-vial', text: 'Manage Test Type', role: 'Admin',},
/* { to: {name: 'Statistics'}, icon: 'fas fa-chart-bar', text: 'Statistics', },
{ to: {name: 'Tickets'}, icon: 'style', text: 'Tickets', },*/
// {to: {name: 'Statistics'}, icon: 'fas fa-chart-bar', text: 'Statistics',},
{to: {name: 'Tickets'}, icon: 'style', text: 'Tickets',},
],
responsive: false
}),
+2 -2
View File
@@ -15,7 +15,7 @@
persistent-hint
prepend-icon="fas fa-search"
color="black"
></v-autocomplete>
/>
</v-flex>
</v-layout>
<ticket-send-message :user-id="user_id" />
@@ -52,7 +52,7 @@ export default {
}
}
}
}
},
};
</script>
<style lang="scss" scoped>
+31 -47
View File
@@ -1,19 +1,19 @@
<template>
<v-container fluid>
<material-card class color="black" title="My Recent ChatList" text>
<v-toolbar flat color="white">
<material-card class color="black" text title="My Recent ChatList">
<v-toolbar color="white" flat>
<v-toolbar-title></v-toolbar-title>
<v-divider class="mx-2" inset vertical></v-divider>
<v-spacer></v-spacer>
<v-btn color="black" @click="newmessage" class="WM-ActionButton mb-2 mr-4">
<v-spacer/>
<v-btn class="WM-ActionButton mb-2 mr-4" color="black" @click="newmessage">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
<span>New Message</span>
</v-btn>
</v-toolbar>
<v-layout class="px-4 my-3">
<v-divider></v-divider>
<v-divider/>
</v-layout>
<v-layout align-center justify-center wrap class="px-5 mt-3">
<v-layout align-center class="px-5 mt-3" justify-center wrap>
<v-flex md12>
<v-data-table :headers="headers" :items="items" hide-actions>
<template slot="headerCell" slot-scope="{ header }">
@@ -23,9 +23,7 @@
/>
</template>
<template slot="items" slot-scope="{ item }">
<td
class="headline font-weight-light WM-NoLetterSpacing"
>{{ item.name }}</td>
<td class="headline font-weight-light WM-NoLetterSpacing">{{ item.name }}</td>
<td class="title font-weight-light">
<span class="Chip">
<span class="Count Content">{{ item.messages_count }} count</span>
@@ -40,12 +38,11 @@
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn
color="cyan"
@click="showmessages(item.id)"
class="WM-ActionButton"
color="cyan"
v-bind="attrs"
v-on="on"
>
@click="showmessages(item.id)"
v-on="on">
<v-icon class="white--text mr-2 caption">fas fa-eye</v-icon>
<span>Show Message</span>
</v-btn>
@@ -55,12 +52,11 @@
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn
color="pink"
@click="remove(item.id)"
class="WM-ActionButton"
color="pink"
v-bind="attrs"
v-on="on"
>
@click="remove(item.id)"
v-on="on">
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
<span>delete</span>
</v-btn>
@@ -72,11 +68,11 @@
</v-data-table>
</v-flex>
</v-layout>
<v-divider></v-divider>
<div class="text-xs-center" v-if="lastPage > 1">
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
<v-divider/>
<div v-if="lastPage > 1" class="text-xs-center">
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6" color="black"></v-pagination>
</div>
<v-layout row wrap align-center justify-center class="mt-3">
<v-layout align-center class="mt-3" justify-center row wrap>
<router-link :to="{name: 'Dashboard'}">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
@@ -89,33 +85,17 @@
</template>
<script>
import { ApiService } from "@/services";
import { urls } from "@/config/urls";
import { mapMutations, mapGetters } from "vuex";
import {ApiService} from "@/services";
import {urls} from "@/config/urls";
import {mapMutations, mapGetters} from "vuex";
export default {
data: () => ({
headers: [
{
sortable: false,
text: "Name",
value: "name"
},
{
sortable: false,
text: "Count Messages",
value: "operator"
},
{
sortable: false,
text: "Unread Message",
value: "operator"
},
{
sortable: false,
text: "Action",
value: "action",
align: "left",
}
{sortable: false, text: "Name", value: "name"},
{sortable: false, text: "Count Messages", value: "operator"},
{sortable: false, text: "Unread Message", value: "operator"},
{sortable: false, text: "Action", value: "action", align: "left",}
],
filter: {
name: ""
@@ -139,12 +119,12 @@ export default {
},
...mapMutations("modal", ["changeCurrentModal"]),
newmessage() {
this.changeCurrentModal({ modal: "modal-ticket-new-message" });
this.changeCurrentModal({modal: "modal-ticket-new-message"});
},
showmessages(user_id) {
this.changeCurrentModal({
modal: "modal-ticket-show-messages",
properties: { user_id: user_id }
properties: {user_id: user_id}
});
},
async remove(user_id) {
@@ -181,6 +161,7 @@ export default {
.WM-ActionButton {
padding: 8px 22px;
}
.Chip {
align-items: center;
border-radius: 28px;
@@ -194,6 +175,7 @@ export default {
height: 24px;
color: #000;
}
.Chip .Content {
align-items: center;
border-radius: 24px;
@@ -206,9 +188,11 @@ export default {
white-space: nowrap;
z-index: 1;
}
.Chip .Content.Count {
background-color: #b2dfdb;
}
.Chip .Content.Unread {
background-color: #ffcdd2;
}