From 29af9f692ffcc357989f9067cfea2b8b3782780b Mon Sep 17 00:00:00 2001
From: BryannYeap <e0543723@u.nus.edu>
Date: Thu, 13 Oct 2022 00:08:07 +0800
Subject: [PATCH] [offers][chore] Make totalYoe compulsory in create offer
 profile API

---
 apps/portal/src/pages/offers/test/createProfile.tsx         | 6 +++---
 apps/portal/src/pages/offers/test/listOffers.tsx            | 6 +++---
 .../src/server/router/offers/offers-profile-router.ts       | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/apps/portal/src/pages/offers/test/createProfile.tsx b/apps/portal/src/pages/offers/test/createProfile.tsx
index ac88b845..07a20f7f 100644
--- a/apps/portal/src/pages/offers/test/createProfile.tsx
+++ b/apps/portal/src/pages/offers/test/createProfile.tsx
@@ -38,7 +38,7 @@ function Test() {
         ],
         experiences: [
           {
-            companyId: 'cl93patjt0003txewyiaky7xx',
+            companyId: 'cl93patjt0004txew88wkcqpu',
             durationInMonths: 24,
             jobType: 'FULLTIME',
             level: 'Junior',
@@ -66,7 +66,7 @@ function Test() {
       offers: [
         {
           // Comments: '',
-          companyId: 'cl93patjt0003txewyiaky7xx',
+          companyId: 'cl93patjt0004txew88wkcqpu',
           job: {
             base: {
               currency: 'SGD',
@@ -95,7 +95,7 @@ function Test() {
         },
         {
           comments: undefined,
-          companyId: 'cl93patjt0003txewyiaky7xx',
+          companyId: 'cl93patjt0004txew88wkcqpu',
           job: {
             base: {
               currency: 'SGD',
diff --git a/apps/portal/src/pages/offers/test/listOffers.tsx b/apps/portal/src/pages/offers/test/listOffers.tsx
index b566f458..d7e5e8c4 100644
--- a/apps/portal/src/pages/offers/test/listOffers.tsx
+++ b/apps/portal/src/pages/offers/test/listOffers.tsx
@@ -6,10 +6,10 @@ function Test() {
   const data = trpc.useQuery([
     'offers.list',
     {
-      companyId: 'cl93patjt0003txewyiaky7xx',
-      limit: 2,
+      companyId: 'cl93patjt0004txew88wkcqpu',
+      limit: 20,
       location: 'Singapore, Singapore',
-      offset: 3,
+      offset: 0,
       sortBy: '-monthYearReceived',
       yoeCategory: 1,
     },
diff --git a/apps/portal/src/server/router/offers/offers-profile-router.ts b/apps/portal/src/server/router/offers/offers-profile-router.ts
index 9030022a..2017a639 100644
--- a/apps/portal/src/server/router/offers/offers-profile-router.ts
+++ b/apps/portal/src/server/router/offers/offers-profile-router.ts
@@ -144,7 +144,7 @@ export const offersProfileRouter = createRouter()
             yoe: z.number(),
           }),
         ),
-        totalYoe: z.number().optional(),
+        totalYoe: z.number(),
       }),
       offers: z.array(offer),
     }),