Skip to content

Commit

Permalink
chore: remove customer object from withdraw and deposit (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 authored and vindard committed Dec 23, 2024
1 parent 7144b73 commit d4d176a
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 241 deletions.
3 changes: 0 additions & 3 deletions apps/admin-panel/app/actions/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ gql`
__typename
... on Withdrawal {
withdrawalId
customer {
email
}
}
... on CreditFacility {
creditFacilityId
Expand Down
4 changes: 2 additions & 2 deletions apps/admin-panel/app/customers/[customer-id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ gql`
customer(id: $id) {
id
customerId
balance {
checking {
depositAccount {
balance {
settled
pending
}
Expand Down
36 changes: 13 additions & 23 deletions apps/admin-panel/app/customers/[customer-id]/transactions/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,34 @@ gql`
query GetCustomerTransactions($id: UUID!) {
customer(id: $id) {
id
deposits {
createdAt
customerId
depositId
reference
amount
}
withdrawals {
status
reference
customerId
withdrawalId
createdAt
amount
customer {
customerId
email
depositAccount {
deposits {
createdAt
depositId
reference
amount
}
withdrawals {
status
reference
withdrawalId
createdAt
amount
}
}
transactions @client {
... on Deposit {
createdAt
customerId
depositId
reference
amount
}
... on Withdrawal {
status
reference
customerId
withdrawalId
createdAt
amount
customer {
customerId
email
}
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions apps/admin-panel/app/customers/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,12 @@ gql`
email
telegramId
applicantId
balance {
checking {
depositAccount {
balance {
settled
pending
}
}
subjectCanRecordDeposit
subjectCanInitiateWithdrawal
subjectCanCreateCreditFacility
}
cursor
Expand Down
9 changes: 0 additions & 9 deletions apps/admin-panel/app/deposits/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ gql`
deposit {
depositId
amount
customer {
customerId
email
balance {
checking {
settled
}
}
}
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions apps/admin-panel/app/deposits/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ gql`
depositId
amount
reference
customer {
email
}
}
}
}
Expand Down
9 changes: 1 addition & 8 deletions apps/admin-panel/app/withdrawals/[withdrawal-id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@ import { DetailsPageSkeleton } from "@/components/details-page-skeleton"
gql`
query GetWithdrawalDetails($id: UUID!) {
withdrawal(id: $id) {
customerId
withdrawalId
amount
status
reference
subjectCanConfirm
subjectCanCancel
customer {
email
customerId
applicantId
}
approvalProcess {
approvalProcessId
deniedReason
Expand Down
9 changes: 0 additions & 9 deletions apps/admin-panel/app/withdrawals/cancel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ gql`
withdrawal {
withdrawalId
amount
customer {
customerId
balance {
checking {
settled
pending
}
}
}
}
}
}
Expand Down
10 changes: 0 additions & 10 deletions apps/admin-panel/app/withdrawals/confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ gql`
withdrawalId
amount
reference
customer {
customerId
email
balance {
checking {
settled
pending
}
}
}
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions apps/admin-panel/app/withdrawals/initiate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ gql`
withdrawal {
withdrawalId
amount
customer {
customerId
balance {
checking {
settled
pending
}
}
}
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions apps/admin-panel/app/withdrawals/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,10 @@ gql`
edges {
cursor
node {
customerId
withdrawalId
amount
status
reference
subjectCanConfirm
subjectCanCancel
customer {
customerId
email
}
}
}
}
Expand Down
Loading

0 comments on commit d4d176a

Please sign in to comment.