Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/.env.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_SAIL_PROJECT_ID=06470057-11a3-4b95-b4b5-ff47111f80f2
VITE_SAIL_PROJECT_ID=11281c9d-e398-4ac2-ae06-604a53b259b6
VITE_SAIL_AUTH_CLIENT=https://test-auth.sail.codes
VITE_API_BASE_URL=http://localhost:8000/api/bwwc/
VITE_ENV=local
11 changes: 8 additions & 3 deletions client/src/utils/csv-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,25 @@ const columnRowMap: Record<Ethnicity, Record<Gender, string>> = {
[Gender.Male]: 'O',
[Gender.NonBinary]: 'P'
},
[Ethnicity.NativeAmerican]: {
[Ethnicity.MENA]: {
[Gender.Female]: 'Q',
[Gender.Male]: 'R',
[Gender.NonBinary]: 'S'
},
[Ethnicity.TwoOrMore]: {
[Ethnicity.NativeAmerican]: {
[Gender.Female]: 'T',
[Gender.Male]: 'U',
[Gender.NonBinary]: 'V'
},
[Ethnicity.Unreported]: {
[Ethnicity.TwoOrMore]: {
[Gender.Female]: 'W',
[Gender.Male]: 'X',
[Gender.NonBinary]: 'Y'
},
[Ethnicity.Unreported]: {
[Gender.Female]: 'Z',
[Gender.Male]: 'AA',
[Gender.NonBinary]: 'AB'
}
};
const extractData = (sheet: WorkSheet): TableData => {
Expand Down
3 changes: 3 additions & 0 deletions client/src/utils/data-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export interface TableRow {
unreportedM: number;
unreportedF: number;
unreportedNB: number;
MENAM: number;
MENAF: number;
MENANB: number;
}

export function convertToRows(data?: TableData): TableRow[] {
Expand Down
6 changes: 4 additions & 2 deletions client/src/utils/ethnicity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export enum Ethnicity {
Asian = 'asian',
NativeAmerican = 'nativeAmerican',
TwoOrMore = 'twoOrMore',
Unreported = 'unreported'
Unreported = 'unreported',
MENA = 'mena'
}

export const EthnicityDisplayNames: Record<Ethnicity, string> = {
Expand All @@ -17,5 +18,6 @@ export const EthnicityDisplayNames: Record<Ethnicity, string> = {
[Ethnicity.Asian]: 'Asian',
[Ethnicity.NativeAmerican]: 'American Indian / Alaska Native',
[Ethnicity.TwoOrMore]: 'Two or More Races (Not Hispanic or Latinx)',
[Ethnicity.Unreported]: 'Unreported'
[Ethnicity.Unreported]: 'Unreported',
[Ethnicity.MENA]: 'Middle Eastern / North African',
};