This commit is contained in:
dineshkumarkannan 2018-04-24 09:23:50 +05:30
commit ecabc61026
7 changed files with 104 additions and 69 deletions

View File

@ -169,7 +169,9 @@ class Fees_Status_Controller extends REST_Controller {
* */ * */
public function getUniversityCourseForFees_post() public function getUniversityCourseForFees_post()
{ {
$getUnivDetails = $this->Fees_model->getUniversityDetails(); $requestedBy = $this->post('requestedBy');
$requestedBranch = $this->post('branchCode');
$getUnivDetails = $this->Fees_model->getUniversityDetails($requestedBy,$requestedBranch);
if ($getUnivDetails) if ($getUnivDetails)
{ {
$getUnivDetails['status'] = REST_Controller::HTTP_OK; $getUnivDetails['status'] = REST_Controller::HTTP_OK;
@ -202,6 +204,7 @@ class Fees_Status_Controller extends REST_Controller {
$student['requestedBy'] = $this->post('requestedtBy'); $student['requestedBy'] = $this->post('requestedtBy');
$student['CourseID'] = $this->post('courseID'); $student['CourseID'] = $this->post('courseID');
$student['StudentID'] = $this->post('studentID'); $student['StudentID'] = $this->post('studentID');
$student['BranchCode'] = $this->post('branchCode');
$getStudentFeesDetails = $this->Fees_model->getFeesStructureAssign($student); $getStudentFeesDetails = $this->Fees_model->getFeesStructureAssign($student);
if ($getStudentFeesDetails) if ($getStudentFeesDetails)
{ {

View File

@ -169,6 +169,7 @@ class University_Controller extends REST_Controller {
$details['CreatedBy'] = $this->post('createdBy'); $details['CreatedBy'] = $this->post('createdBy');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s'); $details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$details['IsActive'] = $this->post('status'); $details['IsActive'] = $this->post('status');
$details['BranchCode'] = $this->post('branchCode');
$jsonData=$this->post('activityStatus'); $jsonData=$this->post('activityStatus');
$activityDetails = $this->university_model->addActivity($details,$jsonData);// Check if the users data store contains users (in case the database result returns NULL) $activityDetails = $this->university_model->addActivity($details,$jsonData);// Check if the users data store contains users (in case the database result returns NULL)
if ($activityDetails) { if ($activityDetails) {
@ -189,7 +190,8 @@ class University_Controller extends REST_Controller {
public function getActivityDetails_post() public function getActivityDetails_post()
{ {
$requestedBy = $this->post('requestedBy'); $requestedBy = $this->post('requestedBy');
$getActivity = $this->university_model->getActivity($requestedBy); $requestedBranch = $this->post('branchCode');
$getActivity = $this->university_model->getActivity($requestedBy,$requestedBranch);
if ($getActivity) if ($getActivity)
{ {
$getActivity['status'] = REST_Controller::HTTP_OK; $getActivity['status'] = REST_Controller::HTTP_OK;
@ -220,6 +222,7 @@ class University_Controller extends REST_Controller {
$details['IsActive'] = $this->post('status'); $details['IsActive'] = $this->post('status');
$details['UpdatedBy'] = $this->post('updatedBy'); $details['UpdatedBy'] = $this->post('updatedBy');
$details['UpdatedOn'] = $now->format('Y-m-d H:i:s'); $details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
$details['BranchCode'] = $this->post('branchCode');
$jsonData=$this->post('activityStatus'); $jsonData=$this->post('activityStatus');
$activityDetails = $this->university_model->updateActivity($details,$jsonData);// Check if the users data store contains users (in case the database result returns NULL) $activityDetails = $this->university_model->updateActivity($details,$jsonData);// Check if the users data store contains users (in case the database result returns NULL)

View File

@ -27,6 +27,8 @@ class Fees_status_model extends CI_Model
$this->db->where('STC.IsActive','1'); $this->db->where('STC.IsActive','1');
if($search['requestedBranch']!='All'){ if($search['requestedBranch']!='All'){
$this->db->where('STC.BranchID',$search['requestedBranch']); $this->db->where('STC.BranchID',$search['requestedBranch']);
$this->db->where('US.BranchCode',$search['requestedBranch']);
$this->db->where('CU.BranchCode',$search['requestedBranch']);
} }
if($search['MobileNumber']!=''){ if($search['MobileNumber']!=''){
$this->db->where('ST.MobileNumber',$search['MobileNumber']); $this->db->where('ST.MobileNumber',$search['MobileNumber']);
@ -78,6 +80,7 @@ class Fees_status_model extends CI_Model
* created by kms * created by kms
* */ * */
public function getStudentFeesStructure($student=null){ public function getStudentFeesStructure($student=null){
$this->db->distinct();
$this->db->select('CF.ID,CF.Sem_Year,CF.ProgramType,SFS.FeesID,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees,SM.SessionName as SessionName,SM1.SessionName as ToSessionName,BA.BatchCode,BA.BatchName'); $this->db->select('CF.ID,CF.Sem_Year,CF.ProgramType,SFS.FeesID,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees,SM.SessionName as SessionName,SM1.SessionName as ToSessionName,BA.BatchCode,BA.BatchName');
$this->db->from(STUDENTS_FEES_STATUS.' as SFS'); $this->db->from(STUDENTS_FEES_STATUS.' as SFS');
$this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName'); $this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName');
@ -87,6 +90,7 @@ class Fees_status_model extends CI_Model
$this->db->join(COURSE.' as CU', 'CU.CourseID = CF.CourseID'); $this->db->join(COURSE.' as CU', 'CU.CourseID = CF.CourseID');
$this->db->where('SFS.CourseID',$student['CourseID']); $this->db->where('SFS.CourseID',$student['CourseID']);
$this->db->where('SFS.StudentID',$student['StudentID']); $this->db->where('SFS.StudentID',$student['StudentID']);
$this->db->where('BA.BranchCode',$student['BranchCode']);
$enrolledFeesDetails = $this->db->get(); $enrolledFeesDetails = $this->db->get();
if($enrolledFeesDetails->result()){ if($enrolledFeesDetails->result()){
$result_array['feesStatus']=true; $result_array['feesStatus']=true;
@ -662,11 +666,12 @@ class Fees_status_model extends CI_Model
* get university details * get university details
* created by kms * created by kms
* */ * */
public function getUniversityDetails() public function getUniversityDetails($requestedBy=null,$requestedBranch=null)
{ {
$this->db->select('UniversityID,UniversityName'); $this->db->select('UniversityID,UniversityName');
$this->db->where('IsActive','1'); $this->db->where('IsActive','1');
$this->db->order_by('UniversityID','ASC'); $this->db->where('BranchCode',$requestedBranch);
$this->db->order_by('CreatedOn','DESC');
$unviversityDetails = $this->db->get(UNIVERSITY); $unviversityDetails = $this->db->get(UNIVERSITY);
if($unviversityDetails->result()){ if($unviversityDetails->result()){
@ -677,7 +682,7 @@ class Fees_status_model extends CI_Model
$university_array['universityID'] = $row->UniversityID; $university_array['universityID'] = $row->UniversityID;
$university_array['universityName'] = $row->UniversityName; $university_array['universityName'] = $row->UniversityName;
$university_array['courseDetails']= $this->getCourseDetails($row->UniversityID); $university_array['courseDetails']= $this->getCourseDetails($row->UniversityID,$requestedBranch);
$result_array[]=$university_array; $result_array[]=$university_array;
} }
$result_university['univerSityDetails']= $result_array; $result_university['univerSityDetails']= $result_array;
@ -699,11 +704,12 @@ class Fees_status_model extends CI_Model
* @params university id * @params university id
* created by kms * created by kms
* */ * */
public function getCourseDetails($universityID=null) public function getCourseDetails($universityID=null,$requestedBranch=null)
{ {
$this->db->select('CourseID,CONCAT(CourseName, "(",CourseCode,")") AS CourseName'); $this->db->select('CourseID,CONCAT(CourseName, "(",CourseCode,")") AS CourseName');
$this->db->where('UniversityID',$universityID); $this->db->where('UniversityID',$universityID);
$this->db->where('IsActive','1'); $this->db->where('IsActive','1');
$this->db->where('BranchCode',$requestedBranch);
$this->db->order_by('CourseID','ASC'); $this->db->order_by('CourseID','ASC');
$courseDetails = $this->db->get(COURSE); $courseDetails = $this->db->get(COURSE);
return $courseDetails->result(); return $courseDetails->result();
@ -713,7 +719,6 @@ class Fees_status_model extends CI_Model
* created by kms * created by kms
* */ * */
public function getFeesStructureAssign($student=null){ public function getFeesStructureAssign($student=null){
$this->db->select('ID,CourseID,ProgramType,FeesAmount,Sem_Year'); $this->db->select('ID,CourseID,ProgramType,FeesAmount,Sem_Year');
$this->db->where('CourseID',$student['CourseID']); $this->db->where('CourseID',$student['CourseID']);
$this->db->order_by('ProgramType'); $this->db->order_by('ProgramType');
@ -768,7 +773,7 @@ class Fees_status_model extends CI_Model
} }
$batchDetails = $this->getBatchDetails($existData[0]->BatchCode,$student['CourseID'],$student['StudentID'],$row->ID); $batchDetails = $this->getBatchDetails($existData[0]->BatchCode,$student['CourseID'],$student['StudentID'],$row->ID,$student['BranchCode']);
if($batchDetails!=false){ if($batchDetails!=false){
$fetchData['batchDetails']=$batchDetails; $fetchData['batchDetails']=$batchDetails;
} }
@ -799,7 +804,7 @@ class Fees_status_model extends CI_Model
$fetchData['PayableFees']=$row->FeesAmount; $fetchData['PayableFees']=$row->FeesAmount;
// for installment details // for installment details
$fetchData['InstallmentDetails']=""; $fetchData['InstallmentDetails']="";
$batchDetails = $this->getBatchDetails('',$student['CourseID'],$student['StudentID'],''); $batchDetails = $this->getBatchDetails('',$student['CourseID'],$student['StudentID'],'',$student['BranchCode']);
if($batchDetails!=false){ if($batchDetails!=false){
$fetchData['batchDetails']=$batchDetails; $fetchData['batchDetails']=$batchDetails;
} }
@ -856,7 +861,7 @@ class Fees_status_model extends CI_Model
* get batch details * get batch details
* created by kms * created by kms
* */ * */
public function getBatchDetails($batchCode=null,$courseID=null,$studentID=null,$feesType=null){ public function getBatchDetails($batchCode=null,$courseID=null,$studentID=null,$feesType=null,$branchCode=null){
if($batchCode=='' OR $batchCode==null){ if($batchCode=='' OR $batchCode==null){
$this->db->select('BA.BatchCode,BA.BatchName,BA.BatchDate,BA.IsDefault,US.UniversityID,US.UniversityName,BA.IsActive'); $this->db->select('BA.BatchCode,BA.BatchName,BA.BatchDate,BA.IsDefault,US.UniversityID,US.UniversityName,BA.IsActive');
$this->db->from(COURSE.' as CU'); $this->db->from(COURSE.' as CU');
@ -865,6 +870,9 @@ class Fees_status_model extends CI_Model
$this->db->order_by('BA.CreatedOn','DESC'); $this->db->order_by('BA.CreatedOn','DESC');
$this->db->where('CU.CourseID',$courseID); $this->db->where('CU.CourseID',$courseID);
$this->db->where('BA.IsActive','1'); $this->db->where('BA.IsActive','1');
$this->db->where('BA.BranchCode',$branchCode);
$this->db->where('US.BranchCode',$branchCode);
$batchDetails = $this->db->get(); $batchDetails = $this->db->get();
if($batchDetails->result()){ if($batchDetails->result()){
@ -887,6 +895,8 @@ class Fees_status_model extends CI_Model
$this->db->where('CU.CourseID',$courseID); $this->db->where('CU.CourseID',$courseID);
$this->db->where('STF.StudentID',$studentID); $this->db->where('STF.StudentID',$studentID);
$this->db->where('STF.FeesType',$feesType); $this->db->where('STF.FeesType',$feesType);
$this->db->where('BA.BranchCode',$branchCode);
$this->db->where('US.BranchCode',$branchCode);
$batchDetails = array(); $batchDetails = array();
/* $this->db->or_where('BA.IsActive','1'); /* $this->db->or_where('BA.IsActive','1');
@ -1602,8 +1612,11 @@ class Fees_status_model extends CI_Model
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = SD.UniversityID'); $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = SD.UniversityID');
$this->db->join(COURSE.' as CU', 'CU.UniversityID = US.UniversityID'); $this->db->join(COURSE.' as CU', 'CU.UniversityID = US.UniversityID');
// $this->db->where('SD.IsActive','1'); // $this->db->where('SD.IsActive','1');
$this->db->order_by('CU.CreatedOn','DESC'); // $this->db->order_by('CU.CreatedOn','DESC');
$this->db->order_by('SM.SessionID','DESC');
$this->db->where('CU.CourseID',$details['CourseID']); $this->db->where('CU.CourseID',$details['CourseID']);
$this->db->where('US.BranchCode',$details['BranchCode']);
$this->db->where('SM.BranchCode',$details['BranchCode']);
// $this->db->group_by('SM.SessionName','DESC'); // $this->db->group_by('SM.SessionName','DESC');
$sessionDetails = $this->db->get(); $sessionDetails = $this->db->get();
if($sessionDetails->result()){ if($sessionDetails->result()){

View File

@ -94,40 +94,38 @@ class University_model extends CI_Model
public function addActivity($arrayDetails=null,$jsonData=null) public function addActivity($arrayDetails=null,$jsonData=null)
{ {
$this->db->select('ActivityID,ActivityName'); $this->db->select('ActivityID,ActivityName');
$this->db->where('ActivityName', $arrayDetails['ActivityName']); $this->db->where('ActivityName', $arrayDetails['ActivityName']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
if($this->db->get(ACTIVITY)->first_row()){
$result['activityStatus'] = false;
$result['message'] = "Activity name is already exist!";
}
else{
$this->db->insert(ACTIVITY, $arrayDetails);
if($this->db->affected_rows() == '1'){
$last = $this->db->order_by('ActivityID',"desc")->limit(1)->get(ACTIVITY)->row();
$lastActivityID=$last->ActivityID;
if($this->db->get(ACTIVITY)->first_row()){ if($jsonData){
foreach ($jsonData as $srow){
$status_array["StatusName"]=$srow['id'];
$status_array["ActivityID"]=$lastActivityID;
$status_array["IsActive"]=$arrayDetails['IsActive'];
$status_array["CreatedBy"]=$arrayDetails['CreatedBy'];
$status_array["CreatedOn"]=$arrayDetails['CreatedOn'];
$this->db->insert(ACTIVITY_STATUS, $status_array);
}
}
$result['activityStatus'] = true;
$result['message'] = "Successfully activity details added";
}
else {
$result['activityStatus'] = false; $result['activityStatus'] = false;
$result['message'] = "Activity name is already exist!"; $result['message'] = "Something went wrong.please try again";
}
else{
$this->db->insert(ACTIVITY, $arrayDetails);
if($this->db->affected_rows() == '1'){
$last = $this->db->order_by('ActivityID',"desc")->limit(1)->get(ACTIVITY)->row();
$lastActivityID=$last->ActivityID;
if($jsonData){
foreach ($jsonData as $srow){
$status_array["StatusName"]=$srow['id'];
$status_array["ActivityID"]=$lastActivityID;
$status_array["IsActive"]=$arrayDetails['IsActive'];
$status_array["CreatedBy"]=$arrayDetails['CreatedBy'];
$status_array["CreatedOn"]=$arrayDetails['CreatedOn'];
$this->db->insert(ACTIVITY_STATUS, $status_array);
}
}
$result['activityStatus'] = true;
$result['message'] = "Successfully activity details added";
}
else {
$result['activityStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
} }
}
@ -141,11 +139,12 @@ class University_model extends CI_Model
* created by Surendiran * created by Surendiran
* */ * */
public function getActivity() public function getActivity($requestedBy=null,$requestedBranch=null)
{ {
$this->db->distinct(); $this->db->distinct();
$this->db->select('ActivityID,ActivityName,Description,IsActive'); $this->db->where('BranchCode',$requestedBranch);
$this->db->order_by('ActivityID','DESC'); $this->db->order_by('ActivityID','DESC');
$this->db->select('ActivityID,ActivityName,Description,IsActive');
$activityDetails=$this->db->get(ACTIVITY); $activityDetails=$this->db->get(ACTIVITY);
if($activityDetails->result()){ if($activityDetails->result()){
@ -172,7 +171,7 @@ class University_model extends CI_Model
$activity_result['activityStatus'] = false; $activity_result['activityStatus'] = false;
$activity_result['details'] = "No records found!"; $activity_result['details'] = "No records found!";
} }
$activity_result['masterStatusList']=$this->getAllStatusList('1'); $activity_result['masterStatusList']=$this->getAllStatusList('1',$requestedBranch);
return $activity_result; return $activity_result;
} }
@ -202,6 +201,7 @@ class University_model extends CI_Model
$this->db->select('ActivityName'); $this->db->select('ActivityName');
$this->db->where('ActivityName',$arrayDetails['ActivityName']); $this->db->where('ActivityName',$arrayDetails['ActivityName']);
$this->db->where('ActivityID !=',$arrayDetails['ActivityID']); $this->db->where('ActivityID !=',$arrayDetails['ActivityID']);
$this->db->where('BranchCode',$arrayDetails['BranchCode']);
if($this->db->get(ACTIVITY)->first_row()){ if($this->db->get(ACTIVITY)->first_row()){
$result['activityStatus'] = false; $result['activityStatus'] = false;
$result['message'] = "Activity name is already exist!"; $result['message'] = "Activity name is already exist!";

View File

@ -105,7 +105,8 @@ if(myModel.status.length > 0) {
description: myModel.Description, description: myModel.Description,
status: myModel.switchsetting, status: myModel.switchsetting,
activityStatus:myModel.status, activityStatus:myModel.status,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };
$http(addactivity).then(function (response) { $http(addactivity).then(function (response) {
@ -114,7 +115,11 @@ if(myModel.status.length > 0) {
$scope.init(); $scope.init();
swal("","Activity details added successfully.", "success"); swal("","Activity details added successfully.", "success");
$state.go($state.current, {}, { reload: true }); $state.go($state.current, {}, { reload: true });
} else { }
else if(response.data.activityStatus==false){
swal("",response.data.message, "warning");
}
else {
$scope.ldloading[loading.replace('-', '_')] = false; $scope.ldloading[loading.replace('-', '_')] = false;
swal(" ", "Something went wrong.please try again.", "error"); swal(" ", "Something went wrong.please try again.", "error");
} }
@ -149,7 +154,8 @@ swal("Warning!", "Status are required", "warning");
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };
$http(getActivity).then(function (response) { $http(getActivity).then(function (response) {
@ -224,7 +230,8 @@ swal("Warning!", "Status are required", "warning");
description: myModel.Description, description: myModel.Description,
status: myModel.IsActive, status: myModel.IsActive,
activityStatus:listStatus.list, activityStatus:listStatus.list,
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };
$http(update).then(function (response) { $http(update).then(function (response) {
@ -236,7 +243,11 @@ swal("Warning!", "Status are required", "warning");
$scope.editId = -1; $scope.editId = -1;
} else { }
else if(response.data.activityStatus==false){
swal("",response.data.message, "warning");
}
else {
$scope.ldloading3[loading.replace('-', '_')] = false; $scope.ldloading3[loading.replace('-', '_')] = false;
swal(" ","Something went wrong.please try again", "error"); swal(" ","Something went wrong.please try again", "error");
} }

View File

@ -95,7 +95,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };
$http(getUniv).then(function (response) { $http(getUniv).then(function (response) {
@ -625,6 +627,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID, createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
installmentItems:$rootScope.updateMoreItems, installmentItems:$rootScope.updateMoreItems,
batchCode:updateModel.BatchCode, batchCode:updateModel.BatchCode,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };
@ -681,7 +684,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
ID:ID, ID:ID,
courseID: courseID, courseID: courseID,
studentID: studeID, studentID: studeID,
requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };
$http(getFees).then(function (response) { $http(getFees).then(function (response) {
@ -741,7 +745,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
ID:ID, ID:ID,
courseID: courseID, courseID: courseID,
studentID: studeID, studentID: studeID,
requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };
$http(setFees).then(function (response) { $http(setFees).then(function (response) {

View File

@ -8,52 +8,52 @@
</legend> </legend>
<div class="row"> <div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.ListCode.$dirty && Form.ListCode.$invalid, 'has-success':Form.ListCode.$valid}"> <div class="col-md-4 form-group" ng-class="{'has-error':Form.EditActivityID.$dirty && Form.EditActivityID.$invalid, 'has-success':Form.EditActivityID.$valid}">
<label> <label>
Activity ID<span class="symbol required"></span> Activity ID<span class="symbol required"></span>
</label> </label>
<input type="text" placeholder="Enter Activity ID" tabindex="1" class="form-control" name="ActivityID" ng-model="p.ActivityID" <input type="text" placeholder="Enter Activity ID" tabindex="6" class="form-control" name="EditActivityID" ng-model="p.ActivityID"
readonly required/> readonly required/>
<span class="error text-small block" ng-if="Form.ListCode.$dirty && Form.ListCode.$error.required">Activity ID is required</span> <span class="error text-small block" ng-if="Form.EditActivityID.$dirty && Form.EditActivityID.$error.required">Activity ID is required</span>
</div> </div>
<div class="col-md-4 form-group" ng-class="{'has-error':Form.ListName.$dirty && Form.ListName.$invalid, 'has-success':Form.ListName.$valid}"> <div class="col-md-4 form-group" ng-class="{'has-error':Form.EditActivityName.$dirty && Form.EditActivityName.$invalid, 'has-success':Form.EditActivityName.$valid}">
<label> <label>
Activity Name <span class="symbol required"></span> Activity Name <span class="symbol required"></span>
</label> </label>
<input type="text" placeholder="Enter Activity Name" tabindex="2" class="form-control" name="ListName" ng-model="p.ActivityName" <input type="text" placeholder="Enter Activity Name" tabindex="7" class="form-control" name="EditActivityName" ng-model="p.ActivityName"
required/> required/>
<span class="error text-small block" ng-if="Form.ListName.$dirty && Form.ListName.$error.required">Activity name is required</span> <span class="error text-small block" ng-if="Form.EditActivityName.$dirty && Form.EditActivityName.$error.required">Activity name is required</span>
<span class="error text-small block" ng-if="Form.ListName.$dirty && Form.ListName.$error.pattern">Invalid activity name </span> <span class="error text-small block" ng-if="Form.EditActivityName.$dirty && Form.EditActivityName.$error.pattern">Invalid activity name </span>
</div> </div>
<div class="col-md-4 form-group" ng-class="{'has-error':Form.Description.$dirty && Form.Description.$invalid, 'has-success':Form.Description.$valid}"> <div class="col-md-4 form-group" ng-class="{'has-error':Form.EditDescription.$dirty && Form.EditDescription.$invalid, 'has-success':Form.EditDescription.$valid}">
<label> <label>
Description <span class="symbol required"></span> Description <span class="symbol required"></span>
</label> </label>
<input type="text" placeholder="Enter Description Name" tabindex="3" class="form-control" name="Description" ng-model="p.Description" <input type="text" placeholder="Enter Description Name" tabindex="8" class="form-control" name="EditDescription" ng-model="p.Description"
required/> required/>
<span class="error text-small block" ng-if="Form.Description.$dirty && Form.Description.$error.required">Description is required</span> <span class="error text-small block" ng-if="Form.EditDescription.$dirty && Form.EditDescription.$error.required">Description is required</span>
<span class="error text-small block" ng-if="Form.Description.$dirty && Form.Description.$error.pattern">Invalid description </span> <span class="error text-small block" ng-if="Form.EditDescription.$dirty && Form.EditDescription.$error.pattern">Invalid description </span>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':Form.status.$dirty && Form.status.$invalid && viewEditStatus.list.length==0, 'has-success':Form.status.$valid}"> ng-class="{'has-error':Form.EditStatus.$dirty && Form.EditStatus.$invalid && viewEditStatus.list.length==0, 'has-success':Form.EditStatus.$valid}">
<label > <label >
Status<span Status<span
class="symbol required"></span> class="symbol required"></span>
</label> </label>
<ui-select multiple ng-model="viewEditStatus.list" tabindex="4"> <ui-select multiple ng-model="viewEditStatus.list" tabindex="9">
<ui-select-match placeholder="Select Status"> <ui-select-match placeholder="Select Status">
{{$item.name}} {{$item.name}}
</ui-select-match> </ui-select-match>
@ -63,11 +63,11 @@
</ui-select-choices> </ui-select-choices>
</ui-select> </ui-select>
<input class="ng-hide" name="status" <input class="ng-hide" name="EditStatus"
ng-model="viewEditStatus.list" ng-model="viewEditStatus.list"
required> required>
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.status.$dirty && Form.status.$error.required && viewEditStatus.list.length==0">Status is required.</span> ng-if="Form.EditStatus.$dirty && Form.EditStatus.$error.required && viewEditStatus.list.length==0">Status is required.</span>
<!--<span class="success text-small block"--> <!--<span class="success text-small block"-->
<!--ng-if="Form.subjects.$valid && myModel.subjects.length!=0">Thank You</span>--> <!--ng-if="Form.subjects.$valid && myModel.subjects.length!=0">Thank You</span>-->
</div> </div>
@ -97,11 +97,11 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="pull-right"> <div class="pull-right">
<button type="submit" ladda="ldloading3.zoom_in" tabindex="5" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateActivity(p,viewEditStatus,Form,'zoom-in')"> <button type="submit" ladda="ldloading3.zoom_in" tabindex="10" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateActivity(p,viewEditStatus,Form,'zoom-in')">
Save Save
</button> </button>
<input type="button" class="btn btn-warning btn-wide" tabindex="6" value="Cancel" ng-click="cancel();"> <input type="button" class="btn btn-warning btn-wide" tabindex="11" value="Cancel" ng-click="cancel();">
</input> </input>
</div> </div>