Commit Graph

4541 Commits

Author SHA1 Message Date
Ahmed Bouhuolia
ec8aec440b wip 2026-05-31 23:40:54 +02:00
Ahmed Bouhuolia
ed48a2cbdb chore: format webapp files 2026-05-31 23:35:10 +02:00
Ahmed Bouhuolia
ef9c93cbf9 ci: add Prettier format check GitHub Action
Adds a format-check workflow that runs `pnpm run format:check` (Lerna fans
out to all packages with the script) on pushes to main/develop and all PRs.
Also adds the missing `format:check` script to the server package so Lerna
picks it up alongside the existing webapp script.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 23:33:30 +02:00
Ahmed Bouhuolia
130d9aee40 Merge pull request #1106 from bigcapitalhq/refactor/typescript-preferences-containers
refactor(typescript): add proper types to Preferences container files
2026-05-31 22:14:47 +02:00
Ahmed Bouhuolia
9feebb2b1a Merge branch 'develop' into refactor/typescript-preferences-containers 2026-05-31 22:03:20 +02:00
Ahmed Bouhuolia
de28aea086 refactor(typescript): add proper types to Preferences container files
Remove @ts-nocheck directives and add TypeScript interfaces for
Preferences container components (Users, Roles, Accountant, Branches,
Currencies). Replace duplicated withUserPreferences HOC with existing
withDialogActions. Install @types/flat for the flat module.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 21:58:11 +02:00
Ahmed Bouhuolia
25b5198ff3 Merge pull request #1105 from bigcapitalhq/refactor/containers-default-to-named-exports
refactor: convert containers default exports to named exports
2026-05-31 20:12:44 +02:00
Ahmed Bouhuolia
b6970fefc2 refactor: convert containers default exports to named exports
## Summary
Converted 905 default exports in src/containers to named exports for improved tree-shaking, better IDE refactoring support, and consistency with modern TypeScript practices.

## Changes
- Converted `export default function X` to `export function X` (916 files)
- Converted `export default compose(...)(X)` to `export const X = compose(...)(XInner)` with HOC wrapping
- Updated 373 import sites from default to named imports
- Fixed 136 React.lazy() imports to use .then() pattern for compatibility with named exports
- Updated re-export patterns in index files
- Fixed edge cases (alert arrays, connector HOCs, type definitions)

## Implementation
- Created codemod script: codemod-containers-exports.js (905 files converted)
- Created import updater: codemod-update-default-imports.js (373 imports fixed)
- Created lazy import fixer: codemod-fix-lazy-imports.js (136 lazy imports fixed)
- Manual fixes for 30 edge-case files (arrays, HOC factories, type definitions)

## Testing
- TypeScript type check: 0 codemod-related errors
- All lazy imports updated with .then() pattern
- All import sites updated to use named imports
- Zero remaining default exports in containers directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 20:08:39 +02:00
Ahmed Bouhuolia
b2fa081d42 Merge pull request #1104 from bigcapitalhq/feat/sdk-report-table-headers-and-audit-log
feat(sdk): add table accept header to report fetchers and refactor audit log hooks
2026-05-31 18:58:11 +02:00
Ahmed Bouhuolia
7a70195ac0 feat(sdk): add table accept header to report fetchers and refactor audit log hooks
- Add `accept: application/json+table` header to all SDK report table
  fetcher functions for proper table response negotiation
- Refactor audit log query hooks to use SDK fetch functions instead of
  manual API calls with qs.stringify
- Modernize useInfiniteQuery to object syntax with initialPageParam
- Replace deprecated keepPreviousData option with placeholderData import
- Uncomment AuditLogHeader, AuditLogLoadingBar, and AuditLogBody components

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 18:52:44 +02:00
Ahmed Bouhuolia
be61ac5ae4 Merge pull request #1018 from bigcapitalhq/feat/query-hooks-refactor-kebab-case
refactor(webapp): rename query hooks to kebab-case convention
2026-05-30 22:26:49 +02:00
Ahmed Bouhuolia
7e787cf288 wip 2026-05-30 21:43:13 +02:00
Ahmed Bouhuolia
757480d258 wip 2026-05-30 19:37:03 +02:00
Ahmed Bouhuolia
326daaf4b4 wip 2026-05-30 00:40:35 +02:00
Ahmed Bouhuolia
def0fb62b6 Merge branch 'develop' into feat/query-hooks-refactor-kebab-case 2026-05-29 18:00:40 +02:00
Ahmed Bouhuolia
18c98f9c34 Merge pull request #1102 from bigcapitalhq/fix/server-typescript-type-errors
fix(server): resolve all TypeScript errors without unsafe type casts
2026-05-29 17:56:13 +02:00
Ahmed Bouhuolia
edf12fb87a fix(server): resolve all TypeScript errors without unsafe type casts
Fix 20+ pre-existing TypeScript errors in the server package using
proper type-safe solutions — no `as any`, `as unknown`, or `any` types.

Key changes:
- Replace R.curry with regular curried arrow functions for proper inference
- Add return types to abstract methods (DynamicFilterRoleAbstractor)
- Add field declarations to empty models (ItemWarehouseQuantity)
- Add index signature to IMetadata for dynamic extra columns
- Use explicit field construction instead of pick()+cast patterns
- Convert moment format strings to Date objects where Date type expected
- Make interface properties optional where payloads don't include them
- Use native Array.reduce with proper typing instead of lodash chain

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 17:52:46 +02:00
Ahmed Bouhuolia
3d687d51e1 wip 2026-05-29 13:32:59 +02:00
Ahmed Bouhuolia
d7d1783eee wip 2026-05-27 23:28:17 +02:00
Ahmed Bouhuolia
4a84d5996e wip 2026-05-27 17:37:39 +02:00
Ahmed Bouhuolia
f7d9ac765b Merge branch 'develop' into feat/query-hooks-refactor-kebab-case 2026-05-22 17:12:01 +02:00
Ahmed Bouhuolia
2faafb2617 Merge pull request #1101 from bigcapitalhq/refactor/webapp-withx-hoc-types
refactor(webapp): standardize withX HOC types with shared MapState generic and props interfaces
2026-05-22 17:07:38 +02:00
Ahmed Bouhuolia
fa98b06a09 refactor(webapp): standardize withX HOC types with shared MapState generic and props interfaces
- Extract shared `MapState<MappedProps, OwnProps>` generic into `containers/hoc.types.ts`,
  replacing 57 per-file local type duplicates
- Add exported `WithXProps` interfaces to all state HOCs that lacked them, replacing
  `MapState<Record<string, unknown>, Props>` with the properly typed generic
- Add exported `WithXActionsProps` interfaces to all action HOCs, annotating
  `mapDispatchToProps` return types and ensuring consistent exports
- Fix TS errors in `withAlertStoreConnect`, `withDrawers`, `withAuthentication`,
  `withCurrentOrganization`, and `withOrganization` (missing args and missing casts)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 15:25:45 +02:00
Ahmed Bouhuolia
bae7222230 Merge pull request #1100 from bigcapitalhq/refactor/store-kebab-case-rename
refactor(webapp): rename store files and folders to kebab-case
2026-05-20 21:58:34 +02:00
Ahmed Bouhuolia
d44ced73ad wip 2026-05-20 21:47:41 +02:00
Ahmed Bouhuolia
5edc3e4723 wip 2026-05-20 21:30:39 +02:00
Ahmed Bouhuolia
f77baaa84f wip 2026-05-20 20:57:29 +02:00
Ahmed Bouhuolia
a1a2f86e86 refactor(webapp/store): update all import paths to match kebab-case renames
Update ~112 files across packages/webapp/src to use the new
kebab-case folder and file names introduced in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 00:48:46 +02:00
Ahmed Bouhuolia
3d529833d5 refactor(webapp/store): rename store files/folders to kebab-case and .ts extension
- Rename 19 PascalCase/camelCase folders to kebab-case
  (e.g. CashflowAccounts → cashflow-accounts, financialStatement → financial-statement)
- Rename all .tsx store files to .ts (no JSX in any store file)
- Rename camelCase/PascalCase file base names to kebab-case
  (e.g. paymentMades.reducer.tsx → payment-mades.reducer.ts)
- Rename 9 root-level store files to kebab-case
  (createStore.tsx → create-store.ts, reducers.tsx → reducers.ts, etc.)
- Update all ~112 import paths across packages/webapp/src to match new paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 00:46:06 +02:00
Ahmed Bouhuolia
445bc8a582 Merge pull request #1078 from bigcapitalhq/feat/ee-workspaces-multi-org-pr
feat(ee): add multi-organization workspaces feature
2026-05-19 21:03:31 +02:00
Ahmed Bouhuolia
a8431da447 wip 2026-05-19 20:59:21 +02:00
Ahmed Bouhuolia
dede2b03ce wip 2026-05-19 20:58:04 +02:00
Ahmed Bouhuolia
0971b3c9ce update pnpm-lock.yaml 2026-05-18 23:54:21 +02:00
Ahmed Bouhuolia
e9b5974182 wip 2026-05-18 23:52:45 +02:00
Ahmed Bouhuolia
73578ab902 wip 2026-05-18 16:08:33 +02:00
Ahmed Bouhuolia
c69515f618 wip 2026-05-18 13:29:16 +02:00
Ahmed Bouhuolia
b1766a9c6f Merge branch 'develop' into feat/ee-workspaces-multi-org-pr 2026-05-18 13:25:35 +02:00
Ahmed Bouhuolia
7f3fbdc57d Merge pull request #1095 from bigcapitalhq/fix/plaid-webhook-signature-verification
fix(server): verify Plaid webhook signatures (GHSA-g56w-g54f-whq5)
2026-05-17 23:04:30 +02:00
Ahmed Bouhuolia
ef7cd6a284 Merge pull request #1098 from bigcapitalhq/chore/update-openapi-sdk-types 2026-05-17 21:22:42 +02:00
abouolia
bc1dad56ca chore(sdk): update OpenAPI spec and generated types 2026-05-17 19:20:32 +00:00
Ahmed Bouhuolia
40d306f39b Merge pull request #1076 from bigcapitalhq/feat/financial-audit-trail
feat(ee): audit logs domain level
2026-05-17 21:18:03 +02:00
Ahmed Bouhuolia
1a4f2e5b5d wip 2026-05-17 21:12:31 +02:00
Ahmed Bouhuolia
64e1221640 wip 2026-05-17 20:46:34 +02:00
Ahmed Bouhuolia
19d8aec2aa Merge remote-tracking branch 'refs/remotes/origin/feat/financial-audit-trail' into feat/financial-audit-trail 2026-05-17 20:46:03 +02:00
Ahmed Bouhuolia
8c8e5138df wip 2026-05-17 20:38:56 +02:00
Ahmed Bouhuolia
d74e02c21a Merge branch 'develop' into feat/financial-audit-trail 2026-05-17 19:55:15 +02:00
Ahmed Bouhuolia
00feae58a7 wip 2026-05-17 19:50:00 +02:00
Ahmed Bouhuolia
54dd475ec3 Merge pull request #1097 from bigcapitalhq/fix/sortorder-sql-injection
fix(server): prevent SQL injection via sortOrder in DynamicListing (GHSA-hcp2-qqg6-jjpm)
2026-05-16 21:42:43 +02:00
Ahmed Bouhuolia
c23bc76afa fix(server): prevent SQL injection via sortOrder in DynamicListing (GHSA-hcp2-qqg6-jjpm)
Validate sortOrder against an allowlist at the DTO layer, normalize the
direction centrally in DynamicFilterSortBy.buildQuery, and re-sanitize
inside every orderByRaw modifier so attacker-controlled SQL cannot reach
the ORDER BY clause.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 21:35:22 +02:00
Ahmed Bouhuolia
9f5aebec1d Merge pull request #1096 from bigcapitalhq/fix/predictable-s3-attachment-keys
fix(server): use CSPRNG for attachment S3 keys (GHSA-gj48-p5ff-g67f)
2026-05-16 19:59:22 +02:00