Skip to content

Commit 96bf3fc

Browse files
#1277 Edited reimbursement form to only projects
1 parent eff4da0 commit 96bf3fc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/frontend/src/pages/FinancePage/ReimbursementRequestForm/ReimbursementRequestForm.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import CreateReimbursementRequestFormView from './ReimbursementFormView';
1414
import { useAllProjects } from '../../../hooks/projects.hooks';
1515
import { useHistory } from 'react-router-dom';
1616
import { routes } from '../../../utils/routes';
17-
import { getAllWbsElements } from '../../../utils/reimbursement-request.utils';
1817

1918
export interface ReimbursementRequestFormInput {
2019
vendorId: string;
@@ -157,10 +156,12 @@ const ReimbursementRequestForm: React.FC<ReimbursementRequestFormProps> = ({
157156
}
158157
};
159158

160-
const allWbsElements: {
161-
wbsNum: WbsNumber;
162-
wbsName: string;
163-
}[] = getAllWbsElements(allProjects);
159+
const projectDropdown = allProjects.map((proj) => {
160+
return {
161+
wbsNum: proj.wbsNum,
162+
wbsName: proj.name
163+
};
164+
});
164165

165166
return (
166167
<CreateReimbursementRequestFormView
@@ -177,7 +178,7 @@ const ReimbursementRequestForm: React.FC<ReimbursementRequestFormProps> = ({
177178
reimbursementProductRemove={reimbursementProductRemove}
178179
onSubmit={onSubmitWrapper}
179180
handleSubmit={handleSubmit}
180-
allWbsElements={allWbsElements}
181+
allWbsElements={projectDropdown}
181182
submitText={submitText}
182183
previousPage={previousPage}
183184
setValue={setValue}

0 commit comments

Comments
 (0)