Closed algirdasc closed 5 months ago
@coderabbitai review
[!IMPORTANT]
Review Skipped
Auto reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The changes address timezone consistency issues and enhance the frontend's version management. Key modifications include setting the default timezone to 'UTC' in backend configurations and kernel, adding date-handling interceptors in the frontend, and integrating version information dynamically from package.json
. These updates ensure consistent date formatting across the application and provide clear version visibility in the frontend.
Files/Paths | Change Summaries |
---|---|
Dockerfile | Uncommented npm run analyze command to enable it during Docker build process. |
backend/config/packages/doctrine.yaml | Updated time_zone setting in Doctrine configuration to 'UTC' . |
backend/config/services.yaml | Added configuration for DateTimeNormalizer specifying default datetime format. |
backend/src/Kernel.php | Modified boot() method to set default timezone to 'UTC'. |
backend/src/Service/Statement/Import/Resolver/StatementImportResolver.php | Marked StatementImportResolver class as readonly . |
frontend/package.json | Removed version and postversion scripts. |
frontend/src/app/app.component.ts | Added import for NbDateService and modified constructor to include it. |
frontend/src/app/app.module.ts | Added DateInterceptor to handle date-related functionality in HTTP interceptors. |
frontend/src/app/interceptors/date.interceptor.ts | Added DateInterceptor class to shift dates in request body using DatePipe . |
frontend/src/app/modules/auth/components/login/login.component.html | Added section to display application version. |
frontend/src/app/modules/auth/components/login/login.component.ts | Added import for environment and declared protected readonly environment = environment . |
frontend/src/app/modules/main/dialogs/expense-dialog/expense-dialog.component.html | Added nb-list-item element to display expense.createdAt . |
frontend/src/app/modules/main/main.component.ts | Changed date parsing logic to directly create a new Date object. |
frontend/src/app/util/date.util.ts | Added static readonly property DATE_TIME_FORMAT to DateUtil class. |
frontend/src/environments/environment.interface.ts | Added version field to EnvironmentInterface . |
frontend/src/environments/environment.prod.ts | Imported package.json and assigned version property from it. |
frontend/src/environments/environment.ts | Imported package.json and assigned version property from it. |
frontend/tsconfig.app.json | Restructured compilerOptions , and added specific paths to include/exclude TypeScript files. |
frontend/tsconfig.json | Added allowSyntheticDefaultImports , resolveJsonModule , and useDefineForClassFields options. |
Objective (Issue #55) | Addressed | Explanation |
---|---|---|
Ensure timezone consistency to prevent shuffling of expenses in calendar when browser timezone changes | ✅ | |
Set default timezone to 'UTC' in backend configurations and kernel | ✅ | |
Add date-handling interceptors in the frontend to manage date formats | ✅ | |
Display application version in the frontend login component | ✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
fixes #55
Summary by CodeRabbit
New Features
DateInterceptor
to handle date formatting in HTTP requests.Improvements
DateTimeNormalizer
in the backend.Configuration Changes
npm run analyze
.package.json
.Code Quality
StatementImportResolver
class asreadonly
for immutability.tsconfig
files for better TypeScript file management.