Flatten nested repos
This commit is contained in:
154
test/vuex/one-sample-electromedis/index.php
Normal file
154
test/vuex/one-sample-electromedis/index.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<!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/icomoon-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body v-on:key="doSomething">
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content style="background:#F5E8DF!important" >
|
||||
<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>
|
||||
<one-sample-call-so-list></one-sample-call-so-list>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<one-sample-call-so-info></one-sample-call-so-info>
|
||||
<one-sample-call-so-detail></one-sample-call-so-detail>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../../libs/vendor/numeral.min.js"></script>
|
||||
<script src="../../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../../libs/vendor/lodash.js"></script>
|
||||
<script src="../../../libs/vendor/axios.min.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>
|
||||
<script src="../../../libs/one_global.js"></script>
|
||||
<script src="../../../libs/one_print_barcode.js"></script>
|
||||
<script src="../../../libs/vendor/socket.io.js"></script>
|
||||
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
window.calculate_age = function (inp_dob) {
|
||||
var now = moment(new Date())
|
||||
var dob = moment(new Date(inp_dob))
|
||||
var year = now.diff(dob,'years')
|
||||
dob.add(year,'years')
|
||||
var month = now.diff(dob,'months')
|
||||
dob.add(month,'months')
|
||||
var day = now.diff(dob,'days')
|
||||
if (isNaN(year)) return ''
|
||||
return `${year} tahun ${month} bulan ${day} hari`
|
||||
}
|
||||
|
||||
var socketIoUrl = "http://" + window.location.host + ":9090/";
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
data : {
|
||||
socket : io.connect(socketIoUrl,{forceNew:false})
|
||||
},
|
||||
store,
|
||||
el: '#app',
|
||||
mounted(){
|
||||
document.addEventListener('keypress',logKeyboard)
|
||||
window.key_enter = ''
|
||||
async function logKeyboard(e) {
|
||||
window.key_enter = (window.key_enter + e.key).toUpperCase()
|
||||
if(e.key == 'Enter') {
|
||||
if(window.key_enter.includes('STF')){
|
||||
var prm = {search:window.key_enter.replace('ENTER','').trim()}
|
||||
await store.dispatch("samplecall/search_staff",prm)
|
||||
}else{
|
||||
var prm = {search:window.key_enter.replace('ENTER','').trim()}
|
||||
store.dispatch("samplecall/search_patient",prm)
|
||||
}
|
||||
window.key_enter = ''
|
||||
}
|
||||
}
|
||||
let self = this
|
||||
self.socket.on("notification", async function(msg) {
|
||||
switch(msg.type) {
|
||||
case "fo-verification-y" :
|
||||
let status_id = 0;
|
||||
try {
|
||||
status_id = self.$store.sate.samplecall.selected_status.id;
|
||||
} catch(e) {};
|
||||
let station_id= 0;
|
||||
try {
|
||||
station_id= self.$store.sate.samplecall.selected_station.id;
|
||||
} catch(e) {};
|
||||
let company_id= 0;
|
||||
try {
|
||||
company_id= self.$store.sate.samplecall.selected_company.id;
|
||||
} catch(e) {};
|
||||
await self.$store.dispatch("samplecall/getstationstatus",{
|
||||
name:self.$store.state.samplecall.name,
|
||||
nolab:self.$store.state.samplecall.nolab,
|
||||
stationid: station_id,
|
||||
statusid: status_id,
|
||||
companyid: company_id,
|
||||
lastid: -1
|
||||
})
|
||||
await self.$store.dispatch("samplecall/search",{
|
||||
name:self.$store.state.samplecall.name,
|
||||
nolab:self.$store.state.samplecall.nolab,
|
||||
stationid: station_id,
|
||||
statusid: status_id,
|
||||
companyid: company_id,
|
||||
lastid: -1
|
||||
})
|
||||
break;
|
||||
}
|
||||
});
|
||||
},
|
||||
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-sample-call-so-list': httpVueLoader('./components/oneSampleCallSOList.vue'),
|
||||
'one-sample-call-so-info': httpVueLoader('./components/oneSampleCallSOInfo.vue'),
|
||||
'one-sample-call-so-detail': httpVueLoader('./components/oneSampleCallSODetail.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user