commit e3809cbaf007f818078ed3accd2e7780cfb56b14
parent 4f20dcf89c11d7484923064d8faa75173a6b7ad2
Author: tanhengyeow <E0032242@u.nus.edu>
Date: Fri, 10 Jul 2020 15:45:19 +0800
Update payment initiation amount format in frontend
Diffstat:
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/frontend/src/components/activity/AddPaymentInitiationDrawer.tsx b/frontend/src/components/activity/AddPaymentInitiationDrawer.tsx
@@ -16,6 +16,7 @@ const AddPaymentInitiationDrawer = (props) => {
const [name, setName] = useState('');
const [IBAN, setIBAN] = useState('');
const [BIC, setBIC] = useState('');
+ const [currency, setCurrency] = useState('');
const [amount, setAmount] = useState('');
const [subject, setSubject] = useState('');
@@ -52,7 +53,7 @@ const AddPaymentInitiationDrawer = (props) => {
name: name,
iban: IBAN,
bic: BIC,
- amount: amount,
+ amount: `${currency}:${amount}`,
subject: subject,
}),
})
@@ -158,6 +159,18 @@ const AddPaymentInitiationDrawer = (props) => {
<Input onChange={(e) => setBIC(e.target.value)} />
</Form.Item>
<Form.Item
+ label="Currency"
+ name="Currency"
+ rules={[
+ {
+ required: true,
+ message: 'Please input the currency to send!',
+ },
+ ]}
+ >
+ <Input onChange={(e) => setCurrency(e.target.value)} />
+ </Form.Item>
+ <Form.Item
label="Amount"
name="Amount"
rules={[