/** * 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/. */ import { Component, OnInit, inject } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { ChequeBookService } from '../../chequebook/chequebook.service'; import { LeafDetailDialogComponent } from '../../chequebook/cheque-book-detail/leaf-detail-dialog/leaf-detail-dialog.component'; import { ClerkLeafActionDialogComponent, LeafAction } from './leaf-action-dialog/leaf-action-dialog.component'; /** Cheque-book detail for the Clerk Dashboard — a fullscreen clerk-styled view of one book, its leaf * register, and the same maker-side leaf actions (stop-payment, revoke, report-lost, cancel-leaf, * mark-used) as the back-office ChequeBookDetailComponent, so a clerk can act on a leaf without leaving * the clerk shell/nav. Every action still goes through the existing maker-checker approval flow server-side. * Each action opens as a popup (ClerkLeafActionDialogComponent) rather than an inline form so it never * pushes the leaf grid around and gets the full dialog width to lay out its fields. */ @Component({ selector: 'mifosx-clerk-cheque-book-detail', standalone: true, imports: [CommonModule], styleUrl: './cheque-book-detail.component.scss', template: `