Skip to content

Commit

Permalink
[#50] Apply org attributes translations
Browse files Browse the repository at this point in the history
  • Loading branch information
ifirmawan committed May 1, 2023
1 parent 1d403fd commit b61c081
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/add-organisation/AddOrganisation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ const AddOrganisation = () => {
placeholder={text.selectAttributes}
mode="multiple"
allowClear
loading={!organisationAttributes.length || loading}
loading={!organisationAttributes()?.length || loading}
>
{organisationAttributes?.map((o, oi) => (
{organisationAttributes(text)?.map((o, oi) => (
<Option key={`org-attr-${oi}`} value={o.id}>
{o.name}
</Option>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/pages/organisations/Organisations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ const Organisations = () => {
? attributes
.map(
(a) =>
organisationAttributes.find((o) => o.id === a.type_id)?.name
organisationAttributes(text)?.find((o) => o.id === a.type_id)
?.name
)
.join(", ")
: "-",
Expand Down Expand Up @@ -221,7 +222,7 @@ const Organisations = () => {
onChange={setAttributes}
allowClear
>
{organisationAttributes?.map((o, oi) => (
{organisationAttributes(text)?.map((o, oi) => (
<Option key={`org-${oi}`} value={o.id}>
{o.name}
</Option>
Expand Down

0 comments on commit b61c081

Please sign in to comment.