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'}