Unverified Commit 03db5521 authored by Zhou (Link)  Fang's avatar Zhou (Link) Fang Committed by GitHub
Browse files

Migrated Review component to ts version (#113)

* Migrated review component to ts version

* added purchasingAndVAT into formvalue interface

* removed the .tsx extension

* improved the code based on feedback

* added missing interface file
parent 21cafa0f
export interface FormValue {
organization: {
id: string;
legalName: string;
address: {
id: string;
street: string;
city: string;
provinceOrState: string;
country: string;
'country-label': string;
postalCode: string;
};
twitterHandle: string;
};
representative: {
member: {
id: string;
firstName: string;
lastName: string;
jobtitle: string;
email: string;
};
marketing: {
sameAsCompany: boolean;
id: string;
firstName: string;
lastName: string;
jobtitle: string;
email: string;
};
accounting: {
sameAsCompany: boolean;
id: string;
firstName: string;
lastName: string;
jobtitle: string;
email: string;
};
};
purchasingAndVAT: {
purchasingProcess: string;
'purchasingProcess-label': { label: string; value: string };
vatNumber: number | string;
countryOfRegistration: string;
};
'membershipLevel-label': { label: string; value: string };
membershipLevel: string;
workingGroups: [WorkingGroups];
signingAuthorityRepresentative: {
firstName: string;
lastName: string;
email: string;
jobtitle: string;
id: string;
};
}
export interface WorkingGroups {
id: string;
workingGroup: {
label: string;
value: string;
participationLevel: [string];
};
participationLevel: string;
effectiveDate: string;
workingGroupRepresentative: {
firstName: string;
lastName: string;
jobtitle: string;
email: string;
id: string;
};
}
import React from 'react';
import CustomStepButton from '../../UIComponents/Button/CustomStepButton';
import { FormValue } from '../../../Interfaces/form_interface';
const Review = ({ values, submitForm }) => {
interface ReviewProps {
values: FormValue;
submitForm: (pageIndex: number, nextPage: string) => void;
}
const Review: React.FC<ReviewProps> = ({ values, submitForm }) => {
return (
<form onSubmit={() => submitForm(5, '/submitted')}>
<h1 className="fw-600 h2">
......@@ -266,7 +272,6 @@ const Review = ({ values, submitForm }) => {
<CustomStepButton
previousPage="/signing-authority"
nextPage="/submitted"
pageIndex={5}
/>
</form>
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment