Flatten nested repos
This commit is contained in:
295
test/vuex/one-queue-fo-v2/components/oneQueueFo.vue
Normal file
295
test/vuex/one-queue-fo-v2/components/oneQueueFo.vue
Normal file
@@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
<one-dialog-info
|
||||
:status="xinfo"
|
||||
:msg="xmsginfo"
|
||||
@close-dialog-info="closeInfo()"
|
||||
></one-dialog-info>
|
||||
|
||||
<v-toolbar class="pa-1 mb-2" color="blue lighten-3" dark height="60px">
|
||||
<v-toolbar-title>DAFTAR ANTRIAN</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<!-- item-text="serviceName" -->
|
||||
<v-select
|
||||
return-object
|
||||
:items="xservices"
|
||||
v-model="xservice"
|
||||
label="Layanan"
|
||||
:item-text="(item) => item.serviceName + ' ' + item.serviceDoctorName"
|
||||
>
|
||||
</v-select>
|
||||
</v-toolbar>
|
||||
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0 mb-5">
|
||||
<v-layout row wrap>
|
||||
<v-flex>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xqueues"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1"
|
||||
>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td
|
||||
:class="redClass(props.item)"
|
||||
style="text-align: left;"
|
||||
v-bind:class="{ 'amber lighten-4': props.item.selected }"
|
||||
>
|
||||
{{ getTime(props.item.queueCreated) }}
|
||||
</td>
|
||||
<td
|
||||
:class="redClass(props.item)"
|
||||
v-bind:class="{ 'amber lighten-4': props.item.selected }"
|
||||
>
|
||||
{{ props.item.serviceName }}
|
||||
{{ props.item.serviceDoctorName }}
|
||||
</td>
|
||||
<td
|
||||
:class="redClass(props.item)"
|
||||
v-bind:class="{ 'amber lighten-4': props.item.selected }"
|
||||
>
|
||||
{{ props.item.queueNumber }}
|
||||
</td>
|
||||
<td
|
||||
:class="redClass(props.item)"
|
||||
v-bind:class="{ 'amber lighten-4': props.item.selected }"
|
||||
>
|
||||
{{ props.item.statusName }}
|
||||
</td>
|
||||
<td
|
||||
:class="redClass(props.item)"
|
||||
class="justify-center layout px-0"
|
||||
>
|
||||
<v-btn
|
||||
v-if="
|
||||
props.item.statusName !== 'Queue Called' &&
|
||||
props.item.statusName !== 'Queue Recall'
|
||||
"
|
||||
title="Panggil"
|
||||
@click="doCall(props.item.queueNumber)"
|
||||
flat
|
||||
icon
|
||||
color="warning"
|
||||
>
|
||||
<v-icon>mic</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="
|
||||
props.item.statusName === 'Queue Called' ||
|
||||
props.item.statusName === 'Queue Recall'
|
||||
"
|
||||
title="Panggil Ulang"
|
||||
@click="
|
||||
doRecall(props.item.queueNumber, props.item.queueID)
|
||||
"
|
||||
flat
|
||||
icon
|
||||
color="brown"
|
||||
>
|
||||
<v-icon>mic</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
title="Proses"
|
||||
@click="doServe(props.item)"
|
||||
flat
|
||||
icon
|
||||
color="info"
|
||||
>
|
||||
<v-icon>account_box</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
title="Skip"
|
||||
@click="doSkip(props.item.queueNumber, props.item.queueID)"
|
||||
flat
|
||||
icon
|
||||
color="red"
|
||||
>
|
||||
<v-icon>skip_next</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
title="Selesai"
|
||||
@click="doDone(props.item.queueNumber, props.item.queueID)"
|
||||
flat
|
||||
icon
|
||||
color="success"
|
||||
>
|
||||
<v-icon>done</v-icon>
|
||||
</v-btn>
|
||||
</td></template
|
||||
>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,
|
||||
table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
.v-input__slot {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
td.isRed {
|
||||
color: #e63900;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
"one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
|
||||
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("queue/fo_url");
|
||||
this.$store.dispatch("queue/loadx", { serviceid: 0 });
|
||||
this.$store.dispatch("queue/loadservice");
|
||||
},
|
||||
methods: {
|
||||
redClass(que) {
|
||||
let cls = { isRed: false };
|
||||
if (que.queueIsRed == "Y") {
|
||||
cls = { isRed: true };
|
||||
}
|
||||
return cls;
|
||||
},
|
||||
getTime(val) {
|
||||
//return moment(val).fromNow()
|
||||
return moment(val).format("HH:mm");
|
||||
},
|
||||
doCall(numbx) {
|
||||
this.$store.dispatch("queue/docall", { number: numbx });
|
||||
// this.$store.dispatch("queue/loadx", {
|
||||
// serviceid: this.xservice.serviceID,
|
||||
// });
|
||||
},
|
||||
doRecall(numbx, qID) {
|
||||
this.$store.dispatch("queue/dorecall", { number: numbx, queueID: qID });
|
||||
// this.$store.dispatch("queue/loadx", {
|
||||
// serviceid: this.xservice.serviceID,
|
||||
// });
|
||||
},
|
||||
async doServe(item) {
|
||||
let numbx = item.queueNumber;
|
||||
let qID = item.queueID;
|
||||
await this.$store.dispatch("queue/doserve", {
|
||||
number: numbx,
|
||||
queueID: qID,
|
||||
});
|
||||
console.log("item queue", item);
|
||||
if (item.serviceIsFoOrder == "Y") {
|
||||
URL_FO =
|
||||
this.fo_url +
|
||||
"?q=" +
|
||||
item.queueNumber +
|
||||
"&id_queue=" +
|
||||
item.queueID;
|
||||
window.open(URL_FO, "_blank");
|
||||
}
|
||||
// this.$store.dispatch("queue/loadx", {
|
||||
// serviceid: this.xservice.serviceID,
|
||||
// });
|
||||
},
|
||||
doDone(numbx, qID) {
|
||||
this.$store.dispatch("queue/dodone", { number: numbx, queueID: qID });
|
||||
// this.$store.dispatch("queue/loadx", {
|
||||
// serviceid: this.xservice.serviceID,
|
||||
// });
|
||||
},
|
||||
doSkip(numbx, qID) {
|
||||
this.$store.dispatch("queue/doskip", { number: numbx, queueID: qID });
|
||||
// this.$store.dispatch("queue/loadx", {
|
||||
// serviceid: this.xservice.serviceID,
|
||||
// });
|
||||
},
|
||||
closeInfo() {
|
||||
this.$store.commit("queue/update_info", false);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
fo_url() {
|
||||
return this.$store.state.queue.fo_url;
|
||||
},
|
||||
xqueues() {
|
||||
return this.$store.state.queue.queues;
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.queue.load_queue == 1;
|
||||
},
|
||||
xinfo() {
|
||||
return this.$store.state.queue.info;
|
||||
},
|
||||
xmsginfo() {
|
||||
return this.$store.state.queue.msg_info;
|
||||
},
|
||||
xservices() {
|
||||
return this.$store.state.queue.services;
|
||||
},
|
||||
xservice: {
|
||||
get() {
|
||||
return this.$store.state.queue.selected_service;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("queue/update_selected_service", val);
|
||||
this.$store.dispatch("queue/loadx", { serviceid: val.serviceID });
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
headers: [
|
||||
{
|
||||
text: "Jam",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: " blue lighten-4",
|
||||
},
|
||||
{
|
||||
text: "Layanan",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "25%",
|
||||
class: "blue lighten-4",
|
||||
},
|
||||
{
|
||||
text: "No Antrian",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "5%",
|
||||
class: "blue lighten-4",
|
||||
},
|
||||
{
|
||||
text: "Status",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "10%",
|
||||
class: "blue lighten-4",
|
||||
},
|
||||
{
|
||||
text: "Action",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "5%",
|
||||
class: "blue lighten-4",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
128
test/vuex/one-queue-fo-v2/components/oneQueueStatus.vue
Normal file
128
test/vuex/one-queue-fo-v2/components/oneQueueStatus.vue
Normal file
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
|
||||
|
||||
<v-toolbar class="pa-1 mb-2" color="blue lighten-3" dark height="60px">
|
||||
<v-toolbar-title>STATUS ANTRIAN</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex >
|
||||
<v-data-table :headers="headers" :items="xsummaries" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.serviceName }}</td>
|
||||
<td style="text-align:center" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.total_queue }}</td>
|
||||
<td style="text-align:center" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.total_queue - props.item.total_served }}</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-progress-circular
|
||||
v-if="false"
|
||||
:rotate="360"
|
||||
:size="100"
|
||||
:width="15"
|
||||
:value="persentase"
|
||||
color="teal"
|
||||
>
|
||||
{{ value }}
|
||||
</v-progress-circular>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods : {
|
||||
getTime(val){
|
||||
return moment(val).format("HH:mm")
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
persentase(){
|
||||
var total = 0
|
||||
var sisa = 0
|
||||
var alldata = this.$store.state.summary.summaries
|
||||
/*
|
||||
_.forEach(alldata, function(value) {
|
||||
total += total + value.total_queue
|
||||
sisa += sisa + value.total_served
|
||||
})
|
||||
return (sisa/total) * 100
|
||||
*/
|
||||
},
|
||||
xsummaries(){
|
||||
return this.$store.state.summary.summaries
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.summary.load_summary == 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
headers: [
|
||||
{
|
||||
text: "Layanan",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "25%",
|
||||
class: " blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Total Antrian",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Sisa Antrian",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "10%",
|
||||
class: "blue lighten-4"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
138
test/vuex/one-queue-fo-v2/components/queueNumbering.vue
Normal file
138
test/vuex/one-queue-fo-v2/components/queueNumbering.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
|
||||
|
||||
<v-toolbar class="pa-1 mb-2" color="blue lighten-3" dark height="50px">
|
||||
<v-toolbar-title>NUMBERING</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-icon>library_add</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-data-table :headers="headers" :items="patients" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.service }}</td>
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.prefix }}</td>
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.date }}</td>
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.digit }}</td>
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.sufix }}</td>
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.counter }}</td>
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.reset }}</td>
|
||||
<td class="justify-center layout px-0">
|
||||
<v-icon small class="mr-2" @click="editItem(props.item)" > edit </v-icon>
|
||||
<v-icon small @click="deleteItem(props.item)" > delete </v-icon> </td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "Service Name",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: " blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Prefix",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Prefix Date",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Digit",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Sufix",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Counter",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Reset",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-4"
|
||||
},
|
||||
{
|
||||
text: "Action",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-4"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: true,
|
||||
patients: [
|
||||
{"service":"Antrian Umum","prefix":"001", "date": "%y%m", "digit": "6", "sufix": "1", "counter": "100", "reset": "D","action":""},
|
||||
{"service":"Antrian Perusahaan","prefix":"001", "date": "%y%m", "digit": "6", "sufix": "1", "counter": "100", "reset": "D","action":""},
|
||||
{"service":"Ambil Hasil","prefix":"001", "date": "%y%m", "digit": "6", "sufix": "1", "counter": "100", "reset": "D","action":""} ]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user