slcing registrasi awal

This commit is contained in:
2024-10-31 15:53:59 +07:00
parent 54f56d9602
commit 8d24534928
27 changed files with 1079 additions and 854 deletions

22
auth-code/api/api.js Normal file
View File

@@ -0,0 +1,22 @@
const URL = "";
export async function callApi(fn_url, params, headers) {
try {
console.log("API CALL")
var url = URL + fn_url
var resp = await axios.post(url, params, headers)
if (resp != 'OK') {
return {
status: 'ERR',
message: resp.message
}
} else {
}
} catch (e) {
return {
status: "ERR",
message: e.message
}
}
}

View File

@@ -0,0 +1,32 @@
<template>
<v-app id="inspire">
<div class="hidden-md-and-up">
<mobile-component></mobile-component>
</div>
<div class="hidden-md-and-down">
<dekstop-component></dekstop-component>
</div>
</v-app>
</template>
<script type="module">
import dekstop from './dekstop.vue';
import mobile from './mobile.vue';
export default {
name: "authentication",
components: {
"dekstop-component": dekstop,
"mobile-component": mobile,
},
mounted() {},
data() {
return {
visible: false,
};
},
computed: {},
methods: {},
}
</script>
<style scoped></style>

View File

@@ -0,0 +1,100 @@
<template>
<v-app id="inspire">
<v-row no-gutters>
<v-col lg="8" md="7">
<v-img
min-height="100vh"
cover
style="background-repeat: repeat-y;"
class="bg-white"
src="./images/bg-left.jpg"
></v-img>
</v-col>
<v-col lg="4" md="5">
<v-container class="fill-height" fluid>
<v-col align-self="center">
<v-card
class="mx-auto px-5 py-12"
elevation="0"
rounded="lg"
width="75%"
>
<div class="d-flex justify-center mb-16 bg-surface-variant">
<v-img
class="bg-white"
height="86px"
aspect-ratio="16/9"
src="../globalimages/logo.png"
></v-img>
</div>
<v-alert
density="compact"
:text="alert.message"
:type="alert.type"
class="mt-4 mb-3 w-100"
variant="tonal"
>
</v-alert>
<v-text-field
:label="$t('message.authtext')"
v-model="password"
:append-inner-icon="visible ? 'mdi-eye':'mdi-eye-off'"
:type="visible ? 'text' : 'password'"
:placeholder="$t('message.authtext')"
variant="outlined"
@click:append-inner="visible = !visible"
></v-text-field>
<div class="text-center">
<v-btn
:loading="loading"
@click="login"
class="mt-5 text-none"
color="blue"
size="large"
variant="elevated"
block
>
SUBMIT
<template v-slot:loader>
<v-progress-circular indeterminate></v-progress-circular>
</template>
</v-btn>
</div>
</v-card>
</v-col>
</v-container>
</v-col>
</v-row>
</v-app>
</template>
<script type="module">
export default {
name: "dekstop",
data() {
return {
visible: false
};
},
computed: {
alert() {
return this.$store.state.auth.alert
},
authcode: {
get() {
return this.$store.state.auth.authcode;
},
set(val) {
this.$store.commit("auth/setAuthcode", val);
}
}
},
methods: {
submit() {
this.$store.dispatch("auth/submit")
}
},
};
</script>
<style scoped></style>

View File

@@ -0,0 +1,87 @@
<template>
<div style="background-image: url(./images/bg-left.jpg); height: 100vh;">
<v-container class="fill-height" fluid>
<v-col align-self="center">
<v-card
class="mx-auto px-5 py-12"
elevation="0"
rounded="lg"
width="90%"
>
<div class="d-flex justify-center mb-16 bg-surface-variant">
<v-img
class="bg-white"
height="86px"
aspect-ratio="16/9"
src="../globalimages/logo.png"
></v-img>
</div>
<v-alert
density="compact"
:text="alert.message"
:type="alert.type"
class="mt-4 mb-3 w-100"
variant="tonal"
>
</v-alert>
<v-text-field
:label="$t('message.authtext')"
v-model="password"
:append-inner-icon="visible ? 'mdi-eye':'mdi-eye-off'"
:type="visible ? 'text' : 'password'"
:placeholder="$t('message.authtext')"
variant="outlined"
@click:append-inner="visible = !visible"
></v-text-field>
<div class="text-center">
<v-btn
:loading="loading"
@click="login"
class="mt-5 text-none"
color="blue"
size="large"
variant="elevated"
block
>
SUBMIT
<template v-slot:loader>
<v-progress-circular indeterminate></v-progress-circular>
</template>
</v-btn>
</div>
</v-card>
</v-col>
</v-container>
</div>
</template>
<script type="module">
export default {
name: "mobile",
data() {
return {
visible: false
};
},
computed: {
alert() {
return this.$store.state.auth.alert
},
authcode: {
get() {
return this.$store.state.auth.authcode;
},
set(val) {
this.$store.commit("auth/setAuthcode", val);
}
}
},
methods: {
submit() {
}
},
};
</script>
<style scoped></style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

118
auth-code/index.html Normal file
View File

@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Authentication</title>
<!-- Vuetify CSS -->
<link href="../css/vuetify.css" rel="stylesheet" />
<!-- Local Stylesheet for Fonts -->
<link rel="stylesheet" href="../css/styles.css" />
<link href="../css/materialdesignicon.css" rel="stylesheet" />
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
</head>
<body>
<div id="app"></div>
<!-- Moment -->
<script src="../libraries/moment.js"></script>
<!-- Vue.js -->
<!-- DEV -->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<!-- PROD -->
<!-- <script src="../libraries/vue3.4.36.global.prod.js"></script> -->
<!-- Vuex -->
<script src="../libraries/vuex.js"></script>
<!-- Vuetify -->
<script src="../libraries/vuetify3.js"></script>
<!-- vue-i18n -->
<script src="../libraries/vue-i18n.global.js"></script>
<!-- Axios -->
<script src="../libraries/axios.js"></script>
<script src="../globalscript/theme.js"></script>
<script src="../globalscript/global.js"></script>
<!-- loader single file component -->
<script src="../libraries/vue3-sfc-loader.js"></script>
<script src="./language.js"></script>
<script type="module">
const { loadModule } = window["vue3-sfc-loader"];
import system from "../globalstore/globalstore.js";
import auth from "./modules/auth.js"
const options = {
moduleCache: {
vue: Vue,
},
getFile(url) {
return fetch(url).then((response) =>
response.ok ? response.text() : Promise.reject(response)
);
},
addStyle(textContent) {
const style = document.createElement("style");
style.textContent = textContent;
const ref = document.head.getElementsByTagName("style")[0] || null;
document.head.insertBefore(style, ref)
},
};
const messages = CustomMessages;
const browserLocale = navigator.language || navigator.languages[0]
const i18n = VueI18n.createI18n({
locale: browserLocale.startsWith("id") ? "id" : "en",
fallbackLocale: "en",
messages,
});
window.i18n = i18n;
moment.locale(browserLocale.startsWith("id") ? "id" : "en");
const store = Vuex.createStore({
modules: {
system: system,
auth: auth,
},
});
const app = Vue.createApp({
data() {
return {
visible: false,
bg_src: "",
loading: false
};
},
template : `<main-component></main-component>`,
});
const vuetify = Vuetify.createVuetify({
theme: {
themes: CustomTheme,
},
});
app.use(store);
app.use(vuetify);
app.use(i18n);
const components = {
"main-component": "./components/authentication.vue",
};
Promise.all(
Object.entries(components).map(([name, path]) => {
return loadModule(path, options).then((component) => {
app.component(name, component);
});
})
)
.then(() => {
app.mount("#app");
})
.catch((error) => {
console.log("Error loading components: ", error);
});
</script>
</body>
</html>

14
auth-code/language.js Normal file
View File

