diff --git a/app/Enums/Role.php b/app/Enums/Role.php
index 4c63497..b772636 100644
--- a/app/Enums/Role.php
+++ b/app/Enums/Role.php
@@ -197,7 +197,6 @@ public function permissions(): array
Permission::ATTENDANCES_VIEW,
Permission::ATTENDANCES_CREATE,
- Permission::ATTENDANCES_DELETE,
Permission::LEAVE_REQUESTS_VIEW,
Permission::LEAVE_REQUESTS_CREATE,
diff --git a/resources/js/components/admin/hr/attendances/AttendanceMap.vue b/resources/js/components/admin/hr/attendances/AttendanceMap.vue
index 61e1325..2b67bcd 100644
--- a/resources/js/components/admin/hr/attendances/AttendanceMap.vue
+++ b/resources/js/components/admin/hr/attendances/AttendanceMap.vue
@@ -17,12 +17,18 @@ const props = defineProps<{
const hasCoordinates = computed(() => props.checkInLat != null && props.checkInLng != null);
const checkInSrc = computed(() => {
- if (props.checkInLat == null || props.checkInLng == null) return '';
+ if (props.checkInLat == null || props.checkInLng == null) {
+ return '';
+ }
+
return `https://www.google.com/maps?q=${props.checkInLat},${props.checkInLng}&z=18&t=k&output=embed`;
});
const checkOutSrc = computed(() => {
- if (props.checkOutLat == null || props.checkOutLng == null) return '';
+ if (props.checkOutLat == null || props.checkOutLng == null) {
+ return '';
+ }
+
return `https://www.google.com/maps?q=${props.checkOutLat},${props.checkOutLng}&z=18&t=k&output=embed`;
});
@@ -38,18 +44,13 @@ function escapeHtml(value: string): string {
function buildLabel(
title: string,
color: string,
- time: string,
locationTag: string | null,
- lat: number | null,
- lng: number | null,
): string {
const lines: string[] = [];
lines.push(`${title}`);
- if (props.employeeName) lines.push(`Karyawan: ${escapeHtml(props.employeeName)}`);
- lines.push(`Tanggal: ${escapeHtml(props.attendanceDateFormatted)}`);
- lines.push(`Jam: ${escapeHtml(time)}`);
+
lines.push(`Lokasi: ${escapeHtml(locationTag ?? '-')}`);
- lines.push(`Koordinat: ${lat}, ${lng}`);
+
return lines.join('
');
}
@@ -62,34 +63,16 @@ function buildLabel(
- {{ previewLocationTag }} -