diff --git a/apps/portal/src/components/resumes/landing/images/screenshots/resumes-browse.png b/apps/portal/src/components/resumes/landing/images/screenshots/resumes-browse.png
index 6bdc81c9..df507f0f 100644
Binary files a/apps/portal/src/components/resumes/landing/images/screenshots/resumes-browse.png and b/apps/portal/src/components/resumes/landing/images/screenshots/resumes-browse.png differ
diff --git a/apps/portal/src/components/resumes/landing/images/screenshots/resumes-review.png b/apps/portal/src/components/resumes/landing/images/screenshots/resumes-review.png
index 1a6b466a..5a7a538b 100644
Binary files a/apps/portal/src/components/resumes/landing/images/screenshots/resumes-review.png and b/apps/portal/src/components/resumes/landing/images/screenshots/resumes-review.png differ
diff --git a/apps/portal/src/components/resumes/landing/images/screenshots/resumes-submit.png b/apps/portal/src/components/resumes/landing/images/screenshots/resumes-submit.png
index ccfcce1f..191b22fb 100644
Binary files a/apps/portal/src/components/resumes/landing/images/screenshots/resumes-submit.png and b/apps/portal/src/components/resumes/landing/images/screenshots/resumes-submit.png differ
diff --git a/apps/portal/src/pages/resumes/browse.tsx b/apps/portal/src/pages/resumes/browse.tsx
index 38e01f67..dd4a5335 100644
--- a/apps/portal/src/pages/resumes/browse.tsx
+++ b/apps/portal/src/pages/resumes/browse.tsx
@@ -126,6 +126,7 @@ export default function ResumeHomePage() {
searchValue: useDebounceValue(searchValue, DEBOUNCE_DELAY),
skip,
sortOrder,
+ take: PAGE_LIMIT,
},
],
{
@@ -144,6 +145,7 @@ export default function ResumeHomePage() {
searchValue: useDebounceValue(searchValue, DEBOUNCE_DELAY),
skip,
sortOrder,
+ take: PAGE_LIMIT,
},
],
{
@@ -163,6 +165,7 @@ export default function ResumeHomePage() {
searchValue: useDebounceValue(searchValue, DEBOUNCE_DELAY),
skip,
sortOrder,
+ take: PAGE_LIMIT,
},
],
{
@@ -489,17 +492,16 @@ export default function ResumeHomePage() {
-
+
@@ -559,7 +561,7 @@ export default function ResumeHomePage() {
end={getTabTotalPages()}
label="pagination"
start={1}
- onSelect={(page) => setCurrentPage(page)}
+ onSelect={setCurrentPage}
/>
)}
diff --git a/apps/portal/src/server/router/resumes/resumes-resume-router.ts b/apps/portal/src/server/router/resumes/resumes-resume-router.ts
index fe3b1d57..dee4627d 100644
--- a/apps/portal/src/server/router/resumes/resumes-resume-router.ts
+++ b/apps/portal/src/server/router/resumes/resumes-resume-router.ts
@@ -15,6 +15,7 @@ export const resumesRouter = createRouter()
searchValue: z.string(),
skip: z.number(),
sortOrder: z.string(),
+ take: z.number(),
}),
async resolve({ ctx, input }) {
const {
@@ -25,6 +26,7 @@ export const resumesRouter = createRouter()
numComments,
skip,
searchValue,
+ take,
} = input;
const userId = ctx.session?.user?.id;
const totalRecords = await ctx.prisma.resumesResume.count({
@@ -37,6 +39,7 @@ export const resumesRouter = createRouter()
experience: { in: experienceFilters },
location: { in: locationFilters },
role: { in: roleFilters },
+ title: { contains: searchValue, mode: 'insensitive' },
},
});
const resumesData = await ctx.prisma.resumesResume.findMany({
@@ -74,7 +77,7 @@ export const resumesRouter = createRouter()
}
: { comments: { _count: 'desc' } },
skip,
- take: 10,
+ take,
where: {
...(numComments === 0 && {
comments: {
diff --git a/apps/portal/src/server/router/resumes/resumes-resume-user-router.ts b/apps/portal/src/server/router/resumes/resumes-resume-user-router.ts
index 10bf5c81..71bd905f 100644
--- a/apps/portal/src/server/router/resumes/resumes-resume-user-router.ts
+++ b/apps/portal/src/server/router/resumes/resumes-resume-user-router.ts
@@ -53,6 +53,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
searchValue: z.string(),
skip: z.number(),
sortOrder: z.string(),
+ take: z.number(),
}),
async resolve({ ctx, input }) {
const userId = ctx.session.user.id;
@@ -64,6 +65,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
sortOrder,
numComments,
skip,
+ take,
} = input;
const totalRecords = await ctx.prisma.resumesStar.count({
where: {
@@ -76,6 +78,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
experience: { in: experienceFilters },
location: { in: locationFilters },
role: { in: roleFilters },
+ title: { contains: searchValue, mode: 'insensitive' },
},
userId,
},
@@ -121,7 +124,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
},
},
skip,
- take: 10,
+ take,
where: {
resume: {
...(numComments === 0 && {
@@ -167,6 +170,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
searchValue: z.string(),
skip: z.number(),
sortOrder: z.string(),
+ take: z.number(),
}),
async resolve({ ctx, input }) {
const userId = ctx.session.user.id;
@@ -177,6 +181,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
sortOrder,
searchValue,
numComments,
+ take,
skip,
} = input;
const totalRecords = await ctx.prisma.resumesResume.count({
@@ -189,6 +194,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
experience: { in: experienceFilters },
location: { in: locationFilters },
role: { in: roleFilters },
+ title: { contains: searchValue, mode: 'insensitive' },
userId,
},
});
@@ -224,7 +230,7 @@ export const resumesResumeUserRouter = createProtectedRouter()
}
: { comments: { _count: 'desc' } },
skip,
- take: 10,
+ take,
where: {
...(numComments === 0 && {
comments: {
diff --git a/packages/ui/src/Pagination/Pagination.tsx b/packages/ui/src/Pagination/Pagination.tsx
index 92a6cf18..59c72a36 100644
--- a/packages/ui/src/Pagination/Pagination.tsx
+++ b/packages/ui/src/Pagination/Pagination.tsx
@@ -69,6 +69,7 @@ export default function Pagination({
pageNumberSet.add(page);
elements.push(
{
@@ -83,7 +84,7 @@ export default function Pagination({
addPage(i);
}
- if (lastAddedPage < current - pagePadding) {
+ if (lastAddedPage < current - pagePadding - 1) {
elements.push();
}
@@ -91,7 +92,7 @@ export default function Pagination({
addPage(i);
}
- if (lastAddedPage < end - pagePadding) {
+ if (lastAddedPage < end - pagePadding - 1) {
elements.push();
}