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>
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>
## 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>
- 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>
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>
- 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>
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>
- 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>
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>