feat: add Jalali Calendar in flight create and edit for user side
This commit is contained in:
@@ -107,6 +107,7 @@ class FlightController extends Controller
|
||||
'departure_time' => [
|
||||
'required',
|
||||
'date',
|
||||
'after_or_equal:today',
|
||||
],
|
||||
|
||||
'departure_airport_id' => [
|
||||
@@ -201,7 +202,7 @@ class FlightController extends Controller
|
||||
|
||||
return redirect()
|
||||
->route('admin.flights.index')
|
||||
->with('success', 'پرواز با موفقیت ایجاد شد');
|
||||
->withErrors(['success' => 'پرواز با موفقیت ایجاد شد']);
|
||||
}
|
||||
|
||||
public function edit(Flight $flight)
|
||||
@@ -252,6 +253,7 @@ class FlightController extends Controller
|
||||
'departure_time' => [
|
||||
'required',
|
||||
'date',
|
||||
'after_or_equal:today',
|
||||
],
|
||||
|
||||
'departure_airport_id' => [
|
||||
@@ -345,7 +347,7 @@ class FlightController extends Controller
|
||||
|
||||
return redirect()
|
||||
->route('admin.flights.index')
|
||||
->with('success', 'پرواز با موفقیت ویرایش شد');
|
||||
->withErrors(['success'=> 'پرواز با موفقیت ویرایش شد']);
|
||||
}
|
||||
|
||||
public function destroy(Flight $flight)
|
||||
|
||||
@@ -353,7 +353,8 @@
|
||||
time: true,
|
||||
hasSecond: false,
|
||||
targetValueInput: 'attr',
|
||||
targetValueType: 'attr'
|
||||
targetValueType: 'attr',
|
||||
minDate: 'today'
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -345,7 +345,8 @@
|
||||
time: true,
|
||||
hasSecond: false,
|
||||
targetValueInput: 'attr',
|
||||
targetValueType: 'attr'
|
||||
targetValueType: 'attr',
|
||||
minDate: 'today'
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="text-success">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
@error('$errors')
|
||||
@error('errors')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
<div class="row">
|
||||
@@ -145,6 +145,7 @@
|
||||
<th>ظرفیت</th>
|
||||
<th>وضعیت</th>
|
||||
<th>تاریخ ثبت</th>
|
||||
<th>تاریخ ویرایش</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -250,6 +251,10 @@
|
||||
{{ $flight->created_at->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->updated_at->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="hstack gap-2 fs-15">
|
||||
|
||||
@@ -314,4 +319,3 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user