mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-13 23:33:16 +03:30
fix : verify test result
This commit is contained in:
@@ -211,7 +211,7 @@ export default {
|
||||
text: 'packages that you posses',
|
||||
// image: '/img/Static/Dashboard/alltest.png',
|
||||
color: 'WM-LightGray-BG',
|
||||
route: {name: 'MyItem'},
|
||||
route: {name: 'MyPackage'},
|
||||
aligntext: 'text-md-left',
|
||||
alignimg: 'text-md-right',
|
||||
column: 'xs12 md4 sm4',
|
||||
|
||||
+44
-43
@@ -1,51 +1,52 @@
|
||||
<template>
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Items" text>
|
||||
<v-layout align-center wrap class="px-3">
|
||||
<v-flex xs12 sm4 md4 lg2 xl1 class="WM-FlexCenter">
|
||||
<material-card class color="black" text title="All Items">
|
||||
<v-layout align-center class="px-3" wrap>
|
||||
<!-- <v-flex xs12 sm4 md4 lg2 xl1 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.item_id" label="Item ID"
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
</v-flex>-->
|
||||
<v-flex class="WM-FlexCenter" lg2 md3 sm3 xl1 xs12>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.name" label="Name" color="black"/>
|
||||
<v-text-field v-model="filter.udi" class="pt-3 pr-3" color="black" label="UDI"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.user_name" label="Owner" color="black"/>
|
||||
<v-text-field v-model="filter.name" class="pt-3 pr-3" color="black" label="Name"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter" v-if="$hasRole('Admin')">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field v-model="filter.user_name" class="pt-3 pr-3" color="black" label="Owner"/>
|
||||
</v-flex>
|
||||
<v-flex v-if="$hasRole('Admin')" class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
||||
<v-autocomplete class="pt-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 v-model="filter.medical_center_id" :clearable="true" :items="medicalCenters"
|
||||
class="pt-3 pr-3" color="black" item-text="name" item-value="id"
|
||||
label="Hospital"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm3 md3 lg2 xl1 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg2 md3 sm3 xl1 xs12>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.size" label="Size" color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm3 md3 lg2 xl1 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.udi" label="UDI" color="black"/>
|
||||
<v-text-field v-model="filter.size" class="pt-3 pr-3" color="black" label="Size"/>
|
||||
</v-flex>
|
||||
|
||||
<!--btn-->
|
||||
<v-spacer/>
|
||||
<v-flex xs12 sm6 md6 lg12 xl3 class="WM-Align-R">
|
||||
<v-flex class="WM-Align-R" lg12 md6 sm6 xl3 xs12>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on"
|
||||
color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2"
|
||||
@click="load()">
|
||||
<v-btn color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2" v-bind="attrs"
|
||||
@click="load()"
|
||||
v-on="on">
|
||||
<v-icon class="black--text caption">fas fa-search</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Filter</span>
|
||||
</v-tooltip>
|
||||
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" @click="download()"
|
||||
style="padding: 10px 30px;">
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" style="padding: 10px 30px;"
|
||||
@click="download()">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>
|
||||
@@ -61,7 +62,7 @@
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-layout align-center class="my-3 px-3" wrap>
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -87,7 +88,7 @@
|
||||
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-bind="attrs" @click="changeStatus(item, status.status)"
|
||||
v-on="on">
|
||||
<v-icon :class="`${status.font_color}--text mr-1 caption`">
|
||||
fas {{ status.icon }}
|
||||
@@ -100,8 +101,8 @@
|
||||
</template>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="light-gray" class="mr-2"
|
||||
@click="show(item.id)">
|
||||
<v-btn class="mr-2" color="light-gray" v-bind="attrs" @click="show(item.id)"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>Show</span>
|
||||
</v-btn>
|
||||
@@ -110,8 +111,8 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="mr-2" v-bind="attrs" v-on="on" color="light-gray"
|
||||
@click="generateBarcode(item, 'Item')">
|
||||
<v-btn class="mr-2" color="light-gray" v-bind="attrs" @click="generateBarcode(item, 'Item')"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-barcode</v-icon>
|
||||
<span class="CSSD-font">Generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -120,9 +121,9 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="mr-2" v-bind="attrs" v-on="on" color="light-gray"
|
||||
v-if="($hasRole('Admin|Supervisor') || item.user_id == $store.state.user.id) && !(item.package_id) && item.status ==='approved'"
|
||||
@click="transfer(item)">
|
||||
<v-btn v-if="($hasRole('Admin|Supervisor') || item.user_id == $store.state.user.id) && !(item.package_id) && item.status ==='approved'" class="mr-2" color="light-gray" v-bind="attrs"
|
||||
@click="transfer(item)"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-exchange-alt</v-icon>
|
||||
<span class="CSSD-font">Transfer</span>
|
||||
</v-btn>
|
||||
@@ -131,10 +132,10 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<router-link class="LinkBtn"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))"
|
||||
:to="{ name: 'EditItem', params: { Item: item.id } }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="black" class="mr-2">
|
||||
<router-link v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))"
|
||||
:to="{ name: 'EditItem', params: { Item: item.id } }"
|
||||
class="LinkBtn">
|
||||
<v-btn class="mr-2" color="black" v-bind="attrs" v-on="on">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
@@ -144,9 +145,9 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="red" class="WM-ActionButton mr-2"
|
||||
<v-btn v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))" class="WM-ActionButton mr-2" color="red" v-bind="attrs"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
v-on="on">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
@@ -159,11 +160,11 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider/>
|
||||
<div class="text-xs-center" v-if="lastPage > 1">
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
<div v-if="lastPage > 1" class="text-xs-center">
|
||||
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6"
|
||||
color="black"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
<v-layout align-center class="mt-3 px-3" justify-center row wrap>
|
||||
<router-link to="/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>
|
||||
|
||||
+37
-36
@@ -1,29 +1,29 @@
|
||||
<template>
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs fluid>
|
||||
<v-container fluid grid-list-xs>
|
||||
<material-card color="black" title="Add Label on Set ">
|
||||
<v-layout wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter pl-3">
|
||||
<v-layout class="px-3 my-3" wrap>
|
||||
<v-flex class="WM-FlexCenter pl-3" lg3 md4 sm6 xs12>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field name="sterilizerId" label="Sterilizer ID" color="black"
|
||||
v-model="formData.sterilizer_id" class="py-3 pr-3"/>
|
||||
<v-text-field v-model="formData.sterilizer_id" class="py-3 pr-3" color="black"
|
||||
label="Sterilizer ID" name="sterilizerId"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter pl-3">
|
||||
<v-flex class="WM-FlexCenter pl-3" lg3 md4 sm6 xs12>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field name="cycle_number" label="Preferred Cycle Number" color="black"
|
||||
v-model="formData.cycle_number"
|
||||
class="py-3 pr-3"/>
|
||||
<v-text-field v-model="formData.cycle_number" class="py-3 pr-3" color="black"
|
||||
label="Preferred Cycle Number"
|
||||
name="cycle_number"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter pl-3">
|
||||
<v-flex class="WM-FlexCenter pl-3" lg3 md4 sm6 xs12>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field name="lot_number" label="Lot Number" color="black" readonly v-model="lotNumber"
|
||||
class="py-3 pr-3"/>
|
||||
<v-text-field v-model="lotNumber" class="py-3 pr-3" color="black" label="Lot Number" name="lot_number"
|
||||
readonly/>
|
||||
</v-flex>
|
||||
<v-spacer/>
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm6 xs12>
|
||||
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"/>
|
||||
<v-autocomplete color="black" :items="items" item-text="name" v-model="formData.package_id"
|
||||
item-value="id" label="Package ID" class="py-3 pr-3" :filter="customFilter">
|
||||
<v-autocomplete v-model="formData.package_id" :filter="customFilter" :items="items" class="py-3 pr-3"
|
||||
color="black" item-text="name" item-value="id" label="Package ID">
|
||||
<template v-slot:chip="{ item }">
|
||||
{{ item.name }} - {{ item.id }}
|
||||
</template>
|
||||
@@ -33,31 +33,31 @@
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter pl-3">
|
||||
<v-flex class="WM-FlexCenter pl-3" lg3 md4 sm6 xs12>
|
||||
<v-icon class="far fa-calendar-alt mr-2"/>
|
||||
<v-menu lazy :close-on-content-click="true" transition="v-scale-transition" offset-y
|
||||
v-model="fromMenuSterile" style="width: 100%">
|
||||
<v-text-field required slot="activator" label="Sterile Date" color="black" class="pr-3"
|
||||
v-model="formData.sterile_date"/>
|
||||
<v-date-picker color="pink" :min="today" no-title v-model="formData.sterile_date"
|
||||
:date-format="date => new Date(date).toDateString()"/>
|
||||
<v-menu v-model="fromMenuSterile" :close-on-content-click="true" lazy offset-y
|
||||
style="width: 100%" transition="v-scale-transition">
|
||||
<v-text-field slot="activator" v-model="formData.sterile_date" class="pr-3" color="black" label="Sterile Date"
|
||||
required/>
|
||||
<v-date-picker v-model="formData.sterile_date" :date-format="date => new Date(date).toDateString()" :min="today" color="pink"
|
||||
no-title/>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter pl-3">
|
||||
<v-flex class="WM-FlexCenter pl-3" lg3 md4 sm6 xs12>
|
||||
<v-icon class="far fa-calendar-alt mr-2"/>
|
||||
<v-menu lazy :close-on-content-click="true" transition="v-scale-transition" offset-y
|
||||
v-model="fromMenuExpire" style="width: 100%">
|
||||
<v-text-field required slot="activator" label="Expire Date" color="black" class="pr-3"
|
||||
v-model="formData.expire_date"/>
|
||||
<v-date-picker :show-current="showCurrent" :min="formData.sterile_date" color="pink"
|
||||
no-title
|
||||
v-model="formData.expire_date"
|
||||
:date-format="date => new Date(date).toDateString()"/>
|
||||
<v-menu v-model="fromMenuExpire" :close-on-content-click="true" lazy offset-y
|
||||
style="width: 100%" transition="v-scale-transition">
|
||||
<v-text-field slot="activator" v-model="formData.expire_date" class="pr-3" color="black" label="Expire Date"
|
||||
required/>
|
||||
<v-date-picker v-model="formData.expire_date" :date-format="date => new Date(date).toDateString()" :min="formData.sterile_date"
|
||||
:show-current="showCurrent"
|
||||
color="pink"
|
||||
no-title/>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap justify-center align-center class="px-3">
|
||||
<v-layout align-center class="px-3" justify-center row wrap>
|
||||
|
||||
<router-link :to="{ name: 'AllLabels' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
@@ -133,9 +133,9 @@ export default {
|
||||
},
|
||||
async load(id) {
|
||||
const result = await ApiService.get(urls.editLabel(id));
|
||||
if (result && result.status == 200) {
|
||||
if (result && result.status === 200) {
|
||||
this.formData = result.data.data;
|
||||
|
||||
console.log()
|
||||
const existingIds = this.items.map(i => i.id);
|
||||
if (!existingIds.includes(this.formData.package_id)) {
|
||||
this.items.push(this.formData.package);
|
||||
@@ -145,11 +145,12 @@ export default {
|
||||
},
|
||||
async loadItems() {
|
||||
const result = await ApiService.get(urls.listAllPackage());
|
||||
if (result && result.status == 200) {
|
||||
if (result && result.status === 200) {
|
||||
this.items = result.data.data;
|
||||
}
|
||||
if (this.$route.query.packageId) {
|
||||
this.formData.package_id = this.items.find((i) => i.id == this.$route.query.packageId);
|
||||
const p = this.items.find((i) => i.id == this.$route.query.packageId);
|
||||
this.formData.package_id = p?.id;
|
||||
if (!this.formData.package_id) {
|
||||
toast.error('package is not in the list');
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
</template>
|
||||
<span>Filter</span>
|
||||
</v-tooltip>
|
||||
|
||||
<!--
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" style="padding: 10px 30px;">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>-->
|
||||
|
||||
<router-link :to="{ name: 'AddLabel' }">
|
||||
<v-btn class="WM-CyanBlueGradient-BG WM-Margin-BT-0" style="padding:10px 30px">
|
||||
|
||||
+39
-38
@@ -1,39 +1,39 @@
|
||||
<template>
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="My Items" text>
|
||||
<v-layout align-center wrap class="px-3">
|
||||
<v-flex xs12 sm4 md4 lg2 xl1 class="WM-FlexCenter">
|
||||
<material-card class color="black" text title="My Items">
|
||||
<v-layout align-center class="px-3" wrap>
|
||||
<!-- <v-flex xs12 sm4 md4 lg2 xl1 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.item_id" label="Item ID"
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
</v-flex>-->
|
||||
<v-flex class="WM-FlexCenter" lg2 md3 sm4 xl1 xs12>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.name" label="Name" color="black"/>
|
||||
<v-text-field v-model="filter.udi" class="pt-3 pr-3" color="black" label="UDI"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter" v-if="$hasRole('Admin')">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field v-model="filter.name" class="pt-3 pr-3" color="black" label="Name"/>
|
||||
</v-flex>
|
||||
<v-flex v-if="$hasRole('Admin')" class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
||||
<v-autocomplete class="pt-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 v-model="filter.medical_center_id" :clearable="true" :items="medicalCenters"
|
||||
class="pt-3 pr-3" color="black" item-text="name" item-value="id"
|
||||
label="Hospital"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg2 xl1 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg2 md4 sm4 xl1 xs12>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.size" label="Size" color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md3 lg2 xl1 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.udi" label="UDI" color="black"/>
|
||||
<v-text-field v-model="filter.size" class="pt-3 pr-3" color="black" label="Size"/>
|
||||
</v-flex>
|
||||
<!--btn-->
|
||||
<v-spacer/>
|
||||
<v-flex xs12 sm6 md6 lg2 xl3 class="WM-Align-R">
|
||||
<v-flex class="WM-Align-R" lg2 md6 sm6 xl3 xs12>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on"
|
||||
color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2"
|
||||
@click="load()">
|
||||
<v-btn color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2" v-bind="attrs"
|
||||
@click="load()"
|
||||
v-on="on">
|
||||
<v-icon class="black--text caption">fas fa-search</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
@@ -56,7 +56,7 @@
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-3" v-if="getMyItems">
|
||||
<v-layout v-if="getMyItems" align-center class="my-3 px-3" wrap>
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="getMyItems" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -80,7 +80,7 @@
|
||||
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-bind="attrs" @click="changeStatus(item, status.status)"
|
||||
v-on="on">
|
||||
<v-icon :class="`${status.font_color}--text mr-1 caption`">
|
||||
fas {{ status.icon }}
|
||||
@@ -93,8 +93,8 @@
|
||||
</template>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="light-gray" class="mr-2"
|
||||
@click="show(item.id)">
|
||||
<v-btn class="mr-2" color="light-gray" v-bind="attrs" @click="show(item.id)"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>Show</span>
|
||||
</v-btn>
|
||||
@@ -103,8 +103,8 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="mr-2" v-bind="attrs" v-on="on" color="light-gray"
|
||||
@click="generateBarcode(item, 'Item')">
|
||||
<v-btn class="mr-2" color="light-gray" v-bind="attrs" @click="generateBarcode(item, 'Item')"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-barcode</v-icon>
|
||||
<span class="CSSD-font">Generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -112,9 +112,9 @@
|
||||
<span>Generate Barcode</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }" v-if="!(item.package_id) && item.status ==='approved'">
|
||||
<v-btn class="mr-2" v-bind="attrs" v-on="on" color="light-gray"
|
||||
@click="transfer(item)">
|
||||
<template v-if="!(item.package_id) && item.status ==='approved'" v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="mr-2" color="light-gray" v-bind="attrs" @click="transfer(item)"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-exchange-alt</v-icon>
|
||||
<span class="CSSD-font">Transfer</span>
|
||||
</v-btn>
|
||||
@@ -123,10 +123,10 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<router-link class="LinkBtn"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))"
|
||||
:to="{ name: 'EditItem', params: { Item: item.id } }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="black" class="mr-2">
|
||||
<router-link v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))"
|
||||
:to="{ name: 'EditItem', params: { Item: item.id } }"
|
||||
class="LinkBtn">
|
||||
<v-btn class="mr-2" color="black" v-bind="attrs" v-on="on">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
@@ -136,9 +136,9 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="red" class="WM-ActionButton mr-2"
|
||||
<v-btn v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))" class="WM-ActionButton mr-2" color="red" v-bind="attrs"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
v-on="on">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
@@ -152,10 +152,10 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider/>
|
||||
<div class="text-xs-center" v-if="lastPage > 1">
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"/>
|
||||
<div v-if="lastPage > 1" class="text-xs-center">
|
||||
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6" color="black"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center class="px-3 mt-3">
|
||||
<v-layout align-center class="px-3 mt-3" row wrap>
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
@@ -190,6 +190,7 @@ export default {
|
||||
{sortable: false, text: "UDI", value: "udi"},
|
||||
{sortable: false, text: "Size", value: "size"},
|
||||
{sortable: false, text: "Status", value: "status", width: '10%'},
|
||||
{sortable: false, text: "Package ID", value: "package_id", width: '10%'},
|
||||
{sortable: false, text: "Action", value: "action", align: "center", width: '20%'}
|
||||
],
|
||||
filter: {
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
<template>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Test Result" text>
|
||||
<v-layout align-center wrap class="px-3">
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<material-card class color="black" text title="All Test Result">
|
||||
<v-layout align-center class="px-3" wrap>
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.device_id" label="ID"
|
||||
color="black"/>
|
||||
<v-text-field v-model="filter.device_id" class="pt-3 pr-3" color="black"
|
||||
label="ID"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-autocomplete :items="deviceLabels" item-text="name" item-value="id"
|
||||
v-model="filter.device_label" label="ID Label" color="black" class="pt-3 pr-3"
|
||||
:clearable="true"/>
|
||||
<v-autocomplete v-model="filter.device_label" :clearable="true" :items="deviceLabels"
|
||||
class="pt-3 pr-3" color="black" item-text="name" item-value="id"
|
||||
label="ID Label"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-autocomplete class="pt-3 pr-3" v-model="filter.testType_id" label="TestType Name"
|
||||
color="black" :items="testTypes" item-text="name" item-value="id"/>
|
||||
<v-autocomplete v-model="filter.testType_id" :items="testTypes" class="pt-3 pr-3"
|
||||
color="black" item-text="name" item-value="id" label="TestType Name"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
||||
<v-autocomplete class="pt-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.medicalCenter_id" :clearable="true" :items="medicalCenters"
|
||||
class="pt-3 pr-3" color="black" item-text="name" item-value="id"
|
||||
label="Hospital"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="pt-3 pr-3" v-model="filter.user_name" label="User Name"
|
||||
color="black"/>
|
||||
<v-text-field v-model="filter.user_name" class="pt-3 pr-3" color="black"
|
||||
label="User Name"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 xl2 xs12>
|
||||
<v-icon class="far fa-calendar-alt mr-2"/>
|
||||
<v-menu class="pr-3" lazy :close-on-content-click="true" transition="v-scale-transition"
|
||||
<v-menu v-model="fromMenu" :close-on-content-click="true" class="pr-3" lazy
|
||||
offset-y
|
||||
v-model="fromMenu" style="width: 100%">
|
||||
<v-text-field class="pt-3 pr-3" required slot="activator" label="FromDate"
|
||||
v-model="filter.fromPicker" color="black"/>
|
||||
<v-date-picker color="pink" no-title v-model="filter.fromPicker"
|
||||
:date-format="date => new Date(date).toDateString()"/>
|
||||
style="width: 100%" transition="v-scale-transition">
|
||||
<v-text-field slot="activator" v-model="filter.fromPicker" class="pt-3 pr-3" color="black"
|
||||
label="FromDate" required/>
|
||||
<v-date-picker v-model="filter.fromPicker" :date-format="date => new Date(date).toDateString()" color="pink"
|
||||
no-title/>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter" style="display: flex;align-items: center;">
|
||||
<v-flex class="WM-FlexCenter" lg3 md4 sm4 style="display: flex;align-items: center;" xl2 xs12>
|
||||
<v-icon class="far fa-calendar-alt mr-2"/>
|
||||
<v-menu class="pr-3" lazy :close-on-content-click="true" transition="v-scale-transition"
|
||||
<v-menu v-model="upToMenu" :close-on-content-click="true" class="pr-3" lazy
|
||||
offset-y
|
||||
v-model="upToMenu" style="width: 100%">
|
||||
<v-text-field class="pt-3 pr-3" required slot="activator" label="UpToDate" color="black"
|
||||
v-model="filter.upToPicker"/>
|
||||
<v-date-picker color="pink" no-title v-model="filter.upToPicker"
|
||||
:date-format="date => new Date(date).toDateString()"/>
|
||||
style="width: 100%" transition="v-scale-transition">
|
||||
<v-text-field slot="activator" v-model="filter.upToPicker" class="pt-3 pr-3" color="black" label="UpToDate"
|
||||
required/>
|
||||
<v-date-picker v-model="filter.upToPicker" :date-format="date => new Date(date).toDateString()" color="pink"
|
||||
no-title/>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-spacer/>
|
||||
<v-flex xs12 sm6 md6 lg12 xl3 class="WM-Align-R">
|
||||
<v-flex class="WM-Align-R" lg12 md6 sm6 xl3 xs12>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on"
|
||||
color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2"
|
||||
@click="load(null, null)">
|
||||
<v-btn color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2" v-bind="attrs"
|
||||
@click="load(null, null)"
|
||||
v-on="on">
|
||||
<v-icon class="black--text caption">fas fa-search</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
@@ -75,7 +75,7 @@
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="px-3 my-2">
|
||||
<v-layout align-center class="px-3 my-2" wrap>
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -109,9 +109,25 @@
|
||||
<!-- {{ item.verified }} -->
|
||||
</td>
|
||||
<td class="text-xs-right FlexBtn justify-self-end">
|
||||
<template v-if="$hasRole('Admin|Supervisor')">
|
||||
<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="`${status.font_color}--text mr-1 caption`">
|
||||
fas {{ status.icon }}
|
||||
</v-icon>
|
||||
<span>{{ status.label }}</span>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ status.label }}</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn color="light-gray" class="mr-2" @click="show(item.id)" v-bind="attrs"
|
||||
<v-btn class="mr-2" color="light-gray" v-bind="attrs" @click="show(item.id)"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>Show</span>
|
||||
@@ -121,8 +137,8 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn color="light-gray" class="mr-2"
|
||||
@click="generateBarcode(item.id, 'TestResult')" v-bind="attrs"
|
||||
<v-btn class="mr-2" color="light-gray"
|
||||
v-bind="attrs" @click="generateBarcode(item.id, 'TestResult')"
|
||||
v-on="on">
|
||||
<v-icon class="black--text mr-1 caption">fa fa-bars</v-icon>
|
||||
<span>generate Barcode</span>
|
||||
@@ -133,10 +149,10 @@
|
||||
<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 && item.verified == 'None')"
|
||||
:to="{ name: 'EditTestResult', params: { testResult: item.id } }">
|
||||
<v-btn color="black" class="mr-2" v-bind="attrs" v-on="on">
|
||||
<router-link v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')"
|
||||
:to="{ name: 'EditTestResult', params: { testResult: item.id } }"
|
||||
class="LinkBtn">
|
||||
<v-btn class="mr-2" color="black" v-bind="attrs" v-on="on">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
@@ -147,9 +163,9 @@
|
||||
<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="red" class="WM-ActionButton" @click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')"
|
||||
v-bind="attrs" v-on="on">
|
||||
<v-btn v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')" class="WM-ActionButton" color="red"
|
||||
v-bind="attrs"
|
||||
@click="removeModal(item.id)" v-on="on">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
@@ -162,11 +178,11 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider/>
|
||||
<div class="text-xs-center mt-2" v-if="lastPage > 1">
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
<div v-if="lastPage > 1" class="text-xs-center mt-2">
|
||||
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6"
|
||||
color="black"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="px-3">
|
||||
<v-layout align-center class="px-3" justify-center row wrap>
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
@@ -314,7 +330,35 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getStatus(item) {
|
||||
if (item.verified === 'None') {
|
||||
return [
|
||||
{status: 'Verified', label: 'Verified', color: 'cyan', font_color: 'white', icon: 'fa-check'},
|
||||
{status: 'NotVerified', label: 'NotVerified', color: 'light-gray', font_color: 'black', icon: 'fa-close'},
|
||||
]
|
||||
} else {
|
||||
const nextStatus = item.verified === 'NotVerified' ? 'Verified' : 'NotVerified'
|
||||
return [
|
||||
{
|
||||
status: nextStatus,
|
||||
label: nextStatus === 'Verified' ? 'approve' : 'NotVerified',
|
||||
color: nextStatus === 'Verified' ? 'cyan' : 'light-gray',
|
||||
font_color: nextStatus === 'Verified' ? 'white' : 'black',
|
||||
icon: nextStatus === 'Verified' ? 'fa-check' : 'fa-close'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
async changeStatus(item, status) {
|
||||
const result = await ApiService.post(urls.verifyTestResult(item.id,status))
|
||||
|
||||
if (result?.data?.data?.verified) {
|
||||
const newStatus = result.data.data.verified
|
||||
const target = this.items.find(i => i.id === item.id)
|
||||
if (target) target.verified = newStatus
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalResult"])
|
||||
|
||||
Reference in New Issue
Block a user