feat: Implement worker authentication and device validation in backend

- Added login route with JWT token generation and device validation for non-manager roles.
- Implemented clocking functionality with geofence validation and distance calculation.
- Created routes for managing workers, including password change and device registration.
- Added security status and app blacklist retrieval endpoints.

feat: Develop Geofence Management component

- Created a Vue component for managing geofences with map integration using Leaflet.
- Implemented functionality to draw, save, activate/deactivate, and delete geofences.
- Added UI for displaying existing geofences in a table format.

feat: Introduce Kill Switch Management component

- Developed a calendar-based UI for managing enabled/disabled dates.
- Implemented functionality to apply or discard changes to the work schedule.
- Added visual indicators for pending changes in the calendar.

feat: Create Warning Reporting component

- Implemented a reporting interface for failed clock records with search and filter options.
- Added detail modal for viewing specific failed record details.
- Implemented sorting functionality for the records table.
This commit is contained in:
sudomarcma
2025-07-16 17:57:25 +08:00
parent 46f508c1ae
commit 14d412544e
20 changed files with 2152 additions and 2594 deletions
+59 -6
View File
@@ -10,6 +10,7 @@
"invalidToken": "Invalid token received from server.",
"english": "English",
"malay": "Malay",
"setting": "Setting",
"yourStatus": "Your Status",
"clockedIn": "Clocked In",
@@ -24,19 +25,20 @@
"out": "Out",
"cancel": "Cancel",
"clockHistory": "Clock History",
"viewMyClockHistory": "View My Clock History",
"changeMyPassword": "Change My Password",
"updateYourPassword": "Update Your Password",
"myClockHistory": "My Clock History",
"backToDashboard": "Back to Dashboard",
"noClockHistory": "You have no clocking history.",
"clockHistoryFetchFail": "Failed to fetch clock history:",
"viewClockHistory": "View My Clock History",
"changePassword": "Change My Password",
"viewClockHistory": "View My Clock History",
"changePassword": "Change My Password",
"successClockIn": "Successfully clocked in.",
"successClockOut": "Successfully clocked out.",
"qrFail": "Could not detect a QR code. Please try again.",
"geoFail": "Unable to retrieve your location: {message}. Please enable location services.",
"successClock": "Successfully clocked at {location}.",
"changePasswordTitle": "Change Password",
"currentPassword": "Current Password",
@@ -46,6 +48,14 @@
"tabPersonnel": "Personnel",
"tabAttendance": "Attendance",
"tabWarning": "Warnings",
"warningSettings": "Warning Settings",
"failedClockSummary": "Failed Clock Summary",
"failedCount": "Failed Count",
"viewDetails": "View Details",
"fetchRecords": "Fetch Records",
"failedRecordsFor": "Failed Records for ",
"eventType": "Event Type",
"tabQrCodes": "QR Codes",
"uploadQrImage": "Upload QR Image",
@@ -58,7 +68,7 @@
"tryAgain": "Try Again",
"qrDetectedGettingLocation": "QR Code detected. Getting location...",
"geolocationNotSupported": "Geolocation is not supported by your browser.",
"unableToRetrieveLocation": "Unable to retrieve your location: {message}. Please enable location services.",
"unableToRetrieveLocation": "Unable to retrieve your location. Please check location permissions. (Details: {message})",
"qrNotDetectedTryAgain": "Could not detect a QR code. Please try again.",
"updatePassword": "Update Password",
"passwordsNoMatch": "New passwords do not match.",
@@ -118,9 +128,13 @@
"tagLoadError": "Could not load workers for the selected tag.",
"generateReportError": "Please select workers, set valid date range, and enter a salary.",
"reportGenerationError": "An error occurred while generating the report.",
"exportAll": "Export All",
"export": "Export",
"addNewUser": "Add New User",
"fullName": "Full Name",
"department": "Department",
"position": "Position",
"egJohnSmith": "e.g. John Smith",
"egJsmith": "e.g. jsmith",
"eg123456": "e.g. 123456",
@@ -130,16 +144,20 @@
"manageTags": "Manage Tags",
"createNewTag": "Create New Tag",
"egTeam": "e.g. Team",
"egSales": "e.g. Sales",
"egManager": "e.g. Manager",
"createTag": "Create Tag",
"tags": "Tags",
"workerRoster": "Worker Roster",
"searchByNameOrUsername": "Search by name or username",
"searchByNameOrDepartment": "Search by name or department",
"filterByTag": "Filter by tag",
"clearFilter": "Clear filter",
"dateJoined": "Date Joined",
"actions": "Actions",
"editTags": "Edit Tags",
"viewRecords": "View Records",
"clearDevice": "Clear Device",
"delete": "Delete",
"loadingWorkers": "Loading workers...",
"noWorkersFound": "No workers found.",
@@ -180,5 +198,40 @@
"download": "Download",
"noQrCodesFound": "No QR codes found. Create one above!",
"deleteQrConfirm": "Are you sure you want to delete this QR code? This cannot be undone.",
"qrDownloadError": "Sorry, the QR code could not be downloaded."
}
"qrDownloadError": "Sorry, the QR code could not be downloaded.",
"loading": "Loading...",
"tabGeofencing": "Geofencing",
"createGeofence": "Create Geofence",
"drawInstruction": "Click the polygon tool on the map to start drawing a new geofence. Click the first point to finish.",
"geofenceName": "Geofence Name",
"geofenceNamePlaceholder": "e.g., Main Warehouse Zone",
"saveGeofence": "Save Geofence",
"existingGeofences": "Existing Geofences",
"view": "View",
"noGeofencesFound": "No Geofences Found",
"startOver" : "Start Over",
"workScheduleTitle": "Work Schedule",
"workScheduleDescription": "Click on a date to toggle its status. Enabled days are green. Changes will not be saved until you click 'Apply Changes'.",
"pendingChanges": "Pending Changes",
"noPendingChanges": "Click on the calendar to enable or disable dates.",
"datesToEnable": "Enable these dates:",
"datesToDisable": "Disable these dates:",
"applyChanges": "Apply Changes",
"discardChanges": "Discard Changes",
"statusClockedIn": "You are Clocked In",
"statusClockedOut": "You are Clocked Out",
"scanToClockIn": "Scan QR Code to Clock In",
"scanToClockOut": "Scan QR Code to Clock Out",
"error.default": "An unexpected error occurred. Please try again.",
"error.clockingDisabled": "Clocking is disabled for today. Your attempt has been logged.",
"error.noActiveGeofence": "Clocking failed: No active work area is defined on the server.",
"error.outsideGeofence": "Clocking failed: You are outside the designated work area by {distance}m.",
"error.invalidQrCode": "Clocking failed: The scanned QR Code is invalid or no longer active.",
"error.alreadyClockedIn": "Action failed: You are already clocked in.",
"error.alreadyClockedOut": "Action failed: You are already clocked out.",
"error.criticalServer": "A critical server error occurred. Please contact support."
}