From ffc7ec858dca1de997d6105f027fb9dbcde48417 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 1 Nov 2018 15:35:02 +0530 Subject: [PATCH] dashboadunchange --- .../models/StatusUpdation_model.php | 39 ++++++++++++------- Apollo/assets/js/controllers/dashboardCtrl.js | 7 ---- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index 134279e5..48f1e377 100755 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -129,24 +129,26 @@ $getlastansbookstatus = $this->GetLastAns_status($arr[0]['StudentID'],$arr[0]['S $upperresult=strtoupper($getlastansbookstatus); - $UpperstatusToMsg = strtoupper($upperresult); +$WithoutspaceStatus = preg_replace('/\s+/', '',$upperresult); -$WithoutspaceStatus = preg_replace('/\s+/', '', $UpperstatusToMsg); - - // echo $WithoutspaceStatus; + // echo $arr[0]['ListCode']; // die(); if($answerBookletStatus['isIssueToStudentExist'] == 0 && $answerBookletStatus['statusCount'] != 0) { //echo "SEND SMS"; + if ($this->get_ListCode_status($arr[0]['ListCode'])) { + //echo 'in'; $dateToMsg = $arr[0]['CDate']; $studentName = $this->getStudentName($arr[0]['StudentID']); $CmntToMsg = $arr[0]['Comments']; $statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']); -//echo $statuToMsg;die(); +$issuecheck = strtoupper($statuToMsg); +$withoutspaceissue = preg_replace('/\s+/', '',$issuecheck); +//echo $withoutspaceissue;die(); // $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']); - if( ($statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED') && $upperresult == 'RECEIVEDFROMSTUDENT'){ + if( ($statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED') && $WithoutspaceStatus == 'RECEIVEDFROMSTUDENT'){ // echo 'if';die(); @@ -161,9 +163,9 @@ $WithoutspaceStatus = preg_replace('/\s+/', '', $UpperstatusToMsg); // echo $statuToMsg; // die(); - } else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') { + } else if($withoutspaceissue == 'ISSUEDTOSTUDENT' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') { - echo 'else if';die(); + /// echo 'else if';die(); $cerNamtToMsg = 'Mark Card'; $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $getSemYearANDType = "$getSemYearMsg $cerNamtToMsg"; @@ -240,7 +242,7 @@ $WithoutspaceStatus = preg_replace('/\s+/', '', $UpperstatusToMsg); $this->db->from(PICK_LIST_DETAILS); $this->db->where('ListCode', $listCode); $statusDetails = $this->db->get()->first_row(); - if ($statusDetails->ListName == 'RECEIVED' || $statusDetails->ListName == 'ISSUED') { + if ($statusDetails->ListName == 'RECEIVED' || $statusDetails->ListName == 'ISSUED TO STUDENT') { return true; } else { return false; @@ -349,6 +351,8 @@ $WithoutspaceStatus = preg_replace('/\s+/', '', $UpperstatusToMsg); } public function get_status_name_ListCode($listCode) { + + //echo $listCode;die(); $this->db->select('ListName'); $this->db->from(PICK_LIST_DETAILS); $this->db->where('ListCode', $listCode); @@ -378,9 +382,11 @@ $WithoutspaceStatus = preg_replace('/\s+/', '', $UpperstatusToMsg); $UpperstatusToMsg = strtoupper($statuToMsg); $WithoutspaceStatus = preg_replace('/\s+/', '', $UpperstatusToMsg); - //echo $WithoutspaceStatus;die(); + // echo $WithoutspaceStatus; // $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']); - if( $WithoutspaceStatus = 'RECEIVEDFROMSTUDENT'){ + if( $WithoutspaceStatus == 'RECEIVEDFROMSTUDENT'){ + + $cerNamtToMsg = 'Answer booklet'; $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $getSemYearANDType = "$getSemYearMsg"; @@ -1093,13 +1099,16 @@ $this->db->insert_batch('T_BroadcastStatus', $data); join T_PickListDetails on T_AnswerBookletStatus.ListCode=T_PickListDetails.ListCode where T_AnswerBookletStatus.StudentID=? and T_AnswerBookletStatus.CreatedOn=(select max(CreatedOn) from T_AnswerBookletStatus - where StudentID= ?) and Sem=? and CourseID=?'; + where StudentID= ? and Sem=?) and Sem=? and CourseID=?'; - $query = $this->db->query($subQuery,array($StudentID,$StudentID,$Sem,$CourseID)); + $query = $this->db->query($subQuery,array($StudentID,$StudentID,$Sem,$Sem,$CourseID)); $expense = $query->result(); - //print_r($expense);die(); + // print_r($expense);die(); + + + // print_r($this->db->last_query()); $latestappstatus=''; @@ -1131,7 +1140,7 @@ $this->db->insert_batch('T_BroadcastStatus', $data); $LastListname= $ty->ListName; } - //echo $LastListname;die(); + // echo $LastListname;die(); return $LastListname; diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index f6ff8910..fece2006 100755 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -568,17 +568,10 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " $scope.showRowLines = true; $scope.rowAlternationEnabled = true; $scope.adYeargrid = { - showBorders: true, columnAutoWidth: true, //columnWidth: 100, - caption: { - title: 'DAYBOOK DETAILS', - width: '300px', - style: 'font-size:50px;color:blue;' - }, - "export": { enabled: true, fileName: "AdmissionsYear",