Genesys Website issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues2024-02-03T20:30:30+01:00https://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/1052Syntax highlighting2024-02-03T20:30:30+01:00Matija ObrezaSyntax highlightingIf ever we want to add custom query support that allows the user to enter JPA queries with autocompletion then we'll need to explore [codemirror](https://codemirror.net/docs/).
- https://codemirror.net/try/?example=Custom%20completions
...If ever we want to add custom query support that allows the user to enter JPA queries with autocompletion then we'll need to explore [codemirror](https://codemirror.net/docs/).
- https://codemirror.net/try/?example=Custom%20completions
- https://lezer.codemirror.net/docs/Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/917Updated API for requesting material2022-11-21T10:28:08+01:00Matija ObrezaUpdated API for requesting materialgenesys-pgr/genesys-server#640 implements new API for requesting material. This change request modifies how UI handles requests for accessions.
Please implement a new UI with new components and we will delete the original implementation...genesys-pgr/genesys-server#640 implements new API for requesting material. This change request modifies how UI handles requests for accessions.
Please implement a new UI with new components and we will delete the original implementation.
# User: Starting a request
![image](/uploads/f2d9b25716aea11a88fcbb9d30b7749b/image.png)
On "Request for material" click, the list of **all** selected accession `ids` is sent to the API `/api/v1/requests/r/create`. The API returns a **new** `DRAFT` `MaterialRequest` with multiple `MaterialSubRequests`. Please update the typescript classes.
The UI displays the `MaterialSubRequests` and indicates the number of requested accessions for each genebank. This can be a simple `h2` and a `p`:
```ts
{ subRequests.map(subreq => <SubRequestInfo key={ subreq.uuid } value={ subreq } /> }
```
`SubRequestInfo` also includes the of accessions in the sub request.
## Possibility to request via Genesys
The flag `FaoInstitute.allowMaterialRequests` indicates if it is possible to request via Genesys.
If the genebank does not allow for requests via Genesys, the UI displays a message saying "Sorry, XYZ does not allow for initiating requests for material from Genesys. We cannot relay your request directly."
Otherwise we indicate "XYZ allows initiating requests for material from Genesys".
# User: Submitting requests
If there is at least one `MaterialSubRequest` that can be relayed, then "Continue..." leads the user to provide additional info (same as now) and submit the request for validation.
When there are no such requests, "Continue..." is disabled, same as now.
# Admin: Viewing requests
Check that Admin can browse all requests and subrequests.Oleksii PlotnykovOleksii Plotnykov