mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-12 00:43:17 +03:30
fix : display Dashboard admin and items fields
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</material-card>
|
||||
|
||||
|
||||
<material-card v-if="$hasRole('Supervisor|Admin')" color="black" title="Supervisor" text="">
|
||||
<material-card v-if="$hasRole('Admin|Supervisor')" color="black" title="Supervisor" text="">
|
||||
<v-layout row wrap>
|
||||
<template v-for="(SupervisorCard, Key ) in SupervisorCards">
|
||||
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column, 'pa-2']"
|
||||
|
||||
+29
-23
@@ -4,27 +4,27 @@
|
||||
<material-card class color="black" title="All Items" text>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.item_id" label="Item ID"
|
||||
color="black"></v-text-field>
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"></v-text-field>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')">
|
||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
||||
<v-autocomplete class="py-3 pr-3" v-model="filter.medical_center_id" item-text="name"
|
||||
item-value="id" label="Hospital" color="black" :items="medicalCenters"
|
||||
:clearable="true"></v-autocomplete>
|
||||
:clearable="true"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.size" label="Size" color="black"></v-text-field>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.size" label="Size" color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl3">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.udi" label="UDI" color="black"></v-text-field>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.udi" label="UDI" color="black"/>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
@@ -35,7 +35,7 @@
|
||||
<span class="white--text CSSD-font">Filter</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer/>
|
||||
<v-flex xs12 md2 sm2 class="text-xs-right">
|
||||
<router-link :to="{ name: 'AddItem' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
@@ -46,7 +46,7 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-divider></v-divider>
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-flex md12>
|
||||
@@ -59,22 +59,23 @@
|
||||
<td class="title font-weight-light">{{ item.id }}</td>
|
||||
<!-- <td class="title font-weight-light">{{ item.unique_id }}</td> -->
|
||||
<td class="title font-weight-light">{{ item.name }}</td>
|
||||
<td class="title font-weight-light">{{ item.user ? item.user.name : '' }}</td>
|
||||
<td class="title font-weight-light">{{ (item.user && item.user.medical_center) ?
|
||||
item.user.medical_center.name : '' }}</td>
|
||||
<td class="title font-weight-light">{{ item.udi }}</td>
|
||||
<td class="title font-weight-light">{{ item.user ? item.user.name : '' | text_20_letter }}</td>
|
||||
<td class="title font-weight-light">{{ (item.user && item.user.medical_center) ? item.user.medical_center.name : '' }}</td>
|
||||
<td class="title font-weight-light">{{ item.udi | text_8_letter }}</td>
|
||||
<td class="title font-weight-light">{{ item.size }}</td>
|
||||
<td class="title font-weight-light">{{ item.status }}</td>
|
||||
<td class="text-xs-right FlexBtn Height-MD-60">
|
||||
<v-tooltip bottom open-on-hover v-if="$hasRole('Supervisor|Admin')">
|
||||
<v-tooltip bottom open-on-hover v-if="$hasRole('Admin|Supervisor')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
:color="!['suspended', 'rejected'].includes(item.status) ? 'red' : 'green'"
|
||||
class="mr-2" @click="changeStatus(item)" v-bind="attrs" v-on="on">
|
||||
<v-icon class="white--text mr-1 caption">fas {{
|
||||
!['suspended', 'rejected'].includes(item.status) ? 'fa-close' :
|
||||
'fa-check' }}</v-icon>
|
||||
<span>{{ !['suspended', 'rejected'].includes(item.status) ? 'reject' :
|
||||
'approve' }}</span>
|
||||
<v-icon class="white--text mr-1 caption">
|
||||
fas {{!['suspended', 'rejected'].includes(item.status) ? 'fa-close' : 'fa-check' }}
|
||||
</v-icon>
|
||||
<span>
|
||||
{{ !['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve' }}
|
||||
</span>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ !['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve'
|
||||
@@ -173,7 +174,7 @@ export default {
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
text: "User",
|
||||
text: "Owner",
|
||||
value: "User"
|
||||
},
|
||||
{
|
||||
@@ -191,6 +192,11 @@ export default {
|
||||
text: "Size",
|
||||
value: "size"
|
||||
},
|
||||
{
|
||||
sortable: false,
|
||||
text: "Status",
|
||||
value: "status"
|
||||
},
|
||||
{
|
||||
sortable: false,
|
||||
text: "Action",
|
||||
|
||||
Reference in New Issue
Block a user