diff --git a/Employee_Managment_App/src/App.css b/Employee_Managment_App/src/App.css
index e69de29..7ee1bf7 100644
--- a/Employee_Managment_App/src/App.css
+++ b/Employee_Managment_App/src/App.css
@@ -0,0 +1,237 @@
+/* 1. GENERAL: Container paddings shrink, stacking, font adapt for mobile */
+@media (max-width: 768px) {
+ .app-layout {
+ padding-left: 0 !important;
+ padding-right: 0 !important;
+ min-width: 0;
+ font-size: 15px;
+ }
+ .app-main {
+ padding: 6px 0 0 0 !important;
+ }
+ .achievements-container,
+ .policies-content,
+ .employees-content {
+ padding: 10px 5px !important;
+ }
+}
+
+/* 2. SIDEBAR: overlay, hide, and usability tweaks for mobile */
+@media (max-width: 991px) {
+ .e-sidebar {
+ width: 80vw !important;
+ min-width: 200px !important;
+ max-width: 97vw !important;
+ left: 0 !important;
+ top: 0 !important;
+ height: 100vh !important;
+ border-radius: 0 !important;
+ box-shadow: 0 2px 24px rgba(0,0,0,0.22);
+ z-index: 1111;
+ }
+ .app-sidebar {
+ min-width: 0;
+ width: 100% !important;
+ padding: 0 !important;
+ }
+ .sidebar-brand {
+ gap: 8px !important;
+ font-size: 19px;
+ padding: 8px 0 9px 12px !important;
+ }
+ .sidebar-toggle {
+ margin-left: auto;
+ }
+ .nav.flex-column {
+ gap: 0;
+ padding: 2px 0;
+ }
+}
+
+/* 3. TOP NAV: squash items, stack user info, hide create if needed */
+@media (max-width: 768px) {
+ .topnav-inner {
+ gap: 3px !important;
+ padding: 0 4px !important;
+ }
+ .cluster-right {
+ gap: 3px !important;
+ }
+ .btn-create-group, .btn-create {
+ min-width: 70px !important;
+ padding: 0 7px;
+ font-size: 13px !important;
+ }
+ .topnav-avatar-name {
+ font-size: 12px;
+ margin-left: 4px !important;
+ word-break: break-all;
+ }
+}
+
+/* 4. SEARCH: search bar fills width, form controls height shrink */
+@media (max-width: 768px) {
+ .cluster-center, .search-form {
+ width: 97vw !important;
+ min-width: 0 !important;
+ max-width: 99vw !important;
+ }
+ .search-form .search-field {
+ height: 32px !important;
+ font-size: 14px;
+ }
+}
+/* Mobile search field needs full width */
+@media (max-width: 530px) {
+ .search-form,
+ .search-field.input-group {
+ width: 99vw !important;
+ min-width: 0 !important;
+ max-width: 100vw !important;
+ }
+}
+
+/* 5. BUTTONS, CHIPS, and TOOLBARS: stack and compress */
+@media (max-width: 640px) {
+ .toolbar-right,
+ .org-filters__pills,
+ .filter-chip-row {
+ flex-wrap: wrap !important;
+ gap: 7px !important;
+ row-gap: 6px !important;
+ justify-content: flex-start !important;
+ }
+ .toolbar-field, .filter-chip {
+ font-size: 13px !important;
+ padding: 6px 10px !important;
+ }
+ .annc-panel-tabs button {
+ padding: 8px 4px !important;
+ }
+}
+
+/* 6. GRIDS/TABLES: Horizontal scroll for overflow columns on mobile */
+@media (max-width: 900px) {
+ .e-grid, .lb-sections, .policies-grid-wrapper .e-grid {
+ overflow-x: auto !important;
+ min-width: 360px !important;
+ width: 100vw !important;
+ }
+}
+/* For actual grid row cells, allow wrapping */
+@media (max-width: 640px) {
+ .e-grid .e-rowcell, .lb-row, .policy-name-cell {
+ font-size: 13px !important;
+ padding-left: 4px !important;
+ padding-right: 4px !important;
+ white-space: normal !important;
+ }
+}
+/* Keep action buttons visible in grid on small screens */
+@media (max-width: 640px) {
+ .policy-dialog, .e-dialog {
+ max-width: 97vw !important;
+ min-width: 0 !important;
+ }
+}
+
+/* 7. EMPLOYEE PROFILE (tabs, avatar, flexing) */
+@media (max-width: 600px) {
+ .overview-header {
+ flex-direction: column !important;
+ align-items: flex-start !important;
+ gap: 3px !important;
+ }
+ .profile-data-name, .profile-data-mail, .profile-data-designation, .profile-data-supervisor, .profile-data-branch {
+ font-size: 14px !important;
+ }
+ .profile-image svg {
+ width: 48px !important;
+ height: 48px !important;
+ }
+}
+
+/* 8. DIALOGS/ANNOUNCEMENTS: Center and fill for mobile */
+@media (max-width: 570px) {
+ .e-annc-detail-dialog.e-dialog, .policy-dialog.e-dialog {
+ width: 97vw !important;
+ max-width: 97vw !important;
+ left: 1vw !important;
+ right: 1vw !important;
+ min-width: 0 !important;
+ border-radius: 11px !important;
+ padding-left: 0 !important;
+ padding-right: 0 !important;
+ }
+ .annc-dlg-content {
+ padding-left: 2vw !important;
+ padding-right: 2vw !important;
+ }
+}
+
+/* 9. ANNOUNCEMENTS PANEL: right panel covers full width on tiny screens */
+@media (max-width: 480px) {
+ .annc-right-panel {
+ width: 99vw !important;
+ min-width: 0 !important;
+ left: 0 !important;
+ border-radius: 0 !important;
+ max-width: 100vw !important;
+ font-size: 14px !important;
+ }
+ .annc-panel-header, .annc-panel-tabs, .annc-panel-content {
+ padding-left: 8px !important;
+ padding-right: 8px !important;
+ }
+}
+
+/* 10. LEADERBOARD/ACHIEVEMENTS: Stacked layout for sections on mobile */
+@media (max-width: 640px) {
+ .lb-sections {
+ grid-template-columns: 1fr !important;
+ }
+ .lb-section {
+ min-width: 0 !important;
+ border-radius: 10px !important;
+ margin-bottom: 14px !important;
+ }
+}
+
+/* 11. GENERAL: Shrink font slightly on XS mobile, compress app-body paddings */
+@media (max-width: 420px) {
+ html, body {
+ font-size: 13.6px !important;
+ }
+ .app-layout {
+ padding: 0 0 !important;
+ }
+}
+
+@media (max-width: 991px) {
+ .e-sidebar {
+ width: 68vw !important;
+ font-size: 30px;
+ min-width: 160px !important;
+ max-width: 88vw !important;
+ border-top-right-radius: 20px;
+ border-bottom-right-radius: 20px;
+ box-shadow: 3px 0 10px rgba(0,0,0,0.34);
+ background: #222b3c;
+ }
+ .nav-icon{
+ font-size:30px !important;
+ margin-right:15px;
+ }
+ .sidebar-brand{
+ font-size: 35px;
+ }
+ .title{
+ font-size: 35px !important;
+ }
+ .nav .flex-column{
+ margin-top: 15px;
+ }
+ .sidebar-toggle{
+ margin-right: 10px !important;
+ }
+}
\ No newline at end of file
diff --git a/Employee_Managment_App/src/App.tsx b/Employee_Managment_App/src/App.tsx
index abe986b..7042c57 100644
--- a/Employee_Managment_App/src/App.tsx
+++ b/Employee_Managment_App/src/App.tsx
@@ -140,6 +140,13 @@ function App() {
onSearch={(q) => console.log('Search:', q)}
onMarkRead={handleMarkRead}
onMarkAllRead={handleMarkAllRead}
+ onOpenSidebar={() => {
+ if (isDesktop) {
+ setSidebarCollapsed(false);
+ } else {
+ setMobileSidebarOpen(true);
+ }
+ }}
/>
{/* Syncfusion Sidebar */}
@@ -167,59 +174,39 @@ function App() {
{collapsed ? 'HR' : 'HR Portal'}
-
-
- {/* user/profile */}
-
+
{!collapsed && My Profile}
-
-
- {/* organization/people */}
-
+
{!collapsed && Organization}
-
-
- {/* policy/document */}
-
+
{!collapsed && Policies}
-
-
- {/* trophy */}
-
+
{!collapsed && Achievements}
diff --git a/Employee_Managment_App/src/components/Achievements.tsx b/Employee_Managment_App/src/components/Achievements.tsx
index d756e03..25603de 100644
--- a/Employee_Managment_App/src/components/Achievements.tsx
+++ b/Employee_Managment_App/src/components/Achievements.tsx
@@ -272,7 +272,7 @@ const Achievements: React.FC = ({ userInfo, onlyTeamIfUser =
-
+
Overall
diff --git a/Employee_Managment_App/src/components/Announcement.css b/Employee_Managment_App/src/components/Announcement.css
index 7af8054..e78336c 100644
--- a/Employee_Managment_App/src/components/Announcement.css
+++ b/Employee_Managment_App/src/components/Announcement.css
@@ -146,10 +146,14 @@
position: relative;
}
.annc-panel-item.is-unread {
+ margin-bottom: 5px;
+ padding: 6px;
background: #f0fdf9;
border-color: #d1fae5;
}
.annc-panel-item.is-read {
+ margin-bottom: 5px;
+ padding: 6px;
opacity: 0.75;
}
.annc-panel-item:hover {
diff --git a/Employee_Managment_App/src/components/Announcement.tsx b/Employee_Managment_App/src/components/Announcement.tsx
index e612f0f..fb15012 100644
--- a/Employee_Managment_App/src/components/Announcement.tsx
+++ b/Employee_Managment_App/src/components/Announcement.tsx
@@ -62,11 +62,34 @@ export const AnnouncementPanel: React.FC
= ({
React.useEffect(() => {
const handleDocClick = (ev: MouseEvent) => {
if (!open) return;
- if (panelRef.current && !panelRef.current.contains(ev.target as Node)) onClose();
+
+ const target = ev.target as Node;
+
+ // If detail dialog is open, ignore clicks inside dialog or its overlay
+ if (detailOpen) {
+ const dialogEl = document.querySelector('.e-annc-detail-dialog') as HTMLElement | null;
+ const overlayEl = document.querySelector('.e-dlg-overlay') as HTMLElement | null;
+
+ const clickedInsideDialog =
+ (dialogEl && dialogEl.contains(target)) ||
+ (overlayEl && overlayEl.contains(target));
+
+ if (clickedInsideDialog) {
+ // Let the dialog handle its own close via overlayClick; don't close the aside
+ return;
+ }
+ }
+
+ // Close aside only when clicking outside both the aside and (if open) the dialog
+ if (panelRef.current && !panelRef.current.contains(target)) {
+ onClose();
+ }
};
- document.addEventListener('click', handleDocClick);
- return () => document.removeEventListener('click', handleDocClick);
- }, [open, onClose]);
+
+ // Use capture to catch the click before Syncfusion might stop propagation
+ document.addEventListener('click', handleDocClick, true);
+ return () => document.removeEventListener('click', handleDocClick, true);
+ }, [open, onClose, detailOpen]);
const setActiveTab = (t: 'notifications' | 'announcements') => {
setTab(t);
diff --git a/Employee_Managment_App/src/components/AnnouncementDialog.css b/Employee_Managment_App/src/components/AnnouncementDialog.css
index cde163f..cc75ada 100644
--- a/Employee_Managment_App/src/components/AnnouncementDialog.css
+++ b/Employee_Managment_App/src/components/AnnouncementDialog.css
@@ -79,9 +79,9 @@
}
.annc-dlg-details {
- display: grid;
- grid-template-columns: repeat(3, minmax(180px, 1fr));
- gap: 12px 18px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
@media (max-width: 920px) {
.annc-dlg-details { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
diff --git a/Employee_Managment_App/src/components/Employees.tsx b/Employee_Managment_App/src/components/Employees.tsx
index 4003d20..66892d1 100644
--- a/Employee_Managment_App/src/components/Employees.tsx
+++ b/Employee_Managment_App/src/components/Employees.tsx
@@ -34,7 +34,6 @@ const Employees = (props?: EmployeesProps) => {
// Apply/clear remote filters on pill changes or routed context
useEffect(() => {
- debugger;
const grid = employeeGridIns.current;
if (!grid) return;
diff --git a/Employee_Managment_App/src/components/TopNav.css b/Employee_Managment_App/src/components/TopNav.css
index 283e1fa..faf410e 100644
--- a/Employee_Managment_App/src/components/TopNav.css
+++ b/Employee_Managment_App/src/components/TopNav.css
@@ -422,4 +422,30 @@
}
/* Utility (when we hide center due to mobile search toggle) */
-.hidden-md-up { display: none; }
\ No newline at end of file
+.hidden-md-up { display: none; }
+
+.hidden-md-up { display: none; }
+
+/* Show only on widths below 992px */
+.show-md-down {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+}
+
+@media (min-width: 992px) {
+ .show-md-down {
+ display: none !important;
+ }
+}
+
+/* Keep left cluster items aligned (menu button + brand) */
+.topnav .cluster-left {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+.topnav .topnav-menu-btn {
+ margin-right: 4px;
+}
\ No newline at end of file
diff --git a/Employee_Managment_App/src/components/TopNav.tsx b/Employee_Managment_App/src/components/TopNav.tsx
index f552645..aecaa07 100644
--- a/Employee_Managment_App/src/components/TopNav.tsx
+++ b/Employee_Managment_App/src/components/TopNav.tsx
@@ -28,6 +28,7 @@ type TopNavProps = {
userFullName?: string;
onMarkRead?: (itemId: string | number, isNotification: boolean) => void;
onMarkAllRead?: (tab: 'notifications' | 'announcements') => void;
+ onOpenSidebar?: () => void;
};
const TopNav: React.FC = ({
@@ -57,6 +58,7 @@ const TopNav: React.FC = ({
userFullName = 'Test Person',
onMarkRead,
onMarkAllRead,
+ onOpenSidebar,
}) => {
const [query, setQuery] = useState('');
const [avatarMenuOpen, setAvatarMenuOpen] = useState(false);
@@ -93,14 +95,6 @@ const TopNav: React.FC = ({
};
}, []);
- const openAnnouncementsPanel = (e?: React.MouseEvent) => {
- e?.preventDefault();
- e?.stopPropagation();
- setPanelTab('announcements');
- setPanelOpen(true);
- onOpenAnnouncements?.();
- };
-
const TOPNAV_HEIGHT = 56;
const notificationItemsWithIcon = useMemo(
@@ -133,6 +127,17 @@ const TopNav: React.FC = ({
>
+
+
+
{companyName}
diff --git a/Employee_Managment_App/src/index.css b/Employee_Managment_App/src/index.css
index 92a8254..e2452f1 100644
--- a/Employee_Managment_App/src/index.css
+++ b/Employee_Managment_App/src/index.css
@@ -70472,7 +70472,7 @@ li.e-separator.e-menu-item.e-excel-separator {
}
#_tab_header_items .e-toolbar-item {
- width: 20%;
+ width: 19.95%;
text-align: center;
}
}
@@ -71125,6 +71125,9 @@ td.cardcell.separateline {
.app-sidebar .nav-icon {
display: inline-flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 14px;
width: 18px;
height: 18px;
color: #cbd5e1;