-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from MVarshini/PANDA-445
Quay and Telco Tabs
- Loading branch information
Showing
32 changed files
with
1,691 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import { | ||
removeCPTAppliedFilters, | ||
setCPTAppliedFilters, | ||
setCPTCatFilters, | ||
setCPTDateFilter, | ||
setCPTOtherSummaryFilter, | ||
} from "./homeActions"; | ||
import { | ||
removeOCPAppliedFilters, | ||
setOCPAppliedFilters, | ||
setOCPCatFilters, | ||
setOCPDateFilter, | ||
setOCPOtherSummaryFilter, | ||
} from "./ocpActions"; | ||
import { | ||
removeQuayAppliedFilters, | ||
setQuayAppliedFilters, | ||
setQuayCatFilters, | ||
setQuayDateFilter, | ||
setQuayOtherSummaryFilter, | ||
} from "./quayActions"; | ||
import { | ||
removeTelcoAppliedFilters, | ||
setTelcoAppliedFilters, | ||
setTelcoCatFilters, | ||
setTelcoDateFilter, | ||
setTelcoOtherSummaryFilter, | ||
} from "./telcoActions"; | ||
|
||
import store from "@/store/store"; | ||
|
||
const { dispatch } = store; | ||
|
||
export const setCatFilters = (category, currType) => { | ||
if (currType === "cpt") { | ||
dispatch(setCPTCatFilters(category)); | ||
} else if (currType === "ocp") { | ||
dispatch(setOCPCatFilters(category)); | ||
} else if (currType === "quay") { | ||
dispatch(setQuayCatFilters(category)); | ||
} else if (currType === "telco") { | ||
dispatch(setTelcoCatFilters(category)); | ||
} | ||
}; | ||
|
||
export const setAppliedFilters = (navigation, currType) => { | ||
if (currType === "cpt") { | ||
dispatch(setCPTAppliedFilters(navigation)); | ||
} else if (currType === "ocp") { | ||
dispatch(setOCPAppliedFilters(navigation)); | ||
} else if (currType === "quay") { | ||
dispatch(setQuayAppliedFilters(navigation)); | ||
} else if (currType === "telco") { | ||
dispatch(setTelcoAppliedFilters(navigation)); | ||
} | ||
}; | ||
|
||
export const removeAppliedFilters = (key, value, navigation, currType) => { | ||
if (currType === "cpt") { | ||
dispatch(removeCPTAppliedFilters(key, value, navigation)); | ||
} else if (currType === "ocp") { | ||
dispatch(removeOCPAppliedFilters(key, value, navigation)); | ||
} else if (currType === "quay") { | ||
dispatch(removeQuayAppliedFilters(key, value, navigation)); | ||
} else if (currType === "telco") { | ||
dispatch(removeTelcoAppliedFilters(key, value, navigation)); | ||
} | ||
}; | ||
|
||
export const setDateFilter = (date, key, navigation, currType) => { | ||
if (currType === "cpt") { | ||
dispatch(setCPTDateFilter(date, key, navigation)); | ||
} else if (currType === "ocp") { | ||
dispatch(setOCPDateFilter(date, key, navigation)); | ||
} else if (currType === "quay") { | ||
dispatch(setQuayDateFilter(date, key, navigation)); | ||
} else if (currType === "telco") { | ||
dispatch(setTelcoDateFilter(date, key, navigation)); | ||
} | ||
}; | ||
|
||
export const setOtherSummaryFilter = (currType) => { | ||
if (currType === "cpt") { | ||
dispatch(setCPTOtherSummaryFilter()); | ||
} else if (currType === "ocp") { | ||
dispatch(setOCPOtherSummaryFilter()); | ||
} else if (currType === "quay") { | ||
dispatch(setQuayOtherSummaryFilter()); | ||
} else if (currType === "telco") { | ||
dispatch(setTelcoOtherSummaryFilter()); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.