Shipping Address Management
A user can manage postal addresses that will be used for sample/parcel tracking. In the data portal an user can:
- Create a new address
- Modify an existing address
- Remove an existing address
- List his addresses
A user can manage any postal address from the same investigation. Example: User A and user B works in the same department of the university. User U1 has created the lab address A and then the user U2 can modify the address A because U1 and U2 are members of the same investigation.
GET, POST, PUT and DELETE methods have been developed in icat+ for such operations:
These methods have as a path param the investigationId that means that the investigation already exist. This is the initial approach because the data portal works only with investigations (=scheduled visit or sessions) BUT these methods will be changed to allow to manage address within the scope of a:
- User
- Proposal
This will not occur until the ingester is modified.
So, we would need to create a component that gets the list of addreses (GET /tracking/{sessionId}/investigation/{investigationId}/address) of an user and then allows to create, delete or modify.
The fields of an address are: https://gitlab.esrf.fr/demariaa/icat-plus/-/blob/issue_130/app/models/address.model.js#L11
The icat+ with the code can be found here: https://gitlab.esrf.fr/demariaa/icat-plus/-/tree/issue_130/