numerique-gouv / people

Teams management application
MIT License
13 stars 1 forks source link

frontend people desk : display specific mail domain details and its mailboxes on /mail-domains/<domain-name> #218

Closed daproclaima closed 4 months ago

daproclaima commented 4 months ago

Display specific mail domain details and its mailboxes on /mail-domains/

On the frontend app, as a visitor clicks on a mail domain button in the left side panel, this one is redirected to /mail-domains/. Within this page, he can consult the list of mailboxes related to this mail domain and the mail domain details.

For the moment, the mail domain is fetched by id, meaning that when the /mail-domains/ is the URL value the app has to fetch all the domain names and look for which one in this list possesses the same name. Only then does the app use the ID of the mail domain found in the list to fetch the mail domain by ID.

Also, the UI only shows the name of the mail domain. The mail domain in the list and the one in details fetched by ID possess this field. So the request by ID was not necessary for the moment but I assume there will come a time when we will need to display the complete domain name details. This is why I used the api/v1.0/mail-domains/ endpoint in this feature.

Demo

https://github.com/numerique-gouv/people/assets/33085077/9f24f8ec-53e6-4161-b2c9-d6cabf5f5fa9