web/admin: fallback for invitation list on first load

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-01 13:33:05 +02:00
parent f82aada23b
commit 88f0dfc8cc
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,9 @@ export class InvitationListLink extends LitElement {
designation: FlowsInstancesListDesignationEnum.Enrollment,
})
.then((flows) => {
if (!this.selectedFlow && flows.results.length > 0) {
this.selectedFlow = flows.results[0].slug;
}
return flows.results.map((flow) => {
return html`<option
value=${flow.slug}