MERGE_TRACKER_ISSUES
This commit is contained in:
commit
c2eb0537d8
@ -281,16 +281,20 @@ class ClientController extends AdminController
|
||||
{
|
||||
$this->myLogger->logme('error','edit client general info function called');
|
||||
$uploadFilePath = ROOTPATH . 'public/uploads/logo/';
|
||||
// print_r($this->request->getFile('client_logo'));die;
|
||||
$file_name = file_Upload($this->request->getFile('client_logo'), $uploadFilePath);
|
||||
$id = $this->request->getPost('PrimaryKey');
|
||||
$data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['client_logo'] = $file_name;
|
||||
|
||||
if (!isset($data['is_download_btn'])) {
|
||||
$data['is_download_btn'] = 0;
|
||||
} elseif ($data['is_download_btn']) {
|
||||
$data['is_download_btn'] = 1;
|
||||
}
|
||||
|
||||
// print_r($data);die;
|
||||
|
||||
$update = $this->clientModel->update($id,$data);
|
||||
|
||||
|
||||
@ -282,17 +282,20 @@ input:checked + .slider:before {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
$('#client_id').val(res.data.id);
|
||||
$('#general_PrimaryKey').val(res.data.id);
|
||||
$('#client_id_relation').val(res.data.id);
|
||||
$('#relation_PrimaryKey').val(res.data.id);
|
||||
$('#client_id_branch').val(res.data.id);
|
||||
$('#client_id_for_client_branch').val(res.data.id);
|
||||
$('#client_id_policy').val(res.data.id);
|
||||
$('#policy_PrimaryKey').val(res.data.id);
|
||||
$('#client_id_kyc').val(res.data.id);
|
||||
$('#kyc_PrimaryKey').val(res.data.id);
|
||||
$('#Client_id').val(res.data.id);
|
||||
var idToUse = res.data.id ? res.data.id : res.data.PrimaryKey;
|
||||
|
||||
$('#client_id').val(idToUse);
|
||||
$('#general_PrimaryKey').val(idToUse);
|
||||
$('#client_id_relation').val(idToUse);
|
||||
$('#relation_PrimaryKey').val(idToUse);
|
||||
$('#client_id_branch').val(idToUse);
|
||||
$('#client_id_for_client_branch').val(idToUse);
|
||||
$('#client_id_policy').val(idToUse);
|
||||
$('#policy_PrimaryKey').val(idToUse);
|
||||
$('#client_id_kyc').val(idToUse);
|
||||
$('#kyc_PrimaryKey').val(idToUse);
|
||||
$('#Client_id').val(idToUse);
|
||||
|
||||
$('#entity_type').val(res.data.entity_type_id);
|
||||
|
||||
|
||||
@ -362,15 +365,22 @@ input:checked + .slider:before {
|
||||
}
|
||||
|
||||
function PreviewImage() {
|
||||
var oFReader = new FileReader();
|
||||
oFReader.readAsDataURL(document.getElementById("client_logo").files[0]);
|
||||
var file = document.getElementById("client_logo").files[0];
|
||||
|
||||
if (file) {
|
||||
if (file.size <= 200 * 1024) { // 200kb in bytes
|
||||
var oFReader = new FileReader();
|
||||
oFReader.readAsDataURL(file);
|
||||
|
||||
oFReader.onload = function (oFREvent) {
|
||||
document.getElementById("uploadPreview").src = oFREvent.target.result;
|
||||
};
|
||||
oFReader.onload = function (oFREvent) {
|
||||
document.getElementById("uploadPreview").src = oFREvent.target.result;
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// function validateFile(input) {
|
||||
// const file = input.files[0];
|
||||
// const allowedExtensions = ["jpg", "jpeg", "png"];
|
||||
@ -394,8 +404,8 @@ input:checked + .slider:before {
|
||||
toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.');
|
||||
document.getElementById("uploadPreview").src = "";
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
input.value = "";
|
||||
return;
|
||||
// input.value = "";
|
||||
// return;
|
||||
}
|
||||
|
||||
// Check file size
|
||||
@ -403,8 +413,8 @@ input:checked + .slider:before {
|
||||
if (fileSize > 200) {
|
||||
toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.');
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
input.value = "";
|
||||
return;
|
||||
// input.value = "";
|
||||
// return;
|
||||
}
|
||||
|
||||
// Check image dimensions
|
||||
@ -413,8 +423,8 @@ input:checked + .slider:before {
|
||||
if (this.width !== 100 || this.height !== 100) {
|
||||
toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.');
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
input.value = "";
|
||||
return;
|
||||
// input.value = "";
|
||||
// return;
|
||||
}
|
||||
// If both size and dimensions are valid, you can proceed with your logic here
|
||||
// For example, you can display the image
|
||||
|
||||
@ -200,6 +200,13 @@ $(document).ready(function () {
|
||||
$('#branch_city').val('');
|
||||
$('#branch_form')[0].reset();
|
||||
$('.ac').css('display', 'block');
|
||||
$('.parsley-errors-list').remove();
|
||||
|
||||
$('#branch_form').parsley().reset();
|
||||
|
||||
|
||||
|
||||
|
||||
contactCount = 1
|
||||
|
||||
var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || [];
|
||||
@ -316,7 +323,7 @@ $(document).ready(function () {
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
}, 500);
|
||||
|
||||
console.log('branch contact : ',res.contact)
|
||||
// console.log('branch contact : ',res.contact)
|
||||
|
||||
$('#add_branch').show();
|
||||
$('#branch_table').hide();
|
||||
@ -335,7 +342,7 @@ $(document).ready(function () {
|
||||
$('#designation').val(res.contact[0].designation);
|
||||
|
||||
res.contact.shift();
|
||||
console.log(res.contact.length)
|
||||
// console.log(res.contact.length)
|
||||
for (let index = 0; index < res.contact.length; index++) {
|
||||
const contact = res.contact[index];
|
||||
if (contact !== undefined) {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
|
||||
<h4 class="header-title" style="position: relative;">Client Deposit - <?php print_r($clientData[0]->client_name);?><?php?></h4>
|
||||
<h4 class="header-title" style="position: relative;">Client Deposit - <?php print_r($clientData[0]->client_name);?></h4>
|
||||
|
||||
</div>
|
||||
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user