gwm:merge
This commit is contained in:
parent
032bac923d
commit
71df99b014
@ -33,6 +33,11 @@
|
|||||||
background-color: #edd179 !important; /* Set background color to a solid color */
|
background-color: #edd179 !important; /* Set background color to a solid color */
|
||||||
opacity: 1 !important; /* Set opacity to 1 to remove transparency */
|
opacity: 1 !important; /* Set opacity to 1 to remove transparency */
|
||||||
}
|
}
|
||||||
|
.toast-success {
|
||||||
|
color: black !important;
|
||||||
|
background-color: #2aa762 !important; /* Set background color to a solid color */
|
||||||
|
opacity: 1 !important; /* Set opacity to 1 to remove transparency */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@ -26,8 +26,8 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="inputEmail4" class="col-form-label">Client Name<span class="text-danger">*</span></label>
|
<label for="inputEmail4" class="col-form-label">Client Name<span class="text-danger">*</span></label>
|
||||||
|
<?= isset($sales['client_id']) ? '' : '<i type="button" class="fe-plus-circle" id="addClientModalButton" style="font-size: 18px;" data-toggle="modal" data-target="#addClientModal" title="Add Client"></i>' ?>
|
||||||
|
|
||||||
<i type="button" class="fe-plus-circle" id="addClientModalButton" style="font-size: 18px;" data-toggle="modal" data-target="#addClientModal" title="Add Client"></i>
|
|
||||||
|
|
||||||
<select class="form-control cleint-select SelExample" name="client_id" <?= isset($sales['client_id']) ? '' : 'required' ?>>
|
<select class="form-control cleint-select SelExample" name="client_id" <?= isset($sales['client_id']) ? '' : 'required' ?>>
|
||||||
|
|
||||||
@ -494,8 +494,11 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// AJAX request to save client
|
// AJAX request to save client
|
||||||
$('#saveClientBtn').click(function() {
|
$('#saveClientBtn').click(function() {
|
||||||
|
|
||||||
|
|
||||||
var clientName = $('#clientName').val();
|
var clientName = $('#clientName').val();
|
||||||
var clientMobile = $('#clientMobile').val();
|
var clientMobile = $('#clientMobile').val();
|
||||||
|
if(clientName != '' && clientMobile != ''){
|
||||||
|
|
||||||
// Send AJAX request to save the client
|
// Send AJAX request to save the client
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -516,15 +519,21 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Client save operation failed, display error message
|
// Client save operation failed, display error message
|
||||||
alert('Failed to save client. Please try again.');
|
toastr.warning("Failed to save client. Please try again");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
// AJAX request failed, display error message
|
// AJAX request failed, display error message
|
||||||
console.error('Error occurred while saving client:', error);
|
console.error('Error occurred while saving client:', error);
|
||||||
alert('Failed to save client. Please try again.');
|
toastr.warning("Failed to save client. Please try again");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
toastr.warning("Please Fill Name and Mobile data");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user