Flatten nested repos
This commit is contained in:
31
test/vuex/one-fo-process-from-distribution/api.js
Normal file
31
test/vuex/one-fo-process-from-distribution/api.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"http://lebaran.aplikasi.web.id/smartlab_api/vuex/t02/search_bank";
|
||||
|
||||
export async function searchBank(query, page, rowPerPage = 15) {
|
||||
try {
|
||||
var resp = await axios.post(URL, {
|
||||
query: query,
|
||||
page: page,
|
||||
rowPerPage: rowPerPage
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
query: query,
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
data.query = query;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
query: query,
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row>
|
||||
<v-flex xs8>
|
||||
<v-layout>
|
||||
<v-text-field class="flex xs4 ma-1"
|
||||
placeholder="No Lab"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
></v-text-field>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<v-layout>
|
||||
<v-btn class="flex xs6 ma-1" color="success" >
|
||||
Search
|
||||
</v-btn>
|
||||
<v-btn class="flex xs6 ma-1" color="info" >
|
||||
Kirim
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
|
||||
|
||||
<v-card class="grow">
|
||||
<v-subheader>
|
||||
Sample Dari Sampling
|
||||
</v-subheader>
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ oneMoment(props.item.date)}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.lab }}
|
||||
</td>
|
||||
<td class="pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.sid}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.name }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
<v-checkbox v-model="props.item.selected"></v-checkbox>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,xtable.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "SAMPLING",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE ID",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "Pilih",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
isLoading: false,
|
||||
patients: [
|
||||
{"status":"","date":"2019-02-21 10:00:00",
|
||||
"lab":"08000198909", "sid": "08000198909-S",
|
||||
"name": "Pasien Umum", "selected":false},
|
||||
{"status":"","date":"2019-02-22 06:30:00",
|
||||
"lab":"08000198111", "sid": "08000198111-2",
|
||||
"name": "Heri Suryawan", "selected":false},
|
||||
{"status":"","date":"2019-02-22 06:45:00",
|
||||
"lab":"08000198222", "sid": "08000198222-U",
|
||||
"name": "LUKA MODRIC","selected":true},
|
||||
]
|
||||
};
|
||||
},
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-subheader>
|
||||
Daftar Penerimaan Sample
|
||||
</v-subheader>
|
||||
<hr style="border-top:0px solid #c8c8c8;"></hr>
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ oneMoment(props.item.date) }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.lab }}
|
||||
</td>
|
||||
<td class="pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.sid}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.name }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.status}}
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
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: "KIRIM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE ID",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "Status",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false,
|
||||
patients: [
|
||||
{"status":"Pending","date": "2019-02-22 07:00:00",
|
||||
"lab":"08000198909", "sid": "08000198909-S",
|
||||
"name": "Pasien Umum", "selected":false},
|
||||
{"status":"Pending","date": "2019-02-22 06:45:00",
|
||||
"lab":"08000198111", "sid": "08000198111-2",
|
||||
"name": "Heri Suryawan", "selected":false},
|
||||
{"status":"Pending","date": "2019-02-22 06:30:00",
|
||||
"lab":"08000198222", "sid": "08000198222-U",
|
||||
"name": "LUKA MODRIC","selected":true},
|
||||
]
|
||||
};
|
||||
},
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 class="left">
|
||||
<v-layout column wrap fill-height>
|
||||
<search-box></search-box>
|
||||
<v-flex grow class="searchresult">
|
||||
search result
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchresult {
|
||||
background-color:red;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'search-box' : httpVueLoader('./searchBoxV3.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
82
test/vuex/one-fo-process-from-distribution/index.php
Normal file
82
test/vuex/one-fo-process-from-distribution/index.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content class="blue lighten-5" >
|
||||
<v-container fluid fill-height class="pl-1 pr-1 pt-2 pb-2">
|
||||
<v-layout row wrap >
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-fo-verification-from-sampling-list></one-verification-from-sampling-list>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-verification-receive-list></one-fo-verification-receive-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../../libs/vendor/axios.min.js"></script>
|
||||
<script src="../../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../../libs/vendor/vue.js"></script>
|
||||
<script src="../../../libs/vendor/vuex.js"></script>
|
||||
<script src="../../../libs/vendor/vuetify.js"></script>
|
||||
<script src="../../../libs/vendor/httpVueLoader.js"></script>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
window.oneMoment = function(d) {
|
||||
return moment(d,"YYYY-MM-DD hh:mm:ss").fromNow()
|
||||
}
|
||||
//for testing
|
||||
//window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
methods: {
|
||||
tab_selected : function(tab) {
|
||||
return this.$store.state.tab_selected == tab
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
'one-fo-verification-from-sampling-list': httpVueLoader('./components/oneFoVerificationFromSamplingList.vue'),
|
||||
'one-fo-verification-receive-list': httpVueLoader('./components/oneFoVerificationReceiveList.vue'),
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
23
test/vuex/one-fo-process-from-distribution/store.js
Normal file
23
test/vuex/one-fo-process-from-distribution/store.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import * as api from "./api.js";
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
state: {
|
||||
tab_selected : 'pasien-dokter'
|
||||
},
|
||||
mutations: {
|
||||
change_tab(state,ntab) {
|
||||
state.tab_selected = ntab
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
change_tab(context,ntab) {
|
||||
context.commit('change_tab',ntab)
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user