Skip to content
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

GMP : 1. EXP -> 2.Lab/Rotor: make sure all 2 roles - operator(s), rev… #126

Merged
merged 1 commit into from
Aug 11, 2024
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
41 changes: 41 additions & 0 deletions programs/us_experiment/us_exp_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,20 @@ void US_ExperGuiRotor::addOpertoList( void )
.arg( c_oper ) );
return;
}

//also, check if to-be-added operator is in other role(s) already [rev, appr]
QString e_revList = te_revs_to_assign->toPlainText();
QString e_apprList = te_apprs_to_assign->toPlainText();
if ( e_revList. contains( c_oper ) || e_apprList. contains( c_oper ) )
{
QMessageBox::information( this, tr( "Cannot add Operator" ),
tr( "<font color='red'><b>ATTENTION:</b> </font> Selected operator: <br><br>"
"<font ><b>%1</b><br><br>"
"is already set as REVIEWER or APPROVER.<br>"
"Please choose other operator.")
.arg( c_oper ) );
return;
}

te_opers_to_assign->append( c_oper );
}
Expand Down Expand Up @@ -1244,6 +1258,19 @@ void US_ExperGuiRotor::addRevtoList( void )
.arg( c_rev ) );
return;
}

//also, check if to-be-added reviewer is an operator already
QString e_operList = te_opers_to_assign->toPlainText();
if ( e_operList. contains( c_rev ) )
{
QMessageBox::information( this, tr( "Cannot add Reviewer" ),
tr( "<font color='red'><b>ATTENTION:</b> </font> Selected reviewer: <br><br>"
"<font ><b>%1</b><br><br>"
"is already set as an OPERATOR.<br>"
"Please choose other reviewer.")
.arg( c_rev ) );
return;
}

te_revs_to_assign->append( c_rev );

Expand Down Expand Up @@ -1284,6 +1311,20 @@ void US_ExperGuiRotor::addApprtoList( void )
.arg( c_appr) );
return;
}

//also, check if to-be-added approver is an operator already
QString e_operList = te_opers_to_assign->toPlainText();
if ( e_operList. contains( c_appr ) )
{
QMessageBox::information( this, tr( "Cannot add Approver" ),
tr( "<font color='red'><b>ATTENTION:</b> </font> Selected approver: <br><br>"
"<font ><b>%1</b><br><br>"
"is already set as an OPERATOR.<br>"
"Please choose other approver.")
.arg( c_appr ) );
return;
}


te_apprs_to_assign->append( c_appr );

Expand Down
Loading