diff --git a/web/src/pages/applications/ApplicationCheckAccessForm.ts b/web/src/pages/applications/ApplicationCheckAccessForm.ts index dbe330791..9d233e89b 100644 --- a/web/src/pages/applications/ApplicationCheckAccessForm.ts +++ b/web/src/pages/applications/ApplicationCheckAccessForm.ts @@ -8,7 +8,7 @@ import { until } from "lit-html/directives/until"; import "../../elements/forms/HorizontalFormElement"; @customElement("ak-application-check-access-form") -export class ApplicationCheckAccessForm extends Form { +export class ApplicationCheckAccessForm extends Form<{ forUser: number }> { @property({attribute: false}) application!: Application; @@ -23,14 +23,19 @@ export class ApplicationCheckAccessForm extends Form { return t`Successfully sent test-request.`; } - send = (data: number): Promise => { - this.request = data; + send = (data: { forUser: number }): Promise => { + this.request = data.forUser; return new CoreApi(DEFAULT_CONFIG).coreApplicationsCheckAccessRetrieve({ slug: this.application?.slug, - forUser: data, + forUser: data.forUser, }).then(result => this.result = result); }; + resetForm(): void { + super.resetForm(); + this.result = undefined; + } + renderResult(): TemplateResult { return html`