532 Commits
Author SHA1 Message Date
F4ilji b53db18826 fix: add personal data policy link to consent banner 2026-09-18 23:59:12 +05:00
F4ilji da7e6368f7 fix: update consent banner text 2026-09-18 23:58:23 +05:00
F4ilji 1efa9df9ba fix: update consent banner text on public site 2026-09-18 23:55:50 +05:00
F4ilji 19c0cdef5b fix: remove links from consent banner 2026-09-18 23:52:32 +05:00
F4ilji 5ef1049be3 feat: update consent banner with detailed cookie policy text 2026-09-18 23:47:40 +05:00
F4ilji cfd7c411cf fix: update git remote to self-hosted Gitea 2026-09-18 23:35:59 +05:00
F4ilji d6c0f48d48 feat(analytics): add site analytics with grouped navigation sections
- Add Analytics container: models, tasks, jobs, controllers, routes, services
- Add analytics config with section groups (structure, institute, content, services)
- Add database tables: analytics_sessions, analytics_hits, analytics_daily_stats
- Add frontend: Analytics page, section detail, chart, overview, navigation components
- Add consent banner and JS tracking service (sendBeacon + Inertia listener)
- Add permission sync for view_analytics, view_any_analytic
- Fix trailing slash URL matching in GetNavigationSectionsTask
- Fix event propagation on expand arrows in navigation sections
- Fix RecordVisitJob to not depend on dropped analytics_geo_cache table
- Replace plain text views/visitors with badge-style icons
- Group navigation sections by category with separate blocks
- Add config-driven non-CMS sections (faculties, divisions, DPO, journals)
- Remove Events, TV, Sveden from analytics sections
2026-09-18 22:18:04 +05:00
F4ilji 8af94388ab fix: make notifications migration idempotent 2026-09-18 02:58:52 +05:00
F4ilji 7ff860feca feat: block destructive DB commands in production
Listen for CommandStarting event and throw RuntimeException for
migrate:fresh, migrate:refresh, migrate:reset, db:wipe, db:seed
when APP_ENV=production. Prevents accidental data loss even with --force.

Also removes old non-functional closure-based override in routes/console.php.
2026-09-18 02:54:42 +05:00
F4ilji 4a776a42e2 fix: resolve image upload issues in posts
- Dashboard: disable submit button during uploads, show upload errors, guard against pending uploads
- Filament: add maxParallelUploads(1) to fix race condition (filamentphp#13306)
- Filament: add image/webp to gallery acceptedFileTypes, increase resize 30->50
- Dashboard: add image/webp to gallery input accept
- Add missing notifications table migration for Filament databaseNotifications
2026-09-18 02:25:36 +05:00
F4ilji 1853b087f4 chore: update seeders, add MockDataSeeder and AssignAllPermissions command
- DatabaseSeeder: replace old seeders with MockDataSeeder
- RolesSeeder: update role definitions
- Add AssignAllPermissions artisan command
- Register MockDataSeeder in AppServiceProvider
- Register command in ConsoleKernel
2026-09-18 01:39:28 +05:00
F4ilji 02455fbca7 feat(factories): add new factories and update existing ones for all models 2026-09-18 01:39:25 +05:00
F4ilji c7a779d9aa refactor(models): replace HasFactory with HasContainerFactory across all models
Add static $factory property for Porto-style model factory resolution
2026-09-18 01:39:22 +05:00
F4ilji cf18dd660a fix: add missing HasContainerFactory trait to repo 2026-09-18 01:38:01 +05:00
F4ilji cc08cdbc97 fix: 405 error on schedule upload/edit
- Edit.vue: move _method PUT from Inertia options to FormData (Inertia v2 ignores it in options)
- Upload.vue: add forceFormData: true for reliable multipart/form-data
- AccessCheck: add logging when abort() is triggered with non-200 code
- UploadSchedulesController: add request logging for diagnostics
- php.ini: increase max_file_uploads from 20 to 50 for bulk uploads
2026-09-18 01:32:34 +05:00
F4ilji bf77cb634c fix(departments): fix contact info editing, cache invalidation, and pivot data display
- User model: add missing pivot columns (service_email, service_phone, cabinet, sort) to departments_work() and departments_teach() withPivot
- ListDepartmentWorkersAction/TeachersAction: fix where() to wherePivot() for position filters
- Dashboard Workers/Teachers Index.vue: display validation errors in add/edit modals
- Dashboard Workers/Teachers Index.vue: add links to client person pages
- DepartmentCacheService: clear person_* cache when department data changes
- Filament WorkersRelationManager/TeachersRelationManager: fix pivot columns in table (pivot.position etc), add cache clearing on edit/detach/bulk actions
2026-09-18 01:32:27 +05:00
F4ilji e0e80fc430 fix: hide slider on main page when no slides available 2026-09-17 14:12:54 +05:00
F4ilji 9023fdd7e7 fix(schedule): restore original Index.vue with SSR-safe fixes 2026-08-31 20:31:35 +05:00
F4ilji d6a10d46c7 fix(schedule): case-sensitive import MainPageNavbar (Linux) 2026-08-31 20:23:36 +05:00
F4ilji a1183f91f6 fix(schedule): merge duplicate script blocks into one 2026-08-31 20:20:59 +05:00
F4ilji 36c122cf65 fix(deploy): restart SSR after build to pick up new SSR bundle 2026-08-31 20:14:55 +05:00
F4ilji 774de4a6ab fix(deploy): explicit SSR restart after build + defensive props 2026-08-31 20:05:39 +05:00
F4ilji 712f172071 fix(schedule): SSR-safe props to prevent null component hydration error 2026-08-31 19:45:12 +05:00
F4ilji 7052b35c19 fix(seeder): remove is_zaoch column not in schedules table 2026-08-20 11:38:36 +05:00
F4ilji 9b0c8f8158 feat(seeder): add ScheduleMockSeeder with 40 fake records 2026-08-20 11:34:08 +05:00
F4ilji e6d223d15c feat(schedules): add 'select all N' across pages
- Add GetAllScheduleIdsAction + GetFilteredScheduleIdsTask
- Add GET /dashboard/schedules/all-ids route returning filtered IDs
- Add selectAllFiltered method to Index.vue
- Button 'Выбрать все N' appears when total > per-page count
2026-08-20 11:31:04 +05:00
F4ilji 24387d6767 feat(schedules): add bulk delete via checkboxes
- Add BulkDeleteSchedulesTask, BulkDeleteSchedulesAction
- Add route DELETE /dashboard/schedules/bulk-destroy
- Add bulkDestroy method to ScheduleController
- Update Index.vue: select all/individual checkboxes, bulk actions bar
- Fix CheckDashboardPermission: replace naive /s$/ regex with Str::singular()
  to resolve irregular plurals (faculties→faculty, categories→category)
2026-08-20 11:16:53 +05:00
F4ilji f8d55092e5 fix: add null guard in generateSlug to prevent SSR crash on null tab titles 2026-08-03 11:52:36 +05:00
F4ilji 63e456088d feat(dashboard): add Roles CRUD with permission-based menu filtering
- Roles CRUD: List/Create/Update/Delete actions, controller, requests
- Roles Vue pages: Index, Create, Edit (Options API, DashboardLayout)
- SidebarNav: filter menu items by user permissions via Inertia shared data
- HandleInertiaRequests: share permissions and roles arrays to frontend
- HttpKernel: register dashboard.permission middleware alias
- SidebarNavItem: add shield-check icon mapping
2026-08-03 10:39:15 +05:00
F4ilji d4ef7daeb1 feat(dashboard): add page export/import functionality
- ExportPageAction: exports page with SEO and section path as JSON
- ImportPageAction: imports page from JSON, resolves section by slug path
- PageController: export/download and import endpoints
- Routes: GET /{page}/export, POST /import
- Index.vue: export button per row, import button in header (local only)
- Import restricted to APP_ENV=local (backend + frontend check)
2026-08-03 10:21:14 +05:00
F4ilji 3860c5d24c fix(permissions): remove direct user permission sync — roles only
UpdateUserAction and CreateUserAction were calling syncPermissions()
which wrote to model_has_permissions table directly. This meant
permissions persisted even after being removed from the role.

Now users only get permissions through their roles.
2026-07-16 14:09:30 +05:00
F4ilji b7259fdd6f refactor(permissions): replace hardcoded route middleware with auto-resolving CheckDashboardPermission
- New middleware extracts permission name from route name automatically
- dashboard.posts.index → view_any_post
- dashboard.admission-campaigns.store → view_any_admission_campaign
- vikon-updates, integration-credentials excluded from check
- Single middleware on parent group instead of 28 individual ones
2026-07-16 12:05:15 +05:00
F4ilji b8fd42d9f8 fix(security): add permission middleware to dashboard routes
Each route group now requires view_any_{resource} permission.
Without the permission, Spatie returns 403 Forbidden.
VIKON updates and integration-credentials remain unprotected.
2026-07-16 11:57:20 +05:00
F4ilji 4f4bed0899 fix(menu): use 'view_any_role' instead of 'view_any_shield::role'
Permission name mismatch between menuConfig and DB was hiding the Roles tab.
2026-07-16 11:35:44 +05:00
F4ilji 9ac4f89e36 feat(jenkins): add dashboard:sync-permissions after migrations
Ensures all dashboard permissions exist on every deploy.
Command is idempotent — safe to run repeatedly.
2026-07-11 14:22:05 +05:00
F4ilji c6ca3258c1 feat(permissions): add dashboard:sync-permissions artisan command
Auto-discovers all dashboard permissions from resource/prefix matrix,
creates missing ones in DB, syncs to super_admin and admin roles.
Run on production after deploy or when adding new menu sections.
2026-07-11 14:17:11 +05:00
F4ilji 4e2105190b fix(tests): replace RefreshDatabase with DatabaseTransactions
- Prevents local DB data loss when running 'php artisan test'
- ViconApiConfigTest uses updateOrCreate to avoid unique constraint
- Delete + Cache::flush for 'not configured' test case
2026-07-10 17:11:27 +05:00
F4ilji c59a08b3a0 test(vikon): add live API integration tests
- getNaprs, getPrograms, getProgramByUuid — real API calls
- EducationalProgramService cross-check
- invalid token rejection via Http::fake
2026-07-10 16:55:30 +05:00
F4ilji 0ea2b7d9ef test(vikon): add ViconApiConfig unit tests
- token returns value from DB
- apiUrl returns value from DB
- apiUrl falls back to constant when not in payload
- token throws RuntimeException when not configured
- token throws when payload is empty
- inactive credential is ignored
2026-07-10 16:51:34 +05:00
F4ilji 73a0a6fe9c feat(vikon): extract API URL from hardcoded to integration_credentials
- Rename ViconApiToken → ViconApiConfig with token() and apiUrl()
- Replace 9 hardcoded db-nica.ru URLs with dynamic apiUrl()
- Payload now stores both token and api_url with fallback
2026-07-10 16:47:18 +05:00
F4ilji 7748b05547 feat(vikon): move API token from .env to integration_credentials
- Rename VICON_TOKEN → VIKON_API_TOKEN in .env and config
- Add ViconApiToken service reading from integration_credentials table
- Update 3 Vicon services to use ViconApiToken instead of config()
- Config/env kept as fallback for clean migration
2026-07-10 16:43:09 +05:00
F4ilji 8db442a34a Revert "fix(ssr): add Vue lifecycle guard plugin to suppress browser API errors in SSR hooks"
This reverts commit bb74bb48ba.
2026-07-07 11:22:32 +05:00
F4ilji bb74bb48ba fix(ssr): add Vue lifecycle guard plugin to suppress browser API errors in SSR hooks 2026-07-06 21:18:33 +05:00
F4ilji 6db62d9961 fix(ssr): suppress lifecycle hook errors (nextSibling null) at process level to prevent SSR crashes 2026-07-06 21:16:12 +05:00
F4ilji 63b71b87df fix(ssr): always return {head,body} from createInertiaApp — .then() fallback for undefined resolve 2026-07-06 18:59:24 +05:00
F4ilji f575325fa7 fix(ssr): remove window polyfill that broke Inertia SSR detection (typeof window check) 2026-07-06 18:53:06 +05:00
F4ilji 5fddb97cbf fix(ssr): return empty string on SSR failure instead of throwing to prevent undefined response 2026-07-06 18:30:26 +05:00
F4ilji 778ea67cb4 fix(ssr): add addEventListener/removeEventListener to document and window polyfills 2026-07-06 18:22:22 +05:00
F4ilji 48ab0b384e fix(ssr): add getElementById and other DOM methods to document polyfill 2026-07-06 18:05:35 +05:00
F4ilji 4c0152ae0f fix(ssr): polyfill localStorage/sessionStorage, guard BasicListBadge filters prop, remove this. from template 2026-07-06 17:57:28 +05:00