Skip to content

Commit

Permalink
refactor: fix column naming issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Nov 1, 2023
1 parent 47bf0c9 commit 3eed623
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const BankingAccountTypeSettings = () => {
const ConnectedComponent = stripes.connect(ControlledVocab);

const columnMapping = {
value: <FormattedMessage id="ui-organizations.settings.name" />,
action: <FormattedMessage id="ui-organizations.settings.action" />,
name: <FormattedMessage id="ui-organizations.settings.accountTypes.name" />,
action: <FormattedMessage id="ui-organizations.settings.accountTypes.action" />,
};

const hasEditPerms = stripes.hasPerm('ui-organizations.settings');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const BankingInformationSettings = () => {
} catch (error) {
sendCallout({
type: 'error',
message: <FormattedMessage id="settings.accountTypes.save.error.generic.message" />,
message: <FormattedMessage id="ui-organizations.settings.accountTypes.save.error.generic.message" />,
});
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/Settings/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const SETTINGS_API = 'organizations-storage/settings';
export const BANKING_ACCOUNT_TYPES_API = 'organizations-storage/banking-account-types';

export const BANKING_INFORMATION_ENABLED_QUERY_KEY = 'BANKING_INFORMATION_ENABLED';
export const BANKING_INFORMATION_SEARCH_QUERY = {
export const BANKING_INFORMATION_SEARCH_PARAMS = {
query: `key=${BANKING_INFORMATION_ENABLED_QUERY_KEY}`,
limit: 1,
};
4 changes: 2 additions & 2 deletions src/Settings/hooks/useBankingInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@folio/stripes/core';

import {
BANKING_INFORMATION_SEARCH_QUERY,
BANKING_INFORMATION_SEARCH_PARAMS,
SETTINGS_API,
} from '../constants';

Expand All @@ -18,7 +18,7 @@ export const useBankingInformation = () => {
const { isLoading, data, refetch } = useQuery(
[namespace],
() => ky.get(SETTINGS_API, {
searchParams: BANKING_INFORMATION_SEARCH_QUERY,
searchParams: BANKING_INFORMATION_SEARCH_PARAMS,
}).json(),
);

Expand Down
4 changes: 2 additions & 2 deletions translations/ui-organizations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,6 @@
"settings.typeStatus.Active": "Active",
"settings.typeStatus.Inactive": "Inactive",
"settings.bankingInformation": "Banking information",
"settings.bankingInformation.enabled": "Enable",
"settings.bankingInformation.disabled": "Disable",
"settings.bankingAccountTypes": "Account types",
"settings.bankingAccountTypes.cannotDeleteTermHeader": "Cannot delete account type",
"settings.bankingAccountTypes.cannotDeleteTermMessage": "This account type cannot be deleted, as it is in use by one or more records.",
Expand All @@ -456,6 +454,8 @@
"settings.accountTypes.save.button": "Save",
"settings.accountTypes.save.success.message": "Setting was successfully updated.",
"settings.accountTypes.save.error.generic.message": "Something went wrong.",
"settings.accountTypes.name": "Name",
"settings.accountTypes.action": "Action",

"permission.view": "Organizations: View",
"permission.edit": "Organizations: View, edit",
Expand Down

0 comments on commit 3eed623

Please sign in to comment.