Files
cbsnexora/src/app/login/agreement-accept/agreement-accept.component.html
T
niteshandClaude Sonnet 5 d334dd1669
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Publish Image in Docker Hub / build (push) Canceled after 0s
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s
Tests / testRigor (push) Canceled after 0s
feat(users): OTP delivery method picker on user creation + post-login agreement
Create User dialog now has a mandatory Email/Mobile OTP delivery method
picker (styled as a pill toggle) alongside the existing fields.

Adds a new post-login agreement acceptance dialog: right after the existing
2FA flow (TwoFactorAuthenticationComponent) succeeds, or immediately after
login for users without 2FA, the user must accept the bank's current
agreement/disclaimer at least once before reaching the app.

Also adds a "Manage User Agreement" admin screen (System section) to publish
versioned agreement text without a code deploy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 16:20:46 +05:30

72 lines
2.0 KiB
HTML

<!--
Copyright since 2025 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="aga-card">
<div class="aga-icon">
<fa-icon icon="file-signature"></fa-icon>
</div>
<h2 class="aga-title">Terms &amp; Agreement</h2>
<p class="aga-sub">
@if (loading) {
Loading the agreement…
} @else if (loadErrorMessage) {
We couldn't load the agreement.
} @else {
Please read the agreement below before continuing.
}
</p>
@if (loading) {
<div class="aga-loading">
<mat-spinner diameter="32"></mat-spinner>
</div>
} @else if (loadErrorMessage) {
<div class="aga-error">
<fa-icon icon="exclamation-circle"></fa-icon>
{{ loadErrorMessage }}
</div>
<button type="button" class="aga-btn aga-btn--ghost" (click)="loadAgreement()">
<fa-icon icon="sync-alt"></fa-icon>
<span>Try Again</span>
</button>
} @else {
<div class="aga-agreement">
<h3 class="aga-agreement__title">{{ agreementTitle }}</h3>
<div class="aga-agreement__body">{{ agreementBody }}</div>
</div>
<label class="aga-check">
<input type="checkbox" [checked]="accepted" (change)="toggleAccepted()" />
<span>I have read and agree to the above</span>
</label>
@if (submitErrorMessage) {
<div class="aga-error">
<fa-icon icon="exclamation-circle"></fa-icon>
{{ submitErrorMessage }}
</div>
}
<button
type="button"
class="aga-btn aga-btn--primary"
[disabled]="!accepted || submitting"
(click)="acceptAndContinue()"
>
@if (submitting) {
<mat-spinner diameter="20"></mat-spinner>
<span>Submitting…</span>
} @else {
<fa-icon icon="check-circle"></fa-icon>
<span>Accept &amp; Continue</span>
}
</button>
}
</div>