-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 1. apply button fix. 2. skill count fix 3. UI fixes , 4. cleanup…
… code, 5. added progress loader (#467)
- Loading branch information
1 parent
b4fba38
commit 0b5a9c9
Showing
13 changed files
with
128 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
/* eslint-disable no-console */ | ||
import { PrismaClient, Currency, EmployementType, Role, WorkMode } from '@prisma/client'; | ||
import { | ||
PrismaClient, | ||
Currency, | ||
EmployementType, | ||
Role, | ||
WorkMode, | ||
} from '@prisma/client'; | ||
import { faker } from '@faker-js/faker'; | ||
import bcrypt from 'bcryptjs'; | ||
|
||
|
@@ -24,7 +30,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.remote, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
|
@@ -47,7 +52,7 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.office, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
|
||
hasExperiencerange: false, | ||
companyLogo: '', | ||
hasSalaryRange: false, | ||
|
@@ -68,7 +73,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.hybrid, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 3, | ||
maxExperience: 4, | ||
|
@@ -92,7 +96,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.remote, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
|
@@ -116,7 +119,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.hybrid, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: false, | ||
companyLogo: '', | ||
hasSalaryRange: true, | ||
|
@@ -138,7 +140,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.office, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
|
@@ -162,7 +163,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.remote, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
|
@@ -185,7 +185,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.hybrid, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
|
@@ -207,7 +206,6 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.office, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
|
@@ -230,14 +228,13 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.remote, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
companyLogo: '', | ||
hasSalaryRange: true, | ||
minSalary: 75, | ||
maxSalary: 95, | ||
minSalary: 75000, | ||
maxSalary: 95000, | ||
isVerifiedJob: false, | ||
}, | ||
{ | ||
|
@@ -253,12 +250,11 @@ let jobs = [ | |
type: EmployementType.Full_time, | ||
workMode: WorkMode.remote, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
companyLogo: '', | ||
hasSalaryRange: true, | ||
hasExperiencerange: false, | ||
minSalary: 25, | ||
maxSalary: 50, | ||
minSalary: 25000, | ||
maxSalary: 50000, | ||
isVerifiedJob: true, | ||
}, | ||
{ | ||
|
@@ -274,7 +270,6 @@ let jobs = [ | |
type: EmployementType.Contract, | ||
workMode: WorkMode.remote, | ||
currency: Currency.USD, | ||
application: '[email protected]', | ||
hasExperiencerange: true, | ||
minExperience: 1, | ||
maxExperience: 2, | ||
|
@@ -316,14 +311,12 @@ async function seedUsers() { | |
|
||
async function seedJobs() { | ||
try { | ||
|
||
const existingUsers = await prisma.user.findMany({ | ||
select: { id: true }, | ||
}); | ||
const existingUserIds = new Set(existingUsers.map(user => user.id)); | ||
const existingUserIds = new Set(existingUsers.map((user) => user.id)); | ||
|
||
|
||
const validJobs = jobs.filter(job => existingUserIds.has(job.userId)); | ||
const validJobs = jobs.filter((job) => existingUserIds.has(job.userId)); | ||
|
||
await Promise.all( | ||
validJobs.map(async (j) => | ||
|
@@ -341,7 +334,7 @@ async function seedJobs() { | |
type: j.type, | ||
workMode: j.workMode, | ||
currency: j.currency, | ||
application: j.application, | ||
application: 'https://x.com/100xDevs', | ||
city: faker.location.city(), | ||
address: faker.location.city(), | ||
hasExperiencerange: j.hasExperiencerange, | ||
|
@@ -378,4 +371,4 @@ async function main() { | |
await seedJobs(); | ||
} | ||
|
||
main(); | ||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.