mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 10:46:29 +00:00
5a3629badf
Added the ability to view and re-download leave application forms in the Employee History page (Leave, Permit, and Sick tabs) Added employee alpha stats and employee alpha detail in Employee Performance Page Added total WFO, WFH and WFS in Admin Summary Report Added batch import from Excel files in Admin Manual Attendance
14 lines
832 B
TypeScript
14 lines
832 B
TypeScript
// lib/client-logger.ts
|
|
import { sendLogToServer } from "@/app/actions/logger";
|
|
|
|
// We wrap the server action call so it behaves identically to the server logger.
|
|
// We DO NOT await these calls, so it acts as "fire and forget" and doesn't slow down the UI.
|
|
export const clientLogger = {
|
|
info: (message: string, data?: any) => { sendLogToServer('INFO', message, data); },
|
|
warn: (message: string, data?: any) => { sendLogToServer('WARN', message, data); },
|
|
error: (message: string, data?: any) => { sendLogToServer('ERROR', message, data); },
|
|
debug: (message: string, data?: any) => { sendLogToServer('DEBUG', message, data); },
|
|
|
|
apiReq: (message: string, data?: any) => { sendLogToServer('API_REQ', message, data); },
|
|
apiRes: (message: string, data?: any) => { sendLogToServer('API_RES', message, data); },
|
|
}; |