Merge branch 'dev' of bitbucket.org:jubilian/nhance-enrollment into dev
This commit is contained in:
commit
b029ff3115
@ -923,7 +923,7 @@ class ClientController extends AdminController
|
|||||||
return $this->respond([
|
return $this->respond([
|
||||||
'status' => false,
|
'status' => false,
|
||||||
'code' => 409,
|
'code' => 409,
|
||||||
'message' => 'The pre branch id '.$data['post_branch_id'].' is already mapped with another branch. Please check.',
|
'message' => 'The branch is already mapped with another branch. Please check.',
|
||||||
], 409);
|
], 409);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1068,7 +1068,7 @@ class ClientController extends AdminController
|
|||||||
return $this->respond([
|
return $this->respond([
|
||||||
'status' => false,
|
'status' => false,
|
||||||
'code' => 409,
|
'code' => 409,
|
||||||
'message' => 'The pre branch id '.$data['pre_branch_id'].' is already mapped with another branch. Please check.',
|
'message' => 'The branch is already mapped with another branch. Please check.',
|
||||||
], 409);
|
], 409);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -312,7 +312,9 @@ $('#btnBranchAdd').click(function() {
|
|||||||
$('#district').val('');
|
$('#district').val('');
|
||||||
$('#branch_city').val('');
|
$('#branch_city').val('');
|
||||||
$('#branch_form')[0].reset();
|
$('#branch_form')[0].reset();
|
||||||
|
$('#branch_form').parsley().reset();
|
||||||
$('.ac').css('display', 'block');
|
$('.ac').css('display', 'block');
|
||||||
|
$('#post_branch_id').val('');
|
||||||
contactCount = 1
|
contactCount = 1
|
||||||
|
|
||||||
var addButton = document.getElementById('add');
|
var addButton = document.getElementById('add');
|
||||||
@ -402,6 +404,7 @@ $("#branch_form").submit(function(event) {
|
|||||||
|
|
||||||
var formData = new FormData($('#branch_form')[0]);
|
var formData = new FormData($('#branch_form')[0]);
|
||||||
|
|
||||||
|
|
||||||
const jsonString = JSON.stringify(selectedValues);
|
const jsonString = JSON.stringify(selectedValues);
|
||||||
const level_contect_data_json_string = JSON.stringify(level_contect_data);
|
const level_contect_data_json_string = JSON.stringify(level_contect_data);
|
||||||
console.log('jsonString', jsonString);
|
console.log('jsonString', jsonString);
|
||||||
@ -492,7 +495,7 @@ $("#branch_form").submit(function(event) {
|
|||||||
$('.loader').fadeOut();
|
$('.loader').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
console.log('Something Wrong!', 'warning');
|
console.log('Something Wrong!', 'warning');
|
||||||
if(xhr.status == 409){
|
if(xhr.status === 409){
|
||||||
alert('The Current Branch is Already Existing..!!');
|
alert('The Current Branch is Already Existing..!!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -126,7 +126,7 @@ body {
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="auto_fetch_client">Client List<span class="text-danger">*</span></label>
|
<label for="auto_fetch_client">Client List<span class="text-danger">*</span></label>
|
||||||
<select class="form-control" id="auto_fetch_client" name="auto_fetch_client" required>
|
<select class="form-control select2" id="auto_fetch_client" name="auto_fetch_client" required>
|
||||||
<option value="">Select Client</option>
|
<option value="">Select Client</option>
|
||||||
<?php if (!empty($auto_fetch_client_list)): ?>
|
<?php if (!empty($auto_fetch_client_list)): ?>
|
||||||
<?php foreach ($auto_fetch_client_list as $client_list): ?>
|
<?php foreach ($auto_fetch_client_list as $client_list): ?>
|
||||||
@ -142,7 +142,7 @@ body {
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="auto_fetch_branch">Branch List<span class="text-danger">*</span></label>
|
<label for="auto_fetch_branch">Branch List<span class="text-danger">*</span></label>
|
||||||
<select class="form-control" id="auto_fetch_branch" name="auto_fetch_branch" required>
|
<select class="form-control select2" id="auto_fetch_branch" name="auto_fetch_branch" required>
|
||||||
<option value="">Select Branch</option>
|
<option value="">Select Branch</option>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
@ -313,10 +313,19 @@ body {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('#auto_fetch_client').select2();
|
||||||
|
$('#auto_fetch_branch').select2();
|
||||||
|
|
||||||
$('#auto_fetch_client').change(function() {
|
$('#auto_fetch_client').change(function() {
|
||||||
|
|
||||||
$('#auto_fetch_branch').html(`<option value="">Select Branch</option>`);
|
$('#auto_fetch_branch').html(`<option value="">Select Branch</option>`);
|
||||||
|
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "<?php echo base_url('client/branch/auto_fetch_branch'); ?>",
|
url: "<?php echo base_url('client/branch/auto_fetch_branch'); ?>",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -341,10 +350,18 @@ body {
|
|||||||
console.error("Error occurred:", status, error);
|
console.error("Error occurred:", status, error);
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
console.log("auto_fetch_client call is completed..!!");
|
console.log("auto_fetch_client call is completed..!!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user