diff --git a/components/Navbar.vue b/components/Navbar.vue
index fbb044c..0908274 100644
--- a/components/Navbar.vue
+++ b/components/Navbar.vue
@@ -54,12 +54,18 @@
to="/satu_rssa/logapi"
>
+
+
-
+
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 9107fa0..07e089b 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -27,6 +27,11 @@ export default defineNuxtConfig({
download:false,
useStylesheet:true,
},
+ runtimeConfig:{
+ public:{
+ API_URL: process.env.API_URL
+ },
+ },
compatibilityDate: "2024-09-09",
});
\ No newline at end of file
diff --git a/pages/satu_rssa/jadwal_dokter/index.vue b/pages/satu_rssa/jadwal_dokter/index.vue
new file mode 100644
index 0000000..8473d6e
--- /dev/null
+++ b/pages/satu_rssa/jadwal_dokter/index.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ Jadwal Dokter
+
+
+
+
+
+
+
+
+
+ | Hari |
+ Waktu |
+ Spesialis |
+ Subspesialis |
+ Namalengkap |
+
+
+
+
+ | {{ item.hari }} |
+ |
+
+ {{ item.waktu }} |
+ {{ item.spesialis }} |
+ |
+
+ {{ item.subspesialis }} |
+ |
+
+ {{ item.namalengkap }} |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/server/api/satu_rssa/jadwal_dokter/index.get.ts b/server/api/satu_rssa/jadwal_dokter/index.get.ts
new file mode 100644
index 0000000..dbf80b3
--- /dev/null
+++ b/server/api/satu_rssa/jadwal_dokter/index.get.ts
@@ -0,0 +1,18 @@
+import axios from "axios";
+
+export default defineEventHandler(async (event) => {
+ const url = useRuntimeConfig().public.API_URL+"/jadwaldokter/detail";
+ // console.log("data"+url)
+ try {
+ const response = await axios.get(url)
+ // const response = await axios.get("http://10.10.150.129:8082/api/jadwaldokter/detail")
+ return response.data
+ } catch (error) {
+ console.error("Error:", error);
+
+ throw createError({
+ statusCode: 500,
+ statusMessage: "Failed to fetch data from satu RSSA API",
+ });
+ }
+})
\ No newline at end of file
diff --git a/stores/users.ts b/stores/users.ts
index 0793f67..6b27e3e 100644
--- a/stores/users.ts
+++ b/stores/users.ts
@@ -209,6 +209,22 @@ export const useDataKunjunganPasien = defineStore("DataKunjunganPasien", () => {
};
});
+
+export const useJadwalDokter = defineStore("JadwalDokter", () => {
+ const JadwalDokter = ref([]);
+ const loadJadwalDokter = async() => {
+ try {
+ JadwalDokter.value = await $fetch("/api/satu_rssa/jadwal_dokter")
+ } catch (error) {
+ console.error("Failed to load jadwal dokter:", error);
+ }
+ }
+ return{
+ JadwalDokter,
+ loadJadwalDokter,
+ }
+})
+
//Path:stores/users.ts
if (import.meta.hot) {
// import.meta.hot.accept(acceptHMRUpdate(useUsersStore, import.meta.hot))