Skip to content

main - #41

Merged
compgeniuses merged 39 commits into
devfrom
main
Jun 30, 2026
Merged

main#41
compgeniuses merged 39 commits into
devfrom
main

Conversation

@compgeniuses

Copy link
Copy Markdown
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing

Test Configuration:

  • Node.js version:
  • PostgreSQL version:
  • OS:

Checklist:

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate):

Additional context:

Add any other context about the pull request here.

kemboi22 and others added 30 commits May 18, 2026 22:03
reset account improvements, and reporting improvements,
feat: updated the db migrations
Change npm ci to npm i in Dockerfile
initial plans. for the Implementation of Multi-currency support.
improvements to the mobile views, and finacial rport rounding errors.
Wallet and Location improvements.
Revert "Wallet and Location improvements."
Revert "Revert "Wallet and Location improvements.""
fix: various typecheck, test, and syntax fixes
feat: add debt management, notification overhaul and fixes
docs: update finabill checklist and wallet script
feat(pricing): add full responsive animated pricing system
fix: release v1.0.2 with payment and location permission fixes
feat: add support for global cross-branch accounts
- Consolidate platform specification into focused integration guide removing redundant architecture details
- Clarify FinaBill as standalone billing platform integrating with FinaFlow's COA and accounting
- Document what exists in FinaFlow (chart of accounts, multi-currency, wallets) vs what FinaBill builds (customers, invoices, subscriptions, time tracking)
- Update CHANGELOG with current release notes and feature status
- Refactor permission system across routers (daily-sales, payment-methods, permissions, users) to use standardized permission checking
- Enhance business provisioning to support permission initialization and validation
- Update middleware to apply consistent permission validation to all protected routes
- Revise ProtectedRoute component to properly enforce permission-based access control
- Update layout and navigation components to reflect new permission model
- Modify Accounts, DailySales, and Users pages to handle permission-driven UI visibility
- Consolidate permission utilities in src/lib/permissions.ts with centralized validation logic
- Ensures granular role-based access control across all platform modules while maintaining FinaFlow integration compatibility
refactor: update permission model
Add comprehensive permission-aware access control across the entire codebase:
- Add `permissions` field to AuthUser interface and auth endpoint response to pass precomputed effective permissions from backend to frontend
- Update permission helper functions to support both role strings and explicit permissions arrays
- Add dynamic default landing page redirects for authenticated users on home, login, and signup flows
- Add dedicated `/unauthorized` page and route for permission denied scenarios
- Implement data scoping for bills: restrict bill lists to user-created entries for users without full `bills:view` access
- Update all navigation menus to show relevant pages even for create-only roles (expenses, bills, etc.)
- Fix user location assignment sync in Users page to preserve saved locations in the active edit form
- Add `enteredBy` column to bills table with index and backfill existing rows for data consistency
- Gate dashboard quick actions, page views, and notification content based on user's actual permissions
add getEffectivePermissions utility to merge role defaults and user's individual DB permissions
update all page-level permission checks to use user's permissions array when available, falling back to user role
change default landing page fallback from /dashboard to /daily-sales to avoid inaccessible pages for restricted roles
update CHANGELOG.md with the latest changes
- mock the useAuth hook in Home.test.tsx for proper component test setup
- add 0017_add_bills_entered_by.sql to test database migration list
- add placeholder test suites to formerly empty test files
- fix cleanup order in budgets-router.test.ts
- fix duplicate location slugs in notification-scope.test.ts
- update CHANGELOG to document these changes
Improve test reliability by adding migration 0017 to test bootstrap, mocking useAuth in Home.test.tsx, populating empty test skeletons, fixing budgets-router.test.ts cleanup order, making notification-scope.test.ts slugs unique, refactoring shared-plan budget tests to use isolated plans and remove manual reset steps, so the full test suite passes reliably
update both test cleanup and reset logic to only modify budget data tied to the current business's locations, preventing flaky test failures and FK violations from cross-test data deletion. maintain graceful handling for pre-migration-0014 setups without budget tables.
Wrap budget plan operations in a Postgres SAVEPOINT so that failures (such as missing budget tables) only roll back those specific operations instead of aborting the entire outer transaction. Fix the issue where caught errors in the try block would still mark the entire transaction as aborted, and update CHANGELOG.md to document this fix.
- add exponential backoff retry for Postgres deadlock errors in test account cleanup
- use SAVEPOINT in business reset transaction to avoid full transaction abort
- update CHANGELOG.md to document both fixed issues
…ential backoff (100ms → 200ms → 400ms) and catches deadlock errors

   by checking both err.code and err.cause?.code (since Drizzle wraps the pg error in a cause property).
feat: add permission-based access controls & pages
Bundles all feature updates since v1.0.5, including:
- Admin dashboard with super-admin access controls
- Password reset flow for self-service password recovery
- Privacy-safe email activity logging and admin reporting
- System-wide owner broadcast announcements via multiple channels
- Floating banner notifications with engagement tracking
- User session logging for login/logout analytics
- New database migrations and schema updates
- Updated environment configuration for SMTP and admin settings
chore(release): Admin Dashbaord v1.0.6
@compgeniuses
compgeniuses merged commit 5352374 into dev Jun 30, 2026
3 of 4 checks passed
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.

2 participants