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.
This pull request includes several changes to the
admin
andapi
modules to add support for user-uploaded data inputs. The most significant changes involve adding new entities and resources for handling user-uploaded cost, restoration, and conservation inputs, as well as implementing the necessary controller and service methods to process these inputs.Admin Module Changes:
admin/datasource.ts
: Added imports and included new entitiesUserUploadCostInputs
,UserUploadRestorationInputs
, andUserUploadConservationInputs
in theADMINJS_ENTITIES
array.admin/index.ts
: Imported new entities and added them to theresources
array with appropriate navigation options. [1] [2]API Module Changes:
import.controller.ts
: Added new imports and implemented anuploadData
method to handle file uploads usingFilesInterceptor
. [1] [2] [3]import.service.ts
: Added new imports and implemented theimportDataProvidedByPartner
method to process the uploaded data and save it to the database. [1] [2] [3]users.module.ts
: Added new entities to theTypeOrmModule
imports.Shared Module Changes:
users.contract.ts
: Added a newuploadData
endpoint to theusersContract
router. [1] [2] [3]Additional Changes:
xlsx.parser.ts
: ImplementedparseUserExcels
method to parse user-uploaded Excel files.user-data-parser.ts
: Added functions to map JSON data to the new entities.