|
|
@@ -1,4 +1,4 @@ |
|
|
|
import { IonContent, IonButton, IonSlides, IonSlide, IonIcon } from '@ionic/react'; |
|
|
|
import { IonContent, IonRange, IonButton, IonSlides, IonSlide, IonIcon } from '@ionic/react'; |
|
|
|
import { Component } from 'react'; |
|
|
|
import styles from './AdditionalQuestions.module.scss'; |
|
|
|
|
|
|
@@ -6,28 +6,30 @@ type Props = { }; |
|
|
|
|
|
|
|
type OwnState = { |
|
|
|
index: number, |
|
|
|
userType: 'INDIVIDUAL' | 'COMPANY' | '' |
|
|
|
userType: 'INDIVIDUAL' | 'COMPANY' | '', |
|
|
|
userSector: number, |
|
|
|
showPicker: boolean, |
|
|
|
}; |
|
|
|
|
|
|
|
const slideOpts = { |
|
|
|
initialSlide: 0, |
|
|
|
initialSlide: 3, |
|
|
|
speed: 400, |
|
|
|
followFinger: false, |
|
|
|
draggable: false, |
|
|
|
}; |
|
|
|
|
|
|
|
const jobSectors = [{ |
|
|
|
id: 1, |
|
|
|
name: 'Information Technology' |
|
|
|
value: 1, |
|
|
|
text: 'Information Technology', |
|
|
|
}, { |
|
|
|
id: 2, |
|
|
|
name: 'Health Care' |
|
|
|
value: 2, |
|
|
|
text: 'Health Care' |
|
|
|
}, { |
|
|
|
id: 3, |
|
|
|
name: 'Finance' |
|
|
|
value: 3, |
|
|
|
text: 'Finance' |
|
|
|
}, { |
|
|
|
id: 4, |
|
|
|
name: 'Communication Services' |
|
|
|
value: 4, |
|
|
|
text: 'Communication Services' |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
@@ -39,7 +41,9 @@ class AdditionalQuestions extends Component<Props, OwnState> { |
|
|
|
super(props); |
|
|
|
this.state = { |
|
|
|
index: 0, |
|
|
|
userType: '' |
|
|
|
userType: 'INDIVIDUAL', |
|
|
|
showPicker: false, |
|
|
|
userSector: 0, |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@@ -76,25 +80,50 @@ class AdditionalQuestions extends Component<Props, OwnState> { |
|
|
|
<p className={styles.hint}> Select answer below </p> |
|
|
|
</div> |
|
|
|
<div className={styles.choiceContainer}> |
|
|
|
<button className={ this.state.userType === 'COMPANY' ? styles.active : '' } |
|
|
|
onClick={e => this.setState({ userType: 'COMPANY' })}> <IonIcon src='assets/images/signup/building.svg'></IonIcon> Company <IonIcon src='assets/images/signup/checkmark.svg'></IonIcon> </button> |
|
|
|
<button className={ this.state.userType === 'INDIVIDUAL' ? styles.active : '' } |
|
|
|
onClick={e => this.setState({ userType: 'INDIVIDUAL' })}> <IonIcon src='assets/images/signup/user.svg'></IonIcon> Individual <IonIcon src='assets/images/signup/checkmark.svg'></IonIcon> </button> |
|
|
|
<div className={styles.optionButtons}> |
|
|
|
<button className={ this.state.userType === 'COMPANY' ? styles.active : '' } |
|
|
|
onClick={e => this.setState({ userType: 'COMPANY' })}> <IonIcon className={styles.leftIcon} src='assets/images/signup/building.svg'></IonIcon> Company <IonIcon className={styles.checkmark} src='assets/images/signup/checkmark.svg'></IonIcon> </button> |
|
|
|
<button className={ this.state.userType === 'INDIVIDUAL' ? styles.active : '' } |
|
|
|
onClick={e => this.setState({ userType: 'INDIVIDUAL' })}> <IonIcon className={styles.leftIcon} src='assets/images/signup/user.svg'></IonIcon> Individual <IonIcon className={styles.checkmark} src='assets/images/signup/checkmark.svg'></IonIcon> </button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</IonSlide> |
|
|
|
|
|
|
|
<IonSlide> |
|
|
|
<div className={styles.questionContainer}> |
|
|
|
<p className={styles.question}> Select if you represent a <strong> company </strong> or if you're an <strong> individual </strong> </p> |
|
|
|
<p className={styles.hint}> Select answer below 1 </p> |
|
|
|
<p className={styles.question}> Which <strong> sector </strong> |
|
|
|
{ this.state.userType === 'COMPANY' && <span> does your company below to? </span> } |
|
|
|
{ this.state.userType === 'INDIVIDUAL' && <span> do you work under? </span> } </p> |
|
|
|
<p className={styles.hint}> Select answer below </p> |
|
|
|
</div> |
|
|
|
<div className={styles.choiceContainer}> |
|
|
|
<div className={styles.optionButtons}> |
|
|
|
<button className={styles.optionButton} onClick={ () => this.setState({ showPicker: true })}> { this.state.userSector ? <span> { this.state.userSector } </span> : <span> Select an Option </span> } <IonIcon className={styles.option} src='assets/images/signup/options.svg'></IonIcon> </button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</IonSlide> |
|
|
|
|
|
|
|
|
|
|
|
<IonSlide> |
|
|
|
<div className={styles.questionContainer}> |
|
|
|
<p className={styles.question}> What is your working <strong> team size? </strong> </p> |
|
|
|
<p className={styles.hint}> Select answer below </p> |
|
|
|
</div> |
|
|
|
<div className={styles.choiceContainer}> |
|
|
|
<button className={ this.state.userType === 'COMPANY' ? styles.active : '' } |
|
|
|
onClick={e => this.setState({ userType: 'COMPANY' })}> <IonIcon src='assets/images/signup/building.svg'></IonIcon> Company <IonIcon src='assets/images/signup/checkmark.svg'></IonIcon> </button> |
|
|
|
<button className={ this.state.userType === 'INDIVIDUAL' ? styles.active : '' } |
|
|
|
onClick={e => this.setState({ userType: 'INDIVIDUAL' })}> <IonIcon src='assets/images/signup/user.svg'></IonIcon> Individual <IonIcon src='assets/images/signup/checkmark.svg'></IonIcon> </button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</IonSlide> |
|
|
|
</IonSlide> |
|
|
|
|
|
|
|
|
|
|
|
<IonSlide> |
|
|
|
<div className={styles.questionContainer}> |
|
|
|
<p className={styles.question}> Select the <strong> modules </strong> that will be used. </p> |
|
|
|
<p className={styles.hint}> Select answer below </p> |
|
|
|
</div> |
|
|
|
<div className={styles.choiceContainer}> |
|
|
|
|
|
|
|
</div> |
|
|
|
</IonSlide> |
|
|
|
</IonSlides> |
|
|
|
|
|
|
|
|
|
|
@@ -106,6 +135,15 @@ class AdditionalQuestions extends Component<Props, OwnState> { |
|
|
|
Next <IonIcon src='assets/images/signup/arrow-next.svg'></IonIcon> |
|
|
|
</IonButton> |
|
|
|
|
|
|
|
|
|
|
|
{ this.state.showPicker && <section className={styles.picker}> |
|
|
|
<div className={styles.container}> |
|
|
|
<ul> |
|
|
|
{ jobSectors.map((sector) => <li key={sector.value}> { this.state.userSector === sector.value ? '*' : '' } { sector.value }. { sector.text } </li>) } |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</section> } |
|
|
|
|
|
|
|
</IonContent> |
|
|
|
}; |
|
|
|
}; |
|
|
|