mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-13 14:03:24 +03:30
fix : title page test result
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<modal-base :show="getCurrentModal" :width="getModalProperties.width ? getModalProperties.width + '%': '70%'" @close="closeModal">
|
<modal-base :show="getCurrentModal" :width="getModalProperties.width ? getModalProperties.width + '%': '70%'" @close="closeModal">
|
||||||
<component :is="getCurrentModal" v-bind="getModalProperties"></component>
|
<component :is="getCurrentModal" v-bind="getModalProperties"/>
|
||||||
</modal-base>
|
</modal-base>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$route'(val) {
|
'$route'(val) {
|
||||||
// this.title = val.name
|
// this.title = val.name
|
||||||
this.title = val.name.replace(/([A-Z])/g, ' $1').trim() !== 'Dashboard' ? val.name.replace(/([A-Z])/g, ' $1').trim() : 'home'
|
// this.title = val.name.replace(/([A-Z])/g, ' $1').trim() !== 'Dashboard' ? val.name.replace(/([A-Z])/g, ' $1').trim() : 'home'
|
||||||
|
this.title = val.meta.title.split('|')[0].trim();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -169,7 +169,7 @@ export default [
|
|||||||
name: 'NotVerifyTestResult',
|
name: 'NotVerifyTestResult',
|
||||||
view: 'TestResult/List',
|
view: 'TestResult/List',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Verify Test Resul | CSSD Dashboard'
|
title: 'Verify Test Result | CSSD Dashboard'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+316
-350
@@ -1,399 +1,365 @@
|
|||||||
<template>
|
<template>
|
||||||
<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-3">
|
||||||
<v-layout align-center wrap class="px-3">
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||||
<v-flex xs12 sm4 md4 lg3 xl2 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.device_id" label="ID"
|
||||||
<v-text-field class="pt-3 pr-3" v-model="filter.device_id" label="ID"
|
color="black"/>
|
||||||
color="black"/>
|
</v-flex>
|
||||||
</v-flex>
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||||
<v-flex xs12 sm4 md4 lg3 xl2 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-autocomplete :items="deviceLabels" item-text="name" item-value="id"
|
||||||
<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"
|
||||||
v-model="filter.device_label" label="ID Label" color="black" class="pt-3 pr-3"
|
:clearable="true"/>
|
||||||
:clearable="true"/>
|
</v-flex>
|
||||||
</v-flex>
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
<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 class="pt-3 pr-3" v-model="filter.testType_id" label="TestType Name"
|
color="black" :items="testTypes" item-text="name" item-value="id"/>
|
||||||
color="black" :items="testTypes" item-text="name" item-value="id"/>
|
</v-flex>
|
||||||
</v-flex>
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
<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 class="pt-3 pr-3" v-model="filter.medicalCenter_id" label="Hospital"
|
color="black" :items="medicalCenters" item-text="name" item-value="id"
|
||||||
color="black" :items="medicalCenters" item-text="name" item-value="id"
|
:clearable="true"/>
|
||||||
:clearable="true"/>
|
</v-flex>
|
||||||
</v-flex>
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
<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 class="pt-3 pr-3" v-model="filter.user_name" label="User Name"
|
color="black"/>
|
||||||
color="black"/>
|
</v-flex>
|
||||||
</v-flex>
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
<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 class="pr-3" lazy :close-on-content-click="true" transition="v-scale-transition"
|
offset-y
|
||||||
offset-y
|
v-model="fromMenu" style="width: 100%">
|
||||||
v-model="fromMenu" style="width: 100%">
|
<v-text-field class="pt-3 pr-3" required slot="activator" label="FromDate"
|
||||||
<v-text-field class="pt-3 pr-3" required slot="activator" label="FromDate"
|
v-model="filter.fromPicker" color="black"/>
|
||||||
v-model="filter.fromPicker" color="black"/>
|
<v-date-picker color="pink" no-title v-model="filter.fromPicker"
|
||||||
<v-date-picker color="pink" no-title v-model="filter.fromPicker"
|
:date-format="date => new Date(date).toDateString()"/>
|
||||||
:date-format="date => new Date(date).toDateString()"/>
|
</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 xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter" style="display: flex;align-items: center;">
|
<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 class="pr-3" lazy :close-on-content-click="true" transition="v-scale-transition"
|
offset-y
|
||||||
offset-y
|
v-model="upToMenu" style="width: 100%">
|
||||||
v-model="upToMenu" style="width: 100%">
|
<v-text-field class="pt-3 pr-3" required slot="activator" label="UpToDate" color="black"
|
||||||
<v-text-field class="pt-3 pr-3" required slot="activator" label="UpToDate" color="black"
|
v-model="filter.upToPicker"/>
|
||||||
v-model="filter.upToPicker"/>
|
<v-date-picker color="pink" no-title v-model="filter.upToPicker"
|
||||||
<v-date-picker color="pink" no-title v-model="filter.upToPicker"
|
:date-format="date => new Date(date).toDateString()"/>
|
||||||
:date-format="date => new Date(date).toDateString()"/>
|
</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 xs12 sm6 md6 lg12 xl3 class="WM-Align-R">
|
<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 v-bind="attrs" v-on="on"
|
color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2"
|
||||||
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-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>
|
|
||||||
|
|
||||||
<router-link :to="{ name: 'SubmitTestResult' }">
|
<router-link :to="{ name: 'SubmitTestResult' }">
|
||||||
<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">
|
||||||
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
||||||
<span class="white--text">Add</span>
|
<span class="white--text">Add</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
<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 wrap class="px-3 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 class="subheading font-weight-light text-white text--darken-3"
|
<span class="subheading font-weight-light text-white text--darken-3"
|
||||||
style="border-radius: 5px;"
|
style="border-radius: 5px;"
|
||||||
v-text="header.text"/>
|
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">
|
<td class="title font-weight-light">
|
||||||
{{ item.test_type ? item.test_type.name : 'Archived Test' }}
|
{{ item.test_type ? item.test_type.name : 'Archived Test' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="title font-weight-light">{{ item.user.medical_center.name }}</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">{{ item.user.name }}</td>
|
||||||
<td class="title font-weight-light">
|
<td class="title font-weight-light">
|
||||||
<span v-if="item.result == 'Reject'" class="ResultMsg Reject">
|
<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="headline font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
|
<td class="headline font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
|
||||||
<td class="title font-weight-light text-center">
|
<td class="title font-weight-light text-center">
|
||||||
<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 class="caption fa fa-times NotVerified"/>
|
||||||
</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 class="caption fa fa-check Verified"/>
|
||||||
</span>
|
</span>
|
||||||
<!-- {{ item.verified }} -->
|
<!-- {{ item.verified }} -->
|
||||||
</td>
|
</td>
|
||||||
<td class="text-xs-right FlexBtn justify-self-end">
|
<td class="text-xs-right FlexBtn justify-self-end">
|
||||||
<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 color="light-gray" class="mr-2" @click="show(item.id)" v-bind="attrs"
|
||||||
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>
|
||||||
</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="light-gray" class="mr-2"
|
<v-btn color="light-gray" class="mr-2"
|
||||||
@click="generateBarcode(item.id, 'TestResult')" v-bind="attrs"
|
@click="generateBarcode(item.id, 'TestResult')" v-bind="attrs"
|
||||||
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>
|
||||||
</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')"
|
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 } }">
|
||||||
<v-btn color="black" class="mr-2" v-bind="attrs" v-on="on">
|
<v-btn color="black" class="mr-2" 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>
|
||||||
</router-link>
|
|
||||||
</template>
|
|
||||||
<span>Edit</span>
|
|
||||||
</v-tooltip>
|
|
||||||
<v-tooltip bottom open-on-hover>
|
|
||||||
<template v-slot:activator="{ on, attrs }">
|
|
||||||
<!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" -->
|
|
||||||
<v-btn color="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-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
|
||||||
<span>Remove</span>
|
|
||||||
</v-btn>
|
|
||||||
</template>
|
|
||||||
<span>Remove</span>
|
|
||||||
</v-tooltip>
|
|
||||||
</td>
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</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-layout row wrap align-center justify-center class="px-3">
|
|
||||||
<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>
|
|
||||||
<span class="black--text">Back</span>
|
|
||||||
</v-btn>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
<v-spacer/>
|
</template>
|
||||||
</v-layout>
|
<span>Edit</span>
|
||||||
</material-card>
|
</v-tooltip>
|
||||||
</v-container>
|
<v-tooltip bottom open-on-hover>
|
||||||
</div>
|
<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-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||||
|
<span>Remove</span>
|
||||||
|
</v-btn>
|
||||||
|
</template>
|
||||||
|
<span>Remove</span>
|
||||||
|
</v-tooltip>
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</v-data-table>
|
||||||
|
</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-layout row wrap align-center justify-center class="px-3">
|
||||||
|
<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>
|
||||||
|
<span class="black--text">Back</span>
|
||||||
|
</v-btn>
|
||||||
|
</router-link>
|
||||||
|
<v-spacer/>
|
||||||
|
</v-layout>
|
||||||
|
</material-card>
|
||||||
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
ApiService
|
ApiService
|
||||||
} from "@/services";
|
} from "@/services";
|
||||||
import {
|
import {
|
||||||
urls
|
urls
|
||||||
} from "@/config/urls";
|
} from "@/config/urls";
|
||||||
import {
|
import {
|
||||||
mapMutations,
|
mapMutations,
|
||||||
mapGetters
|
mapGetters
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
metaInfo() {
|
metaInfo() {
|
||||||
return {
|
return {
|
||||||
title: this.$route.meta.title,
|
title: this.$route.meta.title,
|
||||||
meta: this.$route.meta.metaTags || []
|
meta: this.$route.meta.metaTags || []
|
||||||
}
|
|
||||||
},
|
|
||||||
data: () => ({
|
|
||||||
headers: [
|
|
||||||
{sortable: false, text: "ID", value: "name"},
|
|
||||||
{sortable: false, text: "Test Type", value: "TestType"},
|
|
||||||
{sortable: false, text: "Hospital", value: "Hospital"},
|
|
||||||
{sortable: false, text: "User", value: "Users"},
|
|
||||||
{sortable: false, text: "Result", value: "result", width: '5%'},
|
|
||||||
{sortable: false, text: "Date", value: "date"},
|
|
||||||
{sortable: false, text: "Verify", value: "verify", width: '5%'},
|
|
||||||
{sortable: false, text: "Action", value: "action", align: "center",}
|
|
||||||
],
|
|
||||||
filter: {
|
|
||||||
device_id: '',
|
|
||||||
testType_id: '',
|
|
||||||
medicalCenter_id: '',
|
|
||||||
user_name: '',
|
|
||||||
fromPicker: '',
|
|
||||||
upToPicker: '',
|
|
||||||
device_label: ''
|
|
||||||
},
|
|
||||||
fromMenu: '',
|
|
||||||
upToMenu: '',
|
|
||||||
items: [],
|
|
||||||
currentPage: 1,
|
|
||||||
lastPage: 1,
|
|
||||||
testTypes: [],
|
|
||||||
medicalCenters: [],
|
|
||||||
deviceLabels: [
|
|
||||||
{name: "Washer ID", id: "Washer ID"},
|
|
||||||
{name: "Autoclave ID", id: "Autoclave ID"},
|
|
||||||
{name: "Sterilizer ID", id: "Sterilizer 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() {
|
|
||||||
this.fillSelectFilter();
|
|
||||||
if (this.$route.name == "NotVerifyTestResult") {
|
|
||||||
this.load(1, "NotVerified");
|
|
||||||
} else {
|
|
||||||
this.load();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapMutations("modal", ["changeCurrentModal", "closeModal"]),
|
|
||||||
async load(page = 1, verified = null) {
|
|
||||||
let filter = '?';
|
|
||||||
for (const key in this.filter) {
|
|
||||||
if (this.filter.hasOwnProperty(key)) {
|
|
||||||
filter += `${key}=${this.filter[key]}&`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (verified) {
|
|
||||||
filter += `verified=${verified}&`;
|
|
||||||
}
|
|
||||||
filter += (page) ? `page=${page}` : `page=1`;
|
|
||||||
const result = await ApiService.get(urls.listTestResult(filter));
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
const {data, meta} = result.data;
|
|
||||||
this.items = data;
|
|
||||||
this.currentPage = meta.current_page;
|
|
||||||
this.lastPage = meta.last_page;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async show(id) {
|
|
||||||
const result = await ApiService.get(urls.showTestResult(id));
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
this.changeCurrentModal({
|
|
||||||
modal: "modal-testresult-show",
|
|
||||||
properties: {
|
|
||||||
result
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
removeModal(id) {
|
|
||||||
this.changeCurrentModal({
|
|
||||||
modal: "modal-user-confirmation",
|
|
||||||
properties: {width: '30'},
|
|
||||||
success: async () => {
|
|
||||||
const result = await ApiService.delete(urls.removeTestResult(id));
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
for (const key in this.items) {
|
|
||||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
|
||||||
this.items.splice(key, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.closeModal();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async fillSelectFilter() {
|
|
||||||
const result = await ApiService.get(urls.listFilterItemsTestResult);
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
this.medicalCenters = result.data.data.MedicalCenters;
|
|
||||||
this.testTypes = result.data.data.TestTypes;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async generateBarcode(id, type) {
|
|
||||||
const result = await ApiService.post(urls.Barcode(id, type));
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
this.changeCurrentModal({
|
|
||||||
modal: "modal-barcode-barcode",
|
|
||||||
properties: {
|
|
||||||
result
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters("modal", ["getModalResult"])
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
currentPage(page) {
|
|
||||||
if (this.$route.name == "NotVerifyTestResult") {
|
|
||||||
this.load(page, "NotVerified,None");
|
|
||||||
} else {
|
|
||||||
this.load(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
getModalResult(testResult) {
|
|
||||||
for (const key in this.items) {
|
|
||||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResult.id) {
|
|
||||||
this.items[key].verified = testResult.verified;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
headers: [
|
||||||
|
{sortable: false, text: "ID", value: "name"},
|
||||||
|
{sortable: false, text: "Test Type", value: "TestType"},
|
||||||
|
{sortable: false, text: "Hospital", value: "Hospital"},
|
||||||
|
{sortable: false, text: "User", value: "Users"},
|
||||||
|
{sortable: false, text: "Result", value: "result", width: '5%'},
|
||||||
|
{sortable: false, text: "Date", value: "date"},
|
||||||
|
{sortable: false, text: "Verify", value: "verify", width: '5%'},
|
||||||
|
{sortable: false, text: "Action", value: "action", align: "center",}
|
||||||
|
],
|
||||||
|
filter: {
|
||||||
|
device_id: '',
|
||||||
|
testType_id: '',
|
||||||
|
medicalCenter_id: '',
|
||||||
|
user_name: '',
|
||||||
|
fromPicker: '',
|
||||||
|
upToPicker: '',
|
||||||
|
device_label: ''
|
||||||
|
},
|
||||||
|
fromMenu: '',
|
||||||
|
upToMenu: '',
|
||||||
|
items: [],
|
||||||
|
currentPage: 1,
|
||||||
|
lastPage: 1,
|
||||||
|
testTypes: [],
|
||||||
|
medicalCenters: [],
|
||||||
|
deviceLabels: [
|
||||||
|
{name: "Washer ID", id: "Washer ID"},
|
||||||
|
{name: "Autoclave ID", id: "Autoclave ID"},
|
||||||
|
{name: "Sterilizer ID", id: "Sterilizer 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() {
|
||||||
|
this.fillSelectFilter();
|
||||||
|
if (this.$route.name == "NotVerifyTestResult") {
|
||||||
|
this.load(1, "NotVerified");
|
||||||
|
} else {
|
||||||
|
this.load();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapMutations("modal", ["changeCurrentModal", "closeModal"]),
|
||||||
|
async load(page = 1, verified = null) {
|
||||||
|
let filter = '?';
|
||||||
|
for (const key in this.filter) {
|
||||||
|
if (this.filter.hasOwnProperty(key)) {
|
||||||
|
filter += `${key}=${this.filter[key]}&`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (verified) {
|
||||||
|
filter += `verified=${verified}&`;
|
||||||
|
}
|
||||||
|
filter += (page) ? `page=${page}` : `page=1`;
|
||||||
|
const result = await ApiService.get(urls.listTestResult(filter));
|
||||||
|
if (result && result.status === 200) {
|
||||||
|
const {data, meta} = result.data;
|
||||||
|
this.items = data;
|
||||||
|
this.currentPage = meta.current_page;
|
||||||
|
this.lastPage = meta.last_page;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async show(id) {
|
||||||
|
const result = await ApiService.get(urls.showTestResult(id));
|
||||||
|
if (result && result.status === 200) {
|
||||||
|
this.changeCurrentModal({
|
||||||
|
modal: "modal-testresult-show",
|
||||||
|
properties: {
|
||||||
|
result
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeModal(id) {
|
||||||
|
this.changeCurrentModal({
|
||||||
|
modal: "modal-user-confirmation",
|
||||||
|
properties: {width: '30'},
|
||||||
|
success: async () => {
|
||||||
|
const result = await ApiService.delete(urls.removeTestResult(id));
|
||||||
|
if (result && result.status === 200) {
|
||||||
|
for (const key in this.items) {
|
||||||
|
if (this.items.hasOwnProperty(key) && this.items[key].id === id) {
|
||||||
|
this.items.splice(key, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.closeModal();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async fillSelectFilter() {
|
||||||
|
const result = await ApiService.get(urls.listFilterItemsTestResult);
|
||||||
|
if (result && result.status === 200) {
|
||||||
|
this.medicalCenters = result.data.data.MedicalCenters;
|
||||||
|
this.testTypes = result.data.data.TestTypes;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async generateBarcode(id, type) {
|
||||||
|
const result = await ApiService.post(urls.Barcode(id, type));
|
||||||
|
if (result && result.status === 200) {
|
||||||
|
this.changeCurrentModal({
|
||||||
|
modal: "modal-barcode-barcode",
|
||||||
|
properties: {
|
||||||
|
result
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters("modal", ["getModalResult"])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
currentPage(page) {
|
||||||
|
if (this.$route.name == "NotVerifyTestResult") {
|
||||||
|
this.load(page, "NotVerified,None");
|
||||||
|
} else {
|
||||||
|
this.load(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
getModalResult(testResult) {
|
||||||
|
for (const key in this.items) {
|
||||||
|
if (this.items.hasOwnProperty(key) && this.items[key].id === testResult.id) {
|
||||||
|
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--floating,
|
||||||
.v-btn--icon:before {
|
.v-btn--icon:before {
|
||||||
border-radius: 50% !important;
|
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 {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
padding: 10px 8px !important;
|
|
||||||
}
|
|
||||||
td.FlexBtn .theme--light.v-btn {
|
|
||||||
padding: 21px 20px;
|
|
||||||
}
|
|
||||||
td.FlexBtn a.LinkBtn .theme--light.v-btn {
|
|
||||||
padding: 12px 10px;
|
|
||||||
}
|
|
||||||
@media screen and (max-width:1536px) {
|
|
||||||
.FlexBtn {
|
|
||||||
padding: 30px 8px !important;
|
|
||||||
}
|
|
||||||
td.FlexBtn span {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
td.FlexBtn .theme--light.v-btn {
|
|
||||||
min-width: 30px;
|
|
||||||
padding: 15px 10px;
|
|
||||||
margin-right: 1 !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
td.FlexBtn a.LinkBtn .theme--light.v-btn {
|
|
||||||
padding: 9px 10px;
|
|
||||||
}
|
|
||||||
td.FlexBtn .theme--light.v-icon {
|
|
||||||
margin-right: 0 !important;
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user