Skip to content

Commit c1cfad6

Browse files
authored
Merge pull request #36 from jatin-narang/final-UI-11.0
Refractor: Fix profile page and scenario end success message
2 parents 1af607f + 9bc2fa1 commit c1cfad6

3 files changed

Lines changed: 58 additions & 55 deletions

File tree

client/src/components/ProfileInfo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ProfileInfo extends React.Component {
4040
const { email, name } = this.state;
4141
return (
4242
<div className="profile-info-container">
43-
<div>
43+
<div className="profile-form-container">
4444
<div className="profile-header">
4545
<div className="back-module-container">
4646
<button className="back-button" onClick={this.props.history.goBack}>

client/src/components/ProfileInfo/styles.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@
127127
.profile-info-container {
128128
display: flex;
129129
margin: 0 14em;
130+
.profile-form-container{
131+
width: 26em;
132+
}
130133
.career-progress-label {
131134
margin-left: 0;
132135
font-size: 1.6em;
@@ -139,13 +142,13 @@
139142
}
140143
.input-label {
141144
left: 14em;
142-
top: 3em;
145+
top: 4em;
143146
}
144147
.input-label-name {
145-
top: 8em;
148+
top: 9em;
146149
}
147150
.input-label-password {
148-
top: 13.2em;
151+
top: 14.2em;
149152
}
150153
}
151154
}

client/src/pages/ScenarioBased/ScenarioQuesAns.js

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export class ScenarioQuesAns extends React.Component {
263263
{conclusionReached && (
264264
<AnswerInfoPopup
265265
open={open}
266-
message={'Your answer is correct'}
266+
message={'Scenario Ends'}
267267
answerStatus={true}
268268
handleClose={this.handleClose}
269269
imageUrl={correctAnsUrl}
@@ -290,8 +290,8 @@ export class ScenarioQuesAns extends React.Component {
290290
messageOne: parScoreStatus
291291
? `You have scored ${currentScore > 0 ? currentScore : 0}/${totalScore}.`
292292
: `Oh! You have scored only ${currentScore > 0
293-
? currentScore
294-
: 0}/${totalScore}.`,
293+
? currentScore
294+
: 0}/${totalScore}.`,
295295
messageTwo: `Scenario Ends`,
296296

297297
messageThree: parScoreStatus
@@ -306,56 +306,56 @@ export class ScenarioQuesAns extends React.Component {
306306
)}
307307

308308
{!showCorrectAns &&
309-
questionId != null && (
310-
<div>
311-
<div className="level-question-detail">
312-
<span>Level {level} </span>
313-
<span className="question-number-status">
314-
Question {id} out of {totalQuestion}
315-
</span>
316-
</div>
317-
<div className="progress-bar-container">
318-
<ProgressBar progress={progress} />
319-
</div>
320-
<div className="questions-container">
321-
<p className={`question-label question-label-${moduleColor}`}>
322-
{questions &&
323-
questions.length > 0 &&
324-
questionId != null &&
325-
questions[questionId - 1].question}
326-
</p>
327-
</div>
328-
<div className="answer-container">
329-
{!emptyOption && !showAnswer && <p className="select-label">Select any option.</p>}
330-
<div className="options-card-container">
331-
{!emptyOption &&
332-
questions &&
333-
questions.length > 0 &&
334-
questionId != null &&
335-
questions[questionId - 1].options.map((option, key) => (
336-
<Card
337-
key={key}
338-
option={moduleScenario ? option.option : option}
339-
answerClick={answerClick}
340-
// selectedCard={clickedOptions.includes(key)}
341-
selectedCard={selectedCard === key}
342-
handleClick={this.handleAnswerClick(key)}
343-
moduleColor={moduleColor}
344-
/>
345-
))}
309+
questionId != null && (
310+
<div>
311+
<div className="level-question-detail">
312+
<span>Level {level} </span>
313+
<span className="question-number-status">
314+
Question {id} out of {totalQuestion}
315+
</span>
346316
</div>
347-
</div>
348-
{/* Either option is clicked or question option is empty render proceed button */}
349-
{(emptyOption || answerClick) && (
350-
<button
351-
className={`next-page-button next-page-button-${true}`}
352-
onClick={moduleScenario ? this.handleScenarioProceed : this.handleProceedNext}
353-
>
354-
Proceed
317+
<div className="progress-bar-container">
318+
<ProgressBar progress={progress} />
319+
</div>
320+
<div className="questions-container">
321+
<p className={`question-label question-label-${moduleColor}`}>
322+
{questions &&
323+
questions.length > 0 &&
324+
questionId != null &&
325+
questions[questionId - 1].question}
326+
</p>
327+
</div>
328+
<div className="answer-container">
329+
{!emptyOption && !showAnswer && <p className="select-label">Select any option.</p>}
330+
<div className="options-card-container">
331+
{!emptyOption &&
332+
questions &&
333+
questions.length > 0 &&
334+
questionId != null &&
335+
questions[questionId - 1].options.map((option, key) => (
336+
<Card
337+
key={key}
338+
option={moduleScenario ? option.option : option}
339+
answerClick={answerClick}
340+
// selectedCard={clickedOptions.includes(key)}
341+
selectedCard={selectedCard === key}
342+
handleClick={this.handleAnswerClick(key)}
343+
moduleColor={moduleColor}
344+
/>
345+
))}
346+
</div>
347+
</div>
348+
{/* Either option is clicked or question option is empty render proceed button */}
349+
{(emptyOption || answerClick) && (
350+
<button
351+
className={`next-page-button next-page-button-${true}`}
352+
onClick={moduleScenario ? this.handleScenarioProceed : this.handleProceedNext}
353+
>
354+
Proceed
355355
</button>
356-
)}
357-
</div>
358-
)}
356+
)}
357+
</div>
358+
)}
359359
</Fragment>
360360
</div>
361361
{infoOpen && <GameInfo open={infoOpen} handleClose={this.handleInfoClose} />}

0 commit comments

Comments
 (0)