Skip to content

Conversation

sotiriskast
Copy link

  • update Livewire RolesTable: default sorting, empty message, better columns
  • add migrations for activity_log event and batch_uuid; tweak UsersTable HTML rendering
  • refactor Blade templates to Bootstrap 5 and clean up classes/attributes
  • update dependencies to latest compatible versions
  • replace NIST password rules package with core Laravel Password rule; add Livewire Tables v2.x config
  • timezone package swap to jamesmills/laravel-timezone
  • 2FA dev fixes
  • timezone package swap
  • 2FA provider swap: laraguard → pragmarx/google2fa-laravel

Backend: Livewire Tables

  • RolesTable

    • Sets model and primary key explicitly; adds default sort by name.

    • Adds an empty table message when no rows exist.

    • Refines columns:

      • Type column now maps internal values to user-friendly labels (e.g., “Administrator”, “User”), with an “N/A” fallback.
      • Name column explicitly binds to the name attribute.
      • Permissions column renders a precomputed permissions_label (HTML-enabled), with a “No permissions” fallback.
      • Number of Users displays users_count.
      • Actions column renders the actions partial as HTML.
    • Builder simplified to Role::query()->withCount('users'). Note: the previous ad‑hoc search filter hook was removed; if search is needed, ensure Livewire Tables’ v2 searching is configured accordingly.

  • UsersTable

    • Ensures rendered Blade fragments (2FA and Actions columns) are marked as HTML so the table doesn’t escape them.

Database

  • New migrations (both additive and reversible):

    • Add event (nullable string) to the activity_log table.
    • Add batch_uuid (nullable UUID) to the activity_log table.
  • Existing 2FA and recovery code migrations are present in the tree (Google2FA setup).

Authentication and Security

  • 2FA

    • Replaced darkghosthunter/laraguard with pragmarx/google2fa-laravel.
    • Added Google2FA config and migrations; made follow‑up “dev fixes for 2FA”.
  • Password validation

    • Replaced LangleyFoxall\LaravelNISTPasswordRules with Laravel’s native Illuminate\Validation\Rules\Password where applicable.

Timezone handling

  • Replaced the previously used/abandoned timezone package with jamesmills/laravel-timezone.
  • Introduced corresponding configuration (timezone.php) and integration points.

Frontend and Blade

  • Bootstrap 5 migration

    • Updated Blade templates to Bootstrap 5 standards.

    • Removed/updated deprecated attributes/classes; normalized markup across views.

    • Dependency alignment:

      • bootstrap 5.x
      • @popperjs/core instead of popper.js
      • axios 1.x
      • jquery 3.7.x (still present; note BS5 doesn’t require jQuery)
      • laravel-mix 6.0.49
    • Package lockfile format bumped (lockfileVersion 3).

  • General clean-up for consistency across backend views and shared includes.

Dependencies (Composer)

  • Bumped multiple PHP packages to latest compatible versions (examples called out in the commit message include arcanedev/log-viewer, arcanedev/support, brick/math, dflydev/dot-access-data, etc.).
  • Swapped security/timezone related packages as described above.
  • Kept Laravel 9.x line and compatible ecosystem.

Behavioral implications and notes

  • Roles listing UX improvements: sensible default sort, clearer type labels, explicit empty state, cleaner permissions and actions rendering.

  • Audit logging enhancement: event and batch_uuid on activity_log enable richer reporting and correlation of bulk operations.

  • 2FA stack change: moved to pragmarx/google2fa-laravel; configuration, middleware, and recovery flow should be validated end‑to‑end.

  • Password policy now uses core Laravel rules; ensure env/config reflect desired strength requirements.

  • Bootstrap 5 migration:

    • Check for any custom JS relying on jQuery plugins previously bundled with BS4.
    • Verify templates, forms, and components render correctly (e.g., form groups, input groups, navbars, dropdowns, modals).
  • Livewire Tables v2 adjustments:

    • configure() and HTML rendering flags are updated; confirm sorting, searching, and pagination work as expected.
    • If you relied on custom search logic in RolesTable builder(), ensure the v2 built‑in search is properly configured.

Operational checklist

  • Backend

    • composer install
    • php artisan migrate
    • php artisan reset (or clear-all) if you use the provided scripts to refresh caches
  • Frontend

    • yarn install
    • yarn run prod (or dev) via Laravel Mix
  • Post‑migration verifications

    • Activity log entries still write correctly; new columns populated where applicable.
    • 2FA enrollment, verification, and recovery codes flow.
    • User and Role tables: sorting, searching, pagination, action buttons, and labels.
    • Permissions display for roles (permissions_label source).
    • Timezone capture/storage and display where used.
    • Blade views across backend dashboard and user/role CRUD for BS5 styling and interactions.

…tion\Rules\Password where applicable and add missing Laravel Livewire Tables v2.x configuration
…including arcanedev/log-viewer, arcanedev/support, brick/math, dflydev/dot-access-data, and more.
…outdated classes and attributes, and improve code consistency across views
…table and update Livewire `UsersTable` column configuration
…nd improve column configuration with user-friendly labels and formatting adjustments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant