feat(investment,reconciliation): add Export to Excel across Investment, fix export popup
Adds a shared Export to Excel utility (investment-export.ts) and wires it into every listing/report screen in the Investment module — Dashboard (break-up + allocation), Reports (all ~20 report shapes), Interest (per active tab), the FD/Bond/Share Holdings registers, and Masters (per active master tab). Entry/transaction forms intentionally have no export button. No sign-off is included here, matching the request to keep that feature reconciliation-only. Also fixes the Reconciliation export flow: the Prepared/Checked/Approved sign-off is now an optional one-off popup shown when "Export to Excel" is clicked (fields are blank by default and downloading works whether or not they're filled), replacing the earlier always-visible sign-off card. Also fixes three reconciliation reports (Sundry Dr/Cr, NEFT/RTGS, UDIR) whose labels contain "/" — an Excel-forbidden worksheet-name character — which was silently aborting their export.
This commit is contained in:
@@ -51,6 +51,11 @@
|
||||
<input type="text" [(ngModel)]="asOnDate" placeholder="DD-MM-YYYY" />
|
||||
</label>
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="generate()">Generate</button>
|
||||
@if (!isRestricted) {
|
||||
<button type="button" class="pg-btn pg-btn--ghost" [disabled]="generating" (click)="openExportModal()">
|
||||
{{ generating ? 'Exporting…' : 'Export to Excel' }}
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -225,4 +230,42 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (showExportModal) {
|
||||
<div class="recon-modal-backdrop" (click)="closeExportModal()">
|
||||
<div class="recon-modal" (click)="$event.stopPropagation()">
|
||||
<div class="recon-modal__header">
|
||||
<span>Export to Excel — Sign-off (Optional)</span>
|
||||
<button type="button" class="recon-modal__close" (click)="closeExportModal()" aria-label="Close">
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
<p class="pg-sub" style="padding: 0 20px">
|
||||
Fill in Prepared / Checked / Approved details if this copy needs them for the record — or leave them blank and
|
||||
download straight away.
|
||||
</p>
|
||||
<div class="recon-signoff-grid">
|
||||
<div class="recon-signoff-col">
|
||||
<span class="recon-signoff-role">Prepared By</span>
|
||||
<input type="text" placeholder="Name" [(ngModel)]="exportSignOff.preparedByName" />
|
||||
<input type="text" placeholder="Designation" [(ngModel)]="exportSignOff.preparedByDesg" />
|
||||
</div>
|
||||
<div class="recon-signoff-col">
|
||||
<span class="recon-signoff-role">Checked By</span>
|
||||
<input type="text" placeholder="Name" [(ngModel)]="exportSignOff.checkedByName" />
|
||||
<input type="text" placeholder="Designation" [(ngModel)]="exportSignOff.checkedByDesg" />
|
||||
</div>
|
||||
<div class="recon-signoff-col">
|
||||
<span class="recon-signoff-role">Approved By</span>
|
||||
<input type="text" placeholder="Name" [(ngModel)]="exportSignOff.approvedByName" />
|
||||
<input type="text" placeholder="Designation" [(ngModel)]="exportSignOff.approvedByDesg" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="inv-form-actions" style="padding: 0 20px 20px">
|
||||
<button type="button" class="pg-btn pg-btn--ghost" (click)="closeExportModal()">Cancel</button>
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="confirmExport()">Download</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="inv-toast" [class.show]="toastVisible">{{ toastMsg }}</div>
|
||||
|
||||
Reference in New Issue
Block a user