fix : title of pages

This commit is contained in:
zeinab.ashrafi
2025-04-10 12:39:48 +03:30
parent 78dfba9b24
commit fc029045bc
28 changed files with 1582 additions and 1427 deletions
+21 -9
View File
@@ -56,10 +56,16 @@
<td class="title font-weight-light">{{ item.status }}</td>
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<template v-if="$hasRole('Admin|Supervisor')">
<v-tooltip v-for="status in getStatus(item)" :key="status.label" bottom open-on-hover>
<v-tooltip v-for="status in getStatus(item)" :key="status.label" bottom
open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn :color="status.color" class="mr-2" @click="changeStatus(item, status.status)" v-bind="attrs" v-on="on">
<v-icon class="white--text mr-1 caption">fas {{ status.icon }}</v-icon>
<v-btn :color="status.color" class="mr-2"
@click="changeStatus(item, status.status)" v-bind="attrs"
v-on="on">
<v-icon class="white--text mr-1 caption">fas {{
status.icon
}}
</v-icon>
<span>{{ status.label }}</span>
</v-btn>
</template>
@@ -154,6 +160,12 @@ import {mapMutations, mapGetters} from "vuex";
import toast from "@/services/global/toast.service";
export default {
metaInfo() {
return {
title: this.$route.meta.title,
meta: this.$route.meta.metaTags || []
}
},
data: () => ({
headers: [
{sortable: false, text: "ID", value: "Package ID"},
@@ -161,7 +173,7 @@ export default {
{sortable: false, text: "Hospital", value: "Hospital"},
{sortable: false, text: "Description", value: "description"},
{sortable: false, text: "Status", value: "status"},
{sortable: false, text: "Action", value: "action", align: "center",width:'20%'}
{sortable: false, text: "Action", value: "action", align: "center", width: '20%'}
],
filter: {
name: '',
@@ -191,8 +203,8 @@ export default {
if (result && result.status == 200) {
const {data, meta} = result.data;
this.items = data;
this.currentPage = meta? meta.current_page : 1;
this.lastPage =meta? meta.last_page : 1;
this.currentPage = meta ? meta.current_page : 1;
this.lastPage = meta ? meta.last_page : 1;
}
this.loadMedicalCenters();
},
@@ -227,8 +239,8 @@ export default {
getStatus(item) {
if (item.status === 'pending') {
return [
{ status: 'rejected', label: 'reject', color: 'red', icon: 'fa-close' },
{ status: 'approved', label: 'approve', color: 'green', icon: 'fa-check' }
{status: 'rejected', label: 'reject', color: 'red', icon: 'fa-close'},
{status: 'approved', label: 'approve', color: 'green', icon: 'fa-check'}
]
} else {
const nextStatus = item.status === 'rejected' ? 'approved' : 'rejected'
@@ -243,7 +255,7 @@ export default {
}
},
async changeStatus(item, status) {
const result = await ApiService.post(urls.changePackageStatus(item.id), { status })
const result = await ApiService.post(urls.changePackageStatus(item.id), {status})
if (result?.data?.data?.status) {
const newStatus = result.data.data.status