@@ -0,0 +1,14 @@
var CustomMessages = {
en: {
message: {
authtext: 'Enter the authentication code',
msgInfo: 'Contact Administrator to get the authentication code',
},
},
id: {
message: {
authtext: 'Masukan kode autentifikasi',
msgInfo: "Hubungi Administrator untuk mendapatkan kode autentifikasi",
},
},
};

55
auth-code/modules/auth.js Normal file
View File

@@ -0,0 +1,55 @@
import * as api from "../api/api.js"
const Store = {
state() {
return {
alert: {
show: false,
type: 'info',
message: window.i18n.global.t('message.msgInfo')
},
authcode: "",
loading: false,
}
},
mutations: {
setAuthcode(state, data) {
state.authcode = data
},
setAlert(state, data) {
state.alert = data
},
setLoading(state, data) {
state.loading = data
}
},
actions: {
async submit({state, commit}) {
commit('setLoading', true)
try {
let fn = "linking"
let params = {
AuthCodeCode: state.authcode
}
let headers = {}
let resp = await api.callApi(fn, params, headers)
if (resp.data.status != 'OK') {
commit('setLoading', false);
} else {
commit('setLoading', false);
localStorage.setItem("token", resp.data.token)
localStorage.setItem("user", JSON.stringify(resp.data.data))
window.location.replace("")
}
} catch (error) {
console.log(error);
commit('setLoading', false);
}
}
}
}
export default Store

View File

@@ -10,23 +10,22 @@
style="background-repeat: repeat-y" style="background-repeat: repeat-y"
class="bg-white" class="bg-white"
src="./images/bg-left.jpg" src="./images/bg-left.jpg"
cover
></v-img> ></v-img>
</v-col> </v-col>
<v-col lg="4" md="5"> <v-col lg="4" md="5">
<div class="d-flex justify-center mb-6 mt-16 bg-surface-variant"> <v-container class="fill-height" fluid>
<v-img
class="bg-white"
height="12px"
aspect-ratio="1"
src="../globalimages/logo.png"
></v-img>
</div>
<v-container class="mt-16">
<v-row no-gutters justify="center"> <v-row no-gutters justify="center">
<v-col> <v-col>
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<v-card class="mx-auto px-12" elevation="0" rounded="lg"> <v-card class="mx-auto px-12" elevation="0" rounded="lg">
<div class="d-flex justify-center mb-16 bg-surface-variant">
<v-img
class="bg-white"
height="86px"
aspect-ratio="16/9"
src="../globalimages/logo.png"
></v-img>
</div>
<div class="d-flex mb-6"> <div class="d-flex mb-6">
<v-sheet class=""> <v-sheet class="">
<h2 class="text-h6 font-weight-black"> <h2 class="text-h6 font-weight-black">
@@ -55,19 +54,6 @@
:placeholder="$t('message.placeholderEmail')" :placeholder="$t('message.placeholderEmail')"
variant="outlined" variant="outlined"
></v-text-field> ></v-text-field>
<!-- <div
class="text-subtitle-1 text-medium-emphasis d-flex align-center justify-space-between"
>
{{ $t("message.password") }}
<a
class="text-caption text-decoration-none text-blue"
href="#"
rel="noopener noreferrer"
target="_blank"
>
{{ $t("message.forgotPassword") }}</a
>
</div> -->
<v-text-field <v-text-field
:label="$t('message.password')" :label="$t('message.password')"
v-model="password" v-model="password"
@@ -93,6 +79,16 @@
<v-progress-circular indeterminate></v-progress-circular> <v-progress-circular indeterminate></v-progress-circular>
</template> </template>
</v-btn> </v-btn>
<v-btn
class="my-5 text-none"
size="large"
@click="loginGoogle"
variant="outlined"
block
>
<v-img class="mr-2" src="./images/logo_google.svg" width="20px" height="20px"></v-img>
SIGN IN WITH GOOGLE
</v-btn>
</div> </div>
</v-card> </v-card>
</div> </div>
@@ -135,6 +131,9 @@ export default {
set(val) { set(val) {
this.$store.commit("login/setPassword", val); this.$store.commit("login/setPassword", val);
}, },
loginGoogle() {
this.$store.dispatch("login/loginGoogle")
}
}, },
}, },
methods: { methods: {

View File

@@ -1,86 +1,95 @@
<template> <template>
<div style="background-image: url(./images/bg-left.jpg);"> <div style="background-image: url(./images/bg-left.jpg); height: 100vh;">
<v-container class="h-100 w-100"> <v-container class="fill-height" fluid>
<v-col align-self="center"> <v-col align-self="center">
<v-card <v-card
class="mx-auto px-5 py-12" class="mx-auto px-5 py-12"
elevation="0" elevation="0"
rounded="lg" rounded="lg"
width="90%" width="90%"
>
<div class="d-flex justify-center mb-6 bg-surface-variant">
<v-img
class="bg-white"
height="86px"
aspect-ratio="16/9"
src="../globalimages/logo.png"
></v-img>
</div>
<div class="d-flex mb-6">
<v-sheet class="">
<h2 class="text-h6 font-weight-black">
{{ $t("message.title") }}
</h2>
<p class="text-subtitle-1" style="color: #637381;">
{{ $t("message.sublogin") }}
</p>
</v-sheet>
</div>
<v-alert
density="compact"
:text="alert.message"
:type="alert.type"
class="mt-4 mb-3 w-100"
variant="tonal"
> >
</v-alert> <div class="d-flex justify-center mb-6 bg-surface-variant">
<v-text-field <v-img
class="mt-3" class="bg-white"
v-model="email" height="86px"
:label="$t('message.email')" aspect-ratio="16/9"
:placeholder="$t('message.placeholderEmail')" src="../globalimages/logo.png"
variant="outlined" ></v-img>
></v-text-field> </div>
<!-- <div <div class="d-flex mb-6">
class="text-subtitle-1 text-medium-emphasis d-flex align-center justify-space-between" <v-sheet class="">
> <h2 class="text-h6 font-weight-black">
{{ $t("message.password") }} {{ $t("message.title") }}
<a </h2>
class="text-caption text-decoration-none text-blue" <p class="text-subtitle-1" style="color: #637381;">
href="#" {{ $t("message.sublogin") }}
rel="noopener noreferrer" </p>
target="_blank" </v-sheet>
> </div>
{{ $t("message.forgotPassword") }}</a <v-alert
> density="compact"
</div> --> :text="alert.message"
<v-text-field :type="alert.type"
:label="$t('message.password')" class="mt-4 mb-3 w-100"
v-model="password" variant="tonal"
:append-inner-icon="visible ? 'mdi-eye':'mdi-eye-off'"
:type="visible ? 'text' : 'password'"
:placeholder="$t('message.placeholderPassword')"
variant="outlined"
@click:append-inner="visible = !visible"
></v-text-field>
<div class="text-center">
<v-btn
:loading="loading"
@click="login"
class="mt-5 text-none"
color="blue"
size="large"
variant="elevated"
block
> >
{{ $t("message.login") }} </v-alert>
<template v-slot:loader> <v-text-field
<v-progress-circular indeterminate></v-progress-circular> class="mt-3"
</template> v-model="email"
</v-btn> :label="$t('message.email')"
</div> :placeholder="$t('message.placeholderEmail')"
</v-card> variant="outlined"
</v-col> ></v-text-field>
<!-- <div
class="text-subtitle-1 text-medium-emphasis d-flex align-center justify-space-between"
>
{{ $t("message.password") }}
<a
class="text-caption text-decoration-none text-blue"
href="#"
rel="noopener noreferrer"
target="_blank"
>
{{ $t("message.forgotPassword") }}</a
>
</div> -->
<v-text-field
:label="$t('message.password')"
v-model="password"
:append-inner-icon="visible ? 'mdi-eye':'mdi-eye-off'"
:type="visible ? 'text' : 'password'"
:placeholder="$t('message.placeholderPassword')"
variant="outlined"
@click:append-inner="visible = !visible"
></v-text-field>
<div class="text-center">
<v-btn
:loading="loading"
@click="login"
class="mt-5 text-none"
color="blue"
size="large"
variant="elevated"
block
>
{{ $t("message.login") }}
<template v-slot:loader>
<v-progress-circular indeterminate></v-progress-circular>
</template>
</v-btn>
<v-btn
class="my-5 text-none"
size="large"
variant="outlined"
block
>
<v-img class="mr-2" src="./images/logo_google.svg" width="20px" height="20px"></v-img>
SIGN IN WITH GOOGLE
</v-btn>
</div>
</v-card>
</v-col>
</v-container> </v-container>
</div> </div>
</template> </template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path fill="#FFC107" d="M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"/><path fill="#FF3D00" d="M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"/><path fill="#4CAF50" d="M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"/><path fill="#1976D2" d="M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"/></svg>

After

Width:  |  Height:  |  Size: 988 B

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BISKEU</title> <title>Login</title>
<!-- Vuetify CSS --> <!-- Vuetify CSS -->
<link href="../css/vuetify.css" rel="stylesheet" /> <link href="../css/vuetify.css" rel="stylesheet" />
<!-- Local Stylesheet for Fonts --> <!-- Local Stylesheet for Fonts -->

View File

@@ -1,7 +1,7 @@
// const URL = "/westone-api/v1/system/auth"; // const URL = "/westone-api/v1/system/auth";
// const URL = "https://devcpone.aplikasi.web.id/westone-api/v1/system/auth";
const URL = "https://devcpone.aplikasi.web.id/westone-api/v1/system/auth/"; const apiURL = "http://localhost:8080/api/v1/auth";
const store = { const store = {
namespaced: true, namespaced: true,
@@ -63,12 +63,12 @@ const store = {
message: window.i18n.global.t('message.msgInfo') message: window.i18n.global.t('message.msgInfo')
} }
let params = { let params = {
username: state.email, email: state.email,
password: state.password password: state.password
}; };
console.log(params);
try { try {
const response = await axios.post(URL + '/login', params); const response = await axios.post(apiURL + '/login', params);
console.log(response.data) console.log(response.data)
if (response.data.status != 'OK') { if (response.data.status != 'OK') {
commit('setLoading', false); commit('setLoading', false);
@@ -81,13 +81,19 @@ const store = {
} else { } else {
commit('setLoading', false); commit('setLoading', false);
commit('setData', response.data.data); commit('setData', response.data.data);
localStorage.setItem("token", response.data.data.token) localStorage.setItem("token", response.data.token)
localStorage.setItem('user', JSON.stringify(response.data.data.user)) localStorage.setItem('user', JSON.stringify(response.data.data))
//console.log(localStorage.getItem("token")) //console.log(localStorage.getItem("token"))
// if (data.user.is_courier === 'Y' && window.innerWidth < 600) // if (data.user.is_courier === 'Y' && window.innerWidth < 600)
// window.location = "/one-ui/test/vuex/one-courier-mobile/"; // window.location = "/one-ui/test/vuex/one-courier-mobile/";
// else // else
// window.location = "/" + response.data.data.user.M_UserGroupDashboard; // window.location = "/" + response.data.data.user.M_UserGroupDashboard;
if (response.data.type === 'westone') {
} else {
window.location.href = "/auth-code";
}
} }
commit('setAlert', alert) commit('setAlert', alert)
@@ -97,6 +103,9 @@ const store = {
} }
}, },
async loginGoogle() {
window.location.href = apiURL + "/google/login"
},
async loginState({ state, commit }) { async loginState({ state, commit }) {
commit('setLoading', true); commit('setLoading', true);
const params = { const params = {
@@ -105,7 +114,7 @@ const store = {
}; };
try { try {
const response = await axios.post(URL + '/login', params); const response = await axios.post(apiURL + '/login', params);
if (response.status != 'OK') { if (response.status != 'OK') {
commit('setLoading', false); commit('setLoading', false);
@@ -121,7 +130,7 @@ const store = {
}, },
async LoginParam({ commit }, params) { async LoginParam({ commit }, params) {
try { try {
const response = await axios.post(URL + '/login', params); const response = await axios.post(apiURL + '/login', params);
commit('setData', response.data); commit('setData', response.data);
} catch (error) { } catch (error) {
commit('setError', error); commit('setError', error);

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<v-card class="mb-3"> <v-card class="mb-3 rounded-lg" elevation="0">
<v-card-text> <v-card-text>
<div class="d-flex"> <div class="d-flex">
<v-text-field <v-text-field
@@ -10,79 +10,74 @@
:loading="loading" :loading="loading"
hint="NAMA + DOB (DD-MM-YYYY) + NIK + HP" hint="NAMA + DOB (DD-MM-YYYY) + NIK + HP"
hide-details="auto" hide-details="auto"
class="me-auto pr-1" class="me-auto pr-4"
density="compact" density="compact"
variant="outlined"
> >
</v-text-field> </v-text-field>
<v-btn class="rounded-lg bg-primary mr-4" size="large">
<!--<v-btn-toggle <iconify-icon
v-model="type_card" style="font-size: 1.75rem;"
variant="outlined" icon="fluent:search-24-regular"
divided ></iconify-icon>
class="mt-1"
density="compact"
>
<v-btn >
<v-icon size="x-large" icon="mdi-badge-account"></v-icon>
</v-btn> </v-btn>
<v-btn class="rounded-lg bg-primary" size="large">
<v-btn> <iconify-icon
<v-icon size="x-large" icon="mdi-book-account"></v-icon> style="font-size: 1.75rem;"
icon="fluent:add-24-regular"
></iconify-icon>
</v-btn> </v-btn>
</v-btn-toggle>-->
</div> </div>
</v-card-text> </v-card-text>
</v-card>
<v-card
border="xl"
variant="outlined"
class="scroll-container pa-2"
style="height: 70vh"
>
<v-list selectable lines="three" item-props density="compact">
<v-list-subheader inset>Hasil Pencarian Pasien</v-list-subheader>
<v-list-item <div class="mx-4">
v-for="(item, index) in items" <v-list selectable lines="three" item-props density="compact">
:key="index" <v-list-subheader class="font-weight-medium">Hasil Pencarian Pasien</v-list-subheader>
@click="handleSelect(item)"
>
<template v-slot:prepend>
<v-avatar color="grey-lighten-1">
<v-img
:src="item.prependAvatar"
class="rounded-circle"
max-width="40"
></v-img>
</v-avatar>
</template>
<template v-slot:title>
<div v-html="item.title"></div>
</template>
<template v-slot:subtitle>
<div v-html="item.subtitle"></div>
<v-chip class="mt-1 mr-1" color="pink" label size="small">
<v-icon icon="mdi-cake" start></v-icon>
{{ item.dob }}
</v-chip>
<v-chip class="mt-1 mr-1" color="primary" label size="small"> <v-list-item
<v-icon icon="mdi-phone" start></v-icon> class="rounded-lg"
{{ item.hp }} color="primary"
</v-chip> v-for="(item, index) in items"
</template> :key="index"
@click="handleSelect(item)"
>
<template v-slot:prepend>
<v-avatar color="grey-lighten-1">
<v-img
:src="item.prependAvatar"
class="rounded-circle"
max-width="40"
></v-img>
</v-avatar>
</template>
<template v-slot:title>
<p class="font-weight-medium">{{ item.title }}</p>
</template>
<template v-slot:subtitle>
<p class="font-weight-medium text-primary">{{ item.name }}</p>
<p class="text-black">{{ item.subtitle }}</p>
<v-chip class="mt-1 mr-1" color="success" label size="small">
<v-icon icon="mdi-cake" start></v-icon>
{{ item.dob }}
</v-chip>
<template v-slot:append> <v-chip class="mt-1 mr-1" color="primary" label size="small">
<v-btn <v-icon icon="mdi-phone" start></v-icon>
v-if="item.selected" {{ item.hp }}
color="green" </v-chip>
icon="mdi-check" </template>
variant="text"
></v-btn> <!-- <template v-slot:append>
</template> <v-btn
</v-list-item> v-if="item.selected"
</v-list> color="primary"
icon="mdi-check"
variant="text"
></v-btn>
</template> -->
</v-list-item>
</v-list>
</div>
</v-card> </v-card>
</div> </div>
</template> </template>
@@ -92,7 +87,8 @@ const items = [
{ {
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/3.jpg", prependAvatar: "https://cdn.vuetifyjs.com/images/lists/3.jpg",
title: "LAA0000082", title: "LAA0000082",
subtitle: `<span class="text-primary">Fatiha Rizku Nur Imansari</span> &mdash; Giwangan Tegal Turi UH.7 144 Sawunggaling, Wonokromo, Surabaya`, name: "Fatiha Rizku Nur Imansari",
subtitle: `Giwangan Tegal Turi UH.7 144 Sawunggaling, Wonokromo, Surabaya`,
dob: "19-01-2001", dob: "19-01-2001",
hp: "087731221123", hp: "087731221123",
}, },
@@ -100,7 +96,8 @@ const items = [
{ {
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/2.jpg", prependAvatar: "https://cdn.vuetifyjs.com/images/lists/2.jpg",
title: "LAA0007904", title: "LAA0007904",
subtitle: `<span class="text-primary">Stephan Wilson Mandala Putra Aditama</span> &mdash; Taman Pondok Jati BI/5 Sawunggaling, Wonokromo, Surabaya`, name: "Stephan Wilson Mandala Putra Aditama",
subtitle: `Taman Pondok Jati BI/5 Sawunggaling, Wonokromo, Surabaya`,
dob: "07-07-2002", dob: "07-07-2002",
hp: "081234222126", hp: "081234222126",
}, },
@@ -108,8 +105,8 @@ const items = [
{ {
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/1.jpg", prependAvatar: "https://cdn.vuetifyjs.com/images/lists/1.jpg",
title: "LAA0000035", title: "LAA0000035",
subtitle: name: "Ujang Taufik S.Sastramidjaja",
'<span class="text-primary">Ujang Taufik S.Sastramidjaja</span> &mdash; JL. Winata NO.14 Sawunggaling, Wonokromo, Surabaya?', subtitle: 'JL. Winata NO.14 Sawunggaling, Wonokromo, Surabaya',
dob: "14-09-1988", dob: "14-09-1988",
hp: "085111222129", hp: "085111222129",
selected: false, selected: false,
@@ -118,8 +115,8 @@ const items = [
{ {
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/4.jpg", prependAvatar: "https://cdn.vuetifyjs.com/images/lists/4.jpg",
title: "LAA0000072", title: "LAA0000072",
subtitle: name: "Santi Yuliana",
'<span class="text-primary">Santi Yuliana</span> &mdash; Darmo Permai TIM 2/41 Sawunggaling, Wonokromo, Surabaya', subtitle: 'Darmo Permai TIM 2/41 Sawunggaling, Wonokromo, Surabaya',
dob: "11-10-2004", dob: "11-10-2004",
hp: "0852343421900", hp: "0852343421900",
selected: true, selected: true,
@@ -128,8 +125,8 @@ const items = [
{ {
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/5.jpg", prependAvatar: "https://cdn.vuetifyjs.com/images/lists/5.jpg",
title: "LAA0010689", title: "LAA0010689",
subtitle: name: "Cindy Tiara Hadianti",
'<span class="text-primary">Cindy Tiara Hadianti</span> &mdash; Gunung Sari Indah OO-9 Sawunggaling, Wonokromo, Surabaya', subtitle: 'Gunung Sari Indah OO-9 Sawunggaling, Wonokromo, Surabaya',
dob: "17-01-2001", dob: "17-01-2001",
hp: "087734211126", hp: "087734211126",
selected: false, selected: false,
@@ -137,157 +134,157 @@ const items = [
]; ];
</script> </script>
<script> <script>
export default { export default {
name: "leftcomp", name: "leftcomp",
components: {}, components: {},
mounted() {}, mounted() {},
data() { data() {
return { return {
selected: {}, selected: {},
type_card: 0, type_card: 0,
value: "", value: "",
loading: false, loading: false,
expanded: [], expanded: [],
headers: [ headers: [
{ {
title: "No Reg", // pastikan menggunakan 'text' bukan 'title' title: "No Reg", // pastikan menggunakan 'text' bukan 'title'
align: "start", align: "start",
key: "M_PatientNoReg", key: "M_PatientNoReg",
sortable: true, sortable: true,
width: "15%", width: "15%",
value: "M_PatientNoReg", // tambahkan 'value' untuk identifikasi value: "M_PatientNoReg", // tambahkan 'value' untuk identifikasi
},
{
title: "Nama",
align: "start",
key: "M_PatientName",
sortable: true,
width: "35%",
value: "PatientFullName", // tambahkan 'value' untuk identifikasi
},
{
title: "Alamat",
align: "start",
key: "M_PatientAddress",
sortable: true,
value: "M_PatientAddressDescription", // tambahkan 'value' untuk identifikasi
},
],
};
},
computed: {
search: {
get() {
return this.$store.state.patient.search;
}, },
{ set(data) {
title: "Nama", this.$store.commit("setSearch", data);
align: "start",
key: "M_PatientName",
sortable: true,
width: "35%",
value: "PatientFullName", // tambahkan 'value' untuk identifikasi
}, },
{ },
title: "Alamat", patients() {
align: "start", return this.$store.state.patient.patients;
key: "M_PatientAddress", },
sortable: true, selected_patient: {
value: "M_PatientAddressDescription", // tambahkan 'value' untuk identifikasi get() {
return this.$store.state.patient.selected_patient;
},
set(data) {
this.$store.commit("setSelectedPatient", data);
}, },
],
};
},
computed: {
search: {
get() {
return this.$store.state.patient.search;
}, },
set(data) { current_page: {
this.$store.commit("setSearch", data); get() {
return this.$store.state.patient.current_page;
},
set(data) {
this.$store.commit("setCurrentPage", data);
},
},
loading: {
get() {
return this.$store.state.patient.loading;
},
set(data) {
this.$store.commit("setLoading", data);
},
},
loadmore: {
get() {
return this.$store.state.patient.loadmore;
},
set(data) {
this.$store.commit("setLoadMore", data);
},
},
itemsperpage: {
get() {
return this.$store.state.patient.itemsperpage;
},
set(data) {
this.$store.commit("setItemsPerPage", data);
},
},
sortby: {
get() {
return this.$store.state.patient.sortby;
},
set(data) {
this.$store.commit("setSortBy", data);
},
}, },
}, },
patients() { methods: {
return this.$store.state.patient.patients; handleSelect(item) {
}, console.log("Selected item:", item);
selected_patient: { this.selected = item; // Simpan item yang dipilih
get() {
return this.$store.state.patient.selected_patient;
}, },
set(data) { selectItem(data) {
this.$store.commit("setSelectedPatient", data); this.selected_patient = data;
}, },
}, isItemSelected(data) {
current_page: { return data.M_PatientID === this.$store.state.patient.selected_patient.M_PatientID;
get() {
return this.$store.state.patient.current_page;
}, },
set(data) { searchPat() {
this.$store.commit("setCurrentPage", data); this.current_page = 1;
this.searchPatients();
}, },
}, searchPatients() {
loading: { if (this.search != "") {
get() { this.loading = true;
return this.$store.state.patient.loading; const formattedSortBy =
}, this.sortby.length > 0 ? `${this.sortby[0].key}:${this.sortby[0].order}` : "";
set(data) { if (this.search !== "") {
this.$store.commit("setLoading", data); this.$store
}, .dispatch("searchPatients", {
}, current_page: this.current_page,
loadmore: { items_per_page: this.itemsperpage,
get() { sort_by: formattedSortBy,
return this.$store.state.patient.loadmore; search: this.search,
}, })
set(data) { .then(() => {
this.$store.commit("setLoadMore", data); this.loading = false;
}, });
}, }
itemsperpage: {
get() {
return this.$store.state.patient.itemsperpage;
},
set(data) {
this.$store.commit("setItemsPerPage", data);
},
},
sortby: {
get() {
return this.$store.state.patient.sortby;
},
set(data) {
this.$store.commit("setSortBy", data);
},
},
},
methods: {
handleSelect(item) {
console.log("Selected item:", item);
this.selected = item; // Simpan item yang dipilih
},
selectItem(data) {
this.selected_patient = data;
},
isItemSelected(data) {
return data.M_PatientID === this.$store.state.patient.selected_patient.M_PatientID;
},
searchPat() {
this.current_page = 1;
this.searchPatients();
},
searchPatients() {
if (this.search != "") {
this.loading = true;
const formattedSortBy =
this.sortby.length > 0 ? `${this.sortby[0].key}:${this.sortby[0].order}` : "";
if (this.search !== "") {
this.$store
.dispatch("searchPatients", {
current_page: this.current_page,
items_per_page: this.itemsperpage,
sort_by: formattedSortBy,
search: this.search,
})
.then(() => {
this.loading = false;
});
} }
} },
loadMore() {
this.current_page += 1;
this.searchPatients();
},
handleSort(sortBy) {
this.sortby = sortBy.map((sort) => ({
key: sort.key,
order: sort.order === "desc" ? "desc" : "asc",
}));
this.current_page = 1;
this.searchPatients(); // Panggil searchPatients setelah sortBy diupdate
},
}, },
loadMore() { };
this.current_page += 1;
this.searchPatients();
},
handleSort(sortBy) {
this.sortby = sortBy.map((sort) => ({
key: sort.key,
order: sort.order === "desc" ? "desc" : "asc",
}));
this.current_page = 1;
this.searchPatients(); // Panggil searchPatients setelah sortBy diupdate
},
},
};
</script> </script>
<style scoped> <style scoped>
.row-pointer >>> tbody tr :hover { .row-pointer >>> tbody tr :hover {
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@@ -0,0 +1,36 @@
<template>
<div>
<v-card class="pa-4 rounded-lg" elevation="0">
<v-toolbar color="amber-lighten-5 rounded-md" density="compact">
<v-toolbar-title class="text-title-1 font-weight-bold">DETAIL ORDER</v-toolbar-title>
</v-toolbar>
</v-card>
</div>
</template>
<script>
export default {
name: "detailordercomp",
components: {},
mounted() {},
data() {
return {
kelpelanggan: [
{ id: 1, name: "sasone 2024" },
{ id: 2, name: "sasone 2023" },
],
agreement: [
{ id: 1, name: "mcu karyawan 2024" },
{ id: 2, name: "mcu karyawan 2023" }
]
}
},
computed: {
},
methods: {
},
}
</script>

View File

@@ -1,23 +1,15 @@
<template> <template>
<div> <div>
<v-card class="scroll-container pa-2" style="height: 70vh"> <v-card class="scroll-container pa-4 rounded-lg" elevation="0">
<v-toolbar color="amber-lighten-5" density="compact"> <v-toolbar color="amber-lighten-5 rounded-md" density="compact">
<v-toolbar-title class="text-subtitle-1 font-weight-medium" <v-toolbar-title class="text-title-1 font-weight-bold">DATA PASIEN</v-toolbar-title>
>DATA PASIEN</v-toolbar-title
>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>mdi-plus</v-icon>
</v-btn>
</v-toolbar> </v-toolbar>
<v-row no-gutters class="mt-2"> <v-row no-gutters class="mt-4">
<v-col cols="3"> <v-col cols="2">
<div class="d-flex mb-2"> <div class="d-flex mb-2">
<v-img <v-img
:aspect-ratio="1" :aspect-ratio="1"
class="bg-white" class="bg-grey"
src="https://cdn.vuetifyjs.com/images/lists/4.jpg" src="https://cdn.vuetifyjs.com/images/lists/4.jpg"
width="250" width="250"
rounded rounded
@@ -45,80 +37,52 @@
<div class="d-flex mb-2"> <div class="d-flex mb-2">
<v-btn <v-btn
color="primary" color="primary"
text="Riwayat Order" text="Riwayat"
class="flex-grow-1" class="flex-grow-1"
variant="tonal" variant="tonal"
flat flat
></v-btn> ></v-btn>
</div> </div>
</v-col> </v-col>
<v-col class="pl-2" cols="9"> <v-col class="pl-4" cols="10">
<v-row no-gutters class="mt-0"> <v-text-field class="mb-2" variant="outlined" density="compact" hide-details="auto"
<v-col cols="12"> color="primary" v-model="first" label="PID"
<v-text-field ></v-text-field>
v-model="first" <v-text-field class="mb-2" variant="outlined" density="compact" hide-details="auto"
color="primary" color="primary" v-model="first" label="Nama"
density="compact" ></v-text-field>
label="PID" <v-text-field class="mb-2" variant="outlined" density="compact" hide-details="auto"
hide-details="auto" color="primary" v-model="first" label="Tanggal Lahir"
variant="underlined" ></v-text-field>
></v-text-field> <v-text-field class="mb-2" variant="outlined" density="compact" hide-details="auto"
</v-col> color="primary" v-model="first" label="Umur"
</v-row> ></v-text-field>
<v-row no-gutters class="mt-3"> <v-row no-gutters class="mb-2">
<v-col cols="3" class="pr-2"> <v-col cols="6">
<v-text-field <v-select
v-model="first" :items="genders" return-object class="pr-1" hide-details="auto"
color="primary" density="compact" label="Kartu Identitas" color="primary"
hide-details="auto" item-title="name" variant="outlined"
density="compact" ></v-select>
label="Awalan"
variant="underlined"
></v-text-field>
</v-col> </v-col>
<v-col cols="6"> <v-col cols="6">
<v-text-field <v-text-field class="pl-1" variant="outlined" density="compact" hide-details="auto"
v-model="first" color="primary" v-model="first" label="Nomor ID"
color="primary"
hide-details="auto"
density="compact"
label="Nama"
variant="underlined"
></v-text-field>
</v-col>
<v-col cols="3" class="pl-2">
<v-text-field
v-model="first"
color="primary"
hide-details="auto"
density="compact"
label="Akhiran"
variant="underlined"
></v-text-field> ></v-text-field>
</v-col> </v-col>
</v-row> </v-row>
<v-row no-gutters class="mt-3"> <v-textarea class="mb-2" variant="outlined" density="compact" hide-details="auto"
<v-col cols="6" class="pr2"> color="primary" v-model="first" label="Alamat" rows="3"
<v-select ></v-textarea>
:items="genders" <v-text-field class="mb-2" variant="outlined" density="compact" hide-details="auto"
density="compact" color="primary" v-model="first" label="Diagnosa"
label="Jenis Kelamin" ></v-text-field>
return-object <v-text-field class="mb-2" variant="outlined" density="compact" hide-details="auto"
item-title="name" color="primary" v-model="first" label="Catatan Pasien"
variant="underlined" ></v-text-field>
></v-select> <v-text-field variant="outlined" density="compact" hide-details="auto"
</v-col> color="primary" v-model="first" label="Catatan FO"
<v-col cols="6" class="pl-2"> ></v-text-field>
<v-select
:items="titles"
density="compact"
label="Sapaan"
return-object
item-title="name"
variant="underlined"
></v-select>
</v-col>
</v-row>
</v-col> </v-col>
</v-row> </v-row>
</v-card> </v-card>

View File

@@ -0,0 +1,71 @@
<template>
<div>
<v-card class="pa-4 rounded-lg" elevation="0">
<v-toolbar color="amber-lighten-5 rounded-md" density="compact">
<v-toolbar-title class="text-title-1 font-weight-bold">PEMERIKSAAN</v-toolbar-title>
</v-toolbar>
<v-text-field
append-inner-icon="mdi-magnify" hide-details="auto" variant="outlined"
class="my-4" density="compact" label="Pemeriksaan" color="primary"
></v-text-field>
<v-row no-gutters class="mt-2">
<v-col v-for="x in pemeriksaan" cols="6" class="pa-1">
<v-btn block color="primary" variant="tonal" style="justify-content: start;">
{{ x.name }}
</v-btn>
</v-col>
</v-row>
<v-divider class="mt-4 border-opacity-25"></v-divider>
<v-row no-gutters class="mt-4">
<v-col cols="10" align-self="center">
<p class="text-secondary-darken font-weight-medium">Apakah persyaratan dipenuhi?</p>
</v-col>
<v-col cols="2" class="d-flex">
<v-spacer/>
<v-btn color="error" variant="tonal" class="mr-2">
<iconify-icon style="font-size: 1.5rem;" icon="fluent:dismiss-24-regular"></iconify-icon>
</v-btn>
<v-btn color="success" variant="tonal">
<iconify-icon style="font-size: 1.5rem;" icon="fluent:checkmark-24-regular"></iconify-icon>
</v-btn>
</v-col>
</v-row>
<v-row no-gutters class="mt-4">
<v-col class="pa-1" cols="6" v-for="syarat in persyaratan">
<p class="font-weight-medium">{{ syarat.name }}</p>
</v-col>
</v-row>
<v-switch inset color="success" label="Hanya terima sample" class="mt-2"></v-switch>
</v-card>
</div>
</template>
<script>
export default {
name: "formpemeriksaancomp",
components: {},
mounted() {},
data() {
return {
pemeriksaan: [
{ id: 1, name: "SGOT" },
{ id: 2, name: "SGPT" },
{ id: 3, name: "Asam Urat" },
{ id: 4, name: "Panel Creatinin" },
],
persyaratan: [
{ id: 1, name: "Aktifitas Fisik" },
{ id: 2, name: "Hamil" },
{ id: 3, name: "Vitamin C" },
{ id: 4, name: "Alkohol" },
]
}
},
computed: {
},
methods: {
},
}
</script>

View File

@@ -0,0 +1,65 @@
<template>
<div>
<v-card class="pa-4 rounded-lg" elevation="0">
<v-toolbar color="amber-lighten-5 rounded-md" density="compact">
<v-toolbar-title class="text-title-1 font-weight-bold">PENGIRIM DAN BAHASA</v-toolbar-title>
</v-toolbar>
<v-row no-gutters class="mt-4">
<v-col cols="6">
<v-select
:items="pengirim" return-object class="pr-1 mb-2" hide-details="auto"
density="compact" label="Pengirim"
item-title="name" variant="outlined"
></v-select>
<v-select
:items="bahasa" return-object class="pr-1" hide-details="auto"
density="compact" label="Bahasa 1"
item-title="name" variant="outlined"
></v-select>
</v-col>
<v-col cols="6">
<v-select
:items="alamat" return-object class="pl-1 mb-2" hide-details="auto"
density="compact" label="Alamat"
item-title="name" variant="outlined"
></v-select>
<v-select
:items="bahasa" return-object class="pl-1" hide-details="auto"
density="compact" label="Bahasa 2"
item-title="name" variant="outlined"
></v-select>
</v-col>
</v-row>
</v-card>
</div>
</template>
<script>
export default {
name: "pengirimcomp",
components: {},
mounted() {},
data() {
return {
pengirim: [
{ id: 1, name: "Dr. Andra" },
{ id: 2, name: "Dr. Reffi" },
],
bahasa: [
{ id: 1, name: "Indonesia" },
{ id: 2, name: "Inggris" },
],
alamat: [
{ id: 1, name: "Malang" },
{ id: 2, name: "Surabaya" },
]
}
},
computed: {
},
methods: {
},
}
</script>

View File

@@ -0,0 +1,45 @@
<template>
<div>
<v-card class="pa-4 rounded-lg" elevation="0">
<v-toolbar color="amber-lighten-5 rounded-md" density="compact">
<v-toolbar-title class="text-title-1 font-weight-bold">KEL. PELANGGAN DAN AGREEMENT</v-toolbar-title>
</v-toolbar>
<div class="mt-4">
<v-select
:items="kelpelanggan" return-object class="mb-2" hide-details="auto" color="primary"
density="compact" label="Kel. Pelanggan" item-title="name" variant="outlined"
></v-select>
<v-select
:items="agreement" return-object hide-details="auto" color="primary"
density="compact" label="Agreement" item-title="name" variant="outlined"
></v-select>
</div>
</v-card>
</div>
</template>
<script>
export default {
name: "pelangganagreementcomp",
components: {},
mounted() {},
data() {
return {
kelpelanggan: [
{ id: 1, name: "sasone 2024" },
{ id: 2, name: "sasone 2023" },
],
agreement: [
{ id: 1, name: "mcu karyawan 2024" },
{ id: 2, name: "mcu karyawan 2023" }
]
}
},
computed: {
},
methods: {
},
}
</script>

View File

@@ -1,132 +0,0 @@
<template>
<div>
<v-container class="pt-0" fluid>
<div class="rounded-lg pa-5 mb-5">
<h3 class="primary-lighten">{{ $t('message.tablePatient.title') }}</h3>
</div>
<v-data-table
v-model="selected_patients"
:items="patients"
:headers="headers"
hide-default-footer
class="row-pointer"
>
<template v-slot:headers="{ columns }">
<tr>
<template v-for="column in columns" :key="column.key">
<td :class="column.class" :style="{ width: column.width, textAlign: column.align }">
<span>{{ column.title }}</span>
</td>
</template>
</tr>
</template>
<template v-slot:item="{ item }">
<tr @click="selectItem(item)" v-bind:class="{'bg-primary-lighten':isItemSelected(item)}">
<td>
<p class="font-weight-medium">{{ item.tanggal }}</p>
</td>
<td>
<p class="font-weight-medium">{{ item.noreg }}</p>
</td>
<td>
<p class="font-weight-medium">{{ item.kelpelanggan }}</p>
</td>
<td>
<p class="font-weight-medium">{{ item.nama }}</p>
</td>
<td>
<p class="font-weight-medium">{{ item.status }}</p>
</td>
</tr>
</template>
</v-data-table>
</v-container>
</div>
</template>
<script>
export default {
name: "leftcomp",
components: {},
mounted() {
},
data() {
return {
menu: false,
visible: false,
selectedItems: [],
headers: [
{
title: this.$t('message.tablePatient.date'),
align: "start",
sortable: false,
key: "date",
width: "15%",
class: "font-weight-bold",
},
{
title: this.$t('message.tablePatient.noreg'),
align: "start",
sortable: false,
key: "noreg",
width: "20%",
class: "font-weight-bold",
},
{
title: this.$t('message.tablePatient.group'),
align: "start",
sortable: false,
key: "group",
width: "25%",
class: "font-weight-bold",
},
{
title: this.$t('message.tablePatient.name'),
align: "start",
sortable: false,
key: "name",
width: "25%",
class: "font-weight-bold",
},
{
title: this.$t('message.tablePatient.status'),
align: "start",
sortable: false,
key: "status",
width: "15%",
class: "font-weight-bold",
},
],
};
},
computed: {
patients() {
return this.$store.state.collection.patients;
},
selected_patients: {
get() {
return this.$store.state.collection.selected_patients;
},
set(data) {
this.$store.commit("setSelectedPatients", data);
}
}
},
methods: {
selectItem(data) {
// this.$store.commit("setSelectedPatients", data);
this.selected_patients = data;
},
isItemSelected(data) {
return data.noreg === this.$store.state.collection.selected_patients.noreg
}
},
};
</script>
<style scoped>
.row-pointer >>> tbody tr :hover {
cursor: pointer;
}
</style>

View File

@@ -1,40 +1,31 @@
<template> <template>
<v-app style="background:#e8eaf6" > <v-app id="inspire">
<one-navbar></one-navbar> <one-navbar></one-navbar>
<v-main class="pt-12"> <v-main class="mt-3 mb-3 mx-2">
<div class="pa-4 bg-primary-lighten rounded-xl h-100">
<div class="ml-2 mr-2 mt-0 rounded h-100">
<one-tabs></one-tabs> <one-tabs></one-tabs>
<v-row>
<v-col cols="12" md="6" sm="12" xs="12" class="mt-3">
<one-left></one-left>
</v-col>
<v-col cols="12" md="6" sm="12" xs="12" class="mt-3">
<one-right></one-right>
</v-col>
</v-row>
</div> </div>
</v-main> </v-main>
</v-app> </v-app>
</template> </template>
<script type="module"> <script type="module">
import NavbarComponent from "../../globalcomponent/one-navbar.vue"; import NavbarComponent from "../../globalcomponent/one-navbar.vue";
import Tabs from "./tabs.vue";
import Tabs from "./tabs.vue"; export default {
export default { name: "registration",
name: "registration", components: {
components: { "one-navbar": NavbarComponent,
"one-navbar": NavbarComponent, "one-tabs": Tabs,
"one-tabs": Tabs, },
}, mounted() {},
mounted() {}, data() {
data() { return {
return { visible: false,
visible: false, };
}; },
}, computed: {},
computed: {}, methods: {},
methods: {}, };
};
</script> </script>

View File

@@ -1,275 +0,0 @@
<template>
<div>
<v-container class="rounded-lg" fluid>
<div class="rounded-lg pa-5">
<v-row>
<v-col cols="2">
<div class="rounded-lg bg-secondary-lighten" style="width: 100%; height: 120px;">
<!-- placeholder photo -->
</div>
</v-col>
<v-col cols="8">
<h4>{{ selected.noreg }}</h4>
<h4 class="text-grey-darken-1">{{ selected.nama }}</h4>
</v-col>
<v-col cols="2" align-self="center" class="d-flex justify-end">
<div
style="height: 40px; width: 40px; display: flex; align-items: center; justify-content: center;"
class="rounded-lg pa-2 mr-2 bg-grey-lighten-5 pointer"
v-show="selected.status === 'Call'"
>
<iconify-icon
class="text-grey"
style="font-size: 1.5rem;"
icon="fluent:arrow-previous-24-regular"
></iconify-icon>
</div>
<div
style="height: 40px; width: 40px; display: flex; align-items: center; justify-content: center;"
class="rounded-lg bg-secondary-lighten pa-2 pointer"
@click="setCall(selected)"
v-show="selected.doneCall !== 'Y'"
>
<iconify-icon
class="text-secondary-darken"
style="font-size: 1.5rem;"
:icon="setIconCall(selected.status)"
></iconify-icon>
</div>
</v-col>
</v-row>
<v-row>
<v-col cols="10">
<p class="font-weight-medium">PID</p>
</v-col>
<v-col cols="2" class="text-end">
<p class="font-weight-medium" style="color: slategray;">-</p>
</v-col>
</v-row>
<v-row no-gutters>
<v-col cols="4">
<p class="font-weight-medium">{{ $t('message.dobage') }}</p>
</v-col>
<v-col cols="4" class="text-end">
<p class="font-weight-medium" style="color: slategray;">{{ selected.dob }}</p>
</v-col>
<v-col cols="4" class="text-end">
<p class="font-weight-medium" style="color: slategray;">{{ selected.age }}</p>
</v-col>
</v-row>
</div>
</v-container>
<v-container class="bg-white rounded-lg mt-5" fluid>
<div class="bg-secondary-lighten rounded-lg pa-5 mb-5">
<v-row>
<v-col cols="10" align-self="center">
<h3 class="primary-lighten">{{ $t('message.tableDetail.title') }}: {{ details.staff }}</h3>
</v-col>
<v-col cols="2" align-self="center" class="d-flex justify-end">
<div
style="height: 32px; width: 32px; display: flex; align-items: center; justify-content: center;"
class="rounded-lg bg-primary-lighten pa-2 pointer"
>
<iconify-icon
class="text-primary-darken"
style="font-size: 1.5rem;"
icon="fluent:note-add-24-regular"
></iconify-icon>
</div>
<div
style="height: 32px; width: 32px; display: flex; align-items: center; justify-content: center;"
class="rounded-lg bg-success-lighten pa-2 ml-2 pointer"
>
<iconify-icon
class="text-success-darken"
style="font-size: 1.5rem;"
icon="fluent:notepad-person-24-regular"
></iconify-icon>
</div>
</v-col>
</v-row>
</div>
<v-data-table
:items="details.specimen"
:headers="headers"
hide-default-footer
>
<template v-slot:headers="{ columns }">
<tr>
<template v-for="column in columns" :key="column.key">
<td :class="column.class" :style="{ width: column.width, textAlign: column.align }">
<span>{{ column.title }}</span>
</td>
</template>
</tr>
</template>
<template v-slot:item="{ item }">
<tr>
<td>
<p class="font-weight-medium">{{ item.specimen }}</p>
</td>
<td>
<p class="font-weight-medium">{{ item.barcode }}</p>
</td>
<td align="center">
<div
style="display: flex; align-items: center; justify-content: center;"
class="rounded-lg pa-2"
v-if="selected.doneCall === 'Y'"
>
<div
class="pointer"
style="height: 32px; width: 32px; display: flex; align-items: center; justify-content: center;"
>
<iconify-icon
:class="{'text-error': item.requirement === 'N'}"
style="font-size: 1.5rem;"
icon="fluent:dismiss-12-filled"
@click="setReq(item, 'N')"
></iconify-icon>
</div>
<div
class="pointer"
style="height: 32px; width: 32px; display: flex; align-items: center; justify-content: center; margin-left: 8px;"
>
<iconify-icon
:class="{'text-success': item.requirement === 'Y'}"
style="font-size: 2rem;"
icon="fluent:checkmark-12-filled"
@click="setReq(item, 'Y')"
></iconify-icon>
</div>
</div>
<p v-else style="font-size: 1.5rem;">-</p>
</td>
<td align="center">
<div v-if="selected.doneCall === 'Y'" class="py-1">
<div class="bg-warning rounded-lg pa-1 text-white">
{{ formatDate(item.sDate) }}
</div>
<div :class="['rounded-lg rounded-lg pa-1 mt-1', { 'bg-grey-lighten-5': !item.eDate, 'bg-success': item.eDate }]">
{{ item.eDate === "" ? '00-00-0000 00:00': formatDate(item.eDate) }}
</div>
</div>
<p v-else style="font-size: 1.5rem;">-</p>
</td>
</tr>
</template>
</v-data-table>
<div class="ml-3">
<v-chip v-for="y in details.jenis" class="mr-2 mt-2" :color="selected.doneCall === 'Y' ? 'success' : 'primary'">{{ y }}</v-chip>
</div>
</v-container>
<v-container class="bg-white rounded-lg mt-5" fluid>
<div class="bg-secondary-lighten rounded-lg pa-5">
<h3 class="primary-lighten">{{ $t('message.examination') }}</h3>
</div>
<div>
<v-chip v-for="x in pemeriksaan" class="mt-5 mr-2" color="success">{{ x }}</v-chip>
</div>
</v-container>
</div>
</template>
<script>
export default {
name: "rightcomp",
components: {
},
mounted() {},
data() {
return {
menu: false,
visible: false,
headers: [
{
title: this.$t('message.tableDetail.speciment'),
align: "start",
sortable: false,
key: "name",
width: "20%",
class: "font-weight-bold",
},
{
title: this.$t('message.tableDetail.barcode'),
align: "start",
sortable: false,
key: "name",
width: "20%",
class: "font-weight-bold",
},
{
title: this.$t('message.tableDetail.requirement'),
align: "center",
sortable: false,
key: "name",
width: "20%",
class: "font-weight-bold",
},
{
title: this.$t('message.tableDetail.action'),
align: "center",
sortable: false,
key: "name",
width: "20%",
class: "font-weight-bold",
},
],
};
},
computed: {
selected: {
get() {
return this.$store.state.collection.selected_patients;
},
set(data) {
this.$store.commit("setSelectedPatients", data);
}
},
details: {
get() {
return this.$store.state.collection.details;
},
set(data) {
this.$store.commit("")
}
},
pemeriksaan() {
return this.$store.state.collection.pemeriksaan;
}
},
methods: {
setIconCall(status) {
switch (status.toLowerCase()) {
case "call":
return "fluent:arrow-sync-24-regular";
default:
return "fluent:speaker-2-24-regular";
}
},
setCall(data) {
if (data.status == "New") {
data.status = "Call";
} else if (data.status == "Call") {
data.doneCall = "Y";
}
},
setReq(data, status) {
data.requirement = status;
data.eDate= new Date();
},
formatDate(date) {
if (!date) return null;
return moment(date).format("DD-MM-YYYY HH:mm");
},
},
}
</script>
<style scoped>
.pointer {
cursor: pointer;
}
</style>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<v-card class="mb-0 pa-2 mt-0 pt-0"> <v-card class="pa-4 rounded-lg" elevation="0">
<v-tabs v-model="tab" align-tabs="center" color="primary" grow> <v-tabs v-model="tab" align-tabs="center" color="primary" grow>
<v-tab :value="1">DEMOGRAFI</v-tab> <v-tab :value="1">DEMOGRAFI</v-tab>
<v-tab :value="2">PEMERIKSAAN</v-tab> <v-tab :value="2">PEMERIKSAAN</v-tab>
@@ -10,13 +10,25 @@
</v-card> </v-card>
<v-tabs-window v-model="tab"> <v-tabs-window v-model="tab">
<v-tabs-window-item v-for="n in 3" :key="n" :value="n"> <v-tabs-window-item v-for="n in 4" :key="n" :value="n">
<v-row class="no-gutters"> <v-row no-gutters>
<v-col cols="12" md="6" sm="12" xs="12" class="mt-3 pr-1">
<!-- left side-->
<v-col cols="12" md="6" sm="12" xs="12" class="mt-4 pr-2">
<datatable-patient v-if="tab === 1"></datatable-patient> <datatable-patient v-if="tab === 1"></datatable-patient>
<div v-else-if="tab === 2">
<form-agreement></form-agreement>
<form-pemeriksaan class="mt-4"></form-pemeriksaan>
</div>
<div v-else-if="tab === 3">KIRIM HASIL</div>
<div v-else>PEMBAYARAN</div>
</v-col> </v-col>
<v-col cols="12" md="6" sm="12" xs="12" class="pl-1 mt-3">
<!-- right side -->
<v-col cols="12" md="6" sm="12" xs="12" class="mt-4 pl-2">
<form-patient v-if="tab === 1"></form-patient> <form-patient v-if="tab === 1"></form-patient>
<form-pengirim class="mt-4" v-if="tab === 1"></form-pengirim>
<detail-order v-if="tab === 2"></detail-order>
</v-col> </v-col>
</v-row> </v-row>
</v-tabs-window-item> </v-tabs-window-item>
@@ -26,12 +38,20 @@
<script type="module"> <script type="module">
import DatatablePatient from "./datatable_patient.vue"; import DatatablePatient from "./datatable_patient.vue";
import Detail_order from "./detail_order.vue";
import FormPatient from "./form_patient.vue"; import FormPatient from "./form_patient.vue";
import Form_pemeriksaan from "./form_pemeriksaan.vue";
import FormPengirim from "./form_pengirim.vue";
import Kelpelanggan_agreement from "./kelpelanggan_agreement.vue";
export default { export default {
name: "filtercomp", name: "filtercomp",
components: { components: {
"datatable-patient": DatatablePatient, "datatable-patient": DatatablePatient,
"form-patient": FormPatient, "form-patient": FormPatient,
"form-pengirim": FormPengirim,
"form-agreement": Kelpelanggan_agreement,
"form-pemeriksaan": Form_pemeriksaan,
"detail-order": Detail_order,
}, },
mounted() {}, mounted() {},
data() { data() {
@@ -72,7 +92,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@@ -12,10 +12,7 @@
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script> <script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
</head> </head>
<body> <body>
<v-responsive class="border rounded" max-height="300">
<div id="app"></div> <div id="app"></div>
</v-responsive>
<!-- Moment --> <!-- Moment -->
<script src="../libraries/moment.js"></script> <script src="../libraries/moment.js"></script>
<!-- Vue.js --> <!-- Vue.js -->

View File

@@ -1,14 +1,14 @@
<template> <template>
<v-app id="inspire"> <v-app id="inspire">
<one-navbar></one-navbar> <one-navbar></one-navbar>
<v-main> <v-main class="mt-3 mb-3 mx-2">
<div class="pa-5 bg-primary-lighten ml-2 rounded-xl h-100"> <div class="pa-4 bg-primary-lighten rounded-xl h-100">
<one-filter></one-filter> <one-filter></one-filter>
<v-row> <v-row no-gutters>
<v-col cols="12" md="6" sm="12" xs="12" class="mt-5"> <v-col cols="12" md="6" sm="12" xs="12" class="mt-4 pr-2">
<one-left></one-left> <one-left></one-left>
</v-col> </v-col>
<v-col cols="12" md="6" sm="12" xs="12" class="mt-5"> <v-col cols="12" md="6" sm="12" xs="12" class="mt-4 pl-2">
<one-right></one-right> <one-right></one-right>
</v-col> </v-col>
</v-row> </v-row>

View File

@@ -59,7 +59,7 @@
</v-row> </v-row>
</div> </div>
</v-container> </v-container>
<v-container class="bg-white rounded-lg mt-5" fluid> <v-container class="bg-white rounded-lg mt-4" fluid>
<div class="bg-secondary-lighten rounded-lg pa-5 mb-5"> <div class="bg-secondary-lighten rounded-lg pa-5 mb-5">
<v-row> <v-row>
<v-col cols="10" align-self="center"> <v-col cols="10" align-self="center">
@@ -160,7 +160,7 @@
<v-chip v-for="y in details.jenis" class="mr-2 mt-2" :color="selected.doneCall === 'Y' ? 'success' : 'primary'">{{ y }}</v-chip> <v-chip v-for="y in details.jenis" class="mr-2 mt-2" :color="selected.doneCall === 'Y' ? 'success' : 'primary'">{{ y }}</v-chip>
</div> </div>
</v-container> </v-container>
<v-container class="bg-white rounded-lg mt-5" fluid> <v-container class="bg-white rounded-lg mt-4" fluid>
<div class="bg-secondary-lighten rounded-lg pa-5"> <div class="bg-secondary-lighten rounded-lg pa-5">
<h3 class="primary-lighten">{{ $t('message.examination') }}</h3> <h3 class="primary-lighten">{{ $t('message.examination') }}</h3>
</div> </div>