feat: wip upload attachmentsx

This commit is contained in:
Ahmed Bouhuolia
2024-05-29 13:58:08 +02:00
parent cfdbcea9c0
commit e7871e34a9
7 changed files with 33 additions and 12 deletions

View File

@@ -25,7 +25,8 @@ export default class BillPaymentsPages {
const { BillPayment, Bill } = this.tenancy.models(tenantId);
const billPayment = await BillPayment.query()
.findById(billPaymentId)
.withGraphFetched('entries.bill');
.withGraphFetched('entries.bill')
.withGraphFetched('attachments');
// Throw not found the bill payment.
if (!billPayment) {

View File

@@ -112,7 +112,6 @@ export class CreateBillPayment {
const billPayment = await BillPayment.query(trx).insertGraphAndFetch({
...billPaymentObj,
});
// Triggers `onBillPaymentCreated` event.
await this.eventPublisher.emitAsync(events.billPayment.onCreated, {
tenantId,