Skip to content

Commit

Permalink
Merge pull request #1100 from hackforla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sydneywalcoff authored Jan 14, 2024
2 parents f967cef + 95039d9 commit 989edcd
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 34 deletions.
44 changes: 44 additions & 0 deletions products/statement-generator/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
REACT_APP_FULL_NAME=Daniel Xiao
REACT_APP_AGE=29
REACT_APP_IS_VETERAN=Yes

REACT_APP_IS_JOB_CHECKED=True
REACT_APP_IS_UNEMPLOYMENT_CHECKED=False
REACT_APP_IS_RECOVERY_CHECKED=True
REACT_APP_IS_SCHOOL_CHECKED=False
REACT_APP_IS_PARENTING_CHECKED=False
REACT_APP_IS_COMMUNITY_CHECKED=True
REACT_APP_IS_SOMETHING_ELSE_CHECKED=False


REACT_APP_ORGANIZATION_NAME=Taste Tester
REACT_APP_SERVICE_DESCRIPTION=I check cakes for poison. It is a very serious job.

REACT_APP_COMPANY_NAME=Cool Company
REACT_APP_JOB_TITLE=Big Boss
REACT_APP_JOB_DESCRIPTION=I make the decisions on what the biggest cake should be.


REACT_APP_NAME=Addicts Anonymous
REACT_APP_DESCRIPTION=I go to a meeting every week to help me overcome my addiction to poisons.

REACT_APP_SCHOOL_NAME=Villians University
REACT_APP_STUDY_NAME=Chemistry
REACT_APP_PASSION_DESCRIPTION=I always liked looking at how chemicals affected

REACT_APP_NUMBER_CHILDREN=2
REACT_APP_PARENT_DESCRIPTION=I have been taking care of my baby for over 11 years. I hope that this will be the best one ever.

REACT_APP_UNEMPLOYMENT_DESCRIPTION=I have not been able to find any jobs that are not about licking or eating things.

REACT_APP_GOALS=I want to get a new job so I do not have to eat any more poison.
REACT_APP_GOALS_HOW=I am learning new ways to work that go beyond eating.

REACT_APP_CLEAR_RECORD_WHY=It will help me make a better life for me and my family.
REACT_APP_CLEAR_RECORD_HOW=If my record no longer says I have poison resistance, I can be hired for other jobs.

REACT_APP_ACTIVITY_NAME=Helping rescue cats
REACT_APP_ACTIVITY_DESCRIPTION=Making sure they have a safe home

REACT_APP_HEADING=Today,\n\nDearly beloved,
REACT_APP_CLOSING=Yours Truly,\nDan the Man
1 change: 1 addition & 0 deletions products/statement-generator/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/build

# misc
.env
.DS_Store
.env.local
.env.development.local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ export const FormStateContextProvider = ({
function test(evt: KeyboardEvent) {
// ` (backquote)
if (evt.keyCode === 192) {
updateStepToForm(sampleStepState);
if (process.env.NODE_ENV === 'development') {
updateStepToForm(sampleStepState)
}
}
}

Expand Down
62 changes: 29 additions & 33 deletions products/statement-generator/src/contexts/FormStateProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export interface IInvolvementInitialState {
isSomethingElseChecked?: boolean;
isParentingChecked?: boolean;
isCommunityChecked?: boolean;
isNoneChecked?: boolean;
}
// step 2a
export interface IInvolvementJobState {
Expand Down Expand Up @@ -166,57 +165,54 @@ export interface IStatementState {

export const sampleStepState = {
introduction: {
fullName: 'Daniel Xiao',
age: '29',
isVeteran: 'Yes',
fullName: process.env.REACT_APP_FULL_NAME,
age: process.env.REACT_APP_AGE,
isVeteran: process.env.REACT_APP_IS_VETERAN,
},
involvement: {
isJobChecked: true,
isCommunityChecked: true,
isRecoveryChecked: true,
isSchoolChecked: false,
isParentingChecked: false,
isNoneChecked: false,
isJobChecked: process.env.REACT_APP_IS_JOB_CHECKED,
isRecoveryChecked: process.env.REACT_APP_IS_RECOVERY_CHECKED,
isSchoolChecked: process.env.REACT_APP_IS_SCHOOL_CHECKED,
isParentingChecked: process.env.REACT_APP_IS_PARENTING_CHECKED,
isCommunityChecked: process.env.REACT_APP_IS_COMMUNITY_CHECKED,
isSomethingElseChecked: process.env.REACT_APP_IS_SOMETHING_ELSE_CHECKED,
isUnemploymentChecked: process.env.REACT_APP_IS_UNEMPLOYMENT_CHECKED,
},
involvementJobState: {
companyName: 'Cool Company',
jobTitle: 'Big Boss',
jobDescription: 'I make the decisions on what the biggest cake should be.',
companyName: process.env.REACT_APP_COMPANY_NAME,
jobTitle: process.env.REACT_APP_JOB_TITLE,
jobDescription: process.env.REACT_APP_JOB_DESCRIPTION,
},
communityServiceState: {
organizationName: 'Taste Tester',
serviceDescription: 'I check cakes for poison. It is a very serious job.',
organizationName: process.env.REACT_APP_ORGANIZATION_NAME,
serviceDescription: process.env.REACT_APP_SERVICE_DESCRIPTION,
},
recoveryState: {
recoveryName: 'Addicts Anonymous',
recoveryDescription:
'I go to a meeting every week to help me overcome my addiction to poisons.',
recoveryName: process.env.REACT_APP_RECOVERY_NAME,
recoveryDescription: process.env.REACT_APP_RECOVERY_DESCRIPTION,
},
schoolState: {
schoolName: 'Villians University',
studyName: 'Chemistry',
passionDescription: 'I always liked looking at how chemicals affected ',
schoolName: process.env.REACT_APP_SCHOOL_NAME,
studyName: process.env.REACT_APP_STUDY_NAME,
passionDescription: process.env.REACT_APP_PASSION_DESCRIPTION,
},
parentingState: {
numberChildren: '2',
parentDescription:
'I have been taking care of my baby for over 11 years. I hope that this will be the best one ever.',
numberChildren: process.env.REACT_APP_NUMBER_CHILDREN,
parentDescription: process.env.REACT_APP_PARENT_DESCRIPTION,
},
unemploymentState: {
unemploymentDescription:
'I have not been able to find any jobs that are not about licking or eating things.',
unemploymentDescription: process.env.REACT_APP_UNEMPLOYMENT_DESCRIPTION,
},
goalsState: {
goals: 'I want to get a new job so I do not have to eat any more poison.',
goalsHow: 'I am learning new ways to work that go beyond eating.',
goals: process.env.REACT_APP_GOALS,
goalsHow: process.env.REACT_APP_GOALS_HOW,
},
whyState: {
clearRecordWhy: 'It will help me make a better life for me and my family.',
clearRecordHow:
'If my record no longer says I have poison resistance, I can be hired for other jobs.',
clearRecordWhy: process.env.REACT_APP_CLEAR_RECORD_WHY,
clearRecordHow: process.env.REACT_APP_CLEAR_RECORD_HOW,
},
statements: {
heading: 'Today,\n\nDearly beloved,',
closing: 'Yours Truly,\nDan the Man',
heading: process.env.REACT_APP_HEADING,
closing: process.env.REACT_APP_CLOSING,
},
};

0 comments on commit 989edcd

Please sign in to comment.