- Added `users_permissions` table for managing user permissions. - Created `PermissionRepository` for handling permission logic. - Refactored `controls\Users::permissions()` to utilize the new database structure. - Introduced AJAX endpoint for saving user permissions. - Enhanced user management UI with permission checkboxes. - Added vacation management template for handling employee absences. - Implemented tests for `PermissionRepository`.
19 lines
642 B
Markdown
19 lines
642 B
Markdown
# Code Style & Conventions
|
|
|
|
## PHP
|
|
- PHP 7.4 compatibility required
|
|
- New controllers: `Controllers\{Module}Controller` with camelCase methods
|
|
- New domain: `Domain\{Module}\{Name}Repository` with constructor-injected $mdb
|
|
- Legacy: `controls\{Module}` and `factory\{Module}` with snake_case
|
|
- Templates via `\Tpl::view('module/template', $data_array)`
|
|
- XSS protection via `\Tpl::secureHTML()`
|
|
- UI language: Polish
|
|
|
|
## File Naming
|
|
- New: `ClassName.php`
|
|
- Legacy: `class.ClassName.php`
|
|
|
|
## Spacing Style (from existing code)
|
|
- Spaces inside brackets: `$arr[ 'key' ]`, `func( $arg )`
|
|
- Allman-ish brace style with opening brace on same line
|