Skip to content

Commit

Permalink
Updated variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
DigneshGujarathi committed Nov 12, 2020
1 parent 1e7ec49 commit 576e0f6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const SIDE_DRAWER_WIDTH = 233;
export const DATE_FORMAT = 'DD/MM/YY';
export const TIME_FORMAT = 'HH:mm';
export const SIMULATOR_CONTACT = '9876543210';
export const PUBLISHED_AUTOMATIONS = 'published';
export const AUTOMATION_STATUS_PUBLISHED = 'published';

// const enums
// provider status against the contact
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Chat/ChatMessages/ContactBar/ContactBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { UPDATE_CONTACT } from '../../../../graphql/mutations/Contact';
import { SEARCH_QUERY } from '../../../../graphql/queries/Search';
import { setNotification } from '../../../../common/notification';
import {
PUBLISHED_AUTOMATIONS,
AUTOMATION_STATUS_PUBLISHED,
SEARCH_QUERY_VARIABLES,
setVariables,
} from '../../../../common/constants';
Expand Down Expand Up @@ -65,7 +65,7 @@ export const ContactBar: React.SFC<ContactBarProps> = (props) => {
// get the published automation list
const [getAutomations, { data: automationsData }] = useLazyQuery(GET_AUTOMATIONS, {
variables: setVariables({
status: PUBLISHED_AUTOMATIONS,
status: AUTOMATION_STATUS_PUBLISHED,
}),
fetchPolicy: 'network-only', // set for now, need to check cache issue
});
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Group/GroupList/GroupList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { displayUserGroups } from '../../../context/role';
import { ReactComponent as AddContactIcon } from '../../../assets/images/icons/Contact/Add.svg';
import { SearchDialogBox } from '../../../components/UI/SearchDialogBox/SearchDialogBox';
import { CONTACT_SEARCH_QUERY, GET_GROUP_CONTACTS } from '../../../graphql/queries/Contact';
import { PUBLISHED_AUTOMATIONS, setVariables } from '../../../common/constants';
import { AUTOMATION_STATUS_PUBLISHED, setVariables } from '../../../common/constants';
import { IconButton } from '@material-ui/core';
import Menu from '../../../components/UI/Menu/Menu';
import { CREATE_AND_SEND_MESSAGE_TO_GROUP_MUTATION } from '../../../graphql/mutations/Chat';
Expand Down Expand Up @@ -61,7 +61,7 @@ export const GroupList: React.SFC<GroupListProps> = (props) => {
// get the published automation list
const [getAutomations, { data: automationData }] = useLazyQuery(GET_AUTOMATIONS, {
variables: setVariables({
status: PUBLISHED_AUTOMATIONS,
status: AUTOMATION_STATUS_PUBLISHED,
}),
fetchPolicy: 'network-only', // set for now, need to check cache issue
});
Expand Down
4 changes: 2 additions & 2 deletions src/containers/SettingList/Organisation/Organisation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '../../../graphql/mutations/Organization';
import { GET_LANGUAGES } from '../../../graphql/queries/List';
import { ReactComponent as Settingicon } from '../../../assets/images/icons/Settings/Settings.svg';
import { PUBLISHED_AUTOMATIONS, setVariables } from '../../../common/constants';
import { AUTOMATION_STATUS_PUBLISHED, setVariables } from '../../../common/constants';

const validation = {
name: Yup.string().required('Organisation name is required.'),
Expand Down Expand Up @@ -94,7 +94,7 @@ export const Organisation: React.SFC = () => {
// get the published automation list
const { data } = useQuery(GET_AUTOMATIONS, {
variables: setVariables({
status: PUBLISHED_AUTOMATIONS,
status: AUTOMATION_STATUS_PUBLISHED,
}),
fetchPolicy: 'network-only', // set for now, need to check cache issue
});
Expand Down
4 changes: 2 additions & 2 deletions src/containers/SettingList/SettingList.test.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getProvidersQuery,
getCredential,
} from '../../mocks/Organization';
import { PUBLISHED_AUTOMATIONS, setVariables } from '../../common/constants';
import { AUTOMATION_STATUS_PUBLISHED, setVariables } from '../../common/constants';

export const LIST_ITEM_MOCKS = [
{
Expand Down Expand Up @@ -52,7 +52,7 @@ export const LIST_ITEM_MOCKS = [
{
request: {
query: GET_AUTOMATIONS,
variables: setVariables({ status: PUBLISHED_AUTOMATIONS }),
variables: setVariables({ status: AUTOMATION_STATUS_PUBLISHED }),
},
result: {
data: {
Expand Down

0 comments on commit 576e0f6

Please sign in to comment.