feat: Implement Incident Management and Tab Dashboard

This commit is contained in:
Tola Leng
2025-05-23 20:37:00 +08:00
parent 395a580032
commit 747ae5c23f
69 changed files with 4457 additions and 0 deletions
@@ -0,0 +1,26 @@
import { format } from 'date-fns';
// Font configuration for the PDF
export const fonts = {
normal: 'Helvetica',
bold: 'Helvetica-Bold',
italic: 'Helvetica-Oblique',
};
// Helper function to format dates
export const formatDate = (dateString: string | undefined): string => {
if (!dateString) return 'N/A';
try {
return format(new Date(dateString), 'PPp');
} catch (e) {
return dateString || 'N/A';
}
};
// Helper function to capitalize first letter
export const capitalize = (str: string): string => {
if (!str) return '';
return str.charAt(0).toUpperCase() + str.slice(1);
};