Merge pull request 'fix-bugs' (#1) from fix-bugs into master

Reviewed-on: https://git.willaspace.com/external-projects/cssd-back/pulls/1
This commit is contained in:
sajjad.talkhabi
2023-09-11 10:23:27 +00:00
20 changed files with 672 additions and 16283 deletions
-15609
View File
File diff suppressed because it is too large Load Diff
@@ -9,19 +9,20 @@
<v-layout row wrap class="ml-4"> <v-layout row wrap class="ml-4">
<v-flex xs12 md6 sm6 v-if="barcodeimg"> <v-flex xs12 md6 sm6 v-if="barcodeimg">
<img :src="barcodeimg" class="WM-Width-350"><br /> <img :src="barcodeimg" class="WM-Width-350"><br />
<span v-if = "Type != 'TestType'">{{ Type+ ' ID :' + ID }}</span> <span v-if="Type != 'TestType'">{{ `${Type} ${item.udi ? 'UDI :' : 'ID :'} ${ID}` }}</span>
<span v-else>{{ Type+ ':' + ID }}</span> <span v-else>{{ Type + ':' + ID }}</span>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout row wrap class="ml-4"> <v-layout row wrap class="ml-4">
<v-flex xs12 md6 sm6 v-if="QRCodeimg"> <v-flex xs12 md6 sm6 v-if="QRCodeimg">
<a v-if = "Type != 'TestType'":href="ShowLink" target="_blank"><img :src="QRCodeimg" class="WM-Width-150"></a> <a v-if="Type != 'TestType'" :href="ShowLink" target="_blank"><img :src="QRCodeimg"
class="WM-Width-150"></a>
<img v-else :src="QRCodeimg" class="WM-Width-150"> <img v-else :src="QRCodeimg" class="WM-Width-150">
</v-flex> </v-flex>
</v-layout> </v-layout>
</v-layout> </v-layout>
<v-layout row wrap align-center justify-center> <v-layout row wrap align-center justify-center>
<v-flex class xs12 md2 sm2 @click="print" > <v-flex class xs12 md2 sm2 @click="print">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px"> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon> <v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
<span class="white--text">Print</span> <span class="white--text">Print</span>
@@ -35,15 +36,17 @@
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
data: () => ({ data: () => ({
barcodeimg : null, barcodeimg: null,
QRCodeimg : null, QRCodeimg: null,
ShowLink : '', ShowLink: '',
Type : '', Type: '',
ID : '' ID: '',
item: {}
}), }),
created() { created() {
this.item = this.getModalProperties.item ? this.getModalProperties.item : {};
this.barcodeimg = this.getModalProperties.result.data.data.Barcode ? this.getModalProperties.result.data.data.Barcode : null; this.barcodeimg = this.getModalProperties.result.data.data.Barcode ? this.getModalProperties.result.data.data.Barcode : null;
this.QRCodeimg = this.getModalProperties.result.data.data.QRCode ? this.getModalProperties.result.data.data.QRCode : null; this.QRCodeimg = this.getModalProperties.result.data.data.QRCode ? this.getModalProperties.result.data.data.QRCode : null;
this.ShowLink = this.getModalProperties.result.data.data.ShowLink ? this.getModalProperties.result.data.data.ShowLink : '#'; this.ShowLink = this.getModalProperties.result.data.data.ShowLink ? this.getModalProperties.result.data.data.ShowLink : '#';
this.Type = this.ShowLink.split('/')[1]; this.Type = this.ShowLink.split('/')[1];
this.ID = this.ShowLink.split('/')[2]; this.ID = this.ShowLink.split('/')[2];
+3
View File
@@ -182,6 +182,9 @@ const urls = {
}, },
packageQRCode: function(code) { packageQRCode: function(code) {
return `/Package/QRCode/${code}`; return `/Package/QRCode/${code}`;
},
changeItemStatus: function(id) {
return `/Items/ChangeStatus/${id}`;
} }
}; };
export { urls }; export { urls };
-1
View File
@@ -10,7 +10,6 @@ const $hasRole = function(roles) {
} }
} }
} }
return false;
}; };
export { export {
+143 -63
View File
@@ -4,12 +4,14 @@
font-weight: 100; font-weight: 100;
src: url('../../fonts/Montserrat-Regular.ttf') format('truetype'); src: url('../../fonts/Montserrat-Regular.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'Montserrat-Medium'; font-family: 'Montserrat-Medium';
font-style: normal; font-style: normal;
font-weight: medium; font-weight: medium;
src: url('../../fonts/Montserrat-Medium.ttf') format('truetype'); src: url('../../fonts/Montserrat-Medium.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'Montserrat-Bold'; font-family: 'Montserrat-Bold';
font-style: normal; font-style: normal;
@@ -17,12 +19,28 @@
src: url('../../fonts/Montserrat-Bold.ttf') format('truetype'); src: url('../../fonts/Montserrat-Bold.ttf') format('truetype');
} }
body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4,.title,.display-1 { body,
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.title,
.display-1 {
font-family: 'Montserrat-Regular' !important; font-family: 'Montserrat-Regular' !important;
} }
.CSSD-font, .headline.CSSD-font, h3.CSSD-font {
.CSSD-font,
.headline.CSSD-font,
h3.CSSD-font {
font-family: 'Montserrat-Regular' !important; font-family: 'Montserrat-Regular' !important;
} }
.application { .application {
font-family: 'Montserrat-Regular'; font-family: 'Montserrat-Regular';
} }
@@ -33,100 +51,130 @@ body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4,.title,.display-1 {
border-color: transparent !important; border-color: transparent !important;
box-shadow: none !important; box-shadow: none !important;
} }
.WM-InlineFlex { .WM-InlineFlex {
display: inline-flex; display: inline-flex;
} }
.WM-FlexCenter { .WM-FlexCenter {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
.WM-FlexWrap { .WM-FlexWrap {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.WM-BorderRadius-5 { .WM-BorderRadius-5 {
border-radius: 5px; border-radius: 5px;
} }
.WM-Margin-B-8 { .WM-Margin-B-8 {
margin-bottom: 8px; margin-bottom: 8px;
} }
.material-icons { .material-icons {
font-size: 20px !important; font-size: 20px !important;
vertical-align: sub !important; vertical-align: sub !important;
} }
.fa, .fas {
.fa,
.fas {
font-size: 20px; font-size: 20px;
} }
.headline { .headline {
// letter-spacing : 7px; // letter-spacing : 7px;
} }
.WM-NoLetterSpacing-7 { .WM-NoLetterSpacing-7 {
letter-spacing: 7px !important; letter-spacing: 7px !important;
} }
.WM-NoLetterSpacing { .WM-NoLetterSpacing {
letter-spacing: 0; letter-spacing: 0;
} }
.WM-Border-L-3x { .WM-Border-L-3x {
border-left: 3px solid; border-left: 3px solid;
} }
.WM-OrangeGradient-BG { .WM-OrangeGradient-BG {
background: linear-gradient(-245.99599235188236deg, rgba(252, 184, 162,1) -0.3020833333333286%,rgba(255, 236, 210,1) 93.03125%); background: linear-gradient(-245.99599235188236deg, rgba(252, 184, 162, 1) -0.3020833333333286%, rgba(255, 236, 210, 1) 93.03125%);
} }
.WM-BlueGradient-BG { .WM-BlueGradient-BG {
background: linear-gradient(-246.25375448810587deg, rgba(213, 245, 253,1) 0.4518229166666856%,rgba(233, 255, 247,1) 92.79557291666667%) background: linear-gradient(-246.25375448810587deg, rgba(213, 245, 253, 1) 0.4518229166666856%, rgba(233, 255, 247, 1) 92.79557291666667%)
} }
.WM-CoffeeGradient-BG { .WM-CoffeeGradient-BG {
background : linear-gradient(-246.25375448810587deg, rgba(226, 210, 196,1) 0.2955729166666856%,rgba(250, 247, 245,1) 92.63932291666667%); background: linear-gradient(-246.25375448810587deg, rgba(226, 210, 196, 1) 0.2955729166666856%, rgba(250, 247, 245, 1) 92.63932291666667%);
} }
.WM-MuskGradient-BG { .WM-MuskGradient-BG {
background : linear-gradient(113.58893008880955deg, rgba(167, 204, 225,1) 4.927083333333334%,rgba(236, 246, 237,1) 97.84374999999999%); background: linear-gradient(113.58893008880955deg, rgba(167, 204, 225, 1) 4.927083333333334%, rgba(236, 246, 237, 1) 97.84374999999999%);
} }
.WM-CyanBlueGradient-BG { .WM-CyanBlueGradient-BG {
background:linear-gradient(90deg, rgba(29,200,230,1) 20.5625%,rgba(29,200,229,1) 20.5625%,rgba(29,230,184,1) 80.5625%); background: linear-gradient(90deg, rgba(29, 200, 230, 1) 20.5625%, rgba(29, 200, 229, 1) 20.5625%, rgba(29, 230, 184, 1) 80.5625%);
} }
.WM-GreyGradient-BG { .WM-GreyGradient-BG {
background :linear-gradient(-248.2097473199551deg, rgba(220, 220, 220,1) 0.71484375%,rgba(246, 245, 245,1) 92.95442708333334%) background: linear-gradient(-248.2097473199551deg, rgba(220, 220, 220, 1) 0.71484375%, rgba(246, 245, 245, 1) 92.95442708333334%)
} }
.WM-GreenGradient-BG { .WM-GreenGradient-BG {
background : linear-gradient(112.72013189013455deg, rgba(98, 185, 183,1) 4.927083333333334%,rgba(236, 246, 237,1) 97.84374999999999%) background: linear-gradient(112.72013189013455deg, rgba(98, 185, 183, 1) 4.927083333333334%, rgba(236, 246, 237, 1) 97.84374999999999%)
} }
.WM-YellowPinkGradient-BG { .WM-YellowPinkGradient-BG {
background : linear-gradient(111.36820033167237deg, rgba(249, 231, 148,1) 4.927083333333334%,rgba(246, 190, 212,1) 97.84374999999999%) background: linear-gradient(111.36820033167237deg, rgba(249, 231, 148, 1) 4.927083333333334%, rgba(246, 190, 212, 1) 97.84374999999999%)
} }
.WM-YellowGradient-BG { .WM-YellowGradient-BG {
background : linear-gradient(111.36820033167237deg, #f8c369 4.927083333333334%,#ffe8c1 97.84374999999999%) background: linear-gradient(111.36820033167237deg, #f8c369 4.927083333333334%, #ffe8c1 97.84374999999999%)
} }
.WM-LightGreenGradient-BG { .WM-LightGreenGradient-BG {
background : linear-gradient(111.36820033167237deg, #90f7ec 4.927083333333334%,#32ccbc 97.84374999999999%) background: linear-gradient(111.36820033167237deg, #90f7ec 4.927083333333334%, #32ccbc 97.84374999999999%)
} }
.WM-PinkGradient-BG { .WM-PinkGradient-BG {
background: linear-gradient(to right, #ee9ca7, #ffdde1); background: linear-gradient(to right, #ee9ca7, #ffdde1);
} }
.WM-LightGray-color { .WM-LightGray-color {
color: rgba(33,33,33,.7) color: rgba(33, 33, 33, .7)
} }
.WM-Outline-Btn { .WM-Outline-Btn {
padding: 8px; padding: 8px;
background:transparent !important; background: transparent !important;
} }
.container.grid-list-xl :not(:only-child) .layout:last-child { .container.grid-list-xl :not(:only-child) .layout:last-child {
margin : 0 !important; margin: 0 !important;
} }
.v-navigation-drawer .v-list .v-list-item .v-list__tile.v-list__tile--active { .v-navigation-drawer .v-list .v-list-item .v-list__tile.v-list__tile--active {
-webkit-box-shadow: none !important; -webkit-box-shadow: none !important;
box-shadow: none !important; box-shadow: none !important;
} }
.v-btn.WM-NoShadow:not(.v-btn--depressed):not(.v-btn--flat) { .v-btn.WM-NoShadow:not(.v-btn--depressed):not(.v-btn--flat) {
-webkit-box-shadow: none !important; -webkit-box-shadow: none !important;
box-shadow: none !important; box-shadow: none !important;
padding: 8px 30px; padding: 8px 30px;
} }
.inputfile { .inputfile {
opacity: 0; opacity: 0;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
} }
.inputfile + label {
.inputfile+label {
font-size: 16px; font-size: 16px;
display: inline-block; display: inline-block;
font-weight: 400; font-weight: 400;
@@ -139,56 +187,68 @@ body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4,.title,.display-1 {
border-radius: 5px; border-radius: 5px;
} }
.inputfile:focus + label, .inputfile:focus+label,
.inputfile + label:hover { .inputfile+label:hover {
border: 1px solid #000; border: 1px solid #000;
color: #000; color: #000;
} }
.inputfile:focus .IconHover, .inputfile:focus .IconHover,
.inputfile .IconHover:hover { .inputfile .IconHover:hover {
color: #000 !important; color: #000 !important;
} }
.v-pagination>li:focus {
} .v-pagination>li:focus {}
.theme--light.v-pagination .v-pagination__item:focus { .theme--light.v-pagination .v-pagination__item:focus {
outline: 0 !important; outline: 0 !important;
} }
table.v-table tbody td.Height-MD-60 { table.v-table tbody td.Height-MD-60 {
height: 60px; height: 60px;
} }
table.v-table tbody td.Height-MD-80 { table.v-table tbody td.Height-MD-80 {
height: 80px; height: 80px;
} }
.FlexBtn { .FlexBtn {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
padding: 10px 8px !important; padding: 10px 8px !important;
justify-content: flex-start; justify-content: flex-start;
} }
td.FlexBtn .theme--light.v-btn { td.FlexBtn .theme--light.v-btn {
padding: 21px 20px; padding: 21px 20px;
} }
td.FlexBtn a.LinkBtn .theme--light.v-btn {
td.FlexBtn a.LinkBtn .theme--light.v-btn {
padding: 12px 10px; padding: 12px 10px;
} }
.ResultMsg { .ResultMsg {
font-size: 10px; font-size: 10px;
color: #fff; color: #fff;
padding: 3px 10px; padding: 3px 10px;
border-radius: 5px; border-radius: 5px;
} }
.ResultMsg.Reject{
.ResultMsg.Reject {
background: #ee3552; background: #ee3552;
} }
.ResultMsg.Accept{
background: #1DE6B8;; .ResultMsg.Accept {
background: #1DE6B8;
;
} }
.theme--light.v-icon.Verified { .theme--light.v-icon.Verified {
font-size: 15px !important; font-size: 15px !important;
color: #1DE6B8; color: #1DE6B8;
} }
.theme--light.v-icon.NotVerified { .theme--light.v-icon.NotVerified {
font-size: 15px !important; font-size: 15px !important;
color: #ee3552; color: #ee3552;
@@ -198,37 +258,47 @@ td.FlexBtn a.LinkBtn .theme--light.v-btn {
table.v-table tbody td.FlexBtn:not(:first-child) { table.v-table tbody td.FlexBtn:not(:first-child) {
padding: 12px 8px; padding: 12px 8px;
} }
td.FlexBtn .v-btn { td.FlexBtn .v-btn {
margin-top: 5px; margin-top: 5px;
} }
.WM-WidthScreen-SM { .WM-WidthScreen-SM {
flex-basis:35% !important; flex-basis: 35% !important;
max-width: 35% !important; max-width: 35% !important;
} }
table.v-table tbody td.Height-SM-48 { table.v-table tbody td.Height-SM-48 {
height: 48px; height: 48px;
} }
.v-card .title { .v-card .title {
font-size: .9rem !important; font-size: .9rem !important;
} }
.headline { .headline {
font-size: .9rem !important; font-size: .9rem !important;
} }
.FlexBtn { .FlexBtn {
padding: 10px 8px !important; padding: 10px 8px !important;
} }
td.FlexBtn span { td.FlexBtn span {
display: none; display: none;
} }
td.FlexBtn .theme--light.v-btn { td.FlexBtn .theme--light.v-btn {
min-width: 30px; min-width: 30px;
padding: 15px 10px; padding: 15px 10px;
margin-right: 1 !important; margin-right: 1 !important;
} }
td.FlexBtn a.LinkBtn .theme--light.v-btn {
td.FlexBtn a.LinkBtn .theme--light.v-btn {
padding: 9px 10px; padding: 9px 10px;
} }
td.FlexBtn .theme--light.v-icon { td.FlexBtn .theme--light.v-icon {
margin-right: 0 !important; margin-right: 0 !important;
} }
@@ -238,7 +308,8 @@ td.FlexBtn .theme--light.v-icon {
text-align: left !important; text-align: left !important;
} }
} }
@media screen and(max-width : 1536px) {
@media screen and (max-width : 1536px) {
// table.v-table tbody td.FlexBtn:not(:first-child) { // table.v-table tbody td.FlexBtn:not(:first-child) {
// padding: 12px 8px; // padding: 12px 8px;
// } // }
@@ -254,47 +325,56 @@ td.FlexBtn .theme--light.v-icon {
table.v-table tbody td.Height-SM-48 { table.v-table tbody td.Height-SM-48 {
height: 48px; height: 48px;
} }
.v-card .title {
font-size: .9rem !important; .v-card .title {
} font-size: .9rem !important;
.headline { }
font-size: .9rem !important;
} .headline {
.FlexBtn { font-size: .9rem !important;
padding: 10px 8px !important; }
}
td.FlexBtn span { .FlexBtn {
display: none; padding: 10px 8px !important;
} }
td.FlexBtn .theme--light.v-btn {
min-width: 30px; td.FlexBtn span {
padding: 15px 10px; display: none;
margin-right: 1 !important; }
}
td.FlexBtn a.LinkBtn .theme--light.v-btn { td.FlexBtn .theme--light.v-btn {
padding: 9px 10px; min-width: 30px;
} padding: 15px 10px;
td.FlexBtn .theme--light.v-icon { margin-right: 1 !important;
margin-right: 0 !important; }
}
td.FlexBtn a.LinkBtn .theme--light.v-btn {
padding: 9px 10px;
}
td.FlexBtn .theme--light.v-icon {
margin-right: 0 !important;
}
} }
@media screen and(max-width : 1366px) {
@media screen and (max-width : 1366px) {
.FlexBtn { .FlexBtn {
// padding: 10px 8px !important; // padding: 10px 8px !important;
padding: 20px 8px !important; padding: 20px 8px !important;
} }
td.FlexBtn .v-btn { td.FlexBtn .v-btn {
margin-top: -5px; margin-top: -5px;
} }
} }
@media screen and(max-width : 1024px) { @media screen and (max-width : 1024px) {
.WM-WidthScreen-XS { .WM-WidthScreen-XS {
flex-basis:60% !important; flex-basis: 60% !important;
max-width: 60% !important; max-width: 60% !important;
} }
} }
+48 -76
View File
@@ -1,75 +1,45 @@
<template> <template>
<v-container fluid> <v-container fluid>
<material-card class="" <material-card class="" v-if="$hasRole('Admin')" color="black" title="Admin" text="">
v-if="$hasRole('Admin')" <v-layout row wrap>
color="black"
title="Admin"
text="">
<v-layout row wrap >
<template v-for="(AdminCard, Key ) in AdminCards"> <template v-for="(AdminCard, Key ) in AdminCards">
<v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column , 'pa-2']" :key="Key"> <v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column, 'pa-2']" :key="Key">
<router-link :to="AdminCard.route"> <router-link :to="AdminCard.route">
<material-cards <material-cards :title="AdminCard.title" :icon="AdminCard.icon" :color="AdminCard.color"
:title="AdminCard.title" :text="AdminCard.text" :aligntext="AdminCard.aligntext" :alignimg="AdminCard.alignimg" />
:icon="AdminCard.icon" </router-link>
:color="AdminCard.color" </v-flex>
:text="AdminCard.text"
:aligntext="AdminCard.aligntext"
:alignimg="AdminCard.alignimg"
/>
</router-link>
</v-flex>
</template> </template>
</v-layout> </v-layout>
</material-card> </material-card>
<material-card <material-card v-if="$hasRole('Supervisor|Admin')" color="black" title="Supervisor" text="">
v-if="$hasRole('Supervisor|Admin')" <v-layout row wrap>
color="black"
title="Supervisor"
text=""
>
<v-layout row wrap >
<template v-for="(SupervisorCard, Key ) in SupervisorCards"> <template v-for="(SupervisorCard, Key ) in SupervisorCards">
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column , 'pa-2']" :key="Key"> <v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column, 'pa-2']"
<router-link :to="SupervisorCard.route"> :key="Key">
<material-cards <router-link :to="SupervisorCard.route">
:title="SupervisorCard.title" <material-cards :title="SupervisorCard.title" :icon="SupervisorCard.icon" :color="SupervisorCard.color"
:icon="SupervisorCard.icon" :text="SupervisorCard.text" :aligntext="SupervisorCard.aligntext" :alignimg="SupervisorCard.alignimg" />
:color="SupervisorCard.color" </router-link>
:text="SupervisorCard.text" </v-flex>
:aligntext="SupervisorCard.aligntext"
:alignimg="SupervisorCard.alignimg"
/>
</router-link>
</v-flex>
</template> </template>
</v-layout> </v-layout>
</material-card> </material-card>
<material-card <material-card color="black" title="User" text="">
color="black" <v-layout row wrap>
title="User"
text=""
>
<v-layout row wrap >
<template v-for="(UsersCard, Key ) in UsersCards"> <template v-for="(UsersCard, Key ) in UsersCards">
<v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column , 'pa-2']" :key="Key"> <v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column, 'pa-2']" :key="Key">
<router-link :to="UsersCard.route"> <router-link :to="UsersCard.route">
<material-cards <material-cards :title="UsersCard.title" :icon="UsersCard.icon" :color="UsersCard.color"
:title="UsersCard.title" :text="UsersCard.text" :aligntext="UsersCard.aligntext" :alignimg="UsersCard.alignimg" />
:icon="UsersCard.icon" </router-link>
:color="UsersCard.color" </v-flex>
:text="UsersCard.text"
:aligntext="UsersCard.aligntext"
:alignimg="UsersCard.alignimg"
/>
</router-link>
</v-flex>
</template> </template>
</v-layout> </v-layout>
@@ -79,27 +49,29 @@
</template> </template>
<script> <script>
import { UserService } from '@/services';
export default { export default {
data() { data() {
return { return {
AdminCards :[ AdminCards: [
{title:'Manage Users', text:'You can Manage the users information',icon:'/img/Static/Dashboard/manageusers.png',color:'WM-LightGreenGradient-BG',route:{name: 'ManageUsers'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12', role: 'Admin|Supervisor'}, { title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
{title:'Manage Medical Center', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/settings.png',color:'WM-MuskGradient-BG',route:{name: 'ManageMedicalCenter'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md7 sm7', role: 'Admin'}, { title: 'Manage Medical Center', text: 'You can edit the medical center information', icon: '/img/Static/Dashboard/settings.png', color: 'WM-MuskGradient-BG', route: { name: 'ManageMedicalCenter' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md7 sm7', role: 'Admin' },
{title:'List Test Type', text:'You can simply add your test type',icon:'/img/Static/Dashboard/result.png',color:'WM-GreyGradient-BG',route:{name: 'ListTestType'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md5 sm5', role: 'Admin'} { title: 'List Test Type', text: 'You can simply add your test type', icon: '/img/Static/Dashboard/result.png', color: 'WM-GreyGradient-BG', route: { name: 'ListTestType' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md5 sm5', role: 'Admin' }
], ],
SupervisorCards :[ SupervisorCards: [
{title:'Manage Users', text:'You can Manage the users information',icon:'/img/Static/Dashboard/manageusers.png',color:'WM-LightGreenGradient-BG',route:{name: 'ManageUsers'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12', role: 'Admin|Supervisor'}, { title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
{title:'Test to Verify', text:'You can simply verify your own medical center test result in this section of website',icon:'/img/Static/Dashboard/verify.png',color:'WM-PinkGradient-BG',route:{name: 'NotVerifyTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12', role: 'Admin|Supervisor'}, { title: 'Test to Verify', text: 'You can simply verify your own medical center test result in this section of website', icon: '/img/Static/Dashboard/verify.png', color: 'WM-PinkGradient-BG', route: { name: 'NotVerifyTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
], ],
UsersCards :[ UsersCards: [
{title:'My Info', text:'You can easily edit your registration information',icon:'/img/Static/Dashboard/info.png',color:'WM-OrangeGradient-BG',route:{name: 'MyInfo'},aligntext:'text-md-left',alignimg:'text-md-right', column:'xs12 md6 sm6'}, { title: 'My Info', text: 'You can easily edit your registration information', icon: '/img/Static/Dashboard/info.png', color: 'WM-OrangeGradient-BG', route: { name: 'MyInfo' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
{title:'All Test Result', text:'You can see all user tests and own tests',icon:'/img/Static/Dashboard/alltest.png',color:'WM-GreenGradient-BG',route:{name: 'AllResultTest'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md6 sm6'}, { title: 'All Test Result', text: 'You can see all user tests and own tests', icon: '/img/Static/Dashboard/alltest.png', color: 'WM-GreenGradient-BG', route: { name: 'AllResultTest' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
{title:'Add a Test Result', text:'You can add the test result',icon:'/img/Static/Dashboard/addtest.png',color:'WM-YellowGradient-BG',route:{name: 'SubmitTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'}, { title: 'Add a Test Result', text: 'You can add the test result', icon: '/img/Static/Dashboard/addtest.png', color: 'WM-YellowGradient-BG', route: { name: 'SubmitTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12' },
], ],
} }
} },
async created() {
console.log(await UserService.getInfo());
}
} }
</script> </script>
<style lang="scss"> <style lang="scss"></style>
</style>
+41 -34
View File
@@ -5,14 +5,8 @@
<v-layout align-center justify-center wrap class="px-5 my-3"> <v-layout align-center justify-center wrap class="px-5 my-3">
<v-flex xs12 md4 sm4 class="WM-FlexCenter"> <v-flex xs12 md4 sm4 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field <v-text-field name="name" label="Name" color="black" v-model="formData.name" :rules="[rules.required]"
name="name" class="py-3 pr-3"></v-text-field>
label="Name"
color="black"
v-model="formData.name"
:rules="[rules.required]"
class="py-3 pr-3"
></v-text-field>
</v-flex> </v-flex>
<!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <!-- <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-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
@@ -27,33 +21,28 @@
</v-flex> --> </v-flex> -->
<v-flex xs12 md4 sm4 class="WM-FlexCenter pl-3"> <v-flex xs12 md4 sm4 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon>
<v-text-field <v-text-field name="size" label="Size" color="black" v-model="formData.size" class="py-3 pr-3"></v-text-field>
name="size"
label="Size"
color="black"
v-model="formData.size"
class="py-3 pr-3"
></v-text-field>
</v-flex> </v-flex>
<v-flex xs12 md4 sm4 class="WM-FlexCenter pl-3"> <v-flex xs12 md4 sm4 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon>
<v-text-field <v-text-field name="specific" label="Specific" color="black" v-model="formData.specific"
name="specific" class="py-3 pr-3"></v-text-field>
label="Specific"
color="black"
v-model="formData.specific"
class="py-3 pr-3"
></v-text-field>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout align-center justify-center wrap class="px-5 mb-3"> <v-layout class="px-5 mb-3">
<v-flex xs12 md4 sm4 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field name="UDI" label="UDI" color="black" v-model="formData.udi" :rules="[rules.required]"
class="py-3 pr-3"></v-text-field>
</v-flex>
<v-flex xs12 md8 sm8 class="WM-FlexCenter" v-if="galleryDataLoaded">
<wm-Dropzone class="w-100" :Images="galleries" :BatchID="file_batch_id" :ModelID="$route.params.Item"
ModelType="Item"></wm-Dropzone>
</v-flex>
</v-layout>
<v-layout align-center wrap class="px-5 mb-3">
<v-flex xs12 sm12 md12> <v-flex xs12 sm12 md12>
<v-textarea <v-textarea color="black" v-model="formData.note" class="pa-2" name="address">
color="black"
v-model="formData.note"
class="pa-2"
name="address"
>
<template v-slot:label> <template v-slot:label>
<div>description</div> <div>description</div>
</template> </template>
@@ -68,7 +57,7 @@
</v-btn> </v-btn>
</v-flex> </v-flex>
<v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center"> <v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center">
<router-link :to="{name: 'AllItem'}"> <router-link :to="{ name: 'AllItem' }">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text">keyboard_arrow_left</v-icon> <v-icon class="black--text">keyboard_arrow_left</v-icon>
<span class="black--text">Back</span> <span class="black--text">Back</span>
@@ -85,9 +74,17 @@
import { ApiService } from "@/services"; import { ApiService } from "@/services";
import { urls } from "@/config/urls"; import { urls } from "@/config/urls";
import { mapMutations } from 'vuex'; import { mapMutations } from 'vuex';
import Dropzone from '@/components/core/Dropzone'
export default { export default {
components: {
'wm-Dropzone': Dropzone,
},
data() { data() {
return { return {
galleries: [],
galleryDataLoaded: false,
file_batch_id: Math.floor(Math.random() * 9000000000) + 1000000000,
formData: { formData: {
name: "", name: "",
unique_id: "", unique_id: "",
@@ -105,27 +102,37 @@ export default {
created() { created() {
if (this.$route.params.Item) { if (this.$route.params.Item) {
this.load(this.$route.params.Item); this.load(this.$route.params.Item);
} else {
this.galleryDataLoaded = true;
} }
}, },
methods: { methods: {
async load(id) { async load(id) {
const result = await ApiService.get(urls.editItem(id)); const result = await ApiService.get(urls.editItem(id));
if (result.status == 200) { if (result.status == 200) {
this.galleries = result.data.data.filesPath;
this.galleryDataLoaded = true;
this.formData = result.data.data; this.formData = result.data.data;
} }
}, },
async submitForm() { async submitForm() {
let result; let result;
this.formData['file_batch_id'] = this.file_batch_id;
if (this.$route.params.Item) { if (this.$route.params.Item) {
result = await ApiService.put(urls.updateItem(this.$route.params.Item), this.formData); result = await ApiService.put(urls.updateItem(this.$route.params.Item), this.formData);
} else { } else {
result = await ApiService.post(urls.storeItem, this.formData); result = await ApiService.post(urls.storeItem, this.formData);
} }
if (result && result.status == 200) { if (result && result.status == 200) {
this.$router.push({name: 'AllItem'}) this.$router.push({ name: 'AllItem' })
} }
}, },
} }
}; };
</script> </script>
<style>
.w-100 {
width: 100%;
}
</style>
+101 -92
View File
@@ -5,43 +5,22 @@
<v-layout align-center wrap class="my-3 px-5"> <v-layout align-center wrap class="my-3 px-5">
<v-flex xs12 md3 sm3 class="WM-FlexCenter"> <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-icon>
<v-text-field <v-text-field class="py-3 pr-3" v-model="filter.item_id" label="Item ID"
class="py-3 pr-3" color="black"></v-text-field>
v-model="filter.item_id"
label="Item ID"
color="black"
></v-text-field>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <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-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field <v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"></v-text-field>
class="py-3 pr-3"
v-model="filter.name"
label="Name"
color="black"
></v-text-field>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')"> <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-icon>
<v-autocomplete <v-autocomplete class="py-3 pr-3" v-model="filter.medical_center_id" item-text="name"
class="py-3 pr-3" item-value="id" label="Hospital" color="black" :items="medicalCenters"
v-model="filter.medical_center_id" :clearable="true"></v-autocomplete>
item-text="name" </v-flex>
item-value="id"
label="Hospital"
color="black"
:items="medicalCenters"
:clearable="true"
></v-autocomplete>
</v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <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-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
<v-text-field <v-text-field class="py-3 pr-3" v-model="filter.size" label="Size" color="black"></v-text-field>
class="py-3 pr-3"
v-model="filter.size"
label="Size"
color="black"
></v-text-field>
</v-flex> </v-flex>
<v-flex class xs12 md2 sm3> <v-flex class xs12 md2 sm3>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()"> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()">
@@ -51,7 +30,7 @@
</v-flex> </v-flex>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-flex xs12 md2 sm2 class="text-xs-right"> <v-flex xs12 md2 sm2 class="text-xs-right">
<router-link :to="{name: 'AddItem'}"> <router-link :to="{ name: 'AddItem' }">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon> <v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
<span class="black--text CSSD-font">Add</span> <span class="black--text CSSD-font">Add</span>
@@ -66,66 +45,71 @@
<v-flex md12> <v-flex md12>
<v-data-table :headers="headers" :items="items" hide-actions> <v-data-table :headers="headers" :items="items" hide-actions>
<template slot="headerCell" slot-scope="{ header }"> <template slot="headerCell" slot-scope="{ header }">
<span <span class="subheading font-weight-light text-white text--darken-3" v-text="header.text" />
class="subheading font-weight-light text-white text--darken-3"
v-text="header.text"
/>
</template> </template>
<template slot="items" slot-scope="{ item }"> <template slot="items" slot-scope="{ item }">
<td class="title font-weight-light">{{ item.id }}</td> <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.unique_id }}</td> -->
<td class="title font-weight-light">{{ item.name }}</td> <td class="title font-weight-light">{{ item.name }}</td>
<td <td class="title font-weight-light">{{ (item.user && item.user.medical_center) ?
class="title font-weight-light" item.user.medical_center.name : '' }}</td>
>{{ (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.size }}</td> <td class="title font-weight-light">{{ item.size }}</td>
<td class="text-xs-right FlexBtn Height-MD-60"> <td class="text-xs-right FlexBtn Height-MD-60">
<v-tooltip bottom open-on-hover v-if="$hasRole('Supervisor|Admin')">
<template v-slot:activator="{ on, attrs }">
<v-btn :color="item.status ? 'red' : 'green'" class="mr-2"
@click="changeStatus(item.id)" v-bind="attrs" v-on="on">
<v-icon class="white--text mr-1 caption">fas {{ item.status ? 'fa-close' :
'fa-check' }}</v-icon>
<span>{{ item.status ? 'reject' : 'approve' }}</span>
</v-btn>
</template>
<span>{{ item.status ? 'reject' : 'approve' }}</span>
</v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2" @click="show(item.id)"> <v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2"
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon> @click="show(item.id)">
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
<span>Show</span>
</v-btn>
</template>
<span>Show</span> <span>Show</span>
</v-btn>
</template>
<span>Show</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<router-link class="LinkBtn" <router-link class="LinkBtn"
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" v-if="$hasRole('Admin') || item.user_id == $store.state.user.id"
:to="{name: 'EditItem', params: {Item: item.id}}" :to="{ name: 'EditItem', params: { Item: item.id } }">
> <v-btn v-bind="attrs" v-on="on" color="orange" class="mr-2">
<v-btn v-bind="attrs" v-on="on" color="orange" class="mr-2"> <v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon> <span>Edit</span>
<span>Edit</span> </v-btn>
</v-btn> </router-link>
</router-link> </template>
</template> <span>Edit</span>
<span>Edit</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn <v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
v-bind="attrs" v-on="on" @click="remove(item.id)"
color="pink" v-if="$hasRole('Admin') || item.user_id == $store.state.user.id">
class="WM-ActionButton mr-2" <v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
@click="remove(item.id)" <span>Remove</span>
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" </v-btn>
> </template>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
<span>Remove</span> <span>Remove</span>
</v-btn>
</template>
<span>Remove</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn class="mr-2" v-bind="attrs" v-on="on" color="orange darken-1" @click="generateBarcode(item.id, 'Item')"> <v-btn class="mr-2" v-bind="attrs" v-on="on" color="orange darken-1"
<v-icon class="white--text mr-2 caption">fas fa-barcode</v-icon> @click="generateBarcode(item, 'Item')">
<span class="CSSD-font">Generate Barcode</span> <v-icon class="white--text mr-2 caption">fas fa-barcode</v-icon>
</v-btn> <span class="CSSD-font">Generate Barcode</span>
</template> </v-btn>
<span>Generate Barcode</span> </template>
<span>Generate Barcode</span>
</v-tooltip> </v-tooltip>
</td> </td>
</template> </template>
@@ -172,10 +156,15 @@ export default {
value: "name" value: "name"
}, },
{ {
sortable: true, sortable: true,
text: "Hospital", text: "Hospital",
value: "Hospital" value: "Hospital"
}, },
{
sortable: false,
text: "UDI",
value: "udi"
},
{ {
sortable: false, sortable: false,
text: "Size", text: "Size",
@@ -191,8 +180,8 @@ export default {
filter: { filter: {
name: '', name: '',
size: '', size: '',
item_id : '', item_id: '',
medical_center_id : '' medical_center_id: ''
}, },
items: [], items: [],
currentPage: 1, currentPage: 1,
@@ -223,12 +212,13 @@ export default {
} }
this.loadMedicalCenters(); this.loadMedicalCenters();
}, },
async generateBarcode(code, type = null) { async generateBarcode(item, type = null) {
let code = item.udi ? item.udi : item.id;
const result = await ApiService.post(urls.Barcode(code, type)); const result = await ApiService.post(urls.Barcode(code, type));
if (result && result.status == 200) { if (result && result.status == 200) {
this.changeCurrentModal({ this.changeCurrentModal({
modal: "modal-barcode-barcode", modal: "modal-barcode-barcode",
properties: { result }, properties: { result, item },
}); });
} }
}, },
@@ -258,12 +248,28 @@ export default {
} }
} }
}, },
async changeStatus(id) {
const result = await ApiService.post(
urls.changeItemStatus(id)
);
if (result) {
for (const key in this.items) {
if (
this.items.hasOwnProperty(key) &&
this.items[key].id == id
) {
this.items[key].status = result.data.data.status;
}
}
}
},
async loadMedicalCenters() { async loadMedicalCenters() {
const result = await ApiService.get(urls.listFilterItemsTestResult); const result = await ApiService.get(urls.listFilterItemsTestResult);
if (result && result.status == 200) { if (result && result.status == 200) {
this.medicalCenters = result.data.data.MedicalCenters; this.medicalCenters = result.data.data.MedicalCenters;
} }
}, },
}, },
watch: { watch: {
currentPage(page) { currentPage(page) {
@@ -274,12 +280,15 @@ export default {
</script> </script>
<style> <style>
.v-btn--floating { .v-btn--floating {
padding: 0!important; padding: 0 !important;
} }
.theme--light.v-btn.v-btn--flat { .theme--light.v-btn.v-btn--flat {
color: rgba(0,0,0,.87)!important; color: rgba(0, 0, 0, .87) !important;
} }
.v-btn--floating, .v-btn--icon:before {
border-radius: 50%!important; .v-btn--floating,
.v-btn--icon:before {
border-radius: 50% !important;
} }
</style> </style>
@@ -51,7 +51,7 @@
> >
<template v-if="item.status == 'Active'"> <template v-if="item.status == 'Active'">
<v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon> <v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon>
<span v-if="item.status == 'Active'">Susspended</span> <span v-if="item.status == 'Active'">Suspended</span>
</template> </template>
<template v-else> <template v-else>
<v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon> <v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon>
+25 -46
View File
@@ -4,15 +4,14 @@
<material-card color="black" title="Add Package"> <material-card color="black" title="Add Package">
<v-layout wrap class="px-5 my-3"> <v-layout wrap class="px-5 my-3">
<v-flex xs12 md3 sm3 class="WM-FlexCenter"> <v-flex xs12 md3 sm3 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field <v-text-field name="name" label="Name" color="black" v-model="formData.name"
name="name" :rules="[rules.required, rules.counter]" class="py-3 pr-3"></v-text-field>
label="Name" </v-flex>
color="black" <v-flex xs12 md3 sm3 class="WM-FlexCenter">
v-model="formData.name" <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
:rules="[rules.required, rules.counter]" <v-text-field name="UDI" label="UDI" color="black" v-model="formData.udi" :rules="[rules.required]"
class="py-3 pr-3" class="py-3 pr-3"></v-text-field>
></v-text-field>
</v-flex> </v-flex>
<!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter"> <!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
@@ -27,46 +26,25 @@
</v-flex> --> </v-flex> -->
<v-flex xs12 md12 sm12></v-flex> <v-flex xs12 md12 sm12></v-flex>
<!-- <v-row style="position: relative" v-for="(item, key) in formData.items" :key="key"> --> <!-- <v-row style="position: relative" v-for="(item, key) in formData.items" :key="key"> -->
<v-flex xs12 md3 sm3 class="WM-FlexCenter WM-DuplicateInput" style="position: relative" v-for="(item, key) in formData.items" :key="key"> <v-flex xs12 md3 sm3 class="WM-FlexCenter WM-DuplicateInput" style="position: relative"
<div class="Inner"> v-for="(item, key) in formData.items" :key="key">
<div class="Inner">
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon>
<v-autocomplete <v-autocomplete class="py-3 pr-3" :items="items" item-text="name" v-model="item.id"
item-value="id" label="Select Items For Package" color="black"></v-autocomplete>
class="py-3 pr-3" <v-btn absolute small right bottom color="cyan" @click="duplicateForm(key)">
:items="items" <v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>ADD
item-text="name" </v-btn>
v-model="item.id" <v-btn v-if="key > 0" absolute small right top color="pink" @click="removeForm(key)">
item-value="id" <v-icon class="white--text mr-2 caption">fas fa-remove</v-icon>REMOVE
label="Select Items For Package" </v-btn>
color="black"
></v-autocomplete>
<v-btn
absolute
small
right
bottom
color="cyan"
@click="duplicateForm(key)"
>
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>ADD
</v-btn>
<v-btn v-if="key > 0"
absolute
small
right
top
color="pink"
@click="removeForm(key)"
>
<v-icon class="white--text mr-2 caption">fas fa-remove</v-icon>REMOVE
</v-btn>
</div> </div>
</v-flex> </v-flex>
<!-- </v-row> --> <!-- </v-row> -->
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-flex xs12> <v-flex xs12>
<hr class="v-divider theme--light" style="margin-top:30px !important"> <hr class="v-divider theme--light" style="margin-top:30px !important">
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout align-center justify-center wrap class="px-5 mb-3"> <v-layout align-center justify-center wrap class="px-5 mb-3">
@@ -86,7 +64,7 @@
</v-btn> </v-btn>
</v-flex> </v-flex>
<v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center"> <v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center">
<router-link :to="{name: 'AllPackage'}"> <router-link :to="{ name: 'AllPackage' }">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text">keyboard_arrow_left</v-icon> <v-icon class="black--text">keyboard_arrow_left</v-icon>
<span class="black--text">Back</span> <span class="black--text">Back</span>
@@ -112,7 +90,7 @@ export default {
note: "", note: "",
items: [ items: [
{ {
name:'' name: ''
} }
] ]
}, },
@@ -182,10 +160,11 @@ export default {
.WM-DuplicateInput { .WM-DuplicateInput {
margin: 15px 0; margin: 15px 0;
} }
.WM-DuplicateInput .Inner { .WM-DuplicateInput .Inner {
padding: 15px 20px !important; padding: 15px 20px !important;
margin: 0 10px 0 0; margin: 0 10px 0 0;
width: 100%; width: 100%;
border: 1px solid rgba(0,0,0,.2); border: 1px solid rgba(0, 0, 0, .2);
} }
</style> </style>
+66 -82
View File
@@ -5,34 +5,18 @@
<v-layout align-center wrap class="mt-3 px-5"> <v-layout align-center wrap class="mt-3 px-5">
<v-flex xs12 md3 sm3 class="WM-FlexCenter"> <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-icon>
<v-text-field <v-text-field class="py-3 pr-3" v-model="filter.package_id" label="Package ID"
class="py-3 pr-3" color="black"></v-text-field>
v-model="filter.package_id"
label="Package ID"
color="black"
></v-text-field>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <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-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field <v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"></v-text-field>
class="py-3 pr-3"
v-model="filter.name"
label="Name"
color="black"
></v-text-field>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')"> <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-icon>
<v-autocomplete <v-autocomplete class="py-3 pr-3" v-model="filter.medical_center_id" item-text="name"
class="py-3 pr-3" item-value="id" label="Hospital" color="black" :items="medicalCenters"
v-model="filter.medical_center_id" :clearable="true"></v-autocomplete>
item-text="name"
item-value="id"
label="Hospital"
color="black"
:items="medicalCenters"
:clearable="true"
></v-autocomplete>
</v-flex> </v-flex>
<!-- <v-flex class xs12 md2 sm3> <!-- <v-flex class xs12 md2 sm3>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()"> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()">
@@ -53,7 +37,7 @@
</v-flex> </v-flex>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-flex xs12 md2 sm2 class="text-xs-right ml-3"> <v-flex xs12 md2 sm2 class="text-xs-right ml-3">
<router-link :to="{name: 'AddPackage'}"> <router-link :to="{ name: 'AddPackage' }">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon> <v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
<span class="black--text">Add</span> <span class="black--text">Add</span>
@@ -68,68 +52,61 @@
<v-flex md12> <v-flex md12>
<v-data-table :headers="headers" :items="items" hide-actions> <v-data-table :headers="headers" :items="items" hide-actions>
<template slot="headerCell" slot-scope="{ header }"> <template slot="headerCell" slot-scope="{ header }">
<span <span class="subheading font-weight-light text-white text--darken-3" v-text="header.text" />
class="subheading font-weight-light text-white text--darken-3"
v-text="header.text"
/>
</template> </template>
<template slot="items" slot-scope="{ item }"> <template slot="items" slot-scope="{ item }">
<td class="title font-weight-light">{{ item.id }}</td> <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.unique_id }}</td> -->
<td class="title font-weight-light">{{ item.name }}</td> <td class="title font-weight-light">{{ item.name }}</td>
<td <td class="title font-weight-light">{{ (item.user && item.user.medical_center) ?
class="title font-weight-light" item.user.medical_center.name : '' }}</td>
>{{ (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.user ? item.user.name : '' }}</td>
<td class="title font-weight-light">{{ item.udi }}</td>
<td class="title font-weight-light">{{ item.description }}</td> <td class="title font-weight-light">{{ item.description }}</td>
<td class="text-xs-right FlexBtn Height-MD-60"> <td class="text-xs-right FlexBtn Height-MD-60">
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2" @click="show(item.id)"> <v-btn v-bind="attrs" v-on="on" color="cyan" class="mr-2"
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon> @click="show(item.id)">
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
<span>Show</span>
</v-btn>
</template>
<span>Show</span> <span>Show</span>
</v-btn>
</template>
<span>Show</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<router-link <router-link class="LinkBtn"
class="LinkBtn" v-if="$hasRole('Admin') || item.user_id == $store.state.user.id"
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" :to="{ name: 'EditPackage', params: { package: item.id } }">
:to="{name: 'EditPackage', params: {package: item.id}}" <v-btn v-bind="attrs" v-on="on" color="orange" class="mr-2">
> <v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
<v-btn v-bind="attrs" v-on="on" color="orange" class="mr-2"> <span>Edit</span>
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon> </v-btn>
<span>Edit</span> </router-link>
</v-btn> </template>
</router-link> <span>Edit</span>
</template>
<span>Edit</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn <v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
v-bind="attrs" v-on="on" @click="remove(item.id)"
color="pink" v-if="$hasRole('Admin') || item.user_id == $store.state.user.id">
class="WM-ActionButton mr-2" <v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
@click="remove(item.id)" <span>Remove</span>
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" </v-btn>
> </template>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
<span>Remove</span> <span>Remove</span>
</v-btn>
</template>
<span>Remove</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn class="mr-2" v-bind="attrs" v-on="on" color="orange darken-1" @click="generateBarcode(item.id, 'Package')"> <v-btn class="mr-2" v-bind="attrs" v-on="on" color="orange darken-1"
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon> @click="generateBarcode(item.id, 'Package')">
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
<span>Generate Barcode</span>
</v-btn>
</template>
<span>Generate Barcode</span> <span>Generate Barcode</span>
</v-btn>
</template>
<span>Generate Barcode</span>
</v-tooltip> </v-tooltip>
</td> </td>
</template> </template>
@@ -176,15 +153,19 @@ export default {
value: "name" value: "name"
}, },
{ {
sortable: true, sortable: true,
text: "Hospital", text: "Hospital",
value: "Hospital" value: "Hospital"
}, },
{ {
sortable: true, sortable: true,
text: "User", text: "User",
value: "User" value: "User"
}, },
{
text: "UDI",
value: "udi"
},
{ {
sortable: true, sortable: true,
text: "Description", text: "Description",
@@ -199,8 +180,8 @@ export default {
], ],
filter: { filter: {
name: '', name: '',
package_id : '', package_id: '',
medical_center_id : '' medical_center_id: ''
}, },
result: ['Pass', 'Fail'], result: ['Pass', 'Fail'],
items: [], items: [],
@@ -267,10 +248,10 @@ export default {
} }
}, },
async loadMedicalCenters() { async loadMedicalCenters() {
const result = await ApiService.get(urls.listFilterItemsTestResult); const result = await ApiService.get(urls.listFilterItemsTestResult);
if (result && result.status == 200) { if (result && result.status == 200) {
this.medicalCenters = result.data.data.MedicalCenters; this.medicalCenters = result.data.data.MedicalCenters;
} }
}, },
}, },
computed: { computed: {
@@ -295,12 +276,15 @@ export default {
</script> </script>
<style> <style>
.v-btn--floating { .v-btn--floating {
padding: 0!important; padding: 0 !important;
} }
.theme--light.v-btn.v-btn--flat { .theme--light.v-btn.v-btn--flat {
color: rgba(0,0,0,.87)!important; color: rgba(0, 0, 0, .87) !important;
} }
.v-btn--floating, .v-btn--icon:before {
border-radius: 50%!important; .v-btn--floating,
.v-btn--icon:before {
border-radius: 50% !important;
} }
</style> </style>
+222 -260
View File
@@ -1,132 +1,60 @@
<template> <template>
<div class> <div class>
<v-container fluid> <v-container fluid>
<material-card class color="black" title="All Test Result" text> <material-card class color="black" title="All Test Result" text>
<v-layout align-center wrap class="px-5 mb-3 my-3"> <v-layout align-center wrap class="px-5 mb-3 my-3">
<v-flex xs12 md2 sm3 class="WM-FlexCenter"> <v-flex xs12 md2 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-icon>
<v-text-field <v-text-field class="py-3 pr-3" v-model="filter.device_id" label="ID" color="black"></v-text-field>
class="py-3 pr-3" </v-flex>
v-model="filter.device_id" <v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
label="ID" <v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
color="black" <v-autocomplete :items="deviceLabels" item-text="name" item-value="id" v-model="filter.device_label" label="ID Label" color="black" class="py-3 pr-3" :clearable="true"></v-autocomplete>
></v-text-field> </v-flex>
</v-flex> <v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
<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-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon> <v-autocomplete class="py-3 pr-3" v-model="filter.testType_id" label="TestType Name" color="black" :items="testTypes" item-text="name" item-value="id"></v-autocomplete>
<v-autocomplete </v-flex>
:items="deviceLabels" <v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
item-text="name" <v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"></v-icon>
item-value="id" <v-autocomplete class="py-3 pr-3" v-model="filter.medicalCenter_id" label="Hospital" color="black" :items="medicalCenters" item-text="name" item-value="id" :clearable="true"></v-autocomplete>
v-model="filter.device_label" </v-flex>
label="ID Label" <v-flex xs12 md2 sm3 class="WM-FlexCenter">
color="black" <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
class="py-3 pr-3" <v-text-field class="py-3 pr-3" v-model="filter.user_name" label="User Name" color="black"></v-text-field>
:clearable="true" </v-flex>
></v-autocomplete> <v-flex xs12 sm6 md2 pl-3 class="WM-FlexCenter">
</v-flex> <v-icon class="far fa-calendar-alt mr-2"></v-icon>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <v-menu lazy :close-on-content-click="true" transition="v-scale-transition" offset-y v-model="fromMenu">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-text-field class="py-3 pr-3" required slot="activator" label="FromDate" v-model="filter.fromPicker" color="black"></v-text-field>
<v-autocomplete <v-date-picker color="pink" no-title v-model="filter.fromPicker" :date-format="date => new Date(date).toDateString()"></v-date-picker>
class="py-3 pr-3" </v-menu>
v-model="filter.testType_id" </v-flex>
label="TestType Name" <v-flex xs12 sm6 md2 pl-3 style="display: flex;align-items: center;">
color="black" <v-icon class="far fa-calendar-alt mr-2"></v-icon>
:items="testTypes" <v-menu lazy :close-on-content-click="true" transition="v-scale-transition" offset-y v-model="upToMenu">
item-text="name" <v-text-field class="py-3 pr-3" required slot="activator" label="UpToDate" color="black" v-model="filter.upToPicker"></v-text-field>
item-value="id" <v-date-picker color="pink" no-title v-model="filter.upToPicker" :date-format="date => new Date(date).toDateString()"></v-date-picker>
></v-autocomplete> </v-menu>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <v-flex xs12 md3 sm3 class="WM-XL-Align-L text-lg-left">
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"></v-icon> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load(null, null)">
<v-autocomplete <v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
class="py-3 pr-3" <span class="white--text">Filter</span>
v-model="filter.medicalCenter_id" </v-btn>
label="Hospital" </v-flex>
color="black" <v-spacer></v-spacer>
:items="medicalCenters" <v-flex wrap xs12 md2 sm2 class="WM-Align-R">
item-text="name" <router-link :to="{name: 'SubmitTestResult'}">
item-value="id" <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
:clearable="true" <v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
></v-autocomplete> <span class="black--text">Add</span>
</v-flex>
<v-flex xs12 md2 sm3 class="WM-FlexCenter">
<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.user_name"
label="User Name"
color="black"
></v-text-field>
</v-flex>
<v-flex xs12 sm6 md2 pl-3 class="WM-FlexCenter">
<v-icon class="far fa-calendar-alt mr-2"></v-icon>
<v-menu
lazy
:close-on-content-click="true"
transition="v-scale-transition"
offset-y
v-model="fromMenu"
>
<v-text-field
class="py-3 pr-3"
required
slot="activator"
label="FromDate"
v-model="filter.fromPicker"
color="black"
></v-text-field>
<v-date-picker
color="pink"
no-title
v-model="filter.fromPicker"
:date-format="date => new Date(date).toDateString()"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs12 sm6 md2 pl-3 style="display: flex;align-items: center;">
<v-icon class="far fa-calendar-alt mr-2"></v-icon>
<v-menu
lazy
:close-on-content-click="true"
transition="v-scale-transition"
offset-y
v-model="upToMenu"
>
<v-text-field
class="py-3 pr-3"
required
slot="activator"
label="UpToDate"
color="black"
v-model="filter.upToPicker"
></v-text-field>
<v-date-picker
color="pink"
no-title
v-model="filter.upToPicker"
:date-format="date => new Date(date).toDateString()"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex class xs12 md3 sm3 class="WM-XL-Align-L text-lg-left">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load(null, null)">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span>
</v-btn> </v-btn>
</v-flex> </router-link>
<v-spacer></v-spacer> </v-flex>
<v-flex wrap xs12 md2 sm2 class="WM-Align-R"> </v-layout>
<router-link :to="{name: 'SubmitTestResult'}"> <v-layout wrap class="px-5 mb-3 my-3">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <!-- <v-flex class xs12 md3 sm3 class="WM-XL-Align-L text-lg-left">
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
<span class="black--text">Add</span>
</v-btn>
</router-link>
</v-flex>
</v-layout>
<v-layout wrap class="px-5 mb-3 my-3">
<!-- <v-flex class xs12 md3 sm3 class="WM-XL-Align-L text-lg-left">
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load(null, null)"> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load(null, null)">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon> <v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text">Filter</span> <span class="white--text">Filter</span>
@@ -141,131 +69,116 @@
</v-btn> </v-btn>
</router-link> </router-link>
</v-flex> --> </v-flex> -->
</v-layout> </v-layout>
<v-layout class="px-4 my-3"> <v-layout class="px-4 my-3">
<v-divider></v-divider> <v-divider></v-divider>
</v-layout> </v-layout>
<v-layout align-center wrap class="px-5 my-2"> <v-layout align-center wrap class="px-5 my-2">
<v-flex md12> <v-flex md12>
<v-data-table :headers="headers" :items="items" hide-actions> <v-data-table :headers="headers" :items="items" hide-actions>
<template slot="headerCell" slot-scope="{ header }"> <template slot="headerCell" slot-scope="{ header }">
<span <span class="subheading font-weight-light text-white text--darken-3" v-text="header.text" />
class="subheading font-weight-light text-white text--darken-3" </template>
v-text="header.text" <template slot="items" slot-scope="{ item }">
/> <td class="headline font-weight-light">{{ item.id }}</td>
</template> <td class="title font-weight-light">{{ item.test_type ? item.test_type.name : 'Archived Test' }}</td>
<template slot="items" slot-scope="{ item }"> <td class="title font-weight-light">{{ item.user.medical_center.name }}</td>
<td class="headline font-weight-light">{{ item.id }}</td> <td class="title font-weight-light">{{ item.user.name }}</td>
<td <td class="title font-weight-light">
class="title font-weight-light" <span v-if="item.result == 'Reject'" class="ResultMsg Reject">
>{{ item.test_type ? item.test_type.name : 'Archived Test' }}</td>
<td
class="title font-weight-light"
>{{ item.user.medical_center.name }}</td>
<td class="title font-weight-light">{{ item.user.name }}</td>
<td class="title font-weight-light">
<span v-if="item.result == 'Reject'" class="ResultMsg Reject">
{{ item.result }} {{ item.result }}
</span> </span>
<span v-else-if="item.result == 'Accept'" class="ResultMsg Accept"> <span v-else-if="item.result == 'Accept'" class="ResultMsg Accept">
{{ item.result }} {{ item.result }}
</span> </span>
</td> </td>
<td class="title font-weight-light">{{ item.created_at }}</td> <td class="title font-weight-light">{{ item.created_at }}</td>
<td class="title font-weight-light"> <td class="title font-weight-light">
<span v-if="item.verified == 'NotVerified'" class="NotVerified"> <span v-if="item.verified == 'NotVerified'" class="NotVerified">
<v-icon class="caption fa fa-times NotVerified"></v-icon> <v-icon class="caption fa fa-times NotVerified"></v-icon>
</span> </span>
<span v-if="item.verified == 'Verified'" class=""> <span v-if="item.verified == 'Verified'" class="">
<v-icon class="caption fa fa-check Verified"></v-icon> <v-icon class="caption fa fa-check Verified"></v-icon>
</span> </span>
<!-- {{ item.verified }} --> <!-- {{ item.verified }} -->
</td> </td>
<td class="text-xs-right FlexBtn"> <td class="text-xs-right FlexBtn">
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn color="cyan" class="mr-2" @click="show(item.id)" v-bind="attrs" <v-btn color="cyan" class="mr-2" @click="show(item.id)" v-bind="attrs" v-on="on">
v-on="on"> <v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon> <span>Show</span>
<span>Show</span> </v-btn>
</v-btn>
</template> </template>
<span>Show</span> <span>Show</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn color="orange" class="mr-2" @click="generateBarcode(item.id, 'TestResult')" v-bind="attrs" <v-btn color="orange" class="mr-2" @click="generateBarcode(item.id, 'TestResult')" v-bind="attrs" v-on="on">
v-on="on"> <v-icon class="white--text mr-1 caption">fa fa-bars</v-icon>
<v-icon class="white--text mr-1 caption">fa fa-bars</v-icon> <span>generate Barcode</span>
<span>generate Barcode</span> </v-btn>
</v-btn>
</template> </template>
<span>generate Barcode</span> <span>generate Barcode</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" --> <!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" -->
<router-link class="LinkBtn" <router-link class="LinkBtn" v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')" :to="{name: 'EditTestResult', params: {testResult: item.id}}">
v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')" <v-btn color="orange" class="mr-2" v-bind="attrs" v-on="on">
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
:to="{name: 'EditTestResult', params: {testResult: item.id}}" <span>Edit</span>
> </v-btn>
<v-btn color="orange" class="mr-2" v-bind="attrs" </router-link>
v-on="on">
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
<span>Edit</span>
</v-btn>
</router-link>
</template> </template>
<span>Edit</span> <span>Edit</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" --> <!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" -->
<v-btn <v-btn color="pink" class="WM-ActionButton" @click="remove(item.id)" v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')" v-bind="attrs" v-on="on">
color="pink" <v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
class="WM-ActionButton" <span>Remove</span>
@click="remove(item.id)" </v-btn>
v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')"
v-bind="attrs"
v-on="on"
>
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
<span>Remove</span>
</v-btn>
</template> </template>
<span>Remove</span> <span>Remove</span>
</v-tooltip> </v-tooltip>
</td> </td>
</template> </template>
</v-data-table> </v-data-table>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-divider></v-divider> <v-divider></v-divider>
<div class="text-xs-center mt-2" v-if="lastPage > 1"> <div class="text-xs-center mt-2" v-if="lastPage > 1">
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination> <v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
</div> </div>
<v-layout row wrap align-center justify-center class="mt-3"> <v-layout row wrap align-center justify-center class="mt-3">
<router-link to="/dashboard"> <router-link to="/dashboard">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5"> <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> <v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span> <span class="black--text">Back</span>
</v-btn> </v-btn>
</router-link> </router-link>
</v-layout> </v-layout>
</material-card> </material-card>
</v-container> </v-container>
</div> </div>
</template> </template>
<script> <script>
import { ApiService } from "@/services"; import {
import { urls } from "@/config/urls"; ApiService
import { mapMutations, mapGetters } from "vuex"; } from "@/services";
import {
urls
} from "@/config/urls";
import {
mapMutations,
mapGetters
} from "vuex";
export default { export default {
data: () => ({ data: () => ({
headers: [ headers: [{
{
sortable: false, sortable: false,
text: "ID", text: "ID",
value: "name" value: "name"
@@ -308,13 +221,13 @@ export default {
} }
], ],
filter: { filter: {
device_id:'', device_id: '',
testType_id: '', testType_id: '',
medicalCenter_id: '', medicalCenter_id: '',
user_name: '', user_name: '',
fromPicker: '', fromPicker: '',
upToPicker: '', upToPicker: '',
device_label:'' device_label: ''
}, },
fromMenu: '', fromMenu: '',
upToMenu: '', upToMenu: '',
@@ -323,19 +236,54 @@ export default {
lastPage: 1, lastPage: 1,
testTypes: [], testTypes: [],
medicalCenters: [], medicalCenters: [],
deviceLabels: [ deviceLabels: [{
{ name: "Washer ID", id: "Washer ID" }, name: "Washer ID",
{ name: "Autoclave ID", id: "Autoclave ID" }, id: "Washer ID"
{ name: "Sterilizer ID", id: "Sterilizer ID" }, },
{ name: "Seal Machine ID", id: "Seal Machine ID" }, {
{ name: "Patiant ID", id: "Patiant ID" }, name: "Autoclave ID",
{ name: "Set/Pack ID", id: "Set/Pack ID" }, id: "Autoclave ID"
{ name: "Medical Device ID", id: "Medical Device ID" }, },
{ name: "OR ID", id: "OR ID" }, {
{ name: "Personal ID", id: "Personal ID" }, name: "Sterilizer ID",
{ name: "Instrument ID", id: "Instrument ID" }, id: "Sterilizer ID"
{ name: "Basket ID", id: "Basket ID" }, },
{ name: "Implant ID", id: "Implant ID" }, {
name: "Seal Machine ID",
id: "Seal Machine ID"
},
{
name: "Patiant ID",
id: "Patiant ID"
},
{
name: "Set/Pack ID",
id: "Set/Pack ID"
},
{
name: "Medical Device ID",
id: "Medical Device ID"
},
{
name: "OR ID",
id: "OR ID"
},
{
name: "Personal ID",
id: "Personal ID"
},
{
name: "Instrument ID",
id: "Instrument ID"
},
{
name: "Basket ID",
id: "Basket ID"
},
{
name: "Implant ID",
id: "Implant ID"
},
] ]
}), }),
created() { created() {
@@ -375,7 +323,9 @@ export default {
if (result && result.status == 200) { if (result && result.status == 200) {
this.changeCurrentModal({ this.changeCurrentModal({
modal: "modal-testresult-show", modal: "modal-testresult-show",
properties: { result } properties: {
result
}
}); });
} }
}, },
@@ -402,11 +352,13 @@ export default {
} }
}, },
async generateBarcode(id, type) { async generateBarcode(id, type) {
const result = await ApiService.post(urls.Barcode(id, type)); const result = await ApiService.post(urls.Barcode(id, type));
if (result && result.status == 200) { if (result && result.status == 200) {
this.changeCurrentModal({ this.changeCurrentModal({
modal: "modal-barcode-barcode", modal: "modal-barcode-barcode",
properties: { result } properties: {
result
}
}); });
} }
} }
@@ -416,7 +368,12 @@ export default {
}, },
watch: { watch: {
currentPage(page) { currentPage(page) {
this.load(page); if (this.$route.name == "NotVerifyTestResult") {
this.load(page, "NotVerified,None");
} else {
this.load(page);
}
}, },
getModalResult(testResult) { getModalResult(testResult) {
for (const key in this.items) { for (const key in this.items) {
@@ -424,32 +381,38 @@ export default {
this.items.hasOwnProperty(key) && this.items.hasOwnProperty(key) &&
this.items[key].id == testResult.id this.items[key].id == testResult.id
) { ) {
this.items[key] = testResult; this.items[key].verified = testResult.verified;
} }
} }
} }
} }
}; };
</script> </script>
<style> <style>
.v-btn--floating { .v-btn--floating {
padding: 0!important; padding: 0 !important;
} }
.theme--light.v-btn.v-btn--flat { .theme--light.v-btn.v-btn--flat {
color: rgba(0,0,0,.87)!important; color: rgba(0, 0, 0, .87) !important;
} }
.v-btn--floating, .v-btn--icon:before {
border-radius: 50%!important; .v-btn--floating,
.v-btn--icon:before {
border-radius: 50% !important;
} }
/* -------------------------------------------------------- /* --------------------------------------------------------
Tables :: Begin Tables :: Begin
-------------------------------------------------------- */ -------------------------------------------------------- */
@media screen and (max-width: 1536px) { @media screen and (max-width: 1536px) {
.v-card .title { .v-card .title {
font-size: 0.9rem !important; font-size: 0.9rem !important;
} }
} }
/* .FlexBtn { /* .FlexBtn {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
@@ -481,5 +444,4 @@ td.FlexBtn .theme--light.v-icon {
margin-right: 0 !important; margin-right: 0 !important;
} }
} */ } */
</style> </style>
+3 -3
View File
@@ -137,14 +137,14 @@
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn <v-btn
v-bind="attrs" v-on="on" v-bind="attrs" v-on="on"
:color="item.status == 'Active' ? 'red' : 'green'" :color="item.status == 'Active' ? 'green' : 'red'"
@click="changeStatus(item.id)" @click="changeStatus(item.id)"
class="mr-2 WM-ActionButton" class="mr-2 WM-ActionButton"
v-if="$hasRole('Admin|Supervisor')" v-if="$hasRole('Admin|Supervisor')"
> >
<template v-if="item.status == 'Active'"> <template v-if="item.status == 'Active'">
<v-icon class="white--text mr-2 caption">fa fa-pause</v-icon> <v-icon class="white--text mr-2 caption">fa fa-pause</v-icon>
<span v-if="item.status == 'Active'">Susspended</span> <span v-if="item.status == 'Active'">Suspended</span>
</template> </template>
<template v-else> <template v-else>
<v-icon class="white--text mr-2 caption">fa fa-pause</v-icon> <v-icon class="white--text mr-2 caption">fa fa-pause</v-icon>
@@ -152,7 +152,7 @@
</template> </template>
</v-btn> </v-btn>
</template> </template>
<span v-if="item.status == 'Active'">Susspended</span> <span v-if="item.status == 'Active'">Suspended</span>
<span v-else>Active</span> <span v-else>Active</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover> <v-tooltip bottom open-on-hover>