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