share certificate and share product maker checker
This commit is contained in:
@@ -195,6 +195,9 @@
|
||||
@if (statusId >= 100) {
|
||||
<span class="dap__reached"><i class="fas fa-flag"></i> Threshold Reached</span>
|
||||
<span class="dap__card-hint">Account is inactive</span>
|
||||
} @else if (isOverdue(daysToInactive)) {
|
||||
<span class="dap__reached"><i class="fas fa-flag"></i> Overdue {{ -daysToInactive! }}d</span>
|
||||
<span class="dap__card-hint">{{ inactiveSubtext() }}</span>
|
||||
} @else if (daysToInactive !== null) {
|
||||
<span class="dap__number" [class.dap__number--warn]="daysToInactive <= 30">
|
||||
{{ daysToInactive }}<small>days</small>
|
||||
@@ -217,6 +220,9 @@
|
||||
@if (statusId >= 200) {
|
||||
<span class="dap__reached"><i class="fas fa-flag"></i> Threshold Reached</span>
|
||||
<span class="dap__card-hint">Account is dormant</span>
|
||||
} @else if (isOverdue(daysToDormancy)) {
|
||||
<span class="dap__reached"><i class="fas fa-flag"></i> Overdue {{ -daysToDormancy! }}d</span>
|
||||
<span class="dap__card-hint">{{ dormancySubtext() }}</span>
|
||||
} @else if (daysToDormancy !== null) {
|
||||
<span class="dap__number" [class.dap__number--warn]="daysToDormancy <= 30">
|
||||
{{ daysToDormancy }}<small>days</small>
|
||||
@@ -239,6 +245,9 @@
|
||||
@if (statusId >= 300) {
|
||||
<span class="dap__reached"><i class="fas fa-flag"></i> Threshold Reached</span>
|
||||
<span class="dap__card-hint">Pending regulatory transfer</span>
|
||||
} @else if (isOverdue(daysToEscheat)) {
|
||||
<span class="dap__reached"><i class="fas fa-flag"></i> Overdue {{ -daysToEscheat! }}d</span>
|
||||
<span class="dap__card-hint">{{ escheatSubtext() }}</span>
|
||||
} @else if (daysToEscheat !== null) {
|
||||
<span class="dap__number" [class.dap__number--warn]="daysToEscheat <= 30">
|
||||
{{ daysToEscheat }}<small>days</small>
|
||||
@@ -295,7 +304,9 @@
|
||||
{{ step.label }}
|
||||
<i class="fas fa-info-circle dap__tl-info"></i>
|
||||
</span>
|
||||
@if (!step.reached && step.days !== null) {
|
||||
@if (!step.reached && isOverdue(step.days)) {
|
||||
<span class="dap__tl-reached-tag">Overdue {{ -step.days! }}d</span>
|
||||
} @else if (!step.reached && step.days !== null) {
|
||||
<span class="dap__tl-days">{{ step.days }}d</span>
|
||||
} @else if (step.reached) {
|
||||
<span class="dap__tl-reached-tag">Reached</span>
|
||||
|
||||
@@ -113,12 +113,10 @@ export class DormancyAlertPanelComponent implements OnInit {
|
||||
}
|
||||
|
||||
this.computeRiskFromAccount();
|
||||
this.shouldShow =
|
||||
this.isAlertEnabled ||
|
||||
this.isMonitoringActive ||
|
||||
this.statusId > 0 ||
|
||||
(this.daysToInactive !== null && this.daysToInactive <= 90) ||
|
||||
!!this.lastTxnDate;
|
||||
// Only surface this panel once the account has actually left "Active" —
|
||||
// i.e. subStatus is Inactive/Dormant/Escheat. A healthy active account
|
||||
// (statusId === 0) should never show a danger-colored dormancy alert.
|
||||
this.shouldShow = this.statusId > 0;
|
||||
}
|
||||
|
||||
private computeRiskFromAccount(): void {
|
||||
@@ -179,17 +177,36 @@ export class DormancyAlertPanelComponent implements OnInit {
|
||||
];
|
||||
}
|
||||
|
||||
/** e.g. "Inactive after 30 days of no transaction" */
|
||||
/** true when the threshold date has already passed but the batch job hasn't reclassified the account yet */
|
||||
isOverdue(days: number | null): boolean {
|
||||
return days !== null && days < 0;
|
||||
}
|
||||
|
||||
/** e.g. "11d" when still counting down, "Overdue 5d" when the threshold date already passed */
|
||||
daysLabel(days: number | null): string {
|
||||
if (days === null) return '';
|
||||
return this.isOverdue(days) ? `Overdue ${Math.abs(days)}d` : `${days}d`;
|
||||
}
|
||||
|
||||
/** e.g. "Moves Active → Inactive after 30 days" */
|
||||
inactiveSubtext(): string {
|
||||
return this.daysToInactive !== null ? `No transaction for ${this.daysToInactive} days` : 'Threshold not configured';
|
||||
if (this.daysToInactive === null) return 'Threshold not configured';
|
||||
return this.isOverdue(this.daysToInactive)
|
||||
? `Active → Inactive was due ${Math.abs(this.daysToInactive)} days ago`
|
||||
: `Moves Active → Inactive after ${this.daysToInactive} days`;
|
||||
}
|
||||
|
||||
dormancySubtext(): string {
|
||||
const total = (this.daysToInactive ?? 0) + (this.daysToDormancy ?? 0);
|
||||
return this.daysToDormancy !== null ? `${this.daysToDormancy} days after inactive` : 'Threshold not configured';
|
||||
if (this.daysToDormancy === null) return 'Threshold not configured';
|
||||
return this.isOverdue(this.daysToDormancy)
|
||||
? `Inactive → Dormant was due ${Math.abs(this.daysToDormancy)} days ago`
|
||||
: `Moves Inactive → Dormant after ${this.daysToDormancy} days`;
|
||||
}
|
||||
|
||||
escheatSubtext(): string {
|
||||
return this.daysToEscheat !== null ? `${this.daysToEscheat} days after dormant` : 'Threshold not configured';
|
||||
if (this.daysToEscheat === null) return 'Threshold not configured';
|
||||
return this.isOverdue(this.daysToEscheat)
|
||||
? `Dormant → Escheat was due ${Math.abs(this.daysToEscheat)} days ago`
|
||||
: `Moves Dormant → Escheat after ${this.daysToEscheat} days`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user