mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-29 21:23:14 +08:00
[offers][fix] modify create profile endpoint to accept optional
This commit is contained in:
@ -38,7 +38,7 @@ function Test() {
|
||||
],
|
||||
experiences: [
|
||||
{
|
||||
companyId: 'cl93m87pl0000tx1ofbafqz6f',
|
||||
companyId: 'cl93patjt0003txewyiaky7xx',
|
||||
durationInMonths: 24,
|
||||
jobType: 'FULLTIME',
|
||||
level: 'Junior',
|
||||
@ -65,8 +65,8 @@ function Test() {
|
||||
},
|
||||
offers: [
|
||||
{
|
||||
comments: '',
|
||||
companyId: 'cl93m87pl0000tx1ofbafqz6f',
|
||||
// Comments: '',
|
||||
companyId: 'cl93patjt0003txewyiaky7xx',
|
||||
job: {
|
||||
base: {
|
||||
currency: 'SGD',
|
||||
@ -94,8 +94,8 @@ function Test() {
|
||||
negotiationStrategy: 'Leveraged having multiple offers',
|
||||
},
|
||||
{
|
||||
comments: '',
|
||||
companyId: 'cl93m87pl0000tx1ofbafqz6f',
|
||||
comments: undefined,
|
||||
companyId: 'cl93patjt0003txewyiaky7xx',
|
||||
job: {
|
||||
base: {
|
||||
currency: 'SGD',
|
||||
@ -120,13 +120,13 @@ function Test() {
|
||||
jobType: 'FULLTIME',
|
||||
location: 'Singapore, Singapore',
|
||||
monthYearReceived: new Date('2022-09-30T07:58:54.000Z'),
|
||||
negotiationStrategy: 'Leveraged having multiple offers',
|
||||
// NegotiationStrategy: 'Leveraged having multiple offers',
|
||||
},
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
const profileId = 'cl92wiw30006vw3hg7dxa14fo'; // Remember to change this filed after testing deleting
|
||||
const profileId = 'cl93qtuyc0000w3ideermqtcz'; // Remember to change this filed after testing deleting
|
||||
const data = trpc.useQuery([
|
||||
`offers.profile.listOne`,
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ const valuation = z.object({
|
||||
|
||||
// TODO: handle both full time and intern
|
||||
const offer = z.object({
|
||||
comments: z.string(),
|
||||
comments: z.string().optional(),
|
||||
companyId: z.string(),
|
||||
job: z.object({
|
||||
base: valuation.optional(), // Full time
|
||||
@ -28,7 +28,7 @@ const offer = z.object({
|
||||
jobType: z.string(),
|
||||
location: z.string(),
|
||||
monthYearReceived: z.date(),
|
||||
negotiationStrategy: z.string(),
|
||||
negotiationStrategy: z.string().optional(),
|
||||
});
|
||||
|
||||
const experience = z.object({
|
||||
|
Reference in New Issue
Block a user