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