Skip to content

Commit a2f8e63

Browse files
committed
chore: changes in customer-portal
1 parent eaf2612 commit a2f8e63

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

apps/customer-portal/app/transaction.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ export const CustomerTransactionsTable: React.FC<CustomerTransactionsTableProps>
7878
case "DisbursalEntry":
7979
return <Balance amount={entry.disbursal.amount} currency="usd" />
8080
case "PaymentEntry":
81-
return (
82-
<Balance
83-
amount={entry.payment.disbursalAmount + entry.payment.interestAmount}
84-
currency="usd"
85-
/>
86-
)
81+
return <Balance amount={entry.payment.amount} currency="usd" />
8782
default:
8883
return "-"
8984
}

apps/customer-portal/lib/graphql/generated/index.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,13 @@ export type CreditFacilityOrigination = {
140140
txId: Scalars['UUID']['output'];
141141
};
142142

143-
export type CreditFacilityPayment = {
144-
__typename?: 'CreditFacilityPayment';
143+
export type CreditFacilityPaymentAllocation = {
144+
__typename?: 'CreditFacilityPaymentAllocation';
145+
amount: Scalars['UsdCents']['output'];
145146
createdAt: Scalars['Timestamp']['output'];
146147
creditFacility: CreditFacility;
147-
disbursalAmount: Scalars['UsdCents']['output'];
148148
id: Scalars['ID']['output'];
149-
interestAmount: Scalars['UsdCents']['output'];
150-
paymentId: Scalars['UUID']['output'];
149+
paymentAllocationId: Scalars['UUID']['output'];
151150
};
152151

153152
export type CreditFacilityRepaymentPlanEntry = {
@@ -342,7 +341,7 @@ export type PageInfo = {
342341

343342
export type PaymentEntry = {
344343
__typename?: 'PaymentEntry';
345-
payment: CreditFacilityPayment;
344+
payment: CreditFacilityPaymentAllocation;
346345
recordedAt: Scalars['Timestamp']['output'];
347346
};
348347

@@ -443,7 +442,7 @@ export type GetTransactionHistoryQueryVariables = Exact<{
443442
}>;
444443

445444

446-
export type GetTransactionHistoryQuery = { __typename?: 'Query', me: { __typename?: 'Subject', customer: { __typename?: 'Customer', depositAccount: { __typename?: 'DepositAccount', history: { __typename?: 'DepositAccountHistoryEntryConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null, hasPreviousPage: boolean, startCursor?: string | null }, edges: Array<{ __typename?: 'DepositAccountHistoryEntryEdge', cursor: string, node: { __typename?: 'CancelledWithdrawalEntry', recordedAt: any, withdrawal: { __typename?: 'Withdrawal', id: string, withdrawalId: any, accountId: any, amount: any, createdAt: any, reference: string, status: WithdrawalStatus } } | { __typename?: 'DepositEntry', recordedAt: any, deposit: { __typename?: 'Deposit', id: string, depositId: any, accountId: any, amount: any, createdAt: any, reference: string } } | { __typename?: 'DisbursalEntry', recordedAt: any, disbursal: { __typename?: 'CreditFacilityDisbursal', id: string, disbursalId: any, amount: any, createdAt: any, status: DisbursalStatus } } | { __typename?: 'PaymentEntry', recordedAt: any, payment: { __typename?: 'CreditFacilityPayment', id: string, paymentId: any, interestAmount: any, disbursalAmount: any, createdAt: any } } | { __typename?: 'UnknownEntry' } | { __typename?: 'WithdrawalEntry', recordedAt: any, withdrawal: { __typename?: 'Withdrawal', id: string, withdrawalId: any, accountId: any, amount: any, createdAt: any, reference: string, status: WithdrawalStatus } } }> } } } } };
445+
export type GetTransactionHistoryQuery = { __typename?: 'Query', me: { __typename?: 'Subject', customer: { __typename?: 'Customer', depositAccount: { __typename?: 'DepositAccount', history: { __typename?: 'DepositAccountHistoryEntryConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null, hasPreviousPage: boolean, startCursor?: string | null }, edges: Array<{ __typename?: 'DepositAccountHistoryEntryEdge', cursor: string, node: { __typename?: 'CancelledWithdrawalEntry', recordedAt: any, withdrawal: { __typename?: 'Withdrawal', id: string, withdrawalId: any, accountId: any, amount: any, createdAt: any, reference: string, status: WithdrawalStatus } } | { __typename?: 'DepositEntry', recordedAt: any, deposit: { __typename?: 'Deposit', id: string, depositId: any, accountId: any, amount: any, createdAt: any, reference: string } } | { __typename?: 'DisbursalEntry', recordedAt: any, disbursal: { __typename?: 'CreditFacilityDisbursal', id: string, disbursalId: any, amount: any, createdAt: any, status: DisbursalStatus } } | { __typename?: 'PaymentEntry', recordedAt: any, payment: { __typename?: 'CreditFacilityPaymentAllocation', id: string, paymentAllocationId: any, amount: any, createdAt: any } } | { __typename?: 'UnknownEntry' } | { __typename?: 'WithdrawalEntry', recordedAt: any, withdrawal: { __typename?: 'Withdrawal', id: string, withdrawalId: any, accountId: any, amount: any, createdAt: any, reference: string, status: WithdrawalStatus } } }> } } } } };
447446

448447

449448
export const GetCreditFacilityDocument = gql`
@@ -790,9 +789,8 @@ export const GetTransactionHistoryDocument = gql`
790789
recordedAt
791790
payment {
792791
id
793-
paymentId
794-
interestAmount
795-
disbursalAmount
792+
paymentAllocationId
793+
amount
796794
createdAt
797795
}
798796
}

apps/customer-portal/lib/graphql/query/transaction-history.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ gql`
7272
recordedAt
7373
payment {
7474
id
75-
paymentId
76-
interestAmount
77-
disbursalAmount
75+
paymentAllocationId
76+
amount
7877
createdAt
7978
}
8079
}

0 commit comments

Comments
 (0)