Commit 46d15543 authored by Phyks (Lucas Verney)'s avatar Phyks (Lucas Verney)
Browse files

Withdrawal

parent 05f6cead
Pipeline #79209 failed with stages
in 1 minute and 4 seconds
...@@ -29,6 +29,14 @@ function EmailsParameters(props) { ...@@ -29,6 +29,14 @@ function EmailsParameters(props) {
panelDescriptionKey="client.settings.emails.transaction_desc" panelDescriptionKey="client.settings.emails.transaction_desc"
/> />
<Alerts
alertType="withdraw"
sendIfText={$t('client.settings.emails.send_if_at_least_withdraw')}
titleTranslationKey="client.settings.emails.add_withdraw"
panelTitleKey="client.settings.emails.withdraw_title"
panelDescriptionKey="client.settings.emails.withdraw_desc"
/>
<Reports /> <Reports />
</div> </div>
); );
......
...@@ -38,7 +38,7 @@ export const displayLabel = displayLabel_; ...@@ -38,7 +38,7 @@ export const displayLabel = displayLabel_;
export const maybeIncludeInBalance = maybeIncludeInBalance_; export const maybeIncludeInBalance = maybeIncludeInBalance_;
export const maybeIncludeInOutstandingBalance = maybeIncludeInOutstandingBalance_; export const maybeIncludeInOutstandingBalance = maybeIncludeInOutstandingBalance_;
export const AlertTypes = ['balance', 'transaction']; export const AlertTypes = ['balance', 'transaction', 'withdraw'];
const SMALL_SCREEN_MAX_WIDTH = 768; const SMALL_SCREEN_MAX_WIDTH = 768;
......
...@@ -117,6 +117,8 @@ ${$t('server.email.signature')} ...@@ -117,6 +117,8 @@ ${$t('server.email.signature')}
text text
}); });
} }
// TODO: Handle withdraw alerts
} }
} catch (err) { } catch (err) {
log.error(`Error when checking alerts for accounts: ${err}`); log.error(`Error when checking alerts for accounts: ${err}`);
......
...@@ -6,7 +6,7 @@ export function checkAlert(alert) { ...@@ -6,7 +6,7 @@ export function checkAlert(alert) {
) { ) {
return 'invalid report parameters'; return 'invalid report parameters';
} }
} else if (alert.type === 'balance' || alert.type === 'transaction') { } else if (alert.type === 'balance' || alert.type === 'transaction' || alert.type === 'withdraw') {
if ( if (
typeof alert.limit !== 'number' || typeof alert.limit !== 'number' ||
Number.isNaN(alert.limit) || Number.isNaN(alert.limit) ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment