activity added
This commit is contained in:
parent
280c6aa338
commit
d490165321
@ -86,11 +86,11 @@ class University_model extends CI_Model
|
|||||||
// $this->db->where('Description', $arrayDetails['Description']);
|
// $this->db->where('Description', $arrayDetails['Description']);
|
||||||
$checkExistActivity = $this->db->get(PICK_LIST_DETAILS);
|
$checkExistActivity = $this->db->get(PICK_LIST_DETAILS);
|
||||||
|
|
||||||
if($checkExistActivity->result()){
|
// if($checkExistActivity->result()){
|
||||||
$result['activityStatus'] = false;
|
// $result['activityStatus'] = false;
|
||||||
$result['details'] = "This activity is already added";
|
// $result['details'] = "This activity is already added";
|
||||||
}
|
// }
|
||||||
else{
|
// else{
|
||||||
$this->db->insert(PICK_LIST_DETAILS, $arrayDetails);
|
$this->db->insert(PICK_LIST_DETAILS, $arrayDetails);
|
||||||
if($this->db->affected_rows() == '1'){
|
if($this->db->affected_rows() == '1'){
|
||||||
$result['activityStatus'] = true;
|
$result['activityStatus'] = true;
|
||||||
@ -100,7 +100,7 @@ class University_model extends CI_Model
|
|||||||
$result['activityStatus'] = false;
|
$result['activityStatus'] = false;
|
||||||
$result['message'] = "Something went wrong.please try again";
|
$result['message'] = "Something went wrong.please try again";
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -135,6 +135,7 @@ class University_model extends CI_Model
|
|||||||
* created by Surendiran
|
* created by Surendiran
|
||||||
* */
|
* */
|
||||||
public function updateActivity($arrayDetails=null,$ListCode=null) {
|
public function updateActivity($arrayDetails=null,$ListCode=null) {
|
||||||
|
|
||||||
$this->db->where('ListCode',$ListCode);
|
$this->db->where('ListCode',$ListCode);
|
||||||
$updateStatus=$this->db->update(PICK_LIST_DETAILS, $arrayDetails);
|
$updateStatus=$this->db->update(PICK_LIST_DETAILS, $arrayDetails);
|
||||||
if($updateStatus){
|
if($updateStatus){
|
||||||
|
|||||||
@ -19,7 +19,6 @@ app.controller("activityCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$
|
|||||||
* */
|
* */
|
||||||
$scope.editId = -1;
|
$scope.editId = -1;
|
||||||
$scope.setEditId = function (pid) {
|
$scope.setEditId = function (pid) {
|
||||||
|
|
||||||
$scope.editId = pid;
|
$scope.editId = pid;
|
||||||
$scope.viewId = -1;
|
$scope.viewId = -1;
|
||||||
};
|
};
|
||||||
@ -89,7 +88,7 @@ $scope.activityForm = {
|
|||||||
$state.go($state.current, {}, { reload: true });
|
$state.go($state.current, {}, { reload: true });
|
||||||
} else {
|
} else {
|
||||||
$scope.ldloading1[loading.replace('-', '_')] = false;
|
$scope.ldloading1[loading.replace('-', '_')] = false;
|
||||||
swal("Failed!", response.data.message, "error");
|
swal("Failed!", response.data.details, "error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -90,14 +90,13 @@
|
|||||||
|
|
||||||
</td>-->
|
</td>-->
|
||||||
<td>
|
<td>
|
||||||
<a href="#" class="text-azure" id="editRowBtn{{p.ListCode}}" ng-click="setEditId(p.ListCode);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
|
<a class="text-azure" id="editRowBtn{{p.ListCode}}" ng-click="setEditId(p.ListCode);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr ng-show="editId === p.ListCode" ng-if="editId === p.ListCode" >
|
<tr ng-show="editId === p.ListCode" ng-if="editId === p.ListCode" >
|
||||||
<td colspan="12" ng-include
|
<td colspan="12" ng-include src="'assets/views/editActivityDetails.html'"></td>
|
||||||
src="'assets/views/editActivityDetails.html'"></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
<!--<td>{{p.description}}</td>-->
|
<!--<td>{{p.description}}</td>-->
|
||||||
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">InActive</span></td>
|
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">InActive</span></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" class="text-azure" id="editRowBtn{{p.ID}}" ng-click="setEditId(p.ID);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
|
<a class="text-azure" id="editRowBtn{{p.ID}}" ng-click="setEditId(p.ID);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
|
||||||
</a></td>
|
</a></td>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,49 +8,38 @@
|
|||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 form-group"
|
<div class="col-md-3 form-group" ng-class="{'has-error':Form.ListCode.$dirty && Form.ListCode.$invalid, 'has-success':Form.ListCode.$valid}">
|
||||||
ng-class="{'has-error':Form.ListCode.$dirty && Form.ListCode.$invalid, 'has-success':Form.ListCode.$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"
|
<input type="text" placeholder="Enter Activity ID" tabindex="1" class="form-control" name="ActivityID" ng-model="p.ListCode"
|
||||||
tabindex="1" class="form-control" name="ActivityID"
|
readonly required/>
|
||||||
ng-model="p.ListCode" 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.ListCode.$dirty && Form.ListCode.$error.required">Activity ID is required</span>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3 form-group"
|
<div class="col-md-3 form-group" ng-class="{'has-error':Form.ListName.$dirty && Form.ListName.$invalid, 'has-success':Form.ListName.$valid}">
|
||||||
ng-class="{'has-error':Form.ListName.$dirty && Form.ListName.$invalid, 'has-success':Form.ListName.$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"
|
<input type="text" placeholder="Enter Activity Name" tabindex="1" class="form-control" name="ListName" ng-model="p.ListName"
|
||||||
tabindex="1" class="form-control" name="ListName"
|
required/>
|
||||||
ng-model="p.ListName" 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"
|
<span class="error text-small block" ng-if="Form.ListName.$dirty && Form.ListName.$error.pattern">Invalid Activity Name </span>
|
||||||
ng-if="Form.ListName.$dirty && Form.ListName.$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>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 form-group"
|
<div class="col-md-3 form-group" ng-class="{'has-error':Form.Description.$dirty && Form.Description.$invalid, 'has-success':Form.Description.$valid}">
|
||||||
ng-class="{'has-error':Form.Description.$dirty && Form.Description.$invalid, 'has-success':Form.Description.$valid}">
|
|
||||||
<label>
|
<label>
|
||||||
Description <span class="symbol required"></span>
|
Description <span class="symbol required"></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="text" placeholder="Enter Description Name"
|
<input type="text" placeholder="Enter Description Name" tabindex="1" class="form-control" name="Description" ng-model="p.Description"
|
||||||
tabindex="1" class="form-control" name="Description"
|
required/>
|
||||||
ng-model="p.Description" 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"
|
<span class="error text-small block" ng-if="Form.Description.$dirty && Form.Description.$error.pattern">Invalid Description Code </span>
|
||||||
ng-if="Form.Description.$dirty && Form.Description.$error.required">Description is required</span>
|
|
||||||
<span class="error text-small block"
|
|
||||||
ng-if="Form.Description.$dirty && Form.Description.$error.pattern">Invalid Description Code </span>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -82,8 +71,7 @@
|
|||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
|
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel" ng-click="cancel();">
|
||||||
ng-click="cancel();">
|
|
||||||
|
|
||||||
</input>
|
</input>
|
||||||
</div>
|
</div>
|
||||||
@ -92,11 +80,5 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
<!-- class="editRowTd" -->
|
<!-- class="editRowTd" -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user