update navigation all
This commit is contained in:
293
registration/components/datatable_patient.vue
Normal file
293
registration/components/datatable_patient.vue
Normal file
@@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-card class="mb-3">
|
||||
<v-card-text>
|
||||
<div class="d-flex">
|
||||
<v-text-field
|
||||
v-model="value"
|
||||
label="Ketikkan pencarian pasien"
|
||||
placeholder="Mulai mengetik lalu tekan enter..."
|
||||
:loading="loading"
|
||||
hint="NAMA + DOB (DD-MM-YYYY) + NIK + HP"
|
||||
hide-details="auto"
|
||||
class="me-auto pr-1"
|
||||
density="compact"
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
<!--<v-btn-toggle
|
||||
v-model="type_card"
|
||||
variant="outlined"
|
||||
divided
|
||||
class="mt-1"
|
||||
density="compact"
|
||||
|
||||
>
|
||||
<v-btn >
|
||||
<v-icon size="x-large" icon="mdi-badge-account"></v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-btn>
|
||||
<v-icon size="x-large" icon="mdi-book-account"></v-icon>
|
||||
</v-btn>
|
||||
</v-btn-toggle>-->
|
||||
</div>
|
||||
</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
|
||||
v-for="(item, index) in items"
|
||||
: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>
|
||||
<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-icon icon="mdi-phone" start></v-icon>
|
||||
{{ item.hp }}
|
||||
</v-chip>
|
||||
</template>
|
||||
|
||||
<template v-slot:append>
|
||||
<v-btn
|
||||
v-if="item.selected"
|
||||
color="green"
|
||||
icon="mdi-check"
|
||||
variant="text"
|
||||
></v-btn>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const items = [
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/3.jpg",
|
||||
title: "LAA0000082",
|
||||
subtitle: `<span class="text-primary">Fatiha Rizku Nur Imansari</span> — Giwangan Tegal Turi UH.7 144 Sawunggaling, Wonokromo, Surabaya`,
|
||||
dob: "19-01-2001",
|
||||
hp: "087731221123",
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/2.jpg",
|
||||
title: "LAA0007904",
|
||||
subtitle: `<span class="text-primary">Stephan Wilson Mandala Putra Aditama</span> — Taman Pondok Jati BI/5 Sawunggaling, Wonokromo, Surabaya`,
|
||||
dob: "07-07-2002",
|
||||
hp: "081234222126",
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/1.jpg",
|
||||
title: "LAA0000035",
|
||||
subtitle:
|
||||
'<span class="text-primary">Ujang Taufik S.Sastramidjaja</span> — JL. Winata NO.14 Sawunggaling, Wonokromo, Surabaya?',
|
||||
dob: "14-09-1988",
|
||||
hp: "085111222129",
|
||||
selected: false,
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/4.jpg",
|
||||
title: "LAA0000072",
|
||||
subtitle:
|
||||
'<span class="text-primary">Santi Yuliana</span> — Darmo Permai TIM 2/41 Sawunggaling, Wonokromo, Surabaya',
|
||||
dob: "11-10-2004",
|
||||
hp: "0852343421900",
|
||||
selected: true,
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/5.jpg",
|
||||
title: "LAA0010689",
|
||||
subtitle:
|
||||
'<span class="text-primary">Cindy Tiara Hadianti</span> — Gunung Sari Indah OO-9 Sawunggaling, Wonokromo, Surabaya',
|
||||
dob: "17-01-2001",
|
||||
hp: "087734211126",
|
||||
selected: false,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: "leftcomp",
|
||||
components: {},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
selected: {},
|
||||
type_card: 0,
|
||||
value: "",
|
||||
loading: false,
|
||||
expanded: [],
|
||||
headers: [
|
||||
{
|
||||
title: "No Reg", // pastikan menggunakan 'text' bukan 'title'
|
||||
align: "start",
|
||||
key: "M_PatientNoReg",
|
||||
sortable: true,
|
||||
width: "15%",
|
||||
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) {
|
||||
this.$store.commit("setSearch", data);
|
||||
},
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients;
|
||||
},
|
||||
selected_patient: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_patient;
|
||||
},
|
||||
set(data) {
|
||||
this.$store.commit("setSelectedPatient", data);
|
||||
},
|
||||
},
|
||||
current_page: {
|
||||
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);
|
||||
},
|
||||
},
|
||||
},
|
||||
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
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.row-pointer >>> tbody tr :hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
439
registration/components/datatable_patient_old.vue
Normal file
439
registration/components/datatable_patient_old.vue
Normal file
@@ -0,0 +1,439 @@
|
||||
<template>
|
||||
<div >
|
||||
|
||||
<v-card class="mb-3">
|
||||
<v-card-text>
|
||||
<div class="d-flex">
|
||||
<v-text-field
|
||||
v-model="value"
|
||||
label="Ketikkan pencarian pasien"
|
||||
placeholder="Mulai mengetik lalu tekan enter..."
|
||||
:loading="loading"
|
||||
hint="NAMA + DOB (DD-MM-YYYY) + NIK + HP"
|
||||
hide-details="auto"
|
||||
class="me-auto pr-3"
|
||||
density="compact"
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
|
||||
<v-btn-toggle
|
||||
v-model="type_card"
|
||||
variant="outlined"
|
||||
divided
|
||||
class="mt-1"
|
||||
density="compact"
|
||||
|
||||
>
|
||||
<v-btn >
|
||||
<v-icon size="x-large" icon="mdi-badge-account"></v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-btn>
|
||||
<v-icon size="x-large" icon="mdi-book-account"></v-icon>
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
</div>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card border="xl" variant="outlined" class="scroll-container pa-2" style="height:70vh">
|
||||
<v-card
|
||||
class="mb-3"
|
||||
subtitle="AAE0033398"
|
||||
color="orange-lighten-5"
|
||||
dark
|
||||
prepend-avatar="https://cdn.vuetifyjs.com/images/profiles/marcus.jpg"
|
||||
>
|
||||
|
||||
<template v-slot:title>
|
||||
<span class="text-subtitle-1 font-weight-bold">Fajri Hardhita M</span>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<v-btn
|
||||
class="ma-2 text-none"
|
||||
color="success"
|
||||
label
|
||||
v-show="type_card == 1"
|
||||
size="small"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-icon icon="mdi-check" start></v-icon>
|
||||
Telah dipilih
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-card-text class="pt-1 pl-0 ml-0 mb-0 pb-0 pr-2">
|
||||
<div class="d-flex justify-start no-gutters">
|
||||
<v-chip
|
||||
class="ma-2"
|
||||
color="pink"
|
||||
label
|
||||
|
||||
size="small"
|
||||
>
|
||||
<v-icon icon="mdi-label" start></v-icon>
|
||||
Tags
|
||||
</v-chip>
|
||||
|
||||
<v-chip
|
||||
class="ma-2"
|
||||
color="primary"
|
||||
label
|
||||
size="small"
|
||||
>
|
||||
<v-icon icon="mdi-account-circle-outline" start></v-icon>
|
||||
John Leider
|
||||
</v-chip>
|
||||
<v-chip
|
||||
class="ma-2"
|
||||
color="cyan"
|
||||
size="small"
|
||||
label
|
||||
>
|
||||
<v-icon icon="mdi-twitter" start></v-icon>
|
||||
New Tweets
|
||||
</v-chip>
|
||||
</div>
|
||||
<v-card v-show="type_card == 0" class="ml-2 mb-0 mr-0 pr-0"
|
||||
variant="tonal"
|
||||
density="compact"
|
||||
color="blue-grey-lighten-1"
|
||||
text="Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi, ratione debitis quis est labore voluptatibus!"
|
||||
></v-card>
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="type_card == 0">
|
||||
<v-btn
|
||||
color="success"
|
||||
prepend-icon='mdi-check'
|
||||
class="text-none"
|
||||
block
|
||||
text="Pasien telah dipilih"
|
||||
variant="tonal"
|
||||
></v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
<v-card
|
||||
class="mb-3"
|
||||
subtitle="AAE0033398"
|
||||
|
||||
prepend-avatar="https://cdn.vuetifyjs.com/images/profiles/marcus.jpg"
|
||||
>
|
||||
|
||||
<template v-slot:title>
|
||||
<span class="text-subtitle-1 font-weight-bold">Fajri Hardhita M</span>
|
||||
</template>
|
||||
<template v-slot:append >
|
||||
<v-btn
|
||||
v-show="type_card == 1"
|
||||
class="ma-2 text-white text-none"
|
||||
color="blue-lighten-2"
|
||||
label
|
||||
size="small"
|
||||
variant="elevated"
|
||||
>
|
||||
Pilih pasien
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-divider></v-divider>
|
||||
<v-card-text class="pt-1 pl-0 ml-0 mb-0 pb-0 pr-2">
|
||||
<div class="d-flex justify-start no-gutters">
|
||||
<v-chip
|
||||
class="ma-2"
|
||||
color="pink"
|
||||
label
|
||||
size="small"
|
||||
>
|
||||
<v-icon icon="mdi-label" start></v-icon>
|
||||
Tags
|
||||
</v-chip>
|
||||
|
||||
<v-chip
|
||||
class="ma-2"
|
||||
color="primary"
|
||||
label
|
||||
size="small"
|
||||
>
|
||||
<v-icon icon="mdi-account-circle-outline" start></v-icon>
|
||||
John Leider
|
||||
</v-chip>
|
||||
<v-chip
|
||||
class="ma-2"
|
||||
color="cyan"
|
||||
size="small"
|
||||
label
|
||||
>
|
||||
<v-icon icon="mdi-twitter" start></v-icon>
|
||||
New Tweets
|
||||
</v-chip>
|
||||
</div>
|
||||
<v-card class="ml-2 mb-0 mr-0 pr-0"
|
||||
variant="tonal"
|
||||
v-show="type_card == 0"
|
||||
density="compact"
|
||||
text="Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi, ratione debitis quis est labore voluptatibus!"
|
||||
></v-card>
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="type_card == 0">
|
||||
<v-btn
|
||||
color="blue-lighten-2"
|
||||
text="Pilih pasien"
|
||||
class="text-none"
|
||||
block
|
||||
border
|
||||
@click="reserve"
|
||||
></v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
<v-divider class="mt-2 mb-2"></v-divider>
|
||||
<v-card>
|
||||
<v-btn
|
||||
color="orange-lighten-3"
|
||||
text="Tampilkan lebih banyak"
|
||||
class="text-none"
|
||||
block
|
||||
border="5px"
|
||||
></v-btn>
|
||||
</v-card>
|
||||
</v-card>
|
||||
|
||||
<!--<v-data-table-server
|
||||
:headers="headers"
|
||||
:items="patients"
|
||||
:items-per-page="itemperpage"
|
||||
:sort-by="sortby"
|
||||
height="47vh"
|
||||
fixed-header
|
||||
:loading="loading"
|
||||
@update:sort-by="handleSort"
|
||||
>
|
||||
<template v-slot:top>
|
||||
<div class="d-flex align-center mb-2">
|
||||
<v-sheet style="width: 100%" class="pr-2">
|
||||
<v-text-field
|
||||
variant="outlined"
|
||||
v-model="search"
|
||||
placeholder="Ketikkan kata pencarian"
|
||||
label="Cari"
|
||||
hint="Nama+NIK+DOB+HP+Alamat"
|
||||
@keyup.enter="searchPat"
|
||||
density="compact"
|
||||
></v-text-field
|
||||
></v-sheet>
|
||||
<v-sheet style="width: 60px" class="text-center">
|
||||
<v-btn
|
||||
:disabled="loading"
|
||||
@click="searchPat"
|
||||
height="40"
|
||||
min-width="40"
|
||||
class="mb-5"
|
||||
color="primary"
|
||||
>
|
||||
<v-icon>mdi-magnify</v-icon>
|
||||
</v-btn>
|
||||
</v-sheet>
|
||||
<v-sheet style="width: 60px" class="text-center pl-2">
|
||||
<v-btn height="40" min-width="40" class="mb-5" color="warning">
|
||||
<v-icon>mdi-plus</v-icon>
|
||||
</v-btn>
|
||||
</v-sheet>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item="{ item }">
|
||||
<tr
|
||||
@click="selectItem(item)"
|
||||
v-bind:class="{ 'bg-primary-lighten': isItemSelected(item) }"
|
||||
>
|
||||
<td>{{ item.M_PatientNoReg }}</td>
|
||||
<td>
|
||||
<p class="mb-0">{{ item.PatientFullName }}</p>
|
||||
<p
|
||||
class="text-caption text-no-wrap bg-secondary"
|
||||
style="padding-left: 0.3rem; width: 10rem"
|
||||
>
|
||||
NIK : {{ item.M_PatientIDNumber }}
|
||||
</p>
|
||||
</td>
|
||||
<td>{{ item.M_PatientAddressDescription }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-slot:bottom>
|
||||
<div v-if="patients.length > 0" class="text-center pt-2">
|
||||
<v-btn
|
||||
:loading="loading"
|
||||
v-if="loadmore"
|
||||
@click="loadMore()"
|
||||
class="mt-3 mb-0 text-none"
|
||||
variant="tonal"
|
||||
color="primary-darken"
|
||||
block
|
||||
>Tampilkan data lebih banyak ...</v-btn
|
||||
>
|
||||
<v-btn
|
||||
v-if="!loadmore"
|
||||
class="mt-3 mb-0 text-none"
|
||||
color="error-darken"
|
||||
block
|
||||
variant="tonal"
|
||||
>Sudah tidak ada data ditemukan</v-btn
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table-server>-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "leftcomp",
|
||||
components: {},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
type_card:0,
|
||||
value:'',
|
||||
loading:false,
|
||||
expanded: [],
|
||||
headers: [
|
||||
{
|
||||
title: "No Reg", // pastikan menggunakan 'text' bukan 'title'
|
||||
align: "start",
|
||||
key: "M_PatientNoReg",
|
||||
sortable: true,
|
||||
width: "15%",
|
||||
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) {
|
||||
this.$store.commit("setSearch", data);
|
||||
},
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients;
|
||||
},
|
||||
selected_patient: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_patient;
|
||||
},
|
||||
set(data) {
|
||||
this.$store.commit("setSelectedPatient", data);
|
||||
},
|
||||
},
|
||||
current_page: {
|
||||
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);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
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
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.row-pointer >>> tbody tr :hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
339
registration/components/form_patient.vue
Normal file
339
registration/components/form_patient.vue
Normal file
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-card class="scroll-container pa-2" style="height: 70vh">
|
||||
<v-toolbar color="amber-lighten-5" density="compact">
|
||||
<v-toolbar-title class="text-subtitle-1 font-weight-medium"
|
||||
>DATA PASIEN</v-toolbar-title
|
||||
>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn icon>
|
||||
<v-icon>mdi-plus</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<v-row no-gutters class="mt-2">
|
||||
<v-col cols="3">
|
||||
<div class="d-flex mb-2">
|
||||
<v-img
|
||||
:aspect-ratio="1"
|
||||
class="bg-white"
|
||||
src="https://cdn.vuetifyjs.com/images/lists/4.jpg"
|
||||
width="250"
|
||||
rounded
|
||||
cover
|
||||
></v-img>
|
||||
</div>
|
||||
<div class="d-flex mb-2">
|
||||
<v-btn
|
||||
color="primary"
|
||||
text="Ganti Foto"
|
||||
class="flex-grow-1"
|
||||
variant="tonal"
|
||||
flat
|
||||
></v-btn>
|
||||
</div>
|
||||
<div class="d-flex mb-2">
|
||||
<v-btn
|
||||
color="primary"
|
||||
text="Update Data"
|
||||
class="flex-grow-1"
|
||||
variant="tonal"
|
||||
flat
|
||||
></v-btn>
|
||||
</div>
|
||||
<div class="d-flex mb-2">
|
||||
<v-btn
|
||||
color="primary"
|
||||
text="Riwayat Order"
|
||||
class="flex-grow-1"
|
||||
variant="tonal"
|
||||
flat
|
||||
></v-btn>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col class="pl-2" cols="9">
|
||||
<v-row no-gutters class="mt-0">
|
||||
<v-col cols="12">
|
||||
<v-text-field
|
||||
v-model="first"
|
||||
color="primary"
|
||||
density="compact"
|
||||
label="PID"
|
||||
hide-details="auto"
|
||||
variant="underlined"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3">
|
||||
<v-col cols="3" class="pr-2">
|
||||
<v-text-field
|
||||
v-model="first"
|
||||
color="primary"
|
||||
hide-details="auto"
|
||||
density="compact"
|
||||
label="Awalan"
|
||||
variant="underlined"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<v-text-field
|
||||
v-model="first"
|
||||
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-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3">
|
||||
<v-col cols="6" class="pr2">
|
||||
<v-select
|
||||
:items="genders"
|
||||
density="compact"
|
||||
label="Jenis Kelamin"
|
||||
return-object
|
||||
item-title="name"
|
||||
variant="underlined"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="6" class="pl-2">
|
||||
<v-select
|
||||
:items="titles"
|
||||
density="compact"
|
||||
label="Sapaan"
|
||||
return-object
|
||||
item-title="name"
|
||||
variant="underlined"
|
||||
></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const titles = [
|
||||
{ id: "1", name: "Tn" },
|
||||
{ id: "2", name: "Bapak" },
|
||||
];
|
||||
const genders = [
|
||||
{ id: "M", name: "Laki-laki" },
|
||||
{ id: "P", name: "Perempuan" },
|
||||
];
|
||||
const items = [
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/3.jpg",
|
||||
title: "LAA0000082",
|
||||
subtitle: `<span class="text-primary">Fatiha Rizku Nur Imansari</span> — Giwangan Tegal Turi UH.7 144 Sawunggaling, Wonokromo, Surabaya`,
|
||||
dob: "19-01-2001",
|
||||
hp: "087731221123",
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/2.jpg",
|
||||
title: "LAA0007904",
|
||||
subtitle: `<span class="text-primary">Stephan Wilson Mandala Putra Aditama</span> — Taman Pondok Jati BI/5 Sawunggaling, Wonokromo, Surabaya`,
|
||||
dob: "07-07-2002",
|
||||
hp: "081234222126",
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/4.jpg",
|
||||
title: "LAA0000035",
|
||||
subtitle:
|
||||
'<span class="text-primary">Ujang Taufik S.Sastramidjaja</span> — JL. Winata NO.14 Sawunggaling, Wonokromo, Surabaya?',
|
||||
dob: "14-09-1988",
|
||||
hp: "085111222129",
|
||||
selected: true,
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/1.jpg",
|
||||
title: "LAA0000072",
|
||||
subtitle:
|
||||
'<span class="text-primary">Santi Yuliana</span> — Darmo Permai TIM 2/41 Sawunggaling, Wonokromo, Surabaya',
|
||||
dob: "11-10-2004",
|
||||
hp: "0852343421900",
|
||||
selected: false,
|
||||
},
|
||||
|
||||
{
|
||||
prependAvatar: "https://cdn.vuetifyjs.com/images/lists/5.jpg",
|
||||
title: "LAA0010689",
|
||||
subtitle:
|
||||
'<span class="text-primary">Cindy Tiara Hadianti</span> — Gunung Sari Indah OO-9 Sawunggaling, Wonokromo, Surabaya',
|
||||
dob: "17-01-2001",
|
||||
hp: "087734211126",
|
||||
selected: false,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: "leftcomp",
|
||||
components: {},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
selected: {},
|
||||
type_card: 0,
|
||||
value: "",
|
||||
loading: false,
|
||||
expanded: [],
|
||||
headers: [
|
||||
{
|
||||
title: "No Reg", // pastikan menggunakan 'text' bukan 'title'
|
||||
align: "start",
|
||||
key: "M_PatientNoReg",
|
||||
sortable: true,
|
||||
width: "15%",
|
||||
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) {
|
||||
this.$store.commit("setSearch", data);
|
||||
},
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients;
|
||||
},
|
||||
selected_patient: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_patient;
|
||||
},
|
||||
set(data) {
|
||||
this.$store.commit("setSelectedPatient", data);
|
||||
},
|
||||
},
|
||||
current_page: {
|
||||
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);
|
||||
},
|
||||
},
|
||||
},
|
||||
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
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.row-pointer >>> tbody tr :hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
132
registration/components/left.vue
Normal file
132
registration/components/left.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<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>
|
||||
40
registration/components/main.vue
Normal file
40
registration/components/main.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<v-app style="background:#e8eaf6" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-main class="pt-12">
|
||||
|
||||
<div class="ml-2 mr-2 mt-0 rounded h-100">
|
||||
<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>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script type="module">
|
||||
import NavbarComponent from "../../globalcomponent/one-navbar.vue";
|
||||
|
||||
import Tabs from "./tabs.vue";
|
||||
export default {
|
||||
name: "registration",
|
||||
components: {
|
||||
"one-navbar": NavbarComponent,
|
||||
"one-tabs": Tabs,
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
275
registration/components/right.vue
Normal file
275
registration/components/right.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<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>
|
||||
78
registration/components/tabs.vue
Normal file
78
registration/components/tabs.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-card class="mb-0 pa-2 mt-0 pt-0">
|
||||
<v-tabs v-model="tab" align-tabs="center" color="primary" grow>
|
||||
<v-tab :value="1">DEMOGRAFI</v-tab>
|
||||
<v-tab :value="2">PEMERIKSAAN</v-tab>
|
||||
<v-tab :value="3">KIRIM HASIL</v-tab>
|
||||
<v-tab disabled :value="4">PEMBAYARAN</v-tab>
|
||||
</v-tabs>
|
||||
</v-card>
|
||||
|
||||
<v-tabs-window v-model="tab">
|
||||
<v-tabs-window-item v-for="n in 3" :key="n" :value="n">
|
||||
<v-row class="no-gutters">
|
||||
<v-col cols="12" md="6" sm="12" xs="12" class="mt-3 pr-1">
|
||||
<datatable-patient v-if="tab === 1"></datatable-patient>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" sm="12" xs="12" class="pl-1 mt-3">
|
||||
<form-patient v-if="tab === 1"></form-patient>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-tabs-window-item>
|
||||
</v-tabs-window>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script type="module">
|
||||
import DatatablePatient from "./datatable_patient.vue";
|
||||
import FormPatient from "./form_patient.vue";
|
||||
export default {
|
||||
name: "filtercomp",
|
||||
components: {
|
||||
"datatable-patient": DatatablePatient,
|
||||
"form-patient": FormPatient,
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
menu: false,
|
||||
visible: false,
|
||||
tab: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
date: {
|
||||
get() {
|
||||
return this.$store.state.collection.date;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("setDate", val);
|
||||
},
|
||||
},
|
||||
temp_dropdown: {
|
||||
get() {
|
||||
return this.$store.state.collection.temp_dropdown;
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatDate() {
|
||||
if (!this.date) return null;
|
||||
|
||||
return moment(this.date).format("DD-MM-YYYY");
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null;
|
||||
const [day, month, year] = date.split("-");
|
||||
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user