Feat/Expenses/RF32: Endpoint for expenseReport data by id #205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expenses-RF32: Endpoint for expenseReport data by id
[Feature/RF32]: Added an endpoint for getting expenseReport data by id. Added base logic for expenses and all of it's corresponding files
Description
RF32: As a user I want to consult the details of a travel expenses report.
Changes
prisma/migrations/20240522045959_expenses_update_fields/migration.sql
. Migration to support corresponding fields for expenses according to updated ER Modelprisma/schema.prisma
as a result of the previous migrationsrc/api/routes/index.routes.ts
. Added endpoint for /expense/src/api/routes/expense.routes.ts
src/api/controllers/expense.controller.ts
src/core/domain/entities/expense.entity.ts
src/core/app/services/expense.service.ts
src/core/infra/mappers/expense-entity-from-db-model.mapper.ts
src/core/infra/repositories/expense.repository.ts
src/utils/enums/index.ts
. Added enum for ExpenseReportStatussrc/core/app/services/__tests__/expense.service.test.ts
for testing servicesStory Points
8
Testing
A test was designed and run in which the service was tested. Mocha&Chai was used for this automated test. The test succeeds
Dependencies
None (It will be the PR that lays the foundation for the entire expenses module)
Done?
Screenshot