Fewo Mails / Booking Country Services
This commit is contained in:
parent
b9c26d06d0
commit
48a6eb2282
154 changed files with 7761 additions and 1643 deletions
|
|
@ -55,9 +55,15 @@ class BookingController extends Controller
|
|||
{
|
||||
// \Session()->flash('alert-save', '1');
|
||||
|
||||
|
||||
$data = Request::all();
|
||||
if($id == "new") {
|
||||
|
||||
if($data['action'] === 'update_booking'){
|
||||
$booking = $this->bookingRepo->updateBooking($id, $data);
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('booking_detail', [$booking->id])."#collapseBookingBooking");
|
||||
}
|
||||
|
||||
if($id === "new") {
|
||||
$booking = new Booking();
|
||||
}else{
|
||||
$booking = Booking::findOrFail($id);
|
||||
|
|
@ -244,6 +250,27 @@ class BookingController extends Controller
|
|||
}
|
||||
|
||||
|
||||
public function delete($id, $del="booking"){
|
||||
|
||||
if($del === 'booking') {
|
||||
//$model = Booking::findOrFail($id);
|
||||
//$model->delete();
|
||||
\Session()->flash('alert-success', __('Buchung gelöscht sowie die Reservierung im Sterntrous Kalender'));
|
||||
}
|
||||
if($del === 'booking_file'){
|
||||
$booking_file = BookingFile::findOrFail($id);
|
||||
$booking = $booking_file->booking;
|
||||
$fileRepo = new BookingFileRepository($booking_file);
|
||||
$fileRepo->_set('disk', 'booking');
|
||||
$fileRepo->delete();
|
||||
$booking_file->delete();
|
||||
\Session()->flash('alert-success', 'Datei gelöscht');
|
||||
return redirect(route('booking_detail', [$booking->id]));
|
||||
}
|
||||
return redirect(route('requests'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue