parvarh26 opened a new pull request, #732:
URL: https://github.com/apache/fineract-backoffice-ui/pull/732
## What and why
Date pickers previously defaulted to the user's local browser timezone via
`new Date()`, which refused valid actions for users located in timezones behind
or ahead of the Fineract tenant (e.g. UTC evening in Americas when tenant in
Kolkata has rolled over to tomorrow).
This PR introduces `PlatformDateService` backed by `BusinessDateApi` (ADR
0006 boundary), defaulting to the tenant's timezone (`Asia/Kolkata` by default)
when business date is unconfigured, and only falling back to browser clock as a
last resort. It updates Center action and meeting dialogs to seed from the
platform date, enforces `minDate` bounds (e.g.
`submittedOnDate`/`activatedOnDate`), and improves error surfacing so refused
dates are explicitly visible in error messages.
Closes #358
## Verification
- Ran `npm run lint` with exit code 0 (all ADR boundaries and suppressions
honored).
- Ran `node scripts/check-translations.mjs` with exit code 0.
- Executed unit test suites for:
- `fineract-business-date.api.test.ts`
- `platform-date.service.test.ts`
- `center-action-dialog.component.test.ts`
- `center-view.component.test.ts`
- `error.interceptor.test.ts`
- Verified date boundary enforcement and error surfacing behavior with
Vitest.
## Screenshots
Not applicable (preserves existing UI appearance while adjusting bounds and
defaults).
## AI assistance (optional)
- Tool / model: Antigravity IDE (Gemini)
- Harness / workflow: Pair programming assistant
## Checklist
- [x] I did not hand-edit generated files under `src/app/api/`.
- [x] New component or service code uses the adapter boundary in
`src/app/core/adapters/` instead of direct browser globals or imperative
third-party APIs.
- [x] User-facing strings use translation keys.
- [x] I added or updated tests appropriate to this change, or explained why
tests were not needed.
- [ ] UI workflow changes include suitable e2e coverage, including
real-backend testing where relevant.
- [x] Commits are signed — see [Commit
Signing](CONTRIBUTING.md#commit-signing) in CONTRIBUTING.md.
- [x] I followed the [AI-assisted contributions
guidance](CONTRIBUTING.md#ai-assisted-contributions).
- [x] If this adds a feature or changes a workflow, I raised it on
[email protected] first — or it is a bug fix, refactor or test change,
where that does not apply.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]