Skip to content

Commit

Permalink
Genomics
Browse files Browse the repository at this point in the history
Working with Genomics tab
  • Loading branch information
Vijay Bhaskar committed Jan 15, 2014
1 parent 2201789 commit b9bd222
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 145 deletions.
223 changes: 79 additions & 144 deletions Genomics/ieStudyForm_copy(1).js
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ function checkReasonFilled() {

//to submit BU & GC Study details
function submitstudyDetails() {
debugger
//debugger
var gohead = true;
if ($('#txtM1Date').val() != "")
var txtM1Date = SPdate($('#txtM1Date').val());
Expand Down Expand Up @@ -2168,6 +2168,9 @@ function submitstudyDetails() {
var enableStage = "";
var eanableWF = "";

if(!isSplGC)
{

switch (step) {
case STEP3:
enableStage = STEPM1;
Expand Down Expand Up @@ -2388,10 +2391,26 @@ function submitstudyDetails() {
strBatch += "<Field Name='IsSuperUser'>1</Field>";
break;
}
}//if END

if (step != STEPM4 && step != STEPM2D && step != STEPM3A && step != STEPM3B && isSplGC == false) {
strBatch += "<Field Name='enableStage'>" + enableStage + "</Field>" +
"<Field Name='EnableWF'>" + eanableWF + "</Field>";
} else {
if (isSplGC) {
enableStage = STEPM2D;
eanableWF = 8;

strBatch += allgenomics(gohead, txtM1Date, selM1Reason, selRNA, txtM2aDate, selM2Reason, selcRNAprotocol, M2bDate, M2cDate, M2dDate, selM2bReason, selM2cReason, selM2dReason);
strBatch += "<Field Name='Comments_m2d'>" + CorrectStringAsSPData(txtCommentsM2d) + "</Field>";
strBatch += "<Field Name='Comments_M2a'>" + CorrectStringAsSPData(txtCommentsM2a) + "</Field>";
strBatch += "<Field Name='IsSuperUser'>1</Field>";

if (step != STEPM4 && step != STEPM2D && step != STEPM3A && step != STEPM3B) {
strBatch += "<Field Name='enableStage'>" + enableStage + "</Field>" +
"<Field Name='EnableWF'>" + eanableWF + "</Field>";
}
}
}

strBatch += "<Field Name='ID'>" + itmid + "</Field>" +
Expand Down Expand Up @@ -2535,8 +2554,8 @@ function submitStatistics() {
"<Method ID='1' Cmd='Update'>";

var txtComments3b = CorrectStringAsSPData($('#txtComments3b').val());
// debugger
if (GenomicUserId != getuserId(curUser) || isSplGC) {

//if (GenomicUserId != getuserId(curUser) || isSplGC) {

if ($('#M3aDate').val() != "")
var M3aDate = SPdate($('#M3aDate').val());
Expand All @@ -2554,161 +2573,77 @@ function submitStatistics() {
var enableStage = "";
var eanableWF = "";

switch (step) {

case STEPM2D:
enableStage = STEPM3A;
eanableWF = "9";

if (M3aDate != "") {
strBatch += "<Field Name='M3a_act_Initial_QC_completion_da'>" + M3aDate + "</Field>";
} else {
alert('Please select date.');
$("#M3aDate").focus();
gohead = false;
break;
}

strBatch += "<Field Name='Comments_m3b'>" + txtComments3b + "</Field>";

if (needReason && sel3aReason == 0) {
alert('Please select reason');
$("#sel3aReason").focus();
gohead = false;
break;
}

if (sel3aReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3a'>" + sel3aReason + "</Field>";
strBatch += "<Field Name='ReasonIn'>M3a</Field>";
if (isSplGC)
strBatch += "<Field Name='IsSuperUser'>1</Field>";
}
break;

case STEPM3A:
enableStage = STEPM3B;
eanableWF = "10";

if (M3bDate != "")
strBatch += "<Field Name='M3b_act_Statistics_Report_Date'>" + M3bDate + "</Field>";
else {
alert('Please select date.');
$("#M3bDate").focus();
gohead = false;
break;
}

strBatch += "<Field Name='Comments_m3b'>" + txtComments3b + "</Field>";

if (needReason && sel3bReason == 0) {
alert('Please select reason');
$("#sel3bReason").focus();
gohead = false;
break;
}

if (sel3bReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3b'>" + sel3bReason + "</Field>";
strBatch += "<Field Name='ReasonIn'>M3b</Field>";
}
break;

case STEPM3B:

if (M3aDate != "") {
strBatch += "<Field Name='M3a_act_Initial_QC_completion_da'>" + M3aDate + "</Field>";
} else {
alert('Please select date.');
$("#M3aDate").focus();
gohead = false;
break;
}
if (!isSplGC) {
switch (step) {
case STEPM2D:
enableStage = STEPM3A;
eanableWF = "9";

if (needReason && sel3aReason == 0) {
alert('Please select reason');
$("#sel3aReason").focus();
gohead = false;
break;
}

if (sel3aReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3a'>" + sel3aReason + "</Field>";
}
if (M3aDate != "") {
strBatch += "<Field Name='M3a_act_Initial_QC_completion_da'>" + M3aDate + "</Field>";
} else {
alert('Please select date.');
$("#M3aDate").focus();
gohead = false;
break;
}

if (M3bDate != "")
strBatch += "<Field Name='M3b_act_Statistics_Report_Date'>" + M3bDate + "</Field>";
else {
alert('Please select date.');
$("#M3bDate").focus();
gohead = false;
break;
}
strBatch += "<Field Name='Comments_m3b'>" + txtComments3b + "</Field>";

strBatch += "<Field Name='Comments_m3b'>" + txtComments3b + "</Field>";
if (needReason && sel3aReason == 0) {
alert('Please select reason');
$("#sel3aReason").focus();
gohead = false;
break;
}

if (needReason && sel3bReason == 0) {
alert('Please select reason');
$("#sel3bReason").focus();
gohead = false;
if (sel3aReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3a'>" + sel3aReason + "</Field>";
strBatch += "<Field Name='ReasonIn'>M3a</Field>";
if (isSplGC)
strBatch += "<Field Name='IsSuperUser'>1</Field>";
}
break;
}

if (sel3bReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3b'>" + sel3bReason + "</Field>";
}
break;

case STEPM4:

if (M3aDate != "") {
strBatch += "<Field Name='M3a_act_Initial_QC_completion_da'>" + M3aDate + "</Field>";
} else {
alert('Please select date.');
$("#M3aDate").focus();
gohead = false;
break;
}
case STEPM3A:
enableStage = STEPM3B;
eanableWF = "10";

if (M3bDate != "")
strBatch += "<Field Name='M3b_act_Statistics_Report_Date'>" + M3bDate + "</Field>";
else {
alert('Please select date.');
$("#M3bDate").focus();
gohead = false;
break;
}

if (needReason && sel3aReason == 0) {
alert('Please select reason');
$("#sel3aReason").focus();
gohead = false;
break;
}
strBatch += "<Field Name='Comments_m3b'>" + txtComments3b + "</Field>";

if (sel3aReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3a'>" + sel3aReason + "</Field>";
}
if (needReason && sel3bReason == 0) {
alert('Please select reason');
$("#sel3bReason").focus();
gohead = false;
break;
}

if (M3bDate != "")
strBatch += "<Field Name='M3b_act_Statistics_Report_Date'>" + M3bDate + "</Field>";
else {
alert('Please select date.');
$("#M3bDate").focus();
gohead = false;
if (sel3bReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3b'>" + sel3bReason + "</Field>";
strBatch += "<Field Name='ReasonIn'>M3b</Field>";
}
break;
}

strBatch += "<Field Name='Comments_m3b'>" + txtComments3b + "</Field>";

if (needReason && sel3bReason == 0) {
alert('Please select reason');
$("#sel3bReason").focus();
gohead = false;
break;
}
//case STEPM3B:
//case STEPM4:

if (sel3bReason != 0) {
strBatch += "<Field Name='Reason_for_Delay_m3b'>" + sel3bReason + "</Field>";
}

break;
}// switch end
} else {
} // switch end
} //if END

//} else {
strBatch += "<Field Name='Comments_m3b'>" + txtComments3b + "</Field>";
}
//}


if (isSplGC == false) {
strBatch += "<Field Name='enableStage'>" + enableStage + "</Field>" +
"<Field Name='EnableWF'>" + eanableWF + "</Field>";
Expand Down
21 changes: 20 additions & 1 deletion Genomics/studyform_copy(1).js
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,9 @@ function submitstudyDetails() {
var enableStage = "";
var eanableWF = "";

if(!isSplGC)
{

switch (step) {
case STEP3:
enableStage = STEPM1;
Expand Down Expand Up @@ -2340,12 +2343,28 @@ function submitstudyDetails() {
strBatch += "<Field Name='IsSuperUser'>1</Field>";
break;
}
}//if END

if (step != STEPM4 && step != STEPM2D && step != STEPM3A && step != STEPM3B && isSplGC == false) {
strBatch += "<Field Name='enableStage'>" + enableStage + "</Field>" +
"<Field Name='EnableWF'>" + eanableWF + "</Field>";
}
}else {
if (isSplGC) {
enableStage = STEPM2D;
eanableWF = 8;

strBatch += allgenomics(gohead, txtM1Date, selM1Reason, selRNA, txtM2aDate, selM2Reason, selcRNAprotocol, M2bDate, M2cDate, M2dDate, selM2bReason, selM2cReason, selM2dReason);
strBatch += "<Field Name='Comments_m2d'>" + CorrectStringAsSPData(txtCommentsM2d) + "</Field>";
strBatch += "<Field Name='Comments_M2a'>" + CorrectStringAsSPData(txtCommentsM2a) + "</Field>";
strBatch += "<Field Name='IsSuperUser'>1</Field>";

if (step != STEPM4 && step != STEPM2D && step != STEPM3A && step != STEPM3B) {
strBatch += "<Field Name='enableStage'>" + enableStage + "</Field>" +
"<Field Name='EnableWF'>" + eanableWF + "</Field>";
}
}
}

strBatch += "<Field Name='ID'>" + itmid + "</Field>" +
"</Method>" +
"</Batch>";
Expand Down

0 comments on commit b9bd222

Please sign in to comment.