mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-11 11:33:16 +03:30
fix : delete confirm modal and style
This commit is contained in:
Generated
-11384
File diff suppressed because it is too large
Load Diff
@@ -1,46 +1,42 @@
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Barcode Image">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-5 my-3">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-3 my-3">
|
||||
<!-- <h3 class="ml-3">Barcode And QRCode Image</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex> -->
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br/>
|
||||
<span v-if="Type != 'TestType'">{{ `${Type} UDI : ${ID}` }}</span>
|
||||
<span v-else>{{ Type + ':' + ID }}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg" class="WM-Align-R">
|
||||
<a v-if="Type != 'TestType'" :href="ShowLink" target="_blank"><img :src="QRCodeimg"
|
||||
class="WM-Width-150"></a>
|
||||
class="WM-Width-150"></a>
|
||||
<img v-else :src="QRCodeimg" class="WM-Width-150">
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center>
|
||||
<v-flex xs12 sm6 md6 lg3 class="text-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex class xs12 md2 sm2 @click="print">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
<script>
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
barcodeimg: null,
|
||||
@@ -77,9 +73,9 @@ export default {
|
||||
|
||||
// Open the print window
|
||||
const WinPrint = window.open(
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
);
|
||||
|
||||
WinPrint.document.write(`<!DOCTYPE html>
|
||||
|
||||
+104
-100
@@ -1,135 +1,135 @@
|
||||
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card id="printMe" color="black" title="Show Cycle">
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Cycle - {{ (data.user && data.user.medical_center) ? data.user.medical_center.name : "" }}</h3>
|
||||
<v-layout align-left justify-left wrap class="px-3 my-3">
|
||||
<h3 class="mt-0">Cycle - {{
|
||||
(data.user && data.user.medical_center) ? data.user.medical_center.name : ""
|
||||
}}</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md3 sm3>
|
||||
<!-- class="WM-d-flex" -->
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 sm6 md4>
|
||||
<div>
|
||||
<span class="title">Cycle ID :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-flex xs12 sm6 md4>
|
||||
<div>
|
||||
<span class="title">Sterilizer ID :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.sterilizer_id }}</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{
|
||||
data.sterilizer_id
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-flex xs12 sm6 md4>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.user ? data.user.name : '' }}</span>
|
||||
<v-icon class="WMi-user"/>
|
||||
<span class="headline ml-2"
|
||||
style="letter-spacing:0 !important">{{ data.user ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-flex xs12 sm6 md4>
|
||||
<div>
|
||||
<span class="title">Cycle Number :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.cycle_number }}</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{
|
||||
data.cycle_number
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-flex xs12 sm6 md4>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<v-icon class="WMi-Industry"/>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-flex xs12 sm6 md4>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-pencil"></v-icon>
|
||||
<v-icon class="WMi-pencil"/>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.note }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="my-3">
|
||||
<h3 class="ml-3">Barcode And QRCode Image</h3>
|
||||
<h3 class="mt-0">Barcode And QRCode Image</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-layout row wrap class="align-center mt-3">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>Cycle ID : {{data.id}}</span>
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br/>
|
||||
<span>Cycle ID : {{ data.id }}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'https://www.cssd-doc.com/Show/Cycle/'+data.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-150"></a>
|
||||
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg" class="WM-Align-R">
|
||||
<a :href="'https://www.cssd-doc.com/Show/Cycle/'+data.id+''" target="_blank">
|
||||
<img :src="QRCodeimg" class="WM-Width-150">
|
||||
</a>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Labels</h3>
|
||||
<v-layout align-left justify-left wrap class="px-3 my-3">
|
||||
<h3 class="mt-0">Labels</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap style="margin-left: 20px !important;">
|
||||
|
||||
<template>
|
||||
<v-expansion-panel class="WM-Panel" v-for="(label, key) in data.labels" :key="key">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.id }} ({{ label.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text> Package :
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.package.name }} </div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ label.package.note }}</v-card-text>
|
||||
<v-card-text>
|
||||
Items :
|
||||
<v-expansion-panel class="WM-Panel" v-for="item in label.package.items" :key="item.key">
|
||||
<v-expansion-panel class="WM-Panel" v-for="(label, key) in data.labels" :key="key">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.id }} ({{ label.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text> Package :
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ item.name }} ({{ item.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ item.note }}</v-card-text>
|
||||
</v-card>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.package.name }}</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ label.package.note }}</v-card-text>
|
||||
<v-card-text>
|
||||
Items :
|
||||
<v-expansion-panel class="WM-Panel"
|
||||
v-for="item in label.package.items"
|
||||
:key="item.key">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ item.name }} ({{ item.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ item.note }}</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panel>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
|
||||
<v-layout row wrap align-center justify-center>
|
||||
<v-flex xs12 md2 sm2 class="text-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex class xs12 md2 sm2 @click="print" >
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-layout row wrap align-center justify-center class="px-3">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
@@ -141,22 +141,23 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
import {ApiService} from "@/services";
|
||||
import {urls} from "@/config/urls";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
barcodeimg : '',
|
||||
QRCodeimg : ''
|
||||
data: {},
|
||||
barcodeimg: '',
|
||||
QRCodeimg: ''
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
async generateBarcode(cycleId) {
|
||||
const result = await ApiService.post(urls.Barcode(cycleId, 'Cycle'));
|
||||
if (result && result.status == 200) {
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
},
|
||||
print() {
|
||||
@@ -172,9 +173,9 @@ export default {
|
||||
|
||||
// Open the print window
|
||||
const WinPrint = window.open(
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
);
|
||||
|
||||
WinPrint.document.write(`<!DOCTYPE html>
|
||||
@@ -203,7 +204,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style media="screen">
|
||||
.v-expansion-panel.WM-Panel {
|
||||
.v-expansion-panel.WM-Panel {
|
||||
box-shadow: none;
|
||||
border-top: 1px solid #aaa;
|
||||
border-right: 1px solid #aaa;
|
||||
@@ -211,19 +212,22 @@ export default {
|
||||
border-left: 4px solid #e91e63;
|
||||
padding: 5px 10px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.v-expansion-panel.WM-Panel .v-expansion-panel__header {
|
||||
font-weight:300;
|
||||
}
|
||||
|
||||
.v-expansion-panel.WM-Panel .v-expansion-panel__header {
|
||||
font-weight: 300;
|
||||
font-size: 24px;
|
||||
padding: 5px 10px;
|
||||
margin: 7px 0;
|
||||
}
|
||||
.v-expansion-panel.WM-Panel .v-card__text {
|
||||
}
|
||||
|
||||
.v-expansion-panel.WM-Panel .v-card__text {
|
||||
padding: 0 0 0 30px;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
.v-expansion-panel.WM-Panel .v-expansion-panel__body>.v-card {
|
||||
margin: 5px 0 8px 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.v-expansion-panel.WM-Panel .v-expansion-panel__body > .v-card {
|
||||
margin: 5px 0 8px 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" :title="modalProps.title">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-3 my-3">
|
||||
<div class="WM-Align-L">
|
||||
{{ modalProps.message }}
|
||||
</div>
|
||||
</v-layout>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" @click="handleCancel">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
|
||||
<v-spacer/>
|
||||
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="handleConfirm" style="padding: 10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">Confirm</span>
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"]),
|
||||
modalProps() {
|
||||
return {
|
||||
title: this.getModalProperties.title || "Confirm deletion",
|
||||
message: this.getModalProperties.message ||
|
||||
"Are you sure you want to delete the item? \n There will be no way to undo it.",
|
||||
onConfirm: this.getModalProperties.success || (() => {
|
||||
}),
|
||||
onCancel: this.getModalProperties.close || (() => {
|
||||
})
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal"]),
|
||||
async handleConfirm() {
|
||||
await this.modalProps.onConfirm();
|
||||
this.closeModal();
|
||||
},
|
||||
async handleCancel() {
|
||||
await this.modalProps.onCancel();
|
||||
this.closeModal();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,34 +1,41 @@
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Item">
|
||||
<v-layout align-left id="printMe" justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3 CSSD-font"> Item - {{ data.user.medical_center.name }}</h3>
|
||||
<v-layout align-left id="printMe" justify-left wrap class="px-3">
|
||||
<h3 class="CSSD-font mt-0"> Item - {{ data.user.medical_center.name }}</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title CSSD-font">Item ID :</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{ data.id }}</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{
|
||||
data.id
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title CSSD-font">Name :</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{ data.name }}</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{
|
||||
data.name
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title CSSD-font">Size :</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{ data.size }}</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{
|
||||
data.size
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title CSSD-font">Specific :</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{ data.specific}}</span>
|
||||
<span class="headline ml-1 CSSD-font"
|
||||
style="letter-spacing:0 !important">{{ data.specific }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
@@ -42,24 +49,23 @@
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title CSSD-font">Date Register:</span>
|
||||
<span class="headline ml-2 CSSD-font" style="letter-spacing:0 !important">{{ $d(new Date(data.created_at), 'long') }}</span>
|
||||
<span class="headline ml-2 CSSD-font"
|
||||
style="letter-spacing:0 !important">{{ $d(new Date(data.created_at), 'long') }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="my-3">
|
||||
<h3 class="ml-3 CSSD-font">Barcode And QRCode Image</h3>
|
||||
<h3 class="CSSD-font">Barcode And QRCode Image</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-layout row wrap class="align-center mt-3">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br/>
|
||||
<span class="CSSD-font">Item ID : {{ data.id }}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg" class="WM-Align-R">
|
||||
<a :href="'https://www.cssd-doc.com/Show/Item/' + data.id + ''" target="_blank">
|
||||
<img :src="QRCodeimg" class="WM-Width-150">
|
||||
</a>
|
||||
@@ -67,38 +73,35 @@
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center>
|
||||
<v-flex xs12 md2 sm2 class="text-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 @click="print">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<!-- <v-icon class="white--text mr-2 caption">fas fa-print</v-icon> -->
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text CSSD-font">Print</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex class xs12 md2 sm2
|
||||
@click="changeCurrentModal({modal: 'modal-user-list', properties: { data }})">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<!-- <v-icon class="white--text mr-2 caption">fas fa-print</v-icon> -->
|
||||
<v-icon class="white--text mr-2 caption">fas fa-rocket</v-icon>
|
||||
<span class="white--text CSSD-font">Transfer</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-layout row wrap align-center justify-center class="px-3">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px">
|
||||
<!-- <v-icon class="white--text mr-2 caption">fas fa-print</v-icon> -->
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text CSSD-font">Print</span>
|
||||
</v-btn>
|
||||
<v-btn class="WM-CyanBlueGradient-BG"
|
||||
@click="changeCurrentModal({modal: 'modal-user-list', properties: { data }})"
|
||||
style="padding:10px 60px">
|
||||
<!-- <v-icon class="white--text mr-2 caption">fas fa-print</v-icon> -->
|
||||
<v-icon class="white--text mr-2 caption">fas fa-rocket</v-icon>
|
||||
<span class="white--text CSSD-font">Transfer</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
import {ApiService} from "@/services";
|
||||
import {urls} from "@/config/urls";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
data: {},
|
||||
@@ -127,9 +130,9 @@ export default {
|
||||
|
||||
// Open the print window
|
||||
const WinPrint = window.open(
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
);
|
||||
|
||||
WinPrint.document.write(`<!DOCTYPE html>
|
||||
|
||||
+200
-195
@@ -1,202 +1,207 @@
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Label">
|
||||
<v-layout align-left justify-left wrap class="px-2 my-3">
|
||||
<h3 class="ml-3">Label</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout id="printMe">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<!-- ________ Column1::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{ (data.user && data.user.medical_center) ? data.user.medical_center.name : "" }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12 class="">
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-location"></v-icon>
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{data.package.name}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.sterile_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-hourglass"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.expire_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.user ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column1::End ________ -->
|
||||
<!-- ________ Column2::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div>
|
||||
<v-flex xs6 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'https://www.cssd-doc.com/Show/Label/'+data.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-120"></a>
|
||||
</v-flex>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Sterilizer ID :</span>
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{ data.sterilizer_id}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Cycle No :</span>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.cycle_number }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column2::End ________ -->
|
||||
</v-layout>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Label">
|
||||
<v-layout align-left justify-left wrap class="px-3 my-3">
|
||||
<h3 class="mt-0">Label</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout id="printMe">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<!-- ________ Column1::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{
|
||||
(data.user && data.user.medical_center) ? data.user.medical_center.name : ""
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12 class="">
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-location"></v-icon>
|
||||
<span class="headline ml-1 mb-1"
|
||||
style="letter-spacing:0 !important">{{ data.package.name }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<span class="headline ml-2 mb-1"
|
||||
style="letter-spacing:0 !important">{{ data.sterile_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-hourglass"></v-icon>
|
||||
<span class="headline ml-2 mb-1"
|
||||
style="letter-spacing:0 !important">{{ data.expire_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{
|
||||
data.user ? data.user.name : ''
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column1::End ________ -->
|
||||
<!-- ________ Column2::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="WM-Align-R mt-2">
|
||||
<v-flex xs12 v-if="QRCodeimg">
|
||||
<a :href="'https://www.cssd-doc.com/Show/Label/'+data.id+''"
|
||||
target="_blank"><img :src="QRCodeimg" class="WM-Width-120"></a>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Sterilizer ID :</span>
|
||||
<span class="headline ml-1 mb-1"
|
||||
style="letter-spacing:0 !important">{{ data.sterilizer_id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Cycle No :</span>
|
||||
<span class="headline ml-2 mb-1"
|
||||
style="letter-spacing:0 !important">{{ data.cycle_number }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column2::End ________ -->
|
||||
</v-layout>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
|
||||
|
||||
<!-- ________ row2::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="mt-4" style="text-align:center">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 md12 sm12 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>{{data.id}}</span>
|
||||
<!-- ________ row2::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="mt-4" style="text-align:center">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 md12 sm12 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br/>
|
||||
<span>{{ data.id }}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<!-- ________ row2::End ________ -->
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<!-- ________ row2::End ________ -->
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-2 my-3">
|
||||
<h3 class="ml-3">Package</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="mx-3">
|
||||
<template>
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ data.package.name }}</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ data.package.note }}</v-card-text>
|
||||
<v-card-text> Items :
|
||||
<v-expansion-panel class="WM-Panel" v-for="item in data.package.items" :key="item.key">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ item.name }} ({{ item.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ item.note }}</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center>
|
||||
<v-flex xs12 sm6 md4 class="text-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex class xs12 sm6 md4 @click="print" >
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
<v-layout align-left justify-left wrap class="px-3 my-3">
|
||||
<h3 class="ml-3">Package</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="mx-3">
|
||||
<template>
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ data.package.name }}</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ data.package.note }}</v-card-text>
|
||||
<v-card-text> Items :
|
||||
<v-expansion-panel class="WM-Panel" v-for="item in data.package.items"
|
||||
:key="item.key">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ item.name }} ({{ item.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ item.note }}</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center class="px-3">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
<style media="screen">
|
||||
.WM-d-flex{
|
||||
display: flex;
|
||||
.WM-d-flex {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
import {ApiService} from "@/services";
|
||||
import {urls} from "@/config/urls";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : ''
|
||||
data: () => ({
|
||||
data: {},
|
||||
QRCodeimg: '',
|
||||
barcodeimg: ''
|
||||
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
// async verify(id) {
|
||||
// const result = await ApiService.post(urls.verifyPackage(id));
|
||||
// if (result && result.status == 200) {
|
||||
// this.setResultModal(result.data.data);
|
||||
// this.closeModal();
|
||||
// }
|
||||
// },
|
||||
async generateQRcodePackage(packageId) {
|
||||
const result = await ApiService.post(urls.packageQRCode(packageId));
|
||||
if (result && result.status == 200) {
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
}
|
||||
},
|
||||
async generateBarcode(labelId) {
|
||||
const result = await ApiService.post(urls.Barcode(labelId, 'Label'));
|
||||
if (result && result.status == 200) {
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
},
|
||||
print() {
|
||||
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
// async verify(id) {
|
||||
// const result = await ApiService.post(urls.verifyPackage(id));
|
||||
// if (result && result.status == 200) {
|
||||
// this.setResultModal(result.data.data);
|
||||
// this.closeModal();
|
||||
// }
|
||||
// },
|
||||
async generateQRcodePackage(packageId) {
|
||||
const result = await ApiService.post(urls.packageQRCode(packageId));
|
||||
if (result && result.status == 200) {
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
}
|
||||
},
|
||||
async generateBarcode(labelId) {
|
||||
const result = await ApiService.post(urls.Barcode(labelId, 'Label'));
|
||||
if (result && result.status == 200) {
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
},
|
||||
print() {
|
||||
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||
|
||||
// Get all stylesheets HTML
|
||||
let stylesHtml = "";
|
||||
for (const node of [
|
||||
...document.querySelectorAll('link[rel="stylesheet"], style')
|
||||
]) {
|
||||
stylesHtml += node.outerHTML;
|
||||
}
|
||||
// Get all stylesheets HTML
|
||||
let stylesHtml = "";
|
||||
for (const node of [
|
||||
...document.querySelectorAll('link[rel="stylesheet"], style')
|
||||
]) {
|
||||
stylesHtml += node.outerHTML;
|
||||
}
|
||||
|
||||
// Open the print window
|
||||
const WinPrint = window.open(
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
);
|
||||
// Open the print window
|
||||
const WinPrint = window.open(
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
);
|
||||
|
||||
WinPrint.document.write(`<!DOCTYPE html>
|
||||
WinPrint.document.write(`<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
${stylesHtml}
|
||||
@@ -206,19 +211,19 @@ export default {
|
||||
</body>
|
||||
</html>`);
|
||||
|
||||
WinPrint.document.close();
|
||||
WinPrint.focus();
|
||||
WinPrint.print();
|
||||
WinPrint.close();
|
||||
}
|
||||
WinPrint.document.close();
|
||||
WinPrint.focus();
|
||||
WinPrint.print();
|
||||
WinPrint.close();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.data = this.getModalProperties.result.data.data;
|
||||
this.generateQRcodePackage(this.data.package.id);
|
||||
this.generateBarcode(this.data.id);
|
||||
this.data = this.getModalProperties.result.data.data;
|
||||
this.generateQRcodePackage(this.data.package.id);
|
||||
this.generateBarcode(this.data.id);
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
}
|
||||
};
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,111 +1,113 @@
|
||||
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Package">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3 CSSD-font">{{ data.name }} - MC {{ (data.user != null && data.user.medical_center != null) ? data.user.medical_center.name : ''}}</h3>
|
||||
<material-card color="black" title="Show Package">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-3 mb-3">
|
||||
<h3 class="CSSD-font mt-0">
|
||||
{{ data.name }} - MC {{(data.user != null && data.user.medical_center != null) ? data.user.medical_center.name : ''}}
|
||||
</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 md3 sm3>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-info"></v-icon>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{ data.name }}</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{
|
||||
data.name
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<span class="headline ml-2 CSSD-font" style="letter-spacing:0 !important">{{ $d(new Date(data.created_at), 'long') }}</span>
|
||||
<span class="headline ml-2 CSSD-font"
|
||||
style="letter-spacing:0 !important">{{ $d(new Date(data.created_at), 'long') }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2 CSSD-font" style="letter-spacing:0 !important">{{ data.user ? data.user.name : '' }}</span>
|
||||
<span class="headline ml-2 CSSD-font"
|
||||
style="letter-spacing:0 !important">{{ data.user ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-pencil"></v-icon>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{ data.note }}</span>
|
||||
<span class="headline ml-1 CSSD-font" style="letter-spacing:0 !important">{{
|
||||
data.note
|
||||
}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="my-3">
|
||||
<h3 class="ml-3 CSSD-font">Barcode And QRCode Image</h3>
|
||||
<v-layout align-left justify-left wrap class="mt-3">
|
||||
<h3 class="CSSD-font">Barcode And QRCode Image</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-layout row wrap class="align-center mt-2">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span class="CSSD-font">Package ID : {{data.id}}</span>
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br/>
|
||||
<span class="CSSD-font">Package ID : {{ data.id }}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'https://www.cssd-doc.com/Show/Package/'+data.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-150"></a>
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg" class="WM-Align-R">
|
||||
<a :href="'https://www.cssd-doc.com/Show/Package/'+data.id+''" target="_blank">
|
||||
<img :src="QRCodeimg" class="WM-Width-150">
|
||||
</a>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3" >
|
||||
<h3 class="ml-3 CSSD-font">Items</h3>
|
||||
<v-layout align-left justify-left wrap class="px-3 mb-3">
|
||||
<h3 class="CSSD-font mt-0">Items</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<template v-if="data.items.length">
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content v-for="(item, key) in data.items" :key="key">
|
||||
<template v-slot:header>
|
||||
<div class="CSSD-font">{{ key+1 + ": " + item.name }} <span v-if="item.pivot">({{ item.pivot.count }})</span></div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ item.note }}</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content v-for="(item, key) in data.items" :key="key">
|
||||
<template v-slot:header>
|
||||
<div class="CSSD-font">{{ key + 1 + ": " + item.name }} <span
|
||||
v-if="item.pivot">({{ item.pivot.count }})</span></div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ item.note }}</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="mt-3" style="width: 100%;"> No Item Has Been Selected</p>
|
||||
</template>
|
||||
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap align-center justify-center>
|
||||
<v-flex xs12 md2 sm2 class="text-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 @click="print" >
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-layout row wrap align-center justify-center class="px-3">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
import {ApiService} from "@/services";
|
||||
import {urls} from "@/config/urls";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
barcodeimg : '',
|
||||
QRCodeimg : ''
|
||||
data: {},
|
||||
barcodeimg: '',
|
||||
QRCodeimg: ''
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
@@ -119,8 +121,8 @@ export default {
|
||||
async generateBarcode(packageId) {
|
||||
const result = await ApiService.post(urls.Barcode(packageId, 'Package'));
|
||||
if (result && result.status == 200) {
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
},
|
||||
print() {
|
||||
@@ -136,9 +138,9 @@ export default {
|
||||
|
||||
// Open the print window
|
||||
const WinPrint = window.open(
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
);
|
||||
|
||||
WinPrint.document.write(`<!DOCTYPE html>
|
||||
|
||||
@@ -144,38 +144,29 @@
|
||||
<!-- </material-card>
|
||||
<material-card> -->
|
||||
<v-layout row wrap align-center justify-center class="my-3" v-if="$hasRole('Admin|Supervisor')">
|
||||
<v-flex xs12 md2 sm2 class="text-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
|
||||
<v-spacer/>
|
||||
<v-flex class="WM-Align-R mr-1" xs12 sm6 md4 lg3
|
||||
v-if="data.verified == 'None' || (data.verified == 'NotVerified' && $hasRole('Admin'))"
|
||||
@click="verify(data.id, 'Verified')">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">Verify</span>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" v-if="data.verified == 'None' || (data.verified == 'NotVerified' && $hasRole('Admin'))"
|
||||
@click="verify(data.id, 'Verified')" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">Verify</span>
|
||||
</v-btn>
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray" v-if="data.verified == 'None' || (data.verified == 'Verified' && $hasRole('Admin'))"
|
||||
@click="verify(data.id, 'NotVerified')">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="black--text">UnVerify</span>
|
||||
</v-btn>
|
||||
<a :href="'https://www.cssd-doc.com/Show/TestResult/'+data.id">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="black--text">Go to Print Page</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex class="WM-Align-C" xs12 sm6 md3 lg2
|
||||
v-if="data.verified == 'None' || (data.verified == 'Verified' && $hasRole('Admin'))">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray"
|
||||
@click="verify(data.id, 'NotVerified')">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="black--text">UnVerify</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs6 md2 sm2>
|
||||
<a :href="'https://www.cssd-doc.com/Show/TestResult/'+data.id">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="black--text">Go to Print Page</span>
|
||||
</v-btn>
|
||||
</a>
|
||||
</v-flex>
|
||||
</a>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Users List">
|
||||
<v-form @submit.prevent="transfer">
|
||||
<v-layout align-center justify-center wrap class="px-5 my-2">
|
||||
<v-layout align-center justify-center wrap class="px-3 my-2">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -29,20 +29,21 @@
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<div class="text-xs-center mt-2" v-if="lastPage > 1">
|
||||
<div class="text-xs-center px-3 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 class="mt-3 justify-end mr-5">
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center">
|
||||
<v-layout row wrap align-center class="mt-3 px-3 justify-end">
|
||||
<v-flex xs12 sm6 md4 lg3 class="">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" @click="closeModal()">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-xs-center">
|
||||
<v-spacer/>
|
||||
<v-flex xs12 sm6 md4 lg3 class="text-md-center text-xs-center">
|
||||
<v-btn type="submit" class="WM-CyanBlueGradient-BG ml-5 px-5">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">Submit</span>
|
||||
@@ -116,7 +117,7 @@ export default {
|
||||
const result = await this.transferItem({
|
||||
itemId: this.getModalProperties.data.id,
|
||||
userId: this.selected.id,
|
||||
isUser:this.$hasRole('User')
|
||||
isUser: this.$hasRole('User')
|
||||
});
|
||||
this.setResultModal(result);
|
||||
this.closeModal();
|
||||
@@ -139,7 +140,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.headline{
|
||||
.headline {
|
||||
font-size: 16px !important;
|
||||
line-height: 22px !important;
|
||||
font-family: "Montserrat-regular" !important;
|
||||
@@ -148,7 +149,7 @@ export default {
|
||||
.user-number {
|
||||
line-height: 12px;
|
||||
font-size: 12px !important;
|
||||
margin: 0!important;
|
||||
margin: 0 !important;
|
||||
font-weight: 300;
|
||||
font-family: 'Montserrat-light' !important;
|
||||
}
|
||||
|
||||
@@ -1,28 +1,24 @@
|
||||
<template>
|
||||
<v-form>
|
||||
<v-container grid-list-xs fluid>
|
||||
<v-container grid-list-xs>
|
||||
<material-card class color="black" title="Role">
|
||||
<v-layout row align-center justify-center wrap class="px-5 mb-3">
|
||||
<v-layout row align-center justify-center wrap class="px-3 mb-3">
|
||||
<v-flex xs12 md3 sm3>
|
||||
<v-select :items="items" v-model="data.roles" label="Roles" color="black"></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap>
|
||||
<v-layout align-center justify-center wrap class="px-5 mt-2">
|
||||
<v-flex xs12 sm6 md6 lg3 class="text-center">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md6 lg3 class="text-center">
|
||||
<v-btn @click="changeRole" class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
||||
<span class="white--text">Add</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row align-center justify-center wrap class="px-3 mt-2">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"
|
||||
@click="closeModal">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span class="black--text">Close</span>
|
||||
</v-btn>
|
||||
<v-spacer/>
|
||||
<v-btn @click="changeRole" class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
||||
<span class="white--text">Add</span>
|
||||
</v-btn>
|
||||
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
+13
-16
@@ -2,8 +2,8 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Cycle">
|
||||
<v-layout wrap class="px-5 my-3">
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter pl-3">
|
||||
<v-layout wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter ">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field
|
||||
name="sterilizer_id"
|
||||
@@ -12,7 +12,7 @@
|
||||
v-model="formData.sterilizer_id"
|
||||
class="py-3 pr-3"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter pl-3">
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter ">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field
|
||||
name="cycle_number"
|
||||
@@ -85,20 +85,17 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap justify-center align-center>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-xs-center">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
<router-link :to="{name: 'AllCycle'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center">
|
||||
<router-link :to="{name: 'AllCycle'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
+22
-18
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Cycles" text>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.cycle_id" label="Cycle ID"
|
||||
@@ -51,10 +51,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="packages" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -96,7 +96,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -124,13 +124,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<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">
|
||||
<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>
|
||||
@@ -189,10 +190,8 @@ export default {
|
||||
}
|
||||
this.loadMedicalCenters();
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(
|
||||
urls.showCycle(testResultId)
|
||||
);
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showCycle(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-cycle-show",
|
||||
@@ -209,16 +208,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeCycle(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeCycle(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.packages) {
|
||||
if (
|
||||
this.packages.hasOwnProperty(key) &&
|
||||
this.packages[key].id == testResultId
|
||||
) {
|
||||
if (this.packages.hasOwnProperty(key) && this.packages[key].id == id) {
|
||||
this.packages.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Instrument">
|
||||
<v-layout align-center justify-center wrap class="px-5 my-3">
|
||||
<v-layout align-center justify-center wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field name="name" label="Name" color="black" v-model="formData.name"
|
||||
@@ -42,7 +42,7 @@
|
||||
ModelType="Item"/>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="px-5 mb-3">
|
||||
<v-layout align-center wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm12 md12>
|
||||
<v-textarea color="black" v-model="formData.note" class="pa-2" name="address">
|
||||
<template v-slot:label>
|
||||
@@ -51,8 +51,8 @@
|
||||
</v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap justify-center align-center>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center">
|
||||
<v-layout row wrap justify-center align-center class="px-3">
|
||||
<v-flex xs12 md2 sm2 class="">
|
||||
<router-link :to="{ name: 'AllItem' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
@@ -60,7 +60,8 @@
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-xs-center">
|
||||
<v-spacer/>
|
||||
<v-flex xs12 md2 sm2 class="">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
|
||||
+21
-20
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Items" text>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.item_id" label="Item ID"
|
||||
@@ -43,10 +43,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -109,7 +109,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -137,7 +137,7 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
<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>
|
||||
@@ -200,9 +200,7 @@ export default {
|
||||
}
|
||||
}
|
||||
filter += (page) ? `page=${page}` : `page=1`;
|
||||
const result = await ApiService.get(
|
||||
urls.listItem(filter)
|
||||
);
|
||||
const result = await ApiService.get(urls.listItem(filter));
|
||||
if (result && result.status == 200) {
|
||||
this.items = result.data.data;
|
||||
this.currentPage = result.data.meta.current_page;
|
||||
@@ -219,10 +217,8 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(
|
||||
urls.showItem(testResultId)
|
||||
);
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showItem(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-item-show",
|
||||
@@ -230,16 +226,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeItem(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeItem(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+13
-15
@@ -2,7 +2,7 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Label on Set ">
|
||||
<v-layout wrap class="px-5 my-3">
|
||||
<v-layout wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field name="sterilizerId" label="Sterilizer ID" color="black"
|
||||
@@ -57,21 +57,19 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap justify-center align-center>
|
||||
<v-flex xs12 sm6 md4 lg3 class="text-md-center text-sm-center text-xs-center">
|
||||
<router-link :to="{ name: 'AllLabels' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 lg3 class="text-md-center text-xs-center">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
<v-layout row wrap justify-center align-center class="px-3">
|
||||
|
||||
<router-link :to="{ name: 'AllLabels' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
+24
-23
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Labels" text>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3" v-model="filter.label_id" label="Label ID"
|
||||
@@ -49,10 +49,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -98,7 +98,7 @@
|
||||
v-bind="attrs" v-on="on"
|
||||
color="pink"
|
||||
class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -126,13 +126,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<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">
|
||||
<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>
|
||||
@@ -196,15 +197,13 @@ export default {
|
||||
}
|
||||
},
|
||||
async fillUsers() {
|
||||
const result = await ApiService.get(
|
||||
urls.listOpertorMedicalCenter(this.form.medicalCenterId)
|
||||
);
|
||||
const result = await ApiService.get(urls.listOpertorMedicalCenter(this.form.medicalCenterId));
|
||||
if (result && result.status == 200) {
|
||||
this.users = result.data.data.users;
|
||||
}
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(urls.showLabel(testResultId));
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showLabel(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-label-show",
|
||||
@@ -212,16 +211,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeLabel(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeLabel(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
@@ -246,10 +250,7 @@ export default {
|
||||
},
|
||||
getModalResult(testResult) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResult.id
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResult.id) {
|
||||
this.items[key] = testResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs>
|
||||
<material-card class color="black" title="Add Medical Center" text>
|
||||
<v-layout row wrap class="px-5 mb-3">
|
||||
<v-layout row wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3>
|
||||
<v-text-field
|
||||
v-model="medicalCenter.name"
|
||||
@@ -40,27 +40,25 @@
|
||||
/>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-flex xs12 sm6 md6 lg3 class="text-center">
|
||||
<router-link :to="{name:'ManageMedicalCenter'}">
|
||||
<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-flex>
|
||||
<v-flex xs12 sm6 md6 lg3 class="text-center">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="AddMedicalCenter" style="padding:10px 60px">
|
||||
<template v-if="$route.params.medicalCenter">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-edit</v-icon>
|
||||
<span class="white--text">Edit</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
||||
<span class="white--text">Add</span>
|
||||
</template>
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
|
||||
<router-link :to="{name:'ManageMedicalCenter'}">
|
||||
<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>
|
||||
</v-flex>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="AddMedicalCenter" style="padding:10px 60px">
|
||||
<template v-if="$route.params.medicalCenter">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-edit</v-icon>
|
||||
<span class="white--text">Edit</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
||||
<span class="white--text">Add</span>
|
||||
</template>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" @click="remove(item.id)"
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" @click="removeModal(item.id)"
|
||||
class="WM-ActionButton">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -77,7 +77,7 @@
|
||||
</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"></v-pagination>
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<router-link :to="{ name: 'Dashboard' }">
|
||||
@@ -129,12 +129,20 @@ export default {
|
||||
this.currentPage = result.data.data.current_page;
|
||||
this.lastPage = result.data.data.last_page;
|
||||
},
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-user-confirmation",
|
||||
properties: {
|
||||
width: '30'
|
||||
},
|
||||
properties: {width: '30'},
|
||||
success: async () => {
|
||||
const result = await ApiService.delete(urls.deleteMedicalCenter(id));
|
||||
this.closeModal();
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<v-layout row wrap class="px-5 mb-3">
|
||||
<v-flex xs12 md3 xs3>
|
||||
<v-text-field name="Name" v-model="filter.name" label="Name" class="pa-2"
|
||||
color="black"></v-text-field>
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 xs3>
|
||||
<v-text-field name="cell_number" v-model="filter.cell_number" label="Cell Number" class="pa-2"
|
||||
color="black"></v-text-field>
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 xs3>
|
||||
<v-select :items="roles" name="roles" v-model="filter.role" label="Roles" class="pa-2"
|
||||
color="black"></v-select>
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-xs-right">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="load" style="padding:10px 30px">
|
||||
@@ -47,11 +47,9 @@
|
||||
<td class="title font-weight-light">{{ item.cell_number }}</td>
|
||||
<td class="title font-weight-light">{{ item.status }}</td>
|
||||
<td class="text-xs-right justify-self-end">
|
||||
<v-btn
|
||||
:color="item.status == 'Active' ? 'red' : 'green'"
|
||||
<v-btn :color="item.status == 'Active' ? 'red' : 'green'"
|
||||
@click="changeStatus(item.id)"
|
||||
class="mr-2 WM-ActionButton"
|
||||
>
|
||||
class="mr-2 WM-ActionButton">
|
||||
<template v-if="item.status == 'Active'">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon>
|
||||
<span v-if="item.status == 'Active'">Suspended</span>
|
||||
@@ -61,11 +59,9 @@
|
||||
<span>Active</span>
|
||||
</template>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="orange darken-1"
|
||||
<v-btn color="orange darken-1"
|
||||
@click="changeRoleModal(item)"
|
||||
class="mr-2 WM-ActionButton"
|
||||
>
|
||||
class="mr-2 WM-ActionButton">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon>
|
||||
<span>Role</span>
|
||||
</v-btn>
|
||||
|
||||
+20
-14
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="My Items" text>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="getFilters.item_id"
|
||||
@@ -47,10 +47,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5" v-if="getMyItems">
|
||||
<v-layout align-center wrap class="my-3 px-3" v-if="getMyItems">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="getMyItems" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -110,7 +110,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -148,13 +148,14 @@
|
||||
<div class="text-xs-center" 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="mt-3">
|
||||
<v-layout row wrap align-center class="px-3 mt-3">
|
||||
<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">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text CSSD-font">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
@@ -244,16 +245,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeItem(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeItem(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="My Packages" text>
|
||||
<v-layout align-center wrap class="mt-3 px-5">
|
||||
<v-layout align-center wrap class="mt-3 px-3">
|
||||
<v-flex xs12 sm6 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.package_id" label="Package ID"
|
||||
@@ -35,10 +35,10 @@
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -62,9 +62,7 @@
|
||||
<v-btn :color="status.color" class="mr-2"
|
||||
@click="changeStatus(item, status.status)" v-bind="attrs"
|
||||
v-on="on">
|
||||
<v-icon class="white--text mr-1 caption">fas {{
|
||||
status.icon
|
||||
}}
|
||||
<v-icon class="white--text mr-1 caption">fas {{ status.icon }}
|
||||
</v-icon>
|
||||
<span>{{ status.label }}</span>
|
||||
</v-btn>
|
||||
@@ -101,7 +99,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -140,13 +138,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
<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">
|
||||
<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>
|
||||
@@ -208,8 +207,8 @@ export default {
|
||||
}
|
||||
this.loadMedicalCenters();
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(urls.showPackage(testResultId));
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showPackage(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-package-show",
|
||||
@@ -217,11 +216,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(urls.removePackage(testResultId));
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removePackage(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+19
-13
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Packages" text>
|
||||
<v-layout align-center wrap class="mt-3 px-5">
|
||||
<v-layout align-center wrap class="mt-3 px-3">
|
||||
<v-flex xs12 sm6 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.package_id" label="Package ID"
|
||||
@@ -43,10 +43,10 @@
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -112,7 +112,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -140,13 +140,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"></v-pagination>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
<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">
|
||||
<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>
|
||||
@@ -220,16 +221,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removePackage(testResultId)
|
||||
);
|
||||
const result = await ApiService.delete(urls.removePackage(testResultId));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
<span class="subheading font-weight-light text-white text--darken-3"
|
||||
style="border-radius: 5px;"
|
||||
v-text="header.text"/>
|
||||
</template>
|
||||
<template slot="items" slot-scope="{ item }">
|
||||
@@ -86,10 +87,10 @@
|
||||
<td class="title font-weight-light">{{ item.user.name }}</td>
|
||||
<td class="title font-weight-light">
|
||||
<span v-if="item.result == 'Reject'" class="ResultMsg Reject">
|
||||
{{item.result}}
|
||||
{{ item.result }}
|
||||
</span>
|
||||
<span v-else-if="item.result == 'Accept'" class="ResultMsg Accept">
|
||||
{{item.result}}
|
||||
{{ item.result }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
|
||||
@@ -141,7 +142,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" -->
|
||||
<v-btn color="pink" class="WM-ActionButton" @click="remove(item.id)"
|
||||
<v-btn color="pink" 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>
|
||||
@@ -199,9 +200,9 @@ export default {
|
||||
{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: "Result", value: "result", width: '5%'},
|
||||
{sortable: false, text: "Date", value: "date"},
|
||||
{sortable: false, text: "Verify", value: "verify",width:'5%'},
|
||||
{sortable: false, text: "Verify", value: "verify", width: '5%'},
|
||||
{sortable: false, text: "Action", value: "action", align: "center",}
|
||||
],
|
||||
filter: {
|
||||
@@ -291,9 +292,7 @@ export default {
|
||||
filter += `verified=${verified}&`;
|
||||
}
|
||||
filter += (page) ? `page=${page}` : `page=1`;
|
||||
const result = await ApiService.get(
|
||||
urls.listTestResult(filter)
|
||||
);
|
||||
const result = await ApiService.get(urls.listTestResult(filter));
|
||||
if (result && result.status == 200) {
|
||||
const {data, meta} = result.data;
|
||||
this.items = data;
|
||||
@@ -301,10 +300,8 @@ export default {
|
||||
this.lastPage = meta.last_page;
|
||||
}
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(
|
||||
urls.showTestResult(testResultId)
|
||||
);
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showTestResult(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-testresult-show",
|
||||
@@ -314,16 +311,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeTestResult(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
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 == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="TestType List" text>
|
||||
<v-layout wrap class="px-5 mb-3">
|
||||
<v-layout wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" label="Name" v-model="filter.name" color="black"/>
|
||||
@@ -73,10 +73,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center justify-center wrap class="px-5 mt-3">
|
||||
<v-layout align-center justify-center wrap class="px-3 mt-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -132,13 +132,14 @@
|
||||
<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="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<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">
|
||||
<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>
|
||||
|
||||
+22
-13
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Member List">
|
||||
<v-layout align-center justify-center wrap class="px-5 mb-3">
|
||||
<v-layout align-center justify-center wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" color="black" name="name" label="Name"
|
||||
@@ -22,8 +22,8 @@
|
||||
<v-select class="py-3 pr-3" color="black" name="role" label="Role" :items="roles"
|
||||
v-model="filter.role"/>
|
||||
</v-flex>
|
||||
<!-- </v-layout>
|
||||
<v-layout class="px-5 mb-3">-->
|
||||
<!-- </v-layout>
|
||||
<v-layout class="px-5 mb-3">-->
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="far fa-calendar-alt mr-2"/>
|
||||
<v-menu lazy :close-on-content-click="true" transition="v-scale-transition" offset-y
|
||||
@@ -44,7 +44,7 @@
|
||||
:date-format="date => new Date(date).toDateString()"/>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-spacer/>
|
||||
<v-spacer/>
|
||||
<v-flex wrap xs12 sm12 class="WM-Align-R ml-4">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load(undefined)">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
|
||||
@@ -53,10 +53,10 @@
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center justify-center wrap class="px-5 my-2">
|
||||
<v-layout align-center justify-center wrap class="px-3 my-2">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -107,7 +107,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" v-if="$hasRole('Admin')"
|
||||
class="WM-ActionButton" @click="remove(item.id)">
|
||||
class="WM-ActionButton" @click="removeModal(item.id)">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
@@ -119,19 +119,20 @@
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<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="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<router-link :to="{ name: '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">
|
||||
<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>
|
||||
@@ -236,6 +237,16 @@ export default {
|
||||
properties: {user}
|
||||
});
|
||||
},
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(userId) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-user-confirmation",
|
||||
@@ -248,9 +259,7 @@ export default {
|
||||
this.closeModal();
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items[key].id == userId
|
||||
) {
|
||||
if (this.items[key].id == userId) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user