feat(cashier,organization): denomination-aware vault UI, Bank/Branch Profile screens, popup disbursement review
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s
Tests / testRigor (push) Canceled after 0s
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Publish Image in Docker Hub / build (push) Canceled after 0s

Branch Day open/close now captures a denomination-wise count (carried
forward automatically to the next day), and shows an auto-fetched EOD
summary at close time -- vault + every cashier's position, a branch-total
reconciliation against the book figure, and each cashier's
reconciliation/settlement status and transaction count -- so closing the day
no longer means separately checking Vault Position and every cashier's own
screen by hand. New Vault Position screen (branch-ops menu) mirrors Cashier
Position for the teller/vault. Cash Transfer now shows the vault's live
per-denomination availability while counting a handout, with a client-side
warning before it can be over-counted.

New Organization screens for Bank Profile, Branch Profile and Clearing GL
Configuration, wired into the Organization landing page and the
previously-dead "Bank Profile" admin menu button.

Cashier Transaction Entry: TYPE is now Receipt/Payment only (cash-only TXN
TP.) on the cashier side, with no change to the clerk dashboard's own
Withdrawal Slip/Cheque/Disbursement/Enter Bank Transfer/DD flow beyond
adding a new Fund Transfer type alongside Disbursement for a GL credit that
isn't a loan payout. Neither TYPE nor TXN TP. offers a blank placeholder
option anymore -- a new row starts on a real default instead. Footer no
longer polls the business-date config for cashier/clerk roles, who never
have permission to read it.

