new correction on access

This commit is contained in:
Fateme
2020-07-23 19:49:14 +04:30
parent 8a8d00567f
commit 73d0169ca3
14 changed files with 92 additions and 37 deletions
+12 -3
View File
@@ -40,6 +40,7 @@
label="Hospital"
color="black"
:items="medicalCenters"
:clearable="true"
></v-autocomplete>
</v-flex>
<v-flex xs12 sm2 md2 class="WM-FlexCenter pl-3">
@@ -97,6 +98,9 @@
</template>
<template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light">{{ item.id }}</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.sterilizer_id }}</td>
<td class="title font-weight-light">{{ item.cycle_number }}</td>
<td class="title font-weight-light">{{ item.date }}</td>
@@ -142,9 +146,9 @@
</v-tooltip>
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn
v-bind="attrs" v-on="on"
color="orange darken-1"
<v-btn
v-bind="attrs" v-on="on"
color="orange darken-1"
@click="generateBarcode(item.id, 'Cycle')">
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
<span>Generate Barcode</span>
@@ -186,6 +190,11 @@ export default {
text: "Cycle ID",
value: "Cycle ID"
},
{
sortable: true,
text: "Hospital",
value: "Hospital"
},
{
sortable: true,
text: "Sterilizer ID",
+10 -1
View File
@@ -1,7 +1,7 @@
<template>
<div class>
<v-container fluid>
<material-card class color="black" title="All Instrument" text>
<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>
@@ -31,6 +31,7 @@
label="Hospital"
color="black"
:items="medicalCenters"
:clearable="true"
></v-autocomplete>
</v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
@@ -74,6 +75,9 @@
<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.medical_center) ? item.user.medical_center.name : '' }}</td>
<td class="title font-weight-light">{{ item.size }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<v-tooltip bottom open-on-hover>
@@ -167,6 +171,11 @@ export default {
text: "Name",
value: "name"
},
{
sortable: true,
text: "Hospital",
value: "Hospital"
},
{
sortable: false,
text: "Size",
+1
View File
@@ -19,6 +19,7 @@
label="Hospital"
color="black"
:items="medicalCenters"
:clearable="true"
></v-autocomplete>
</v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
+11 -2
View File
@@ -31,6 +31,7 @@
label="Hospital"
color="black"
:items="medicalCenters"
:clearable="true"
></v-autocomplete>
</v-flex>
<!-- <v-flex class xs12 md2 sm3>
@@ -41,7 +42,7 @@
</v-flex>
<v-spacer></v-spacer> -->
<!-- <v-spacer></v-spacer> -->
</v-layout>
<v-layout align-center wrap class="mb-3 px-5">
<v-flex class xs12 md2 sm3>
@@ -76,6 +77,9 @@
<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.medical_center) ? item.user.medical_center.name : '' }}</td>
<td class="title font-weight-light">{{ item.user ? item.user.name : '' }}</td>
<td class="title font-weight-light">{{ item.description }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
@@ -105,7 +109,7 @@
</v-tooltip>
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn
<v-btn
v-bind="attrs" v-on="on"
color="pink"
class="WM-ActionButton mr-2"
@@ -171,6 +175,11 @@ export default {
text: "Name",
value: "name"
},
{
sortable: true,
text: "Hospital",
value: "Hospital"
},
{
sortable: true,
text: "User",
+9 -5
View File
@@ -47,6 +47,7 @@
:items="medicalCenters"
item-text="name"
item-value="id"
:clearable="true"
></v-autocomplete>
</v-flex>
<v-flex xs12 md2 sm3 class="WM-FlexCenter">
@@ -203,8 +204,10 @@
</v-tooltip>
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" -->
<router-link class="LinkBtn"
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id"
v-if="$hasRole('Admin')"
:to="{name: 'EditTestResult', params: {testResult: item.id}}"
>
<v-btn color="orange" class="mr-2" v-bind="attrs"
@@ -218,11 +221,12 @@
</v-tooltip>
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" -->
<v-btn
color="pink"
class="WM-ActionButton"
@click="remove(item.id)"
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id"
v-if="$hasRole('Admin')"
v-bind="attrs"
v-on="on"
>
@@ -456,7 +460,7 @@ td.FlexBtn .theme--light.v-btn {
}
td.FlexBtn a.LinkBtn .theme--light.v-btn {
padding: 12px 10px;
}
}
@media screen and (max-width:1536px) {
.FlexBtn {
padding: 30px 8px !important;
@@ -468,8 +472,8 @@ td.FlexBtn .theme--light.v-btn {
min-width: 30px;
padding: 15px 10px;
margin-right: 1 !important;
}
}
td.FlexBtn a.LinkBtn .theme--light.v-btn {
padding: 9px 10px;
}
+2 -1
View File
@@ -152,7 +152,8 @@
</template>
</v-btn>
</template>
<span>Active</span>
<span v-if="item.status == 'Active'">Susspended</span>
<span v-else>Active</span>
</v-tooltip>
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">