From 31e18c59653f9df9ce1090eb1aa638a23b35a36d Mon Sep 17 00:00:00 2001 From: bagus-arie05 Date: Tue, 14 Oct 2025 08:49:54 +0700 Subject: [PATCH 1/3] update sidebar dan menu layanan penunjang --- components/ProfileMenu.vue | 158 +++ components/SideBar.vue | 307 ++++-- layouts/default.vue | 272 +---- pages/{KlinikAdmin.vue => AdminKlinik.vue} | 0 pages/{Loket-Admin.vue => AdminLoket.vue} | 357 ++++--- pages/{Fast-Track.vue => FastTrack.txt} | 0 pages/{LoketAdmin1.vue => LoketAdmin1.text} | 0 pages/Setting/Master-Klinik.txt | 491 +++++++++ pages/Setting/Master-KlinikRuang.txt | 376 +++++++ pages/Setting/Master-Loket.vue | 2 +- pages/Setting/MasterKlinik.vue | 1057 +++++++++++-------- pages/Setting/MasterKlinikRuang.vue | 885 ++++++++++------ pages/Setting/MasterLoket.vue | 176 +++ pages/Setting/TambahLoket.vue | 310 ++++++ server/api/auth/session.get.ts | 151 ++- stores/navItems.ts | 81 +- 16 files changed, 3257 insertions(+), 1366 deletions(-) create mode 100644 components/ProfileMenu.vue rename pages/{KlinikAdmin.vue => AdminKlinik.vue} (100%) rename pages/{Loket-Admin.vue => AdminLoket.vue} (76%) rename pages/{Fast-Track.vue => FastTrack.txt} (100%) rename pages/{LoketAdmin1.vue => LoketAdmin1.text} (100%) create mode 100644 pages/Setting/Master-Klinik.txt create mode 100644 pages/Setting/Master-KlinikRuang.txt create mode 100644 pages/Setting/MasterLoket.vue create mode 100644 pages/Setting/TambahLoket.vue diff --git a/components/ProfileMenu.vue b/components/ProfileMenu.vue new file mode 100644 index 0000000..9bf9cf7 --- /dev/null +++ b/components/ProfileMenu.vue @@ -0,0 +1,158 @@ + + + + + \ No newline at end of file diff --git a/components/SideBar.vue b/components/SideBar.vue index 5098f72..1736613 100644 --- a/components/SideBar.vue +++ b/components/SideBar.vue @@ -1,103 +1,260 @@ -
it-support@rssa.malang.go.id @@ -337,11 +241,10 @@
- + + mdi-clock
Senin - Jumat: 07:00 - 15:00 @@ -352,19 +255,18 @@
- + + color="orange" >
Catatan: Pendaftaran akun memerlukan verifikasi dokumen dan dapat memakan waktu 1-2 hari kerja.
- + mdi-content-copy Salin Info @@ -406,6 +307,15 @@ const successMessage = ref('') const showRegistrationDialog = ref(false) const showAdminContact = ref(false) +// Hospital Profile URL +const HOSPITAL_PROFILE_URL = 'https://rsusaifulanwar.jatimprov.go.id/v2/' + +// Function to navigate to external hospital profile site +// NOTE: This function is no longer called in the template since the menu item was removed. +const goToHospitalProfile = (): void => { + window.open(HOSPITAL_PROFILE_URL, '_blank') +} + // Check URL parameters for errors const route = useRoute() onMounted(() => { @@ -414,7 +324,7 @@ onMounted(() => { } }) -// Custom login handler +// Custom login handler (pointing to Keycloak SSO logic) const handleLogin = async (): Promise => { isLoading.value = true errorMessage.value = '' @@ -422,7 +332,8 @@ const handleLogin = async (): Promise => { try { console.log('Starting login process...') - + + // Call API route to initiate Keycloak login process const response = await $fetch('/api/auth/keycloak-login', { method: 'POST' }) @@ -430,7 +341,8 @@ const handleLogin = async (): Promise => { if (response?.success && response?.data?.authUrl) { console.log('Redirecting to Keycloak...') successMessage.value = 'Redirecting to Keycloak...' - + + // Redirect the user to the Keycloak authorization URL setTimeout(() => { window.location.href = response.data!.authUrl }, 500) @@ -439,31 +351,44 @@ const handleLogin = async (): Promise => { } } catch (error: any) { console.error('Login error:', error) + // Display the error message errorMessage.value = `Login failed: ${error.message || 'Please try again.'}` } finally { - isLoading.value = false + // Only set isLoading back to false if no redirect is happening + if (!successMessage.value.includes('Redirecting')) { + isLoading.value = false + } } } // Copy contact information to clipboard const copyContactInfo = async (): Promise => { + // Updated contact info block from user's provided code const contactInfo = ` IT Support RSSA Telepon: (0341) 343343 ext. 1234 Email: it-support@rssa.malang.go.id -Jam Operasional: Senin - Jumat, 08:00 - 16:00 +Jam Operasional: Senin - Jumat, 07:00 - 15:00 `.trim() - + try { + // Use the Clipboard API await navigator.clipboard.writeText(contactInfo) successMessage.value = 'Informasi kontak berhasil disalin!' showAdminContact.value = false - + + // Clear the success message after a short delay setTimeout(() => { successMessage.value = '' }, 3000) } catch (error) { console.error('Failed to copy contact info:', error) + // Fallback or simple alert for error + errorMessage.value = 'Gagal menyalin informasi kontak. Silakan coba salin manual.' + + setTimeout(() => { + errorMessage.value = '' + }, 3000) } } diff --git a/pages/MonitoringPasien/monitoringPasien.vue b/pages/MonitoringPasien/monitoringPasien.vue new file mode 100644 index 0000000..6dea9b0 --- /dev/null +++ b/pages/MonitoringPasien/monitoringPasien.vue @@ -0,0 +1,252 @@ + + + + + \ No newline at end of file diff --git a/pages/MonitoringPasien/pasien/[id].vue b/pages/MonitoringPasien/pasien/[id].vue new file mode 100644 index 0000000..695df6d --- /dev/null +++ b/pages/MonitoringPasien/pasien/[id].vue @@ -0,0 +1,298 @@ + + + + + \ No newline at end of file diff --git a/pages/Profile/Pengaturan.vue.txt b/pages/Profile/Pengaturan.vue.txt new file mode 100644 index 0000000..6332cc7 --- /dev/null +++ b/pages/Profile/Pengaturan.vue.txt @@ -0,0 +1,1126 @@ + + + + + \ No newline at end of file diff --git a/pages/Profile/Profil.vue b/pages/Profile/Profil.vue new file mode 100644 index 0000000..2bcbd45 --- /dev/null +++ b/pages/Profile/Profil.vue @@ -0,0 +1,800 @@ + + + + + \ No newline at end of file diff --git a/pages/verifikasiAkun/VerifikasiAkun.vue b/pages/verifikasiAkun/VerifikasiAkun.vue index 3113121..ccbf554 100644 --- a/pages/verifikasiAkun/VerifikasiAkun.vue +++ b/pages/verifikasiAkun/VerifikasiAkun.vue @@ -1,115 +1,138 @@