This commit applies the modular refactoring to the web-ui,
including the new daily attendance tracking feature.
- **Modular Structure:** Re-introduced the modular files 'config.js',
'component-loader.js', and 'navigation.js' to centralize configuration,
component loading, and navigation logic.
- **Refactored Dashboard:** Refactored 'group-leader-dashboard.js' to use
the new 'apiCall' function from 'api-config.js' for API requests,
removing duplicated code and improving error handling.
- **ES6 Modules:** Updated 'group-leader.html' to load scripts as
ES6 modules ('type="module"'), ensuring compatibility with the
modular JavaScript files.
- **Clean-up:** Removed unnecessary global variables and duplicated
functions, improving code quality and maintainability.
1.3 KiB
1.3 KiB
업데이트 로그
2026-01-06
feat(web-ui): Refactor web-ui for improved maintainability and modularity
- Commit:
b4037c9395da89271c82285e9284f4c37aa66296 - Author: Hyungi Ahn hyungiahn@Hyungiui-MacBookPro.local
- Date: Tue Jan 6 15:54:49 2026 +0900
Description:
This commit introduces a series of refactoring changes to the web-ui to remove hardcoded values and improve page integration.
- Centralized Configuration: Created
web-ui/js/config.jsto centralize API ports, paths, and navigation URLs, replacing hardcoded values across multiple files. - Modular Component Loading: Introduced
web-ui/js/component-loader.jsto handle dynamic loading of common HTML components (e.g., sidebar, navbar), using paths fromconfig.js. - Modular Navigation: Created
web-ui/js/navigation.jsto centralize page redirection logic, improving maintainability and reducing directwindow.location.hrefmanipulations. - Refactored Existing Modules: Updated
web-ui/js/api-config.js,web-ui/js/login.js,web-ui/js/load-sidebar.js, andweb-ui/js/load-navbar.jsto utilize the newconfig,component-loader, andnavigationmodules. - ES6 Module Compatibility: Ensured
web-ui/index.htmlloads scripts as ES6 modules (type="module") to supportimportstatements.