-
Notifications
You must be signed in to change notification settings - Fork 779
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
Add challenge phase detail edit feature for more fields #3491
Conversation
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.
@gautamjajoo The phase and submission visiblity change makes the modal to close adrupty ignoring the rest of the changes. Instead, we can make it either -
- The visibility should change only after we click on submit button of the edit phase modal
or - After we select the phase, we can show three option -
a. Edit Detail - It will make the edit phase modal allowing users to edit phase details except submission and phase visibility.
b. Phase Visibility - It will allow to change only the phase visibility
c. Submission Visibility - It will allow users to change only the submission visibility
@@ -76,6 +100,7 @@ | |||
</div> | |||
</div> | |||
|
|||
<div class="row row-lr-margin"> |
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.
Formatting seems a bit off in this file, please fix it.
@@ -135,6 +160,43 @@ | |||
</div> | |||
</div> | |||
|
|||
<div class="col-lg-4 col-md-4 col-sm-12 col-lr-pad"> |
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.
please keep this div outside the submissions div i.e after [this] line. Moreover make a separate div and add the Max Concurrent Submissions Allowed
and Allowed Submission File Types
in a single row of class col-lg-6 col-md-6 col-sm-6 col-lr-pad
each
@@ -1,6 +1,12 @@ | |||
import { ViewChildren, QueryList, Component, Input, OnInit } from '@angular/core'; | |||
import { GlobalService } from '../../../../services/global.service'; | |||
import { InputComponent } from '../../../utility/input/input.component'; | |||
import { NGXLogger } from 'ngx-logger'; | |||
|
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.
please remove this extra line gap
@@ -113,6 +149,22 @@ export class EditphasemodalComponent implements OnInit { | |||
*/ | |||
editPhaseDetails = true; | |||
|
|||
/** | |||
* publish challenge state and it's icon |
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.
it should be phase visibility state and it's icon
instead of publish challenge state and it's icon
}; | ||
|
||
/** | ||
* publish challenge state and it's icon |
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.
it should be submission visibility state and it's icon
here.
@@ -188,6 +269,124 @@ export class EditphasemodalComponent implements OnInit { | |||
this.todayDateTime = new Date(); | |||
} | |||
|
|||
/** | |||
* Phase Visibility click function |
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.
it should be phase visibility toggle function
} | ||
|
||
/** | ||
* Submission Visibility click function |
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.
please change it to Submission Visibility toggle function
@Kajol-Kumari Done the required changes! |
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.
@gautamjajoo The condition for the the edit
, phase visibiiity change
and submission visibility change
needs to be modified as after we change the visibility, the selected phase value becomes undefined but still those buttons are visible.
Ref -
Screen.Recording.2021-06-29.at.9.07.03.PM.mov
class="btn ev-btn-dark waves-effect waves-dark grad-btn grad-btn-dark fs-12" | ||
(click)="togglePhaseVisibility()" | ||
> | ||
<i class="{{ phaseVisibility.icon }}"></i> Phase Visibility |
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.
We need to bind the icon with the selected phase's phase visibility otherwise, it will show the ambiguous behaviour. Please see the recording below to see the ambiguity -
Screen.Recording.2021-06-29.at.8.58.45.PM.mov
class="btn ev-btn-dark waves-effect waves-dark grad-btn grad-btn-dark fs-12" | ||
(click)="toggleSubmissionVisibility()" | ||
> | ||
<i class="{{ submissionVisibility.icon }}"></i> Submission Visibility |
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.
Same here! Please bind it with the selected phases's submission visibility.
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.
I believe we don't need to bind it to the particular phase, it's just that I missed the else
statement.
<div class="row row-lr-margin"> | ||
<div class="col-lg-6 col-md-6 col-sm-6 col-lr-pad"> | ||
<div class="input-field align-left"> | ||
<div class="fs-16 fw-regular text-med-black">Allowed Submission File Types</div> |
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.
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!
@@ -2,6 +2,7 @@ import { ViewChildren, QueryList, Component, Input, OnInit } from '@angular/core | |||
import { GlobalService } from '../../../../services/global.service'; | |||
import { InputComponent } from '../../../utility/input/input.component'; | |||
|
|||
|
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.
please revert this change
@Kajol-Kumari This error is encountered because we are fetching the phase details again after they are updated. I will look for a different method from which we can update the details. |
@Kajol-Kumari @Ram81 I have updated the PR, fixing the above issues. The error which was mentioned that the phase are not visible on the drop-down menu after phase details are updated, was becuase we were using |
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.
LGTM 👍
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.
@gautamjajoo the Phase details
button after selecting the phase should also show a edit icon. It's not clear what the Phase details
button is for. Also the Phase visibility
and Submission visibility
toggle button can go in the Phase details
pop up or they should look like toggle buttons.
@Ram81 Is this fine? |
@gautamjajoo can we move the toggle bottons slightly down. They are misaligned from the labels. Also, rename |
@gautamjajoo can you share the updated screenshot? |
@Ram81 The toggle buttons are now slightly down |
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.
LGTM
Add challenge phase detail edit feature for following fields:
default meta attributes