Skip to content

Commit

Permalink
rka-53: add lever (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
konstrybakov authored Aug 7, 2024
1 parent 61901e1 commit 92981cf
Show file tree
Hide file tree
Showing 14 changed files with 487 additions and 85 deletions.
10 changes: 0 additions & 10 deletions app/add/components/variant/picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ export const VariantPicker = () => {
defaultValue="url"
columns={{ initial: '1', sm: '4' }}
>
<RadioCards.Item value="search">
<Flex direction="column">
<Text trim="start" weight="bold">
Name
</Text>
<Text trim="end">
Search for a company by name and select from the results
</Text>
</Flex>
</RadioCards.Item>
<RadioCards.Item value="url">
<Flex direction="column">
<Text weight="bold">URL</Text>
Expand Down
1 change: 1 addition & 0 deletions app/add/components/variant/variants/url.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const schema = z.object({
const platformLogo: Record<HiringPlatformName, string> = {
ashby: 'ashby.png',
greenhouse: 'greenhouse.svg',
lever: 'lever.svg',
}

type FormType = z.infer<typeof schema>
Expand Down
1 change: 1 addition & 0 deletions drizzle/0011_sad_manta.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TYPE "hiring_platform" ADD VALUE 'lever';
282 changes: 282 additions & 0 deletions drizzle/meta/0011_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
{
"id": "5e3959bd-e0c5-449a-b5d1-59edef45cb02",
"prevId": "1452fed9-07f1-4afb-9798-28f9bf828e85",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.companies": {
"name": "companies",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"tracker_url": {
"name": "tracker_url",
"type": "text",
"primaryKey": false,
"notNull": true
},
"tracker_type": {
"name": "tracker_type",
"type": "tracker_type",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"hiring_platform": {
"name": "hiring_platform",
"type": "hiring_platform",
"typeSchema": "public",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"companies_tracker_url_unique": {
"name": "companies_tracker_url_unique",
"nullsNotDistinct": false,
"columns": [
"tracker_url"
]
}
}
},
"public.jobs": {
"name": "jobs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"url": {
"name": "url",
"type": "text",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"location": {
"name": "location",
"type": "text",
"primaryKey": false,
"notNull": true
},
"last_updated_at": {
"name": "last_updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"departments": {
"name": "departments",
"type": "json",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "job_status",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'open'"
},
"company_id": {
"name": "company_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"is_seen": {
"name": "is_seen",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"is_hidden": {
"name": "is_hidden",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"is_top_choice": {
"name": "is_top_choice",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"is_applied": {
"name": "is_applied",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"is_remote": {
"name": "is_remote",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"currency_code": {
"name": "currency_code",
"type": "text",
"primaryKey": false,
"notNull": false
},
"compensation_interval": {
"name": "compensation_interval",
"type": "text",
"primaryKey": false,
"notNull": false
},
"compensation_summary": {
"name": "compensation_summary",
"type": "text",
"primaryKey": false,
"notNull": false
},
"salary_min": {
"name": "salary_min",
"type": "numeric(10, 3)",
"primaryKey": false,
"notNull": false
},
"salary_max": {
"name": "salary_max",
"type": "numeric(10, 3)",
"primaryKey": false,
"notNull": false
},
"equity_min": {
"name": "equity_min",
"type": "numeric(10, 3)",
"primaryKey": false,
"notNull": false
},
"equity_max": {
"name": "equity_max",
"type": "numeric(10, 3)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"jobs_company_id_companies_id_fk": {
"name": "jobs_company_id_companies_id_fk",
"tableFrom": "jobs",
"tableTo": "companies",
"columnsFrom": [
"company_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"jobs_url_unique": {
"name": "jobs_url_unique",
"nullsNotDistinct": false,
"columns": [
"url"
]
}
}
}
},
"enums": {
"public.hiring_platform": {
"name": "hiring_platform",
"schema": "public",
"values": [
"greenhouse",
"ashby",
"lever"
]
},
"public.job_status": {
"name": "job_status",
"schema": "public",
"values": [
"open",
"closed"
]
},
"public.tracker_type": {
"name": "tracker_type",
"schema": "public",
"values": [
"hiring_platform"
]
}
},
"schemas": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
7 changes: 7 additions & 0 deletions drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@
"when": 1722146825730,
"tag": "0010_silly_joseph",
"breakpoints": true
},
{
"idx": 11,
"version": "7",
"when": 1723007063294,
"tag": "0011_sad_manta",
"breakpoints": true
}
]
}
2 changes: 1 addition & 1 deletion lib/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const trackerTypes = ['hiring_platform'] as const
export type TrackerType = (typeof trackerTypes)[number]
export const trackerType = pgEnum('tracker_type', trackerTypes)

const hiringPlatforms = ['greenhouse', 'ashby'] as const
const hiringPlatforms = ['greenhouse', 'ashby', 'lever'] as const
export type HiringPlatformName = (typeof hiringPlatforms)[number]
export const hiringPlatform = pgEnum('hiring_platform', hiringPlatforms)

Expand Down
Loading

0 comments on commit 92981cf

Please sign in to comment.