Skip to content

Commit 0e26733

Browse files
committed
Change RoleCategory type to an enum and capitalize values
1 parent beeb9e7 commit 0e26733

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

src/config/color-mappings.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
---------------------------------------------------
44
*/
55

6+
import { RoleCategory } from '../types/content/roles.ts';
67
import type { ColorMappingsConfig } from '../types/other.ts';
78

89
export const COLOR_MAPPINGS_CONFIG: ColorMappingsConfig = {
@@ -23,7 +24,7 @@ export const COLOR_MAPPINGS_CONFIG: ColorMappingsConfig = {
2324
website: 'bg-sky-600',
2425
},
2526
roleCategory: {
26-
internship: 'bg-rose-600',
27-
seasonal: 'bg-rose-600',
27+
[RoleCategory.Internship]: 'bg-rose-600',
28+
[RoleCategory.SeasonalJob]: 'bg-rose-600',
2829
},
2930
} as const;

src/config/content/roles.ts

+11-7
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
----------------
44
*/
55

6-
import { RoleType, type RolesConfig } from '../../types/content/roles.ts';
6+
import {
7+
RoleCategory,
8+
RoleType,
9+
type RolesConfig,
10+
} from '../../types/content/roles.ts';
711

812
export const ROLES_CONFIG: RolesConfig = {
913
[RoleType.Employment]: [
1014
{
11-
category: 'internship',
15+
category: RoleCategory.Internship,
1216
title: 'Systems Analyst',
1317
company: 'Haemonetics Corporation',
1418
companyUrl: 'https://www.haemonetics.com/',
@@ -25,7 +29,7 @@ export const ROLES_CONFIG: RolesConfig = {
2529
],
2630
},
2731
{
28-
category: 'seasonal',
32+
category: RoleCategory.SeasonalJob,
2933
title: 'Ramp Agent',
3034
company: 'Airport Terminal Services',
3135
companyUrl: 'https://www.atsstl.com/',
@@ -38,7 +42,7 @@ export const ROLES_CONFIG: RolesConfig = {
3842
],
3943
},
4044
{
41-
category: 'seasonal',
45+
category: RoleCategory.SeasonalJob,
4246
title: 'General Production Laborer',
4347
company: 'Universal Handling Equipment Ltd.',
4448
companyUrl: 'https://www.universalhandling.com/',
@@ -54,7 +58,7 @@ export const ROLES_CONFIG: RolesConfig = {
5458
],
5559
},
5660
{
57-
category: 'seasonal',
61+
category: RoleCategory.SeasonalJob,
5862
title: 'General Production Laborer',
5963
company: 'Universal Handling Equipment Ltd.',
6064
companyUrl: 'https://www.universalhandling.com/',
@@ -70,7 +74,7 @@ export const ROLES_CONFIG: RolesConfig = {
7074
],
7175
},
7276
{
73-
category: 'seasonal',
77+
category: RoleCategory.SeasonalJob,
7478
title: 'Afternoon Paper Carrier',
7579
company: 'Red Deer Advocate',
7680
companyUrl: 'https://www.reddeeradvocate.com/',
@@ -84,7 +88,7 @@ export const ROLES_CONFIG: RolesConfig = {
8488
],
8589
},
8690
{
87-
category: 'seasonal',
91+
category: RoleCategory.SeasonalJob,
8892
title: 'Shop Assistant',
8993
company: 'Universal Handling Equipment Ltd.',
9094
companyUrl: 'https://www.universalhandling.com/',

src/types/content/roles.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ export enum RoleType {
2222
/**
2323
* Possible role categories
2424
*/
25-
export type RoleCategory = 'seasonal' | 'internship';
25+
export enum RoleCategory {
26+
Internship = 'Internship',
27+
SeasonalJob = 'Seasonal Job',
28+
}
2629

2730
/**
2831
* A base role with common fields
2932
*
30-
* @param category A string describing the category of the role (ex. 'internship', 'seasonal', etc.).
33+
* @param category A string describing the category of the role (ex. 'Internship', 'Seasonal Job', etc.).
3134
* @param title The title of the role.
3235
* @param company The name of the company.
3336
* @param companyUrl The URL of the company's .website.

0 commit comments

Comments
 (0)