[portal][chore] update job titles enum

pull/507/head
Yangshun Tay 2 years ago
parent 39c96f86da
commit f4e5d2ddb1

@ -47,7 +47,7 @@ const getJobTitle = (role: string) => {
const processedRole = role.toUpperCase().trim(); const processedRole = role.toUpperCase().trim();
if (processedRole.includes('ML ENGINEER')) { if (processedRole.includes('ML ENGINEER')) {
return 'ai-ml-engineer'; return 'machine-learning-engineer';
} else if (processedRole.includes('BACKEND')) { } else if (processedRole.includes('BACKEND')) {
return 'back-end-engineer'; return 'back-end-engineer';
} else if (processedRole.includes('DATA')) { } else if (processedRole.includes('DATA')) {
@ -117,13 +117,13 @@ const seedSalaries = async () => {
}); });
// get countryId of Singapore // get countryId of Singapore
const singapore = (await prisma.city.findFirst({ const singapore = await prisma.city.findFirst({
where: { where: {
name: "Singapore" name: 'Singapore',
} },
})) });
console.log("Singapore ID: " + singapore?.id) console.log('Singapore ID: ' + singapore?.id);
// break; // break;
// seed here // seed here
@ -171,8 +171,8 @@ const seedSalaries = async () => {
jobType: 'INTERN', jobType: 'INTERN',
location: { location: {
connect: { connect: {
id: singapore.id id: singapore.id,
} },
}, // TODO: DEFAULT AS SG }, // TODO: DEFAULT AS SG
monthYearReceived: xlSerialToJsDate(data.Timestamp), monthYearReceived: xlSerialToJsDate(data.Timestamp),
negotiationStrategy: '', negotiationStrategy: '',
@ -193,10 +193,10 @@ const seedSalaries = async () => {
), ),
currency: 'SGD', // assume sgd currency: 'SGD', // assume sgd
value: data.Income value: data.Income
? typeof data.Income === 'number' ? typeof data.Income === 'number'
? data.Income ? data.Income
: 0 : 0
: 0, : 0,
}, },
}, },
startYear: xlSerialToJsDate( startYear: xlSerialToJsDate(
@ -235,8 +235,8 @@ const seedSalaries = async () => {
jobType: 'FULLTIME', jobType: 'FULLTIME',
location: { location: {
connect: { connect: {
id: singapore.id id: singapore.id,
} },
}, // TODO: DEFAULT AS SG }, // TODO: DEFAULT AS SG
monthYearReceived: xlSerialToJsDate(data.Timestamp), monthYearReceived: xlSerialToJsDate(data.Timestamp),
negotiationStrategy: '', negotiationStrategy: '',
@ -256,10 +256,10 @@ const seedSalaries = async () => {
), ),
currency: 'SGD', // assume sgd currency: 'SGD', // assume sgd
value: data.Income value: data.Income
? typeof data.Income === 'number' ? typeof data.Income === 'number'
? data.Income ? data.Income
: 0 : 0
: 0, : 0,
}, },
}, },
bonus: { bonus: {
@ -358,8 +358,8 @@ const generateAllAnalysis = async () => {
Promise.all([seedSalaries()]) Promise.all([seedSalaries()])
.then(() => { .then(() => {
console.log(createdProfileIds.length + " profiles created") console.log(createdProfileIds.length + ' profiles created');
console.log("Busy crunching analysis.....") console.log('Busy crunching analysis.....');
}) })
.then(() => generateAllAnalysis()) .then(() => generateAllAnalysis())
.then((_data) => { .then((_data) => {

@ -1,27 +1,52 @@
export const JobTitleLabels = { export const JobTitleLabels = {
'ai-ml-engineer': 'AI/ML Engineer', 'ai-engineer': 'Artificial Intelligence (AI) Engineer',
'algorithms-engineer': 'Algorithms Engineer', 'algorithms-engineer': 'Algorithms Engineer',
'android-engineer': 'Android Software Engineer', 'android-engineer': 'Android Software Engineer',
'applications-engineer': 'Applications Engineer', 'applications-engineer': 'Applications Engineer',
'back-end-engineer': 'Back End Engineer', 'back-end-engineer': 'Back End Engineer',
'business-analyst': 'Business Analyst',
'business-engineer': 'Business Engineer', 'business-engineer': 'Business Engineer',
'capacity-engineer': 'Capacity Engineer',
'customer-engineer': 'Customer Engineer',
'data-analyst': 'Data Analyst',
'data-engineer': 'Data Engineer', 'data-engineer': 'Data Engineer',
'data-scientist': 'Data Scientist',
'devops-engineer': 'DevOps Engineer', 'devops-engineer': 'DevOps Engineer',
'engineering-director': 'Engineering Director',
'engineering-manager': 'Engineering Manager',
'enterprise-engineer': 'Enterprise Engineer', 'enterprise-engineer': 'Enterprise Engineer',
'forward-deployed-engineer': 'Forward Deployed Engineer',
'front-end-engineer': 'Front End Engineer', 'front-end-engineer': 'Front End Engineer',
'full-stack-engineer': 'Full Stack Engineer',
'gameplay-engineer': 'Gameplay Engineer',
'hardware-engineer': 'Hardware Engineer', 'hardware-engineer': 'Hardware Engineer',
'infrastructure-engineer': 'Infrastructure Engineer',
'ios-engineer': 'iOS Software Engineer', 'ios-engineer': 'iOS Software Engineer',
'machine-learning-engineer': 'Machine Learning (ML) Engineer',
'machine-learning-researcher': 'Machine Learning (ML) Researcher',
'mobile-engineer': 'Mobile Software Engineer (iOS + Android)', 'mobile-engineer': 'Mobile Software Engineer (iOS + Android)',
'networks-engineer': 'Networks Engineer', 'networks-engineer': 'Networks Engineer',
'partner-engineer': 'Partner Engineer', 'partner-engineer': 'Partner Engineer',
'product-engineer': 'Product Engineer',
'product-manager': 'Product Manager',
'production-engineer': 'Production Engineer', 'production-engineer': 'Production Engineer',
'project-manager': 'Project Manager',
'release-engineer': 'Release Engineer',
'research-engineer': 'Research Engineer', 'research-engineer': 'Research Engineer',
'research-scientist': 'Research Scientist',
'rotational-engineer': 'Rotational Engineer',
'sales-engineer': 'Sales Engineer', 'sales-engineer': 'Sales Engineer',
'security-engineer': 'Security Engineer', 'security-engineer': 'Security Engineer',
'site-reliability-engineer': 'Site Reliability Engineer (SRE)', 'site-reliability-engineer': 'Site Reliability Engineer (SRE)',
'software-engineer': 'Software Engineer', 'software-engineer': 'Software Engineer',
'solutions-architect': 'Solutions Architect',
'solutions-engineer': 'Solutions Engineer',
'systems-analyst': 'Systems Analyst',
'systems-engineer': 'Systems Engineer', 'systems-engineer': 'Systems Engineer',
'tech-ops-engineer': 'Tech Ops Engineer',
'technical-program-manager': 'Technical Program Manager',
'test-engineer': 'QA/Test Engineer (SDET)', 'test-engineer': 'QA/Test Engineer (SDET)',
'ux-engineer': 'User Experience (UX) Engineer',
}; };
export type JobTitleType = keyof typeof JobTitleLabels; export type JobTitleType = keyof typeof JobTitleLabels;

Loading…
Cancel
Save