Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[candidate_parameters] Participant status - mandatory comments if not active or complete #8731

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion modules/candidate_parameters/jsx/ParticipantStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ class ParticipantStatus extends Component {
suboptionsRequired = true;
}

let commentsRequired = false;
let statusOpts = this.state.Data.statusOptions;
if (
statusOpts &&
statusOpts[participantStatus] !== 'Active' &&
statusOpts[participantStatus] !== 'Complete'
) {
commentsRequired = true;
}

let formattedHistory = [];
for (let statusKey in this.state.Data.history) {
if (this.state.Data.history.hasOwnProperty(statusKey)) {
Expand Down Expand Up @@ -246,7 +256,7 @@ class ParticipantStatus extends Component {
onUserInput={this.setFormData}
ref="reasonSpecify"
disabled={disabled}
required={false}
required={commentsRequired}
/>
{updateButton}
{formattedHistory}
Expand Down