Skip to content

Commit

Permalink
fixed typo organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
akanshaaa19 committed Feb 11, 2024
1 parent b2853c6 commit d332ad1
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 57 deletions.
File renamed without changes
4 changes: 2 additions & 2 deletions src/components/floweditor/FlowEditor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
getActiveFlow,
getInactiveFlow,
getFlowWithoutKeyword,
getOrganisationServicesQuery,
getOrganizationServicesQuery,
publishFlow,
getFreeFlow,
resetFlowCount,
Expand Down Expand Up @@ -46,7 +46,7 @@ const mocks = [
simulatorSearchQuery,
simulatorSearchQuery,
publishFlow,
getOrganisationServicesQuery,
getOrganizationServicesQuery,
getFreeFlow,
getFreeFlow,
];
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Auth/ConfirmOTP/ConfirmOTP.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { User } from '../Registration/Registration';
// let's define registration success message
const successMessage = (
<div>
Your account is registered successfully. Please contact your organisation admin for the
Your account is registered successfully. Please contact your organization admin for the
approval. Click&nbsp;<a href="/login">here</a>&nbsp;for login.
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Auth/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import setLogs from 'config/logs';
import { GET_ORGANIZATION_SERVICES } from 'graphql/queries/Organization';
import { Auth } from '../Auth';

const notApprovedMsg = 'Your account is not approved yet. Please contact your organisation admin.';
const notApprovedMsg = 'Your account is not approved yet. Please contact your organization admin.';

export const Login = () => {
const { setAuthenticated } = useContext(SessionContext);
Expand Down
4 changes: 2 additions & 2 deletions src/containers/OrganizationList/OrganizationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
DELETE_INACTIVE_ORGANIZATIONS,
UPDATE_ORGANIZATION_STATUS,
} from 'graphql/mutations/Organization';
import OrganisationIcon from 'assets/images/icons/Organisation.svg?react';
import OrganizationIcon from 'assets/images/icons/Organization.svg?react';
import ExtensionIcon from 'assets/images/icons/extension.svg?react';
import CustomerDetailsIcon from 'assets/images/icons/customer_details.svg?react';
import { setNotification } from 'common/notification';
Expand Down Expand Up @@ -106,7 +106,7 @@ export const OrganizationList = ({
columnStyles,
};

const listIcon = <OrganisationIcon className={styles.OrgIcon} />;
const listIcon = <OrganizationIcon className={styles.OrgIcon} />;
const extensionIcon = <ExtensionIcon className={styles.ExtensionIcon} />;

const customerDetailsIcon = <CustomerDetailsIcon />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import UserEvent from '@testing-library/user-event';
import { MockedProvider } from '@apollo/client/testing';
import { BrowserRouter as Router, MemoryRouter } from 'react-router-dom';

import { ORGANISATION_MOCKS } from '../SettingList.test.helper';
import { Organisation } from './Organisation';
import { ORGANIZATION_MOCKS } from '../SettingList.test.helper';
import { Organization } from './Organization';

const mocks = ORGANISATION_MOCKS;
const mocks = ORGANIZATION_MOCKS;

const wrapper = (
<MockedProvider mocks={mocks} addTypename={false}>
<MemoryRouter initialEntries={['/settings/organization']}>
<Organisation />
<Organization />
</MemoryRouter>
</MockedProvider>
);
Expand All @@ -22,10 +22,10 @@ test('it should render the placeholders correctly', async () => {
expect(getByText('Loading...')).toBeInTheDocument();

await waitFor(() => {
expect(getByTestId('formLayout')).toHaveTextContent('Organisation name');
expect(getByTestId('formLayout')).toHaveTextContent('Organization name');
expect(getByTestId('formLayout')).toHaveTextContent('Supported languages');
expect(getByTestId('formLayout')).toHaveTextContent('Default language');
expect(getByTestId('formLayout')).toHaveTextContent('Organisation phone number');
expect(getByTestId('formLayout')).toHaveTextContent('Organization phone number');
expect(getByTestId('formLayout')).toHaveTextContent('Low balance threshold for warning emails');
expect(getByTestId('formLayout')).toHaveTextContent(
'Critical balance threshold for warning emails'
Expand All @@ -40,7 +40,7 @@ test('it renders component properly', async () => {
expect(getByText('Loading...')).toBeInTheDocument();
await waitFor(() => {
expect(getByText('Back to settings')).toBeInTheDocument();
expect(getByTestId('add-container')).toHaveTextContent('Organisation name');
expect(getByTestId('add-container')).toHaveTextContent('Organization name');
});
});

Expand All @@ -58,9 +58,9 @@ test('it renders component and clicks cancel', async () => {

test('it renders component in edit mode', async () => {
const { getByText, getByTestId } = render(
<MockedProvider mocks={[...ORGANISATION_MOCKS]} addTypename={false}>
<MockedProvider mocks={[...ORGANIZATION_MOCKS]} addTypename={false}>
<Router>
<Organisation />
<Organization />
</Router>
</MockedProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { GET_LANGUAGES } from 'graphql/queries/List';
import Settingicon from 'assets/images/icons/Settings/Settings.svg?react';
import CopyIcon from 'assets/images/icons/Settings/Copy.svg?react';
import { copyToClipboard } from 'common/utils';
import styles from './Organisation.module.css';
import styles from './Organization.module.css';
import { Checkbox } from 'components/UI/Form/Checkbox/Checkbox';

const SettingIcon = <Settingicon />;
Expand All @@ -30,7 +30,7 @@ const queries = {
deleteItemQuery: DELETE_ORGANIZATION,
};

export const Organisation = () => {
export const Organization = () => {
const client = useApolloClient();
const [name, setName] = useState('');
const [organizationId, setOrganizationId] = useState(null);
Expand Down Expand Up @@ -131,7 +131,7 @@ export const Organisation = () => {
};

const validation = {
name: Yup.string().required(t('Organisation name is required.')),
name: Yup.string().required(t('Organization name is required.')),
activeLanguages: Yup.array().required(t('Supported Languages is required.')),
defaultLanguage: Yup.object().nullable().required(t('Default Language is required.')),
signaturePhrase: Yup.string().nullable().required(t('Webhook signature is required.')),
Expand All @@ -151,7 +151,7 @@ export const Organisation = () => {
component: Input,
name: 'name',
type: 'text',
placeholder: t('Organisation name'),
placeholder: t('Organization name'),
},
{
component: AutoComplete,
Expand Down Expand Up @@ -187,7 +187,7 @@ export const Organisation = () => {
component: Input,
name: 'phone',
type: 'text',
placeholder: t('Organisation phone number'),
placeholder: t('Organization phone number'),
disabled: true,
endAdornment: (
<InputAdornment position="end">
Expand Down Expand Up @@ -289,4 +289,4 @@ export const Organisation = () => {
);
};

export default Organisation;
export default Organization;
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import UserEvent from '@testing-library/user-event';
import { MockedProvider } from '@apollo/client/testing';
import { BrowserRouter as Router } from 'react-router-dom';

import { ORGANISATION_MOCKS } from '../SettingList.test.helper';
import { OrganisationFlows } from './OrganisationFlows';
import { ORGANIZATION_MOCKS } from '../SettingList.test.helper';
import { OrganizationFlows } from './OrganizationFlows';

const mocks = ORGANISATION_MOCKS;
const mocks = ORGANIZATION_MOCKS;

const wrapper = (
<MockedProvider mocks={mocks} addTypename={false}>
<Router>
<OrganisationFlows />
<OrganizationFlows />
</Router>
</MockedProvider>
);
Expand Down Expand Up @@ -39,9 +39,9 @@ test('it renders component and clicks cancel', async () => {

test('it renders component in edit mode', async () => {
const { getByText, getByTestId } = render(
<MockedProvider mocks={[...ORGANISATION_MOCKS]} addTypename={false}>
<MockedProvider mocks={[...ORGANIZATION_MOCKS]} addTypename={false}>
<Router>
<OrganisationFlows />
<OrganizationFlows />
</Router>
</MockedProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
EXTENDED_TIME_FORMAT,
setVariables,
} from 'common/constants';
import styles from './OrganisationFlows.module.css';
import styles from './OrganizationFlows.module.css';
import dayjs from 'dayjs';

const SettingIcon = <Settingicon />;
Expand All @@ -36,7 +36,7 @@ const queries = {
deleteItemQuery: DELETE_ORGANIZATION,
};

export const OrganisationFlows = () => {
export const OrganizationFlows = () => {
const client = useApolloClient();
const [hours, setHours] = useState(true);
const [enabledDays, setEnabledDays] = useState<any>([]);
Expand Down Expand Up @@ -402,4 +402,4 @@ export const OrganisationFlows = () => {
);
};

export default OrganisationFlows;
export default OrganizationFlows;
14 changes: 7 additions & 7 deletions src/containers/SettingList/SettingList.test.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
getOrganizationLanguagesQuery,
getOrganizationQuery,
getProvidersQuery,
getOrganisationSettings,
getOrganizationSettings,
getCredential,
getQualityRating,
} from 'mocks/Organization';
Expand Down Expand Up @@ -64,11 +64,11 @@ export const LIST_ITEM_MOCKS = [
...getOrganizationQuery,
...getProvidersQuery,
...getCredential,
getOrganisationSettings,
getOrganizationSettings,
getOrganizationLanguagesQuery,
];

const updateOrganisationMock = {
const updateOrganizationMock = {
request: {
query: UPDATE_ORGANIZATION,
variables: {
Expand Down Expand Up @@ -139,7 +139,7 @@ const updateOrganisationMock = {
},
};

const updateOrganisationMock2 = {
const updateOrganizationMock2 = {
request: {
query: UPDATE_ORGANIZATION,
variables: {
Expand Down Expand Up @@ -196,13 +196,13 @@ const updateOrganisationMock2 = {
},
};

export const ORGANISATION_MOCKS = [
export const ORGANIZATION_MOCKS = [
getRoleNamesMock,
getQualityRating,
languageMock,
getOrganizationLanguagesQuery,
flowsMock,
...getOrganizationQuery,
updateOrganisationMock,
updateOrganisationMock2,
updateOrganizationMock,
updateOrganizationMock2,
];
8 changes: 4 additions & 4 deletions src/containers/SettingList/SettingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ export const SettingList = () => {

const List = [
{
name: 'Organisation',
name: 'Organization',
shortcode: 'organization',
description: t('Manage organisation name, supported languages.'),
description: t('Manage organization name, supported languages.'),
},
{
name: 'Flows',
shortcode: 'organization-flows',
description: t('Manage organisation flows.'),
description: t('Manage organization flows.'),
},
{
name: 'Billing',
Expand All @@ -50,7 +50,7 @@ export const SettingList = () => {

let CardList: any = [];
if (providerData) {
// create setting list of Organisation & providers
// create setting list of Organization & providers
CardList = [...List, ...providerData.providers];
}

Expand Down
10 changes: 5 additions & 5 deletions src/i18n/en/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,15 @@
"Supported language is required.": "Supported language is required.",
"Default language is required.": "Default language is required.",
"Default language needs to be an active language.": "Default language needs to be an active language.",
"Organisation name is required.": "Organisation name is required.",
"Organization name is required.": "Organization name is required.",
"Supported Languages is required.": "Supported Languages is required.",
"Default Language is required.": "Default Language is required.",
"Webhook signature is required.": "Webhook signature is required.",
"Organisation name": "Organisation name",
"Organization name": "Organization name",
"Supported languages": "Supported languages",
"Default language": "Default language",
"Webhook signature": "Webhook signature",
"Organisation phone number": "Organisation phone number",
"Organization phone number": "Organization phone number",
"WhatsApp tier": "WhatsApp tier",
"Back to settings": "Back to settings",
"Please select default flow ": "Please select default flow ",
Expand All @@ -336,8 +336,8 @@
"New contact flow": "New contact flow",
"For new contacts messaging your chatbot for the first time": "For new contacts messaging your chatbot for the first time",
"Optin flow": "Optin flow",
"Manage organisation name, supported languages.": "Manage organisation name, supported languages.",
"Manage organisation flows.": "Manage organisation flows.",
"Manage organization name, supported languages.": "Manage organization name, supported languages.",
"Manage organization flows.": "Manage organization flows.",
"Setup for glific billing account": "Setup for glific billing account",
"Sheet name is required.": "Sheet name is required.",
"You won't be able to use this sheet again.": "You won't be able to use this sheet again.",
Expand Down
8 changes: 4 additions & 4 deletions src/i18n/hi/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@
"Supported language is required.": "समर्थित भाषा की आवश्यकता है।",
"Default language is required.": "डिफ़ॉल्ट भाषा की आवश्यकता है।",
"Default language needs to be an active language.": "डिफ़ॉल्ट भाषा के लिए एक सक्रिय भाषा होना आवश्यक है।",
"Organisation name is required.": "संगठन का नाम आवश्यक है।",
"Organization name is required.": "संगठन का नाम आवश्यक है।",
"Supported Languages is required.": "समर्थित भाषाओं की आवश्यकता है।",
"Default Language is required.": "डिफ़ॉल्ट भाषा की आवश्यकता है।",
"Webhook signature is required.": "वेबहूक हस्ताक्षर आवश्यक है।",
"Organisation name": "संगठन का नाम",
"Organization name": "संगठन का नाम",
"Supported languages": "समर्थित भाषाएं",
"Default language": "डिफ़ॉल्ट भाषा",
"Webhook signature": "वेबहुक हस्ताक्षर",
"Organisation phone number": "संगठन का फ़ोन नंबर",
"Organization phone number": "संगठन का फ़ोन नंबर",
"Hours of operations": "संचालन के घंटे",
"Opens": "Opens",
"Closes": "Closes",
Expand All @@ -178,7 +178,7 @@
"the selected flow will be triggered for messages received outside hours of operations": "the selected flow will be triggered for messages received outside hours of operations",
"Back to settings": "सेटिंग्स में वापस",
"Is active?": "Is active?",
"Manage organisation name, supported languages.": "Manage organisation name, supported languages.",
"Manage Organization name, supported languages.": "Manage Organization name, supported languages.",
"Setup for glific billing account": "ग्लिफिक बिलिंग खाते के लिए सेटअप",
"Complete access to all the parts of the platform.": "Complete access to all the parts of the platform.",
"Complete access to the platform except settings and staff management.": "Complete access to the platform except settings and staff management.",
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/Flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export const publishFlow = {
},
};

export const getOrganisationServicesQuery = {
export const getOrganizationServicesQuery = {
request: {
query: GET_ORGANIZATION_SERVICES,
},
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/Organization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const getOrganizationQuery = [
},
},
];
export const getOrganisationSettings = {
export const getOrganizationSettings = {
request: {
query: GET_ORGANIZATION,
variables: { id: '1' },
Expand Down
10 changes: 5 additions & 5 deletions src/routes/AuthenticatedRoute/AuthenticatedRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ const Providers = lazy(() => import('containers/SettingList/Providers/Providers'
const BlockContactList = lazy(
() => import('containers/BlockContact/BlockContactList/BlockContactList')
);
const Organisation = lazy(() => import('containers/SettingList/Organisation/Organisation'));
const OrganisationFLows = lazy(
() => import('containers/SettingList/OrganizationFlows/OrganisationFlows')
const Organization = lazy(() => import('containers/SettingList/Organization/Organization'));
const OrganizationFlows = lazy(
() => import('containers/SettingList/OrganizationFlows/OrganizationFlows')

Check warning on line 52 in src/routes/AuthenticatedRoute/AuthenticatedRoute.tsx

View check run for this annotation

Codecov / codecov/patch

src/routes/AuthenticatedRoute/AuthenticatedRoute.tsx#L52

Added line #L52 was not covered by tests
);
const WebhookLogsList = lazy(
() => import('containers/WebhookLogs/WebhookLogsList/WebhookLogsList')
Expand Down Expand Up @@ -124,8 +124,8 @@ const routeAdmin = (
<Route path="template/:id/edit" element={<HSM />} />
<Route path="ticket" element={<TicketList />} />
<Route path="settings" element={<SettingList />} />
<Route path="settings/organization" element={<Organisation />} />
<Route path="settings/organization-flows" element={<OrganisationFLows />} />
<Route path="settings/organization" element={<Organization />} />
<Route path="settings/organization-flows" element={<OrganizationFlows />} />
<Route path="settings/billing" element={<Billing />} />
<Route path="settings/:type" element={<Providers />} />
<Route path="blocked-contacts" element={<BlockContactList />} />
Expand Down

0 comments on commit d332ad1

Please sign in to comment.