FIX_toarst_message

This commit is contained in:
sanjeev.p 2026-02-09 13:13:19 +05:30
parent 1783defb21
commit 231cef6b26
9 changed files with 65 additions and 65 deletions

View File

@ -1969,7 +1969,7 @@ table.dataTable tbody td {
checkDuplicateTableFieldValue(table, field, value, function(isDuplicate) {
if (isDuplicate) {
toastr.warning(message, 'WARNING');
toastr.warning(message, 'Warning');
// $(input).val('')
$('#' + submitButId).prop('disabled', true);
} else{

View File

@ -899,7 +899,7 @@
appendPolicies(response.data)
} else {
toastr.warning(response.message, 'WARNING');
toastr.warning(response.message, 'Warning');
}
}, function(xhr, status, error) {
console.error('Error fetching data:', error);

View File

@ -395,7 +395,7 @@ $('#cost_center').change(function() {
console.log(res)
if (res.status == true) {
toastr.warning(res.message, 'warning');
toastr.warning(res.message, 'Warning');
$('#cost_center').val('');
}
},

View File

@ -102,10 +102,10 @@ $("#vehicle_file_upload_form").submit(function(event) {
console.log(res);
if(res.status == true){
toastr.success(res.message, 'SUCCESS');
toastr.success(res.message, 'Success');
appendVehicleFileTableBody(res.vehicle_docs);
}else{
toastr.warning(res.message, 'WARNING');
toastr.warning(res.message, 'Warning');
}
$('#vehicle_file_upload_form')[0].reset();

View File

@ -636,10 +636,10 @@ function removeVehicleMasterData(element) {
// console.log(res.status == true);
if (res) {
if (res.status == true) {
toastr.success('Vehicle Data removed successfully.', 'success');
toastr.success('Vehicle Data removed successfully.', 'Success');
location.reload();
} else {
toastr.warning('Failed to remove Vehicle Data.', 'warning');
toastr.warning('Failed to remove Vehicle Data.', 'Warning');
}
}
},
@ -648,7 +648,7 @@ function removeVehicleMasterData(element) {
console.error(status, error);
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
console.log('Something Wrong!', 'warning');
console.log('Something Wrong!', 'Warning');
}
});
}

View File

@ -982,7 +982,7 @@
var student_id = $(this).attr('data-id');
$.get('<?php echo base_url('user/deactive/');?>'+student_id, function (data) {
console.log(data);
toastr.success('User removed successfully', 'success');
toastr.success('User removed successfully', 'Success');
window.location.reload()
})
}

View File

@ -2037,7 +2037,7 @@ rfqTable.addEventListener('click', function(e) {
Swal.fire({
title: 'Are you sure?',
text: "Do you want to remove the row?",
icon: 'warning',
icon: 'Warning',
showCancelButton: true,
confirmButtonColor: '#d33',
cancelButtonColor: '#3085d6',
@ -2934,7 +2934,7 @@ function removeProposal(event) {
Swal.fire({
title: 'Are you sure?',
text: "Do you want to remove the Proposal?",
icon: 'warning',
icon: 'Warning',
showCancelButton: true,
confirmButtonColor: '#d33',
cancelButtonColor: '#3085d6',
@ -2995,7 +2995,7 @@ function removeInsurer(event) {
Swal.fire({
title: 'Are you sure?',
text: "Do you want to remove the insurer?",
icon: 'warning',
icon: 'Warning',
showCancelButton: true,
confirmButtonColor: '#d33',
cancelButtonColor: '#3085d6',
@ -3212,7 +3212,7 @@ function changeInsurer(event) {
console.log('proposel Name', proposal_name);
if(proposal_name == null || proposal_name == ""){
toastr.warning("Could not change the insurer", "WARNING")
toastr.warning("Could not change the insurer", "Warning")
return;
}
@ -3349,7 +3349,7 @@ function changeInsurerData(event, newInsurerName, dataId){
}else{
toastr.warning("Could not change the insurer", "WARNING")
toastr.warning("Could not change the insurer", "Warning")
return;
}
}
@ -4276,7 +4276,7 @@ function constructURL(url_type) {
if (validationStatus){
constructURL_ForInsurerAndClientMailSend();
}else{
toastr.error("All Client Mail ID's Should Contain Same Domain","ERROR");
toastr.error("All Client Mail ID's Should Contain Same Domain","Error");
}
}else if(url_type == 2){
constructURL_ForInternalMailSend()
@ -4555,17 +4555,17 @@ function ajaxRequest(formData) {
$('.loader-mask').delay(350).fadeOut('slow');
console.log(res);
if (res.status == 'success' && res.code == 200) {
toastr.success('Mail sent Successfully', 'SUCCESS')
if (res.status == 'Success' && res.code == 200) {
toastr.success('Mail sent Successfully', 'Success')
if(res.is_placement == true){
clearInterval(intervalId);
console.log('******** Intervel Cleared ********')
}
} else {
if (res.messgae) {
toastr.error(res.messgae, 'ERROR')
toastr.error(res.messgae, 'Error')
} else {
toastr.error('Mail send failed', 'ERROR')
toastr.error('Mail send failed', 'Error')
}
}
@ -4622,7 +4622,7 @@ function getInsurerBranchContacts(input){
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
if(res.status == false){
toastr.warning(res.message, 'WARNING')
toastr.warning(res.message, 'Warning')
}else{
appendInsurerContact(res.data)
}
@ -4798,7 +4798,7 @@ function getMailContent(id){
console.log(response);
$('#'+id).val(response.data)
} else {
toastr.error(response.message || 'Unable to fetch data', 'ERROR');
toastr.error(response.message || 'Unable to fetch data', 'Error');
}
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
@ -4872,7 +4872,7 @@ function checkTheTableDataChanged(redirect_type, url){
//PLACEMENT MAIL SEND
showModal(3);
// if(demography_file_status == "failed"){
// toastr.warning('Member Demography file validation failed. Please re-upload', 'WARNING');
// toastr.warning('Member Demography file validation failed. Please re-upload', 'Warning');
// }else{
// showModal(3);
// }
@ -6416,14 +6416,14 @@ function appendMultiFileData(data) {
if (response.status == true) {
if(input == 1){
console.log(response.message, 'SUCCESS');
console.log(response.message, 'Success');
showTinyToast();
}else{
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
}
$('#rfq_primaryKey').val(response.id);
} else {
toastr.warning(response.message, 'WARNING');
toastr.warning(response.message, 'Warning');
}
if(input != 1){
@ -6494,9 +6494,9 @@ function appendMultiFileData(data) {
console.log('Data sent successfully:', response);
if (response.status == true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
} else {
toastr.warning(response.message, 'WARNING');
toastr.warning(response.message, 'Warning');
}
window.location.href = '<?= base_url('rfq/list/') ?>' + lead_id + '/' + 2;
@ -7017,7 +7017,7 @@ function appendMultiFileData(data) {
console.log('Data fetched successfully:', response);
if (response.status === true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
$("#no_of_installment").closest('.form-group').hide();
$('#no_of_installment').val("");
$('#installment_form_row').empty();
@ -7044,7 +7044,7 @@ function appendMultiFileData(data) {
dateFormat: 'd-m-Y',
});
} else {
toastr.error(response.message, 'WARNING');
toastr.error(response.message, 'Warning');
}
$('.loader').fadeOut();
@ -7055,7 +7055,7 @@ function appendMultiFileData(data) {
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while removing the installment.', 'ERROR');
toastr.error('An error occurred while removing the installment.', 'Error');
});
}else{
// alert("Inside else");
@ -7174,14 +7174,14 @@ function appendMultiFileData(data) {
console.log('Data fetched successfully:', response);
if (response.status === true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
$this.closest('.form-row').remove();
let updated_row_count = $('#installment_form_row .form-row').length;
$('#no_of_installment').val(updated_row_count);
console.log("after remove row_count", updated_row_count);
} else {
toastr.error(response.message, 'WARNING');
toastr.error(response.message, 'Warning');
}
$('.loader').fadeOut();
@ -7192,7 +7192,7 @@ function appendMultiFileData(data) {
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while removing the installment.', 'ERROR');
toastr.error('An error occurred while removing the installment.', 'Error');
});
}
});
@ -7255,10 +7255,10 @@ function appendMultiFileData(data) {
console.log('Data fetched successfully:', response);
if (response.status === true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
$installmentContainer.find('.form-row').slice(-remove_count).remove();
} else {
toastr.error(response.message, 'WARNING');
toastr.error(response.message, 'Warning');
}
$('.loader').fadeOut();
@ -7269,7 +7269,7 @@ function appendMultiFileData(data) {
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while removing the installment.', 'ERROR');
toastr.error('An error occurred while removing the installment.', 'Error');
});
}else{
$('#no_of_installment').val(row_count);
@ -7381,7 +7381,7 @@ function appendMultiFileData(data) {
function removeFileField(index, lead_file_id = null) {
if(index == 1){
toastr.warning("You can't remove the first file field", 'WARNING');
toastr.warning("You can't remove the first file field", 'Warning');
return false;
}
@ -7413,7 +7413,7 @@ function appendMultiFileData(data) {
console.log('Data fetched successfully:', response);
if (response.status == true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
//remove the file field
const field = document.getElementById(`fileField_${index}`);
@ -7422,7 +7422,7 @@ function appendMultiFileData(data) {
}
} else {
toastr.error(response.message, 'WARNING');
toastr.error(response.message, 'Warning');
}
$('.loader').fadeOut();
@ -7433,7 +7433,7 @@ function appendMultiFileData(data) {
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'ERROR');
toastr.error('An error occurred while checking the CD amount.', 'Error');
});
}else{
@ -7480,14 +7480,14 @@ function appendMultiFileData(data) {
console.log('uploadMultiFileFromRfq reponse', res);
if(res.status == true){
toastr.success(res.message, 'SUCCESS');
toastr.success(res.message, 'Success');
$('#multiFileAppendArea').empty();
$('.attachmet_row').empty();
$('#multiFileAppendArea').append(res.document_data);
$('.attachmet_row').html(res.attachment_html);
window.location.reload();
}else{
toastr.warning(res.message, 'WARNING');
toastr.warning(res.message, 'Warning');
}
// Hide loader
@ -7562,10 +7562,10 @@ function appendMultiFileData(data) {
sendAjaxRequestForGlobal(url, 'POST', requestData, function(res) {
if (res.status == true) {
toastr.success(res.message, 'SUCCESS');
toastr.success(res.message, 'Success');
checkMemberDataValidationStatus(res.lead_id)
} else {
toastr.warning(res.message, 'WARNING');
toastr.warning(res.message, 'Warning');
// Hide loader
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
@ -7575,7 +7575,7 @@ function appendMultiFileData(data) {
clearInterval(interval);
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while validation.', 'ERROR');
toastr.error('An error occurred while validation.', 'Error');
console.error("❌ Error checking validation status:", err);
// Hide loader
$('.loader').fadeOut();
@ -7609,10 +7609,10 @@ function appendMultiFileData(data) {
if (res.code === 200 && res.data.status != "pending") {
clearInterval(interval); // stop checking
if(res.data.status == 'success'){
toastr.success("✅ Validation Completed status : " + res.data.status, 'SUCCESS');
if(res.data.status == 'Success'){
toastr.success("✅ Validation Completed status : " + res.data.status, 'Success');
}else{
toastr.warning("✅ Validation Completed status : " + res.data.status, 'WARNING');
toastr.warning("✅ Validation Completed status : " + res.data.status, 'Warning');
}
window.location.reload();
@ -7633,7 +7633,7 @@ function appendMultiFileData(data) {
clearInterval(interval);
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while validation.', 'ERROR');
toastr.error('An error occurred while validation.', 'Error');
console.error("❌ Error checking validation status:", err);
// Hide loader
$('.loader').fadeOut();
@ -7692,7 +7692,7 @@ function appendMultiFileData(data) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
// toastr.error('An error occurred while fetching demography.', 'ERROR');
// toastr.error('An error occurred while fetching demography.', 'Error');
// Hide loader
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');

View File

@ -2992,7 +2992,7 @@
// Save all tables' data to localStorage
localStorage.setItem('allTablesJsonData', JSON.stringify(allTablesData));
// // console.log('All tables data saved:', allTablesData);
// toastr.success("RFQ Saved Successfully", "SUCCESS");
// toastr.success("RFQ Saved Successfully", "Success");
// If needed, reconstruct tables from JSON (implement jsonToTable accordingly)
return allTablesData;
@ -5048,16 +5048,16 @@
// // console.log(res);
if (res.status == 'success' && res.code == 200) {
toastr.success('Mail send Successfully', 'SUCCESS');
toastr.success('Mail send Successfully', 'Success');
if(res.is_placement == true){
clearInterval(intervalId);
console.log('******** Intervel Cleared ********')
}
} else {
if (res.messgae) {
toastr.error(res.messgae, 'ERROR')
toastr.error(res.messgae, 'Error')
} else {
toastr.error('Mail send failed', 'ERROR')
toastr.error('Mail send failed', 'Error')
}
}
@ -5113,7 +5113,7 @@
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
if (res.status == false) {
toastr.warning(res.message, 'WARNING')
toastr.warning(res.message, 'Warning')
} else {
appendInsurerContact(res.data)
}
@ -5490,7 +5490,7 @@
console.log('Data fetched successfully:', response);
if (response.status === true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
$("#no_of_installment").hide();
$("#payment_date").show();
$("#utr_no").show();
@ -5515,7 +5515,7 @@
dateFormat: 'd-m-Y',
});
} else {
toastr.error(response.message, 'WARNING');
toastr.error(response.message, 'Warning');
}
$('.loader').fadeOut();
@ -5526,7 +5526,7 @@
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while removing the installment.', 'ERROR');
toastr.error('An error occurred while removing the installment.', 'Error');
});
}else{
// alert("Inside else");
@ -5592,10 +5592,10 @@
console.log('Data fetched successfully:', response);
if (response.status === true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
$installmentContainer.find('.form-row').slice(-remove_count).remove();
} else {
toastr.error(response.message, 'WARNING');
toastr.error(response.message, 'Warning');
}
$('.loader').fadeOut();
@ -5606,7 +5606,7 @@
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while removing the installment.', 'ERROR');
toastr.error('An error occurred while removing the installment.', 'Error');
});
}else{
$('#no_of_installment').val(row_count);
@ -5704,14 +5704,14 @@
console.log('Data fetched successfully:', response);
if (response.status === true) {
toastr.success(response.message, 'SUCCESS');
toastr.success(response.message, 'Success');
$this.closest('.form-row').remove();
let updated_row_count = $('#installment_form_row .form-row').length;
$('#no_of_installment').val(updated_row_count);
console.log("after remove row_count", updated_row_count);
} else {
toastr.error(response.message, 'WARNING');
toastr.error(response.message, 'Warning');
}
$('.loader').fadeOut();
@ -5722,7 +5722,7 @@
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while removing the installment.', 'ERROR');
toastr.error('An error occurred while removing the installment.', 'Error');
});
}
});

View File

@ -3271,7 +3271,7 @@
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'ERROR');
toastr.error('An error occurred while checking the CD amount.', 'Error');
});
}