Merge branch 'master' of https://bitbucket.org/venbainformationtechnology/apollodec
This commit is contained in:
commit
9779c5c5fa
@ -183,6 +183,9 @@ class Call_Tracking_Controller extends REST_Controller {
|
||||
$update_followup_details['AssignedTo'] = $this->post('assignedTo');
|
||||
$update_followup_details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
|
||||
$update_followup_details['CreatedBranch'] = $this->post('branchId');
|
||||
$update_followup_details['Address'] = $this->post('address');
|
||||
$update_followup_details['AlternateMobile'] = $this->post('alternateMobile');
|
||||
$update_followup_details['ReferredBy'] = $this->post('referredBy');
|
||||
// store followup details for insert
|
||||
$followup_details['TrackingID'] = $this->post('trackingID');
|
||||
$followup_details['FollowupOn'] = $this->post('date');
|
||||
|
||||
@ -137,6 +137,7 @@ class Course_Controller extends REST_Controller {
|
||||
$details['CourseID'] = $this->post('courseID');
|
||||
$details['CourseCode'] = $this->post('courseCode');
|
||||
$details['CourseName'] = $this->post('courseName');
|
||||
$details['UniversityID'] = $this->post('universityID');
|
||||
$details['Specilization1'] = $this->post('specilization1');
|
||||
$details['Specilization2'] = $this->post('specilization2');
|
||||
$details['IsActive'] = $this->post('status');
|
||||
|
||||
@ -557,7 +557,7 @@ class Calltracking_model extends CI_Model {
|
||||
$upateStatus = $this->db->update(LEAD_TRACKING, $updateDetails);
|
||||
$result['followupStatus'] = true;
|
||||
$result['trackingID'] = $updateDetails['TrackingID'];
|
||||
$result['message'] = "Successfully followup details added";
|
||||
$result['message'] = "Successfully followup details updated";
|
||||
} else {
|
||||
$result['followupStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
@ -586,7 +586,7 @@ class Calltracking_model extends CI_Model {
|
||||
|
||||
public function getLoadFollowupDetails($trackingID)
|
||||
{
|
||||
$this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.CreatedBranch,BR.BranchName,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName');
|
||||
$this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.CreatedBranch,BR.BranchName,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,LT.ReferredBy,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName');
|
||||
$this->db->from(LEAD_DETAILS.' as LD');
|
||||
$this->db->join(LEAD_TRACKING.' as LT', 'LT.LeadID = LD.LeadID');
|
||||
$this->db->join(LOGIN.' as LO', 'LO.ID = LT.AssignedTo');
|
||||
@ -635,6 +635,7 @@ class Calltracking_model extends CI_Model {
|
||||
$tracking_array["ActivityName"]=$row->ActivityName;
|
||||
$tracking_array["AlternateMobile"]=$row->AlternateMobile;
|
||||
$tracking_array["Address"]=$row->Address;
|
||||
$tracking_array["ReferredBy"]=$row->ReferredBy;
|
||||
$tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID);
|
||||
$tracking_array["collectTrackedID"]=$this->getStudentTrackedID($row->MobileNumber,$trackingID['CreatedBranch'],$trackingID['requestedDept'],$trackingID['UpdatedBy']);
|
||||
|
||||
|
||||
@ -17,12 +17,12 @@ class Course_model extends CI_Model {
|
||||
|
||||
public function addCourse($arrayDetails=null,$jsonSemFeesData=null,$subjectDetails=null)
|
||||
{
|
||||
|
||||
$this->db->select('CourseCode');
|
||||
$this->db->where('CourseCode', $arrayDetails['CourseCode']);
|
||||
$this->db->where('UniversityID', $arrayDetails['UniversityID']);
|
||||
if($this->db->get(COURSE)->first_row()){
|
||||
$result['courseStatus'] = false;
|
||||
$result['message'] = "This course id is already exist!";
|
||||
$result['message'] = "This course id is already exist in same university";
|
||||
} else {
|
||||
$this->db->insert(COURSE, $arrayDetails);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
@ -132,10 +132,11 @@ class Course_model extends CI_Model {
|
||||
{
|
||||
$this->db->select('CourseCode');
|
||||
$this->db->where('CourseCode', $arrayDetails['CourseCode']);
|
||||
$this->db->where('UniversityID', $arrayDetails['UniversityID']);
|
||||
$this->db->where('CourseID !=', $arrayDetails['CourseID']);
|
||||
if($this->db->get(COURSE)->first_row()){
|
||||
$result['courseStatus'] = false;
|
||||
$result['message'] = "This course id is already exist!";
|
||||
$result['message'] = "This course id is already exist in same university";
|
||||
}
|
||||
else{
|
||||
$this->db->where('CourseID',$arrayDetails['CourseID']);
|
||||
|
||||
@ -1152,10 +1152,12 @@ class Fees_status_model extends CI_Model
|
||||
|
||||
|
||||
// this is for expense come entry
|
||||
$now1 = new DateTime();
|
||||
$now1->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
|
||||
$expenseArray['Date'] = $data['BillDate'];
|
||||
$expenseArray['CreatedBy'] = $data['CreatedBy'];
|
||||
$expenseArray['CreatedOn'] = $data['CreatedOn'];
|
||||
$expenseArray['CreatedOn'] = $now1->format('Y-m-d H:i:s');;
|
||||
$expenseArray['Description'] = $data['InternalComments'];
|
||||
$expenseArray['Amount'] = $data['BillAmount'];
|
||||
$expenseArray['Status'] = 'Approved';
|
||||
|
||||
@ -1427,7 +1427,26 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
* update the follow up details
|
||||
* created by kms
|
||||
* */
|
||||
$rootScope.updateFollowup = function (followupDetails,myModel1, loading) {
|
||||
$rootScope.updateFollowup = function (form,followupDetails,myModel1, loading) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
}
|
||||
else{
|
||||
|
||||
if(isNaN(myModel1.date)){
|
||||
$scope.nextFollowupDate = myModel1.date;
|
||||
|
||||
@ -1479,6 +1498,9 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
comments: myModel1.comments,
|
||||
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: $scope.updateBranchID,
|
||||
address: myModel1.Address,
|
||||
alternateMobile: myModel1.AlternateMobile,
|
||||
referredBy: myModel1.ReferredBy,
|
||||
}
|
||||
};
|
||||
$http(update).then(function (response) {
|
||||
@ -1493,6 +1515,7 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
$rootScope.loadFollowupDetails = function (trackID) {
|
||||
|
||||
@ -1515,8 +1538,13 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
if (response.data.status==200 && response.data.followupStatus) {
|
||||
$rootScope.followupDetails=response.data.trackingDetails[0];
|
||||
$rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||
if($rootScope.followupDetails.followupDetails[0].FollowupOn.length==10){
|
||||
$rootScope.currentDate1 = new Date($rootScope.followupDetails.followupDetails[0].FollowupOn.substring(6,10)+'-'+$rootScope.followupDetails.followupDetails[0].FollowupOn.substring(3,5)+'-'+$rootScope.followupDetails.followupDetails[0].FollowupOn.substring(0,2));
|
||||
}
|
||||
else{
|
||||
$rootScope.currentDate1=new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||
|
||||
$rootScope.currentDate1=new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||
}
|
||||
|
||||
$rootScope.myModel1.date=$rootScope.followupDetails.followupDetails[0].FollowupOn;
|
||||
// get 30 plus date for follwup details
|
||||
@ -1527,6 +1555,9 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
$rootScope.trackingStatus=response.data.statusDetails;
|
||||
$rootScope.myModel1.branch=$rootScope.followupDetails.CreatedBranch;
|
||||
$rootScope.myModel1.assignStaff=$rootScope.followupDetails.AssignedTo;
|
||||
$rootScope.myModel1.AlternateMobile=$rootScope.followupDetails.AlternateMobile;
|
||||
$rootScope.myModel1.Address=$rootScope.followupDetails.Address;
|
||||
$rootScope.myModel1.ReferredBy=$rootScope.followupDetails.ReferredBy;
|
||||
$rootScope.staffArray='';
|
||||
$rootScope.staffDetails=response.data.staffDetails;
|
||||
if($scope.userType =='R004'){
|
||||
|
||||
@ -349,7 +349,7 @@
|
||||
max-date="futureDate"
|
||||
close-text="Close" required="required" ng-readonly="true"/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.date.$dirty && Form.date.$error.required">Followup Date is required.</span>
|
||||
ng-if="Form.date.$dirty && Form.date.$error.required">Followup date is required.</span>
|
||||
<!--<span class="success text-small block"-->
|
||||
<!--ng-if="Form.date.$valid ">Thank You</span>-->
|
||||
</div>
|
||||
@ -548,7 +548,7 @@
|
||||
ng-model="myModel.referedBy" ng-pattern="/^[a-zA-Z.\s]*$/"/>
|
||||
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.refered.$dirty && Form.refered.$error.pattern">Invalid refered by name </span>
|
||||
ng-if="Form.refered.$dirty && Form.refered.$error.pattern">Invalid referred by name </span>
|
||||
</div>
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.address.$dirty && Form.address.$invalid, 'has-success':Form.address.$valid}">
|
||||
|
||||
@ -33,13 +33,13 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 text-right">
|
||||
<button type="submit" class="btn btn-sm btn-azure" ng-click="previous(followupDetails.TrackingID);">
|
||||
<button type="submit" tabindex="1" class="btn btn-sm btn-azure" ng-click="previous(followupDetails.TrackingID);">
|
||||
Previous
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-azure" ng-click="next(followupDetails.TrackingID);">
|
||||
<button type="submit" tabindex="2" class="btn btn-sm btn-azure" ng-click="next(followupDetails.TrackingID);">
|
||||
Next
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-warning" ng-click="cancel();">
|
||||
<button type="submit" tabindex="3" class="btn btn-sm btn-warning" ng-click="cancel();">
|
||||
Cancel
|
||||
</button>
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="row">
|
||||
<form name="Form" id="form" novalidate method="post">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
@ -62,7 +63,7 @@
|
||||
<!--{{followupDetails | json}}-->
|
||||
<table class="table table-condensed" ng-controller="studentModalDemoCtrl">
|
||||
<thead>
|
||||
<tr >
|
||||
<tr>
|
||||
<th colspan="3">Contact Information</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -71,7 +72,7 @@
|
||||
<td class="text-primary">Student Name</td>
|
||||
<td><span class="text-blue text-bold">
|
||||
|
||||
<a tooltip="View Student" class="text-blue" ng-click="open(followupDetails);"> {{followupDetails.LeadName}}</a></span>
|
||||
<a tooltip="View Student" class="text-blue" ng-click="open(followupDetails);"> {{followupDetails.LeadName}}</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -92,16 +93,43 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alternate Mobile</td>
|
||||
<td>
|
||||
{{followupDetails.AlternateMobile}} </td>
|
||||
<td class="form-group"
|
||||
ng-class="{'has-error':Form.editAltermobilenumber.$dirty && Form.editAltermobilenumber.$invalid, 'has-success':Form.editAltermobilenumber.$valid}">
|
||||
|
||||
<input type="text" placeholder="Enter Alter Mobile Number"
|
||||
autofocus tabindex="4" class="form-control" name="editAltermobilenumber" id="altermobilenumber" ng-minlength="10" ng-maxlength="12"
|
||||
ng-model="myModel1.AlternateMobile" ng-pattern="/^[0-9]*$/" />
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.editAltermobilenumber.$error.maxlength || Form.editAltermobilenumber.$error.minlength || Form.editAltermobilenumber.$error.pattern">Enter a valid phone number</span>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Address</td>
|
||||
<td>
|
||||
{{followupDetails.Address}} </td>
|
||||
<textarea placeholder="Enter Address" tabindex="5"
|
||||
class="form-control textdsc" name="editaddress" rows="3"
|
||||
ng-model="myModel1.Address"></textarea>
|
||||
<!--<span class="error text-small block"
|
||||
ng-if="Form.address.$dirty && Form.address.$invalid">Address is required</span>-->
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Referred By</td>
|
||||
|
||||
<td class="form-group"
|
||||
ng-class="{'has-error':Form.refered.$dirty && Form.refered.$invalid, 'has-success':Form.refered.$valid}">
|
||||
|
||||
<input type="text" placeholder="Enter Referred By Name"
|
||||
tabindex="6" class="form-control" name="refered"
|
||||
ng-model="myModel1.ReferredBy" ng-pattern="/^[a-zA-Z.\s]*$/"/>
|
||||
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.refered.$dirty && Form.refered.$error.pattern">Invalid referred by name </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -122,13 +150,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Followup On</td>
|
||||
<td>
|
||||
<td class="form-group"
|
||||
ng-class="{'has-error':Form.date.$dirty && Form.date.$invalid, 'has-success':Form.date.$valid}">
|
||||
|
||||
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
|
||||
|
||||
<input type="text" tabindex="6"
|
||||
<input type="text" tabindex="7"
|
||||
class="form-control "
|
||||
ng-click="startOpen = !startOpen"
|
||||
datepicker-popup="dd-MM-yyyy"
|
||||
@ -141,10 +170,10 @@
|
||||
min-date="currentDate1"
|
||||
max-date="futureDate1"
|
||||
close-text="Close" required="required" ng-readonly="true"/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.date.$dirty && Form.date.$error.required">Date is required.</span>
|
||||
<!--<span class="success text-small block"-->
|
||||
<!--ng-if="Form.date.$valid ">Thank You</span>-->
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.date.$dirty && Form.date.$error.required">Followup date is required.</span>
|
||||
</div>
|
||||
|
||||
|
||||
@ -154,7 +183,7 @@
|
||||
<tr ng-if="userType != 'R004'">
|
||||
<td>Assigned To</td>
|
||||
<td>
|
||||
<select class="form-control" name="status" id="Box4" tabindex="1"
|
||||
<select class="form-control" name="status" id="Box4" tabindex="8"
|
||||
ng-model="myModel1.assignStaff"
|
||||
ng-options="checkStaf.loginId as checkStaf.staffName for checkStaf in staffDetails"
|
||||
required>
|
||||
@ -167,7 +196,7 @@
|
||||
<tr ng-if="userType == 'R004'">
|
||||
<td>Select Branch</td>
|
||||
<td>
|
||||
<select class="form-control" name="status" id="Box43" tabindex="1"
|
||||
<select class="form-control" name="status" id="Box43" tabindex="9"
|
||||
ng-model="myModel1.branch"
|
||||
ng-options="checkBranch.BranchCode as checkBranch.BranchName for checkBranch in staffDetails" ng-change="changeBranch(myModel1.branch);"
|
||||
required>
|
||||
@ -181,7 +210,7 @@
|
||||
<tr ng-if="userType == 'R004'">
|
||||
<td>Assigned To</td>
|
||||
<td>
|
||||
<select class="form-control" name="status" id="Box44" tabindex="2"
|
||||
<select class="form-control" name="status" id="Box44" tabindex="10"
|
||||
ng-model="myModel1.assignStaff"
|
||||
ng-options="checkStaf.loginId as checkStaf.staffName for checkStaf in staffArray"
|
||||
required>
|
||||
@ -197,7 +226,7 @@
|
||||
<td><span class="label label-sm label-info">{{followupDetails.statusListName}}</span></td>
|
||||
-->
|
||||
<td>
|
||||
<select class="form-control" name="status" id="Box3" tabindex="2"
|
||||
<select class="form-control" name="status" id="Box3" tabindex="11"
|
||||
ng-model="myModel1.status"
|
||||
ng-options="checkStatus.ListCode as checkStatus.ListName for checkStatus in trackingStatus"
|
||||
required>
|
||||
@ -312,11 +341,11 @@
|
||||
<div class="panel-body" >
|
||||
<div class="col-md-8">
|
||||
|
||||
<textarea class="form-control text-dark" placeholder="Enter a comments" rows="2" ng-model="myModel1.comments"></textarea>
|
||||
<textarea tabindex="12" class="form-control text-dark" placeholder="Enter a comments" rows="2" ng-model="myModel1.comments"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-left">
|
||||
<button type="submit" ladda="ldloading2.zoom_in" class="btn btn-sm btn-success" data-style="zoom-in" ng-click="updateFollowup(followupDetails,myModel1,'zoom-in');">
|
||||
<button type="submit" ladda="ldloading2.zoom_in" class="btn btn-sm btn-success" tabindex="13" data-style="zoom-in" ng-click="updateFollowup(Form,followupDetails,myModel1,'zoom-in');">
|
||||
Save
|
||||
</button>
|
||||
|
||||
@ -331,7 +360,7 @@
|
||||
|
||||
<div class="panel panel-white" id="activities">
|
||||
<div class="panel-heading border-light">
|
||||
<h4 class="panel-title text-orange">Recent Activities</h4>
|
||||
<h4 class="panel-title text-orange">Comments History</h4>
|
||||
<paneltool class="panel-tools" tool-collapse="tool-collapse" tool-refresh="load1" tool-dismiss="tool-dismiss"></paneltool>
|
||||
</div>
|
||||
<div collapse="activities" ng-init="activities=false" class="panel-wrapper">
|
||||
@ -357,6 +386,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user