From 96747db984f05316ce36e5d107cc00840660ed4c Mon Sep 17 00:00:00 2001 From: kj1352 Date: Wed, 17 Feb 2021 19:56:57 +0530 Subject: [PATCH] Partial commit --- public/assets/images/signup/options.svg | 6 ++ .../signup/AdditionalQuestions.module.scss | 53 ++++++++++-- src/pages/signup/AdditionalQuestions.tsx | 84 ++++++++++++++----- src/pages/signup/Signup.tsx | 6 +- 4 files changed, 117 insertions(+), 32 deletions(-) create mode 100644 public/assets/images/signup/options.svg diff --git a/public/assets/images/signup/options.svg b/public/assets/images/signup/options.svg new file mode 100644 index 0000000..3db16ce --- /dev/null +++ b/public/assets/images/signup/options.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/pages/signup/AdditionalQuestions.module.scss b/src/pages/signup/AdditionalQuestions.module.scss index 4f36d47..3befe95 100644 --- a/src/pages/signup/AdditionalQuestions.module.scss +++ b/src/pages/signup/AdditionalQuestions.module.scss @@ -71,9 +71,8 @@ padding: 40px 7%; border-top-left-radius: 35px; border-top-right-radius: 35px; - - - button { + + .optionButtons button { width: 100%; text-align: left; outline: none; @@ -88,11 +87,16 @@ margin-bottom: 30px; transition: box-shadow 0.3s, color 0.3s; + &.optionButton { + color: white; + padding-right: 15px; + } + &.active { color: white; box-shadow: 0px 0px 10px 1px var(--shamrock); - ion-icon:nth-child(2) { + ion-icon.checkmark { opacity: 1; } } @@ -102,16 +106,21 @@ vertical-align: middle; transition: opacity 0.3s; - &:nth-child(1) { + &.leftIcon { margin-right: 15px; } - &:nth-child(2) { + &.checkmark { opacity: 0; float: right; } + + &.option { + float: right; + } } } + } } @@ -152,4 +161,36 @@ opacity: 0.4; transform: rotateY(180deg); } +} + +.picker { + position: fixed; + left: 0; + top: 0; + z-index: 1; + width: 100%; + height: 100vh; + background-color: var(--dark-charcoal); + display: flex; + align-items: center; + justify-content: center; + + .container { + + ul { + list-style: none; + padding: 0; + margin: 0; + color: white; + } + + ion-range { + position: absolute; + right: 5%; + top: 0; + transform: rotate(90deg); + width: 100px; + height: 100%; + } + } } \ No newline at end of file diff --git a/src/pages/signup/AdditionalQuestions.tsx b/src/pages/signup/AdditionalQuestions.tsx index 7d8ec71..cc52c94 100644 --- a/src/pages/signup/AdditionalQuestions.tsx +++ b/src/pages/signup/AdditionalQuestions.tsx @@ -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 { super(props); this.state = { index: 0, - userType: '' + userType: 'INDIVIDUAL', + showPicker: false, + userSector: 0, }; @@ -76,25 +80,50 @@ class AdditionalQuestions extends Component {

Select answer below

- - +
+ + +
-

Select if you represent a company or if you're an individual

-

Select answer below 1

+

Which sector + { this.state.userType === 'COMPANY' && does your company below to? } + { this.state.userType === 'INDIVIDUAL' && do you work under? }

+

Select answer below

+
+
+
+ +
+
+
+ + + +
+

What is your working team size?

+

Select answer below

- - +
-
+ + + + +
+

Select the modules that will be used.

+

Select answer below

+
+
+ +
+
@@ -106,6 +135,15 @@ class AdditionalQuestions extends Component { Next + + { this.state.showPicker &&
+
+
    + { jobSectors.map((sector) =>
  • { this.state.userSector === sector.value ? '*' : '' } { sector.value }. { sector.text }
  • ) } +
+
+
} + }; }; diff --git a/src/pages/signup/Signup.tsx b/src/pages/signup/Signup.tsx index c5c0739..afddc63 100644 --- a/src/pages/signup/Signup.tsx +++ b/src/pages/signup/Signup.tsx @@ -24,7 +24,8 @@ class SignupPage extends Component { render() { return - { this.state.signupStep === 'BASIC' && + { this.state.signupStep === 'BASIC' && +
@@ -69,8 +70,7 @@ class SignupPage extends Component {
Already have an account? Login
} - - + { this.state.signupStep === 'ADDITIONAL' && } };