=Team3 Nebyatra form changes
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m40s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m40s
Details
This commit is contained in:
parent
73b8e3365b
commit
9001087b18
|
|
@ -562,6 +562,25 @@
|
|||
<script src="{{asset('assets/libs/datatables/datatables.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
function toInputDate(value) {
|
||||
if (value === null || value === undefined || value === '') {
|
||||
return '';
|
||||
}
|
||||
const str = String(value).trim();
|
||||
const datePart = str.split(' ')[0];
|
||||
if (/^\d{4}-\d{2}-\d{2}$/.test(datePart)) {
|
||||
return datePart;
|
||||
}
|
||||
const parsed = new Date(str.includes(' ') ? str.replace(' ', 'T') : str);
|
||||
if (isNaN(parsed.getTime())) {
|
||||
return '';
|
||||
}
|
||||
const yyyy = parsed.getFullYear();
|
||||
const mm = String(parsed.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(parsed.getDate()).padStart(2, '0');
|
||||
return yyyy + '-' + mm + '-' + dd;
|
||||
}
|
||||
|
||||
var submissions = []
|
||||
var table = $('#list-page-datatable').DataTable({
|
||||
stateSave: true,
|
||||
|
|
@ -935,9 +954,7 @@
|
|||
//$('#field-nebulizer_doctor_image').parent().hide()
|
||||
}
|
||||
|
||||
let ex_date = new Date(selected.date_added)
|
||||
console.log(ex_date)
|
||||
$('#field-execution_date').val(ex_date.toISOString().split('T')[0]);
|
||||
$('#field-execution_date').val(toInputDate(selected.date_added));
|
||||
if(selected.type == 'doctor') {
|
||||
$('#field-legacy_code').parent().show()
|
||||
$('#field-gst_number').parent().hide()
|
||||
|
|
@ -1311,12 +1328,15 @@
|
|||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/neb_mitra/doctor/delete', // Change this URL to your actual delete route
|
||||
url: '/neb_mitra/doctor/delete',
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
id: id,
|
||||
type: type,
|
||||
_token: '{{ csrf_token() }}'
|
||||
_token: $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.status === 'success') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue