-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1013 - Update Bank Account Forms (#1160)
* update create/edit bank account -change Status and Account Type to Select Fields -comment out fingerprint ( we are hiding it for now ) add captialize util function update types * add translation * use translate method * remove import * remove import * remove capitalize util * Update public/locales/en/bankaccounts.json Co-authored-by: Ilko Kacharov <kachar136@gmail.com> * Update public/locales/bg/bankaccounts.json Co-authored-by: Ilko Kacharov <kachar136@gmail.com> * add new reusable components for Status and Account holder select * clean up comments * cleanup comments Co-authored-by: Andrey <andrey.goranov@mentormate.com> Co-authored-by: Ilko Kacharov <kachar136@gmail.com>
- Loading branch information
1 parent
84bbdac
commit c1846ae
Showing
7 changed files
with
101 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { AccountHolderType } from './BankAccountTypes' | ||
import FormSelectField from 'components/common/form/FormSelectField' | ||
import { useTranslation } from 'next-i18next' | ||
|
||
export default function AccountHolderSelect() { | ||
const { t } = useTranslation() | ||
return ( | ||
<FormSelectField | ||
name="accountHolderType" | ||
label="bankaccounts:fields.accountHolderType" | ||
options={Object.keys(AccountHolderType).map((key: string) => { | ||
return { | ||
key, | ||
value: AccountHolderType[key as AccountHolderType], | ||
name: t(`bankaccounts:accountHolderType.${key}`), | ||
} | ||
})} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { BankAccountStatus } from './BankAccountTypes' | ||
import FormSelectField from 'components/common/form/FormSelectField' | ||
import { useTranslation } from 'next-i18next' | ||
|
||
type Props = { | ||
name?: string | ||
} | ||
export default function BankAccountStatusSelect({ name = 'status' }: Props) { | ||
const { t } = useTranslation() | ||
return ( | ||
<FormSelectField | ||
name={name} | ||
label="bankaccounts:fields.status" | ||
options={Object.keys(BankAccountStatus).map((key: string) => { | ||
return { | ||
key, | ||
value: BankAccountStatus[key as BankAccountStatus], | ||
name: t(`bankaccounts:status.${key}`), | ||
} | ||
})} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters