Skip to content

Commit

Permalink
Merge pull request #3011 from glific/fix/template-flows
Browse files Browse the repository at this point in the history
Added filters for template flows
  • Loading branch information
kurund authored Aug 7, 2024
2 parents fc79dc4 + 0b932a6 commit a135023
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/containers/Chat/ChatMessages/StartFlow/StartFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const StartAFlow = ({
variables: setVariables({
status: FLOW_STATUS_PUBLISHED,
isActive: true,
isTemplate: false,
}),
fetchPolicy: 'network-only', // set for now, need to check cache issue
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const OrganizationFlows = () => {
const { data: flow } = useQuery(GET_FLOWS, {
variables: setVariables({
status: FLOW_STATUS_PUBLISHED,
isTemplate: false,
}),
fetchPolicy: 'network-only', // set for now, need to check cache issue
});
Expand Down
2 changes: 1 addition & 1 deletion src/containers/SettingList/SettingList.test.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const languageMock = {
const flowsMock = {
request: {
query: GET_FLOWS,
variables: setVariables({ status: FLOW_STATUS_PUBLISHED }),
variables: setVariables({ status: FLOW_STATUS_PUBLISHED, isTemplate: false }),
},
result: {
data: {
Expand Down
1 change: 1 addition & 0 deletions src/containers/Trigger/Trigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export const Trigger = () => {
const { data: flow } = useQuery(GET_FLOWS, {
variables: setVariables({
status: FLOW_STATUS_PUBLISHED,
isTemplate: false,
}),
fetchPolicy: 'network-only', // set for now, need to check cache issue
});
Expand Down
2 changes: 1 addition & 1 deletion src/mocks/Flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export const getPublishedFlowQuery = {
request: {
query: GET_FLOWS,
variables: {
filter: { status: 'published', isActive: true },
filter: { status: 'published', isActive: true, isTemplate: false },
opts: {
order: 'ASC',
limit: null,
Expand Down

0 comments on commit a135023

Please sign in to comment.