Skip to content

Commit

Permalink
Passenger interfaces updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblurie29 committed Feb 21, 2024
1 parent 6415ba8 commit df557b6
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/data/test-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,34 @@ export const createTestPassengerData = (
Created: faker.date.recent().toISOString(),
'Latest Trip': faker.date.recent().toISOString(),
'TS City, State (from Treatment Site Totals 2)': [],
'Cell Phone': faker.phone.number(),
'Home Phone': faker.phone.number(),
Education: faker.helpers.arrayElement([
'Less than high school degree',
'High school degree or equivalent',
'Some college, no degree',
'Associate degree',
"Bachelor's degree",
'Graduate or professional degree',
]),

'Marital Status': faker.helpers.arrayElement([
'Single',
'Married',
'Divorced',
'Widowed',
]),
Employment: faker.helpers.arrayElement([
'Employed, working 40+ hours per week',
'Employed, working 1-39 hours per week',
'Unemployed, looking for work',
'Unemployed, not looking for work',
'Retired',
'Student',
'Homemaker',
'Unable to work',
'Other',
]),
...manualData.fields,
},
...manualData,
Expand Down
5 changes: 5 additions & 0 deletions src/interfaces/passenger/passenger.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ export interface PassengerData {
City: string;
Country: string;
Email: string;
'Cell Phone': string;
'Home Phone': string;
Education: string;
'Household Income': number;
'Household Size': number;
'Marital Status': string;
Employment: string;
Ethnicity: string[];
'Military Service': string;
'Military Member': string[];
Expand Down
5 changes: 5 additions & 0 deletions src/interfaces/passenger/trimmed-passenger.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export interface TrimmedPassenger {
Email: string;
'Household Income': number;
'Household Size': number;
'Cell Phone': string;
'Home Phone': string;
Education: string;
'Marital Status': string;
Employment: string;
Ethnicity: string[];
'Military Service': string;
'Military Member': string[];
Expand Down
5 changes: 5 additions & 0 deletions src/util/trim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export const trimPassenger = (passenger: PassengerData): TrimmedPassenger => {
fields['Passenger Names (from All Flight Legs)'],
Age: Age,
'Latest Trip': fields['Latest Trip'],
'Cell Phone': fields['Cell Phone'],
'Home Phone': fields['Home Phone'],
Education: fields['Education'],
'Marital Status': fields['Marital Status'],
Employment: fields['Employment'],
};

return trimmedPassenger;
Expand Down
5 changes: 5 additions & 0 deletions src/util/trimming/passengers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export const trimPassenger = (passenger: PassengerData): TrimmedPassenger => {
fields['Passenger Names (from All Flight Legs)'],
Age: Age,
'Latest Trip': fields['Latest Trip'],
'Cell Phone': fields['Cell Phone'],
'Home Phone': fields['Home Phone'],
Education: fields['Education'],
'Marital Status': fields['Marital Status'],
Employment: fields['Employment'],
};

return trimmedPassenger;
Expand Down

0 comments on commit df557b6

Please sign in to comment.