cloud-ide-fees 0.0.33 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3074,6 +3074,7 @@ class FeeApplicableFeesComponent {
|
|
|
3074
3074
|
selectedFeeStructureId = signal(null, ...(ngDevMode ? [{ debugName: "selectedFeeStructureId" }] : []));
|
|
3075
3075
|
feeDiscountScholarshipData = signal(new Map(), ...(ngDevMode ? [{ debugName: "feeDiscountScholarshipData" }] : []));
|
|
3076
3076
|
viewingFeeDetails = signal(null, ...(ngDevMode ? [{ debugName: "viewingFeeDetails" }] : []));
|
|
3077
|
+
selectedFeeIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "selectedFeeIds" }] : [])); // IDs of selected fees
|
|
3077
3078
|
onStructureChange(value) {
|
|
3078
3079
|
this.selectedFeeStructureId.set(value ? String(value) : null);
|
|
3079
3080
|
}
|
|
@@ -3314,6 +3315,12 @@ class FeeApplicableFeesComponent {
|
|
|
3314
3315
|
// Simple optimization: check if any status changed. For now just set.
|
|
3315
3316
|
this.applicableFees.set(updatedFees);
|
|
3316
3317
|
this.regroupFees(updatedFees);
|
|
3318
|
+
// Initialize selection: Select all by default (including assigned ones which will be disabled)
|
|
3319
|
+
// Or just select unassigned? User requirement: "if that fees is alrwdy assigned bu the studen then we will show this as checked"
|
|
3320
|
+
// Implicitly: we also want to select unassigned ones so they can be processed?
|
|
3321
|
+
// Let's select ALL by default so user can opt-out.
|
|
3322
|
+
const allIds = new Set(updatedFees.map(f => this.getFeeId(f)));
|
|
3323
|
+
this.selectedFeeIds.set(allIds);
|
|
3317
3324
|
}
|
|
3318
3325
|
regroupFees(allFeeItems) {
|
|
3319
3326
|
const groupedFees = new Map();
|
|
@@ -3376,22 +3383,30 @@ class FeeApplicableFeesComponent {
|
|
|
3376
3383
|
}
|
|
3377
3384
|
// Totals for current selection
|
|
3378
3385
|
totalOriginalAmount = computed(() => {
|
|
3379
|
-
return this.getSelectedFeeStructureFees()
|
|
3386
|
+
return this.getSelectedFeeStructureFees()
|
|
3387
|
+
.filter(f => this.selectedFeeIds().has(this.getFeeId(f)))
|
|
3388
|
+
.reduce((sum, fee) => sum + (fee.fees_amount || 0), 0);
|
|
3380
3389
|
}, ...(ngDevMode ? [{ debugName: "totalOriginalAmount" }] : []));
|
|
3381
3390
|
totalDiscount = computed(() => {
|
|
3382
|
-
return this.getSelectedFeeStructureFees()
|
|
3391
|
+
return this.getSelectedFeeStructureFees()
|
|
3392
|
+
.filter(f => this.selectedFeeIds().has(this.getFeeId(f)))
|
|
3393
|
+
.reduce((sum, fee) => {
|
|
3383
3394
|
const discount = this.getDiscountData(this.getFeeId(fee));
|
|
3384
3395
|
return sum + (discount?.discount_amount || 0);
|
|
3385
3396
|
}, 0);
|
|
3386
3397
|
}, ...(ngDevMode ? [{ debugName: "totalDiscount" }] : []));
|
|
3387
3398
|
totalScholarship = computed(() => {
|
|
3388
|
-
return this.getSelectedFeeStructureFees()
|
|
3399
|
+
return this.getSelectedFeeStructureFees()
|
|
3400
|
+
.filter(f => this.selectedFeeIds().has(this.getFeeId(f)))
|
|
3401
|
+
.reduce((sum, fee) => {
|
|
3389
3402
|
const scholarship = this.getScholarshipData(this.getFeeId(fee));
|
|
3390
3403
|
return sum + (scholarship?.scholarship_amount || 0);
|
|
3391
3404
|
}, 0);
|
|
3392
3405
|
}, ...(ngDevMode ? [{ debugName: "totalScholarship" }] : []));
|
|
3393
3406
|
totalFinalAmount = computed(() => {
|
|
3394
|
-
return this.getSelectedFeeStructureFees()
|
|
3407
|
+
return this.getSelectedFeeStructureFees()
|
|
3408
|
+
.filter(f => this.selectedFeeIds().has(this.getFeeId(f)))
|
|
3409
|
+
.reduce((sum, fee) => sum + this.calculateFinalAmount(fee), 0);
|
|
3395
3410
|
}, ...(ngDevMode ? [{ debugName: "totalFinalAmount" }] : []));
|
|
3396
3411
|
// --- Actions ---
|
|
3397
3412
|
async openDiscountManagement(feeId) {
|
|
@@ -3556,7 +3571,11 @@ class FeeApplicableFeesComponent {
|
|
|
3556
3571
|
emitFeeData() {
|
|
3557
3572
|
const fees = this.getSelectedFeeStructureFees();
|
|
3558
3573
|
// Enrich with calculated values
|
|
3559
|
-
|
|
3574
|
+
// Filter by selection for final output
|
|
3575
|
+
const selectedIds = this.selectedFeeIds();
|
|
3576
|
+
const enrichedFees = fees
|
|
3577
|
+
.filter(f => selectedIds.has(this.getFeeId(f)))
|
|
3578
|
+
.map(f => {
|
|
3560
3579
|
const feeId = this.getFeeId(f);
|
|
3561
3580
|
const discount = this.getDiscountData(feeId)?.discount_amount || 0;
|
|
3562
3581
|
const scholarship = this.getScholarshipData(feeId)?.scholarship_amount || 0;
|
|
@@ -8506,6 +8525,13 @@ class FeeDetailsViewerComponent {
|
|
|
8506
8525
|
this.assignmentDate;
|
|
8507
8526
|
this.discount;
|
|
8508
8527
|
this.scholarship;
|
|
8528
|
+
console.log('🔍 FeeDetailsViewer - isOpen:', this.isOpen);
|
|
8529
|
+
console.log('🔍 FeeDetailsViewer - studentId:', this.studentId);
|
|
8530
|
+
console.log('🔍 FeeDetailsViewer - feeId:', this.feeId);
|
|
8531
|
+
console.log('🔍 FeeDetailsViewer - feeData:', this.feeData);
|
|
8532
|
+
console.log('🔍 FeeDetailsViewer - assignmentDate:', this.assignmentDate);
|
|
8533
|
+
console.log('🔍 FeeDetailsViewer - discount:', this.discount);
|
|
8534
|
+
console.log('🔍 FeeDetailsViewer - scholarship:', this.scholarship);
|
|
8509
8535
|
this.loadFeeDetails();
|
|
8510
8536
|
});
|
|
8511
8537
|
}
|