-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pr to inquiry v2 #65
Pr to inquiry v2 #65
Conversation
@@ -58,7 +58,7 @@ export class ViewerService { | |||
this.isSectionsAvailable = parentConfig?.isSectionsAvailable; | |||
this.src = config.metadata.artifactUrl || ''; | |||
this.questionSetId = config.metadata.identifier; | |||
this.questionSetEvaluable = this.serverValidationCheck(config.metadata?.eval); | |||
this.questionSetEvaluable = this.serverValidationCheck(config.metadata?.evalMode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavankumar0408 Can you set the default value of questionSetEvaluable
to false instead of type any
and in serverValidationCheck
method re-assign the value to true based on condition check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
serverValidationCheck(mode: any) { | ||
if(mode == 'server') { | ||
this.questionSetEvaluable = true; | ||
return this.questionSetEvaluable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavankumar0408 Instead of returning the true
/ false
from this method can you just re-assign the value of questionSetEvaluable
and use the value in all other places in components. So this way we can reduce the call of same method in multiple places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -216,7 +216,7 @@ export class SectionPlayerComponent implements OnChanges, AfterViewInit { | |||
this.showTimer = this.sectionConfig.metadata?.showTimer; | |||
|
|||
//server-level-validation | |||
this.questionSetEvaluable = this.viewerService.serverValidationCheck(this.sectionConfig.metadata?.eval); | |||
this.questionSetEvaluable = this.viewerService.serverValidationCheck(this.sectionConfig.metadata?.evalMode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavankumar0408 Instead of calling this.viewerService.serverValidationCheck
method can you set the value of questionSetEvaluable
in viewerService one time and use it like this.viewerService.questionSetEvaluable
in all the components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
@rajnishdargan, comments are addressed |
Another PR has been raised |
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please choose appropriate options.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: