Files
FE_CPONE/test/vuex/hs-registrasi-v2/index.php
2026-04-27 10:13:31 +07:00

242 lines
7.6 KiB
PHP

<!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>
<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 xs12 shrink>
<finish-dialog></finish-dialog>
<one-registration-tab></one-registration-tab>
</v-flex>
<v-flex xs12 fill-height >
<!-- <v-layout> -->
<tab-01 v-show="tab_active == '01'"></tab-01>
<tab-03 v-show="tab_active == '03'"></tab-03>
<tab-04 v-show="tab_active == '04'"></tab-04>
<!-- </v-layout> -->
</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/vendor/webcam.min.js"></script>
<script src="../../../libs/one_global.js"></script>
<script src="../../../libs/vendor/map/vue-google-maps.js"></script>
<!-- App Script -->
<?php
$ts = "?ts=" . Date("ymdhis");
?>
<style scoped>
.footer {
right: -15px;
left: auto;
}
</style>
<script type="module">
/*
function one_money(inp) {
return numeral(inp).format('0,000.00')
}
window.one_money = one_money
function one_float(inp) {
try {
let val = parseFloat(inp)
if (isNaN(val)) return 0.0
return val
} catch(e) {
return 0.0
}
}
window.one_float = one_float
*/
import { store } from './store.js<?php echo $ts ?>';
Vue.use(VueGoogleMaps, {
load: {
key: 'AIzaSyDHz7vf520UottjpiqGqPvvebuM4lo8G5o',
libraries: 'places'
},
});
//for testing
window.store = store;
new Vue({
store,
data : {
dialog_restart:false
},
mounted: function() {
this.$store.dispatch("doctor/search_pj")
this.$store.dispatch("language/search")
this.$store.dispatch("order/search_latlong")
var url_string = window.location.href
var url = new URL(url_string);
var c = url.searchParams.get("id");
if (c != null) {
this.$store.commit('order/update_order_id', c)
this.$store.dispatch('order/load')
}
if (!one_token())
location.replace('/one-ui/test/vuex/one-login')
},
computed : {
formattedElapsedTime() {
const date = new Date(null);
date.setSeconds(this.$store.state.order.elapsedTime / 1000);
const utc = date.toUTCString();
return utc.substr(utc.indexOf(":") - 2, 8)
//this.$store.commit('order/update_show_time',showtime)
},
tab_active () {
return store.state.tab_active
},
message_error () {
return this.$store.state.message_error
},
dialog_error () {
return this.$store.state.dialog_error
},
dialog_start: {
get() {
return this.$store.state.order.dialog_start
},
set(val) {
this.$store.commit('order/update_dialog_start',val)
}
},
status_start: {
get() {
return this.$store.state.order.status_start
},
set(val) {
this.$store.commit('order/update_status_start',val)
}
},
time_start: {
get() {
return this.$store.state.order.time_start
},
set(val) {
this.$store.commit('order/update_time_start',val)
}
},
elapsedTime: {
get() {
return this.$store.state.order.elapsedTime
},
set(val) {
this.$store.commit('order/update_elapsedTime',val)
}
}
},
methods : {
start() {
this.time_start = setInterval(() => {
this.elapsedTime += 1000;
}, 1000);
this.status_start = 'Y'
// this.show_time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
//this.dialog_start = false
var url_string = window.location.href
var url = new URL(url_string);
var pre_id = url.searchParams.get("pre_id")
this.$store.dispatch('order/get_time_start',{'id':0,pre_id:pre_id})
},
stop() {
clearInterval(this.time_start);
},
reset() {
this.elapsedTime = 0;
},
restart(){
this.dialog_restart = true
},
restart_now(){
//location.reload()
if(this.$store.state.payment.order_id && this.$store.state.payment.order_id !== 0)
this.$store.dispatch('payment/reset', {order_id:this.$store.state.payment.order_id,time_start:this.$store.state.order.show_time})
else
location.reload()
},
goToClinic() {
let x = this.$store.state.patient.selected_patient
if (x)
if (x.M_PatientNoReg) {
location.replace("/one-ui/test/vuex/one-fo-clinic-registration/?noreg="+x.M_PatientNoReg)
return
}
location.replace("/one-ui/test/vuex/one-fo-clinic-registration/")
}
},
el: '#app',
components: {
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
// 'patient-left-side' : httpVueLoader('./components/patientLeftSide.vue'),
// 'patient-right-side' : httpVueLoader('./components/patientRightSide.vue'),
'one-registration-tab': httpVueLoader('./components/oneRegistrationTab.vue'),
'tab-01' : httpVueLoader('./components/oneFoRegistrationTab01.vue'),
'tab-02' : httpVueLoader('./components/oneFoRegistrationTab02.vue'),
'tab-03' : httpVueLoader('./components/oneFoRegistrationTab03.vue'),
'tab-04' : httpVueLoader('./components/oneFoRegistrationTab04.vue'),
'tab-05' : httpVueLoader('./components/oneFoRegistrationTab05.vue'),
'finish-dialog' : httpVueLoader('./components/oneFoRegisterFinishDialog.vue'),
'one-fo-registration-doctor-new' : httpVueLoader('./components/oneFoRegistrationDoctorNewDialog.vue'),
'one-dialog-error' : httpVueLoader('../common/oneDialogError.vue')
}
})
</script>
<style>
[v-cloak] {
display: none
}
.v-content.one {
//padding:64px 0px 0px !important;
}
</style>
</body>
</html>