Skip to content

Commit

Permalink
TASK : #0000 Resolved all content page issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mahajanmahesh935 committed Sep 9, 2024
1 parent 53a81a3 commit be3073f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/nulp_elite/src/pages/content/AllContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ const AllContent = () => {
filters: {
board: [domainName],
primaryCategory: [
"course","Manuals/SOPs","Good Practices","Reports"
"course","Manuals/SOPs","Good Practices","Reports","Manual/SOPs"
],
visibility: ["Default", "Parent"],
// visibility: ["Default", "Parent"], Commentent because not showing contents on prod
},
limit: 100,
limit: 2000,
sort_by: { lastPublishedOn: "desc" },
fields: [
"name",
Expand Down Expand Up @@ -172,7 +172,7 @@ const AllContent = () => {

const filteredAndSortedData = response?.data?.result?.content
?.filter((item) =>
["Manuals/SOPs", "Good Practices", "Reports", "Course"].includes(
["Manuals/SOPs","Manual/SOPs", "Good Practices", "Reports", "Course"].includes(
item.primaryCategory
)
)
Expand Down
9 changes: 6 additions & 3 deletions packages/nulp_elite/src/pages/content/CategoryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ const preselectedDomain = decodeURIComponent(preselectedDomainRaw || "");
filters: {
primaryCategory: [category],
visibility: [],
board: domainName ? [domainName] : [preselectedDomain],
board: domainName
? [domainName]
: (preselectedDomain && preselectedDomain !== "null" ? [preselectedDomain] : undefined)

},
limit: 20,
sort_by: {
Expand Down Expand Up @@ -249,7 +252,7 @@ const preselectedDomain = decodeURIComponent(preselectedDomainRaw || "");
role="main"
className="allContent xs-pb-20 pb-30 domain-list"
>
{(domainName || preselectedDomain) && (
{(domainName || (preselectedDomain && preselectedDomain !== "null")) && (
<Box
className="d-flex jc-bw mr-20 my-20"
style={{ alignItems: "center" }}
Expand Down Expand Up @@ -280,7 +283,7 @@ const preselectedDomain = decodeURIComponent(preselectedDomainRaw || "");
className="d-flex jc-bw mr-20 my-20 px-10"
style={{ alignItems: "center" }}
>
<p className="h3-title">{category}</p>
<p className="h3-title">{category === "Course" ? "Courses" : category}</p>
<Link onClick={handleGoBack} className="viewAll mr-17">
{t("BACK")}
</Link>
Expand Down

0 comments on commit be3073f

Please sign in to comment.