feat: update edit for flights and add create flights in admin panel

This commit is contained in:
2026-08-20 14:18:28 +03:30
parent 6cde2328c1
commit 87e0fc16f8
6 changed files with 428 additions and 52 deletions
+26 -19
View File
@@ -155,6 +155,7 @@
class="form-control"
value="{{ old('start_time', verta($flight->start_time)->format('Y/m/d H:i')) }}"
placeholder="تاریخ و ساعت حرکت"
autocomplete="off"
>
@error('start_time')
@@ -176,6 +177,7 @@
class="form-control"
value="{{ old('end_time', verta($flight->end_time)->format('Y/m/d H:i')) }}"
placeholder="تاریخ و ساعت رسیدن"
autocomplete="off"
>
@error('end_time')
@@ -240,28 +242,33 @@
</div>
@endsection
@section('scripts')
<script>
$(document).ready(function () {
document.addEventListener('DOMContentLoaded', function () {
$('#start_time').persianDatepicker({
format: 'YYYY/MM/DD HH:mm',
autoClose: true,
timePicker: {
enabled: true
}
});
const startTime = document.getElementById('start_time');
const endTime = document.getElementById('end_time');
$('#end_time').persianDatepicker({
format: 'YYYY/MM/DD HH:mm',
autoClose: true,
timePicker: {
enabled: true
}
});
if (typeof $ !== 'undefined' && typeof $.fn.persianDatepicker !== 'undefined') {
$(startTime).persianDatepicker({
format: 'YYYY/MM/DD HH:mm',
autoClose: true,
initialValue: false,
timePicker: {
enabled: true
}
});
$(endTime).persianDatepicker({
format: 'YYYY/MM/DD HH:mm',
autoClose: true,
initialValue: false,
timePicker: {
enabled: true
}
});
}
});
</script>