Disbursement & Transfer Requests: "Review" now opens the review screen as a
popup instead of navigating to a separate route, refreshing the list on
close; the review screen recognises the new Fund Transfer request type
too, and its non-functional "+ Disbursement Review" tab-styled label is now
a plain heading.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 14:40:13 +05:30
co-authored by Claude Sonnet 5
parent ce840d73d7
commit da1f57c3b6
32 changed files with 3006 additions and 136 deletions
@@ -6,16 +6,21 @@
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="dri">
<!-- ── NAV BAR ── -->
<div class="dri" [class.dri--dialog]="isDialog">
<!-- ── HEADER ── -->
<nav class="cashier-nav cashier-nav--clerk">
<button type="button" class="cashier-nav__item cashier-nav__item--primary cashier-nav__item--active">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 2v20M2 12h20" />
</svg>
{{ isBankTransferMode ? 'Bank Transfer Review' : isCollectionMode ? 'Collection Review' : 'Disbursement Review' }}
</button>
<span class="cashier-nav__esc-hint" (click)="backToInbox()">← Back to Inbox</span>
<span class="dri-header-title">
{{
isBankTransferMode
? 'Bank Transfer Review'
: isCollectionMode
? 'Collection Review'
: isFundTransferMode
? 'Fund Transfer Review'
: 'Disbursement Review'
}}
</span>
<span class="cashier-nav__esc-hint" (click)="backToInbox()">{{ isDialog ? '✕ Close' : '← Back to Inbox' }}</span>
</nav>
<!-- ── LOADING ── -->
@@ -36,6 +36,16 @@ $shadow-md: 0 4px 16px rgb(0 0 0 / 9%);
flex-direction: column;
min-height: 100vh;
background: $bg-page;
/* Opened as a popup rather than a full page — sizes to its own content (capped so a long
entries table still scrolls inside the dialog) instead of stretching to the viewport. */
&--dialog {
min-height: 0;
max-height: 85vh;
overflow-y: auto;
width: min(760px, 92vw);
border-radius: 10px;
}
}
// ── Nav bar ────────────────────────────────────────────────────────────────
@@ -48,29 +58,6 @@ $shadow-md: 0 4px 16px rgb(0 0 0 / 9%);
border-bottom: 1px solid $border;
box-shadow: $shadow-sm;
&__item {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 7px 16px;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
border: none;
cursor: pointer;
transition: all 0.15s;
&--primary {
background: $brand-light;
color: $brand;
}
&--active {
background: $brand;
color: #fff;
}
}
&__esc-hint {
margin-left: auto;
font-size: 12px;
@@ -88,6 +75,12 @@ $shadow-md: 0 4px 16px rgb(0 0 0 / 9%);
}
}
.dri-header-title {
font-size: 14px;
font-weight: 700;
color: $text-mid;
}
// ── Loading / empty ────────────────────────────────────────────────────────
.dri-loading {
display: flex;
@@ -12,6 +12,7 @@ import { FormsModule } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
import { MatIconModule } from '@angular/material/icon';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
import { catchError } from 'rxjs/operators';
import { of } from 'rxjs';
@@ -33,7 +34,8 @@ interface CreditEntry {
CommonModule,
FormsModule,
MatSnackBarModule,
MatIconModule
MatIconModule,
MatDialogModule
],
templateUrl: './disbursement-review.component.html',
styleUrl: './disbursement-review.component.scss'
@@ -43,6 +45,11 @@ export class DisbursementReviewComponent implements OnInit {
private router = inject(Router);
private service = inject(ClerkDisbursementService);
private snackBar = inject(MatSnackBar);
/** Present only when opened as a popup from the requests list; absent when reached by direct
* route (e.g. a bookmarked/shared link). Both entry points stay supported — this only changes
* how "done" is signalled: closing the dialog vs. navigating back to the inbox route. */
private dialogRef = inject(MatDialogRef<DisbursementReviewComponent>, { optional: true });
private dialogData = inject<{ requestId: number } | null>(MAT_DIALOG_DATA, { optional: true });
requestId: number | null = null;
request: any = null;
@@ -53,9 +60,17 @@ export class DisbursementReviewComponent implements OnInit {
showRejectForm = false;
rejectionReason = '';
get isDialog(): boolean {
return !!this.dialogRef;
}
ngOnInit(): void {
const id = this.route.snapshot.params['id'];
this.requestId = id != null ? Number(id) : null;
if (this.dialogData?.requestId) {
this.requestId = this.dialogData.requestId;
} else {
const id = this.route.snapshot.params['id'];
this.requestId = id != null ? Number(id) : null;
}
if (this.requestId) this.loadRequest();
}
@@ -93,9 +108,11 @@ export class DisbursementReviewComponent implements OnInit {
} else {
const msg = this.isBankTransferMode
? 'Bank transfer approved successfully.'
: 'Disbursement approved successfully.';
: this.isFundTransferMode
? 'Fund transfer approved successfully.'
: 'Disbursement approved successfully.';
this.snackBar.open(msg, 'Close', { duration: 3000 });
this.router.navigate(['/checker-inbox-and-tasks/disbursement-requests']);
this.finish();
}
});
}
@@ -112,15 +129,31 @@ export class DisbursementReviewComponent implements OnInit {
this.snackBar.open(res.error, 'Close', { duration: 5000 });
} else {
this.snackBar.open('Request rejected.', 'Close', { duration: 3000 });
this.router.navigate(['/checker-inbox-and-tasks/disbursement-requests']);
this.finish();
}
});
}
/** "Done" for this screen — closes the popup (telling the list to refresh) when opened as a
* dialog, or returns to the inbox route otherwise. */
private finish(): void {
if (this.dialogRef) {
this.dialogRef.close({ refreshed: true });
} else {
this.router.navigate(['/checker-inbox-and-tasks/disbursement-requests']);
}
}
get isBankTransferMode(): boolean {
return this.request?.request_type === 'BANK_TRANSFER';
}
/** Mechanically identical to a Disbursement (same 1 GL debit -> N account credits flow) — only
* the label differs, so a checker doesn't read this as a loan payout. */
get isFundTransferMode(): boolean {
return this.request?.request_type === 'FUND_TRANSFER';
}
get isCollectionMode(): boolean {
if (this.isBankTransferMode) return false;
return this.creditEntries.some((e) => e.dbCr === 'Dr');
@@ -189,6 +222,10 @@ export class DisbursementReviewComponent implements OnInit {
}
backToInbox(): void {
this.router.navigate(['/checker-inbox-and-tasks/disbursement-requests']);
if (this.dialogRef) {
this.dialogRef.close();
} else {
this.router.navigate(['/checker-inbox-and-tasks/disbursement-requests']);
}
}
}