Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parsing for json data in Charge Detail view #47

Merged
merged 2 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/js/tool.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"Delinquent": "Delinquent",
"Description": "Description",
"Discount": "Discount",
"Dispute": "Dispute",
"Disputed": "Disputed",
"Email": "Email",
"Fee": "Fee",
"Fraud Details": "Fraud Details",
Expand All @@ -25,6 +25,7 @@
"Net": "Net",
"Next Invoice Sequence": "Next Invoice Sequence",
"Next": "Next",
"Outcome": "Outcome",
"Paid": "Paid",
"Pending Balance": "Pending Balance",
"Phone": "Phone",
Expand Down
33 changes: 24 additions & 9 deletions resources/js/components/cards/ChargeDetailCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,20 @@
value: $filters.date(charge.created),
}"
></DetailTextField>
<DetailTextField
:field="{ name: __('Metadata'), value: charge.metadata }"
></DetailTextField>
<DetailKeyValueField
v-if="!initialLoading && !!Object.keys(charge.metadata).length"
:field="{
name: __('Metadata'),
value: charge.metadata,
}"
></DetailKeyValueField>
<DetailKeyValueField
v-if="!initialLoading && !!Object.keys(charge.outcome).length"
:field="{
name: __('Outcome'),
value: charge.outcome,
}"
></DetailKeyValueField>
<DetailBooleanField
:field="{ name: __('Livemode'), value: charge.livemode }"
></DetailBooleanField>
Expand All @@ -39,12 +50,16 @@
<DetailBooleanField
:field="{ name: __('Refunded'), value: charge.refunded }"
></DetailBooleanField>
<DetailTextField
:field="{ name: __('Dispute'), value: charge.dispute }"
></DetailTextField>
<DetailTextField
:field="{ name: __('Fraud Details'), value: charge.fraud_details }"
></DetailTextField>
<DetailBooleanField
:field="{ name: __('Disputed'), value: charge.disputed }"
></DetailBooleanField>
<DetailKeyValueField
v-if="!initialLoading && !!Object.keys(charge.fraud_details).length"
:field="{
name: __('Fraud Details'),
value: charge.fraud_details,
}"
></DetailKeyValueField>
<DetailTextField
:field="{
name: __('Transfer Group'),
Expand Down
3 changes: 2 additions & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"Delinquent": "Delinquent",
"Description": "Description",
"Discount": "Discount",
"Dispute": "Dispute",
"Disputed": "Disputed",
"Email": "Email",
"Fee": "Fee",
"Fraud Details": "Fraud Details",
Expand All @@ -25,6 +25,7 @@
"Net": "Net",
"Next Invoice Sequence": "Next Invoice Sequence",
"Next": "Next",
"Outcome": "Outcome",
"Paid": "Paid",
"Pending Balance": "Pending Balance",
"Phone": "Phone",
Expand Down