feat: add waitlist view, quick edit payment dialog, and catering fee in class views

This commit is contained in:
2026-08-23 23:00:23 +03:30
parent 39921b548e
commit 6d64c2931d
13 changed files with 1598 additions and 7 deletions
+13
View File
@@ -47,6 +47,19 @@ describe('calculateProfessorPayout', () => {
assert.equal(result.totalPayout, 4_500_000);
});
it('computes percentage-based payout deducting serviceFeePerPerson * studentsCount first', () => {
const result = calculateProfessorPayout({
payoutType: 'percentage',
payoutPercentage: 50,
revenue: 20_000_000,
serviceFeePerPerson: 400_000,
studentsCount: 2
});
// 20M - (400k * 2) = 19.2M * 50% = 9.6M
assert.equal(result.baseShare, 9_600_000);
assert.equal(result.totalPayout, 9_600_000);
});
it('computes hourly-based payout with extra expenses', () => {
const result = calculateProfessorPayout({
payoutType: 'hourly',