This commit is contained in:
2025-12-16 10:50:15 +01:00
parent 775d41e055
commit 8ed6ba1fd1
144 changed files with 5763 additions and 1985 deletions

View File

@@ -0,0 +1,26 @@
import type {
IGetPaymentsPresenter,
GetPaymentsResultDTO,
GetPaymentsViewModel,
} from '@gridpilot/payments/application/presenters/IGetPaymentsPresenter';
export class GetPaymentsPresenter implements IGetPaymentsPresenter {
private result: GetPaymentsViewModel | null = null;
reset() {
this.result = null;
}
present(dto: GetPaymentsResultDTO) {
this.result = dto;
}
getViewModel(): GetPaymentsViewModel | null {
return this.result;
}
get viewModel(): GetPaymentsViewModel {
if (!this.result) throw new Error('Presenter not presented');
return this.result;
}
}