Skip to content

Commit

Permalink
🌟 feat(WalletManagment.tsx): add support for displaying gross amount …
Browse files Browse the repository at this point in the history
…in Wallet Management page

🌟 feat(columns.ts): add support for sorting by gross amount in Wallet Management page
  • Loading branch information
marcbon committed Sep 18, 2023
1 parent 194813c commit b48a74f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
"All your certifications were successfully removed": "All your certifications were successfully removed",
"All_female": "All",
"All_male": "All",
"Amount": "Amount",
"Amount": "Net received",
"Amount gross": "Tot. gross",
"Amount to get": "Net to be received",
"Annual witholding < 5000€": "Annual witholding < 5000€",
"Annual witholding > 5000": "Annual witholding > 5000",
"Apply now": "Apply now",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"All_female": "Todas",
"All_male": "Todos",
"Amount": "Importe",
"Amount gross": "",
"Amount to get": "",
"Annual witholding < 5000€": "Deducción anual < 5000€",
"Annual witholding > 5000": "Deducción anual > 5000",
"Apply now": "Apúntate ahora",
Expand Down Expand Up @@ -701,6 +703,7 @@
"BUGFORM_UPLOAD_PROGRESS": "{{num}} subido",
"BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} subidos"
},
"Amount Gross": "",
"Home": "Página de inicio",
"Loading": "Cargando",
"Redirecting to your dashboard...": "Redireccionando a tu dashboard...",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/it/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"All_female": "Tutte",
"All_male": "Tutti",
"Amount": "Importo",
"Amount gross": "",
"Amount to get": "",
"Annual witholding < 5000€": "Trattenuta annua < 5000€",
"Annual witholding > 5000": "Trattenuta annua > 5000€",
"Apply now": "Candidati",
Expand Down Expand Up @@ -701,6 +703,7 @@
"BUGFORM_UPLOAD_PROGRESS": "{{num}} caricato",
"BUGFORM_UPLOAD_PROGRESS_plural": "{{num}} caricati"
},
"Amount Gross": "",
"Home": "Home",
"Loading": "Caricamento in corso...",
"Redirecting to your dashboard...": "Reindirizzamento alla dashboard in corso ...",
Expand Down
13 changes: 12 additions & 1 deletion src/pages/Wallet/WalletManagment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,18 @@ export const WalletManagment = () => {
: "aq-text-primary"
}
>
<strong>{booty.amount?.toFixed(2)}€</strong>
<strong>
{t("Amount to get")} {booty.amount?.toFixed(2)}€
</strong>
</Text>
<Text
className={
!isVerified || booty.amount === 0 || paymentInProcessing
? "aq-text-disabled-dark"
: "aq-text-primary"
}
>
({t("Amount gross")} {booty.amount_gross?.toFixed(2)}€)
</Text>
</div>
</div>
Expand Down
12 changes: 12 additions & 0 deletions src/pages/Wallet/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ export const walletColumns = (
role: "overline",
hideIndex: true,
},
{
title: t("Amount gross"),
dataIndex: "amount_gross",
key: "amount_gross",
isSortable: true,
onSort: (newOrder) => {
setIsLoading(true);
dispatch(updateSortingOptions(newOrder, "amount_gross")).then(() =>
setIsLoading(false)
);
},
},
{
title: t("Amount"),
dataIndex: "amount",
Expand Down

0 comments on commit b48a74f

Please sign in to comment.