Report Strono-Date, Booking+Fewo Notice, Custom Mail opti
This commit is contained in:
parent
644ec93c53
commit
5d55e5be3f
35 changed files with 581 additions and 41 deletions
|
|
@ -11,6 +11,7 @@ use App\Models\FewoLodging;
|
|||
use App\Models\FewoReservation;
|
||||
use App\Models\TravelBookingFewoChannel;
|
||||
use App\Models\TravelUserBookingFewo;
|
||||
use App\Models\TravelUserBookingFewoNotice;
|
||||
use App\Models\TravelUserBookingFile;
|
||||
use App\Repositories\BookingFewoFileRepository;
|
||||
use App\Repositories\TravelUserBookingFewoRepository;
|
||||
|
|
@ -82,6 +83,18 @@ class TravelUserBookingFewoController extends Controller
|
|||
public function store($id)
|
||||
{
|
||||
$data = Request::all();
|
||||
if($data['action'] === 'save_notice'){
|
||||
$travel_user_booking_fewo = $this->userBookingFewoRepo->updateNotice($id, $data);
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id])."#collapseBookingNotice");
|
||||
}
|
||||
if($data['action'] === 'edit_notice'){
|
||||
$travel_user_booking_fewo = $this->userBookingFewoRepo->updateNotice($id, $data);
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id])."#collapseBookingNotice");
|
||||
}
|
||||
|
||||
|
||||
if($data['action'] === 'saveAll'){
|
||||
return $this->userBookingFewoRepo->update($id, $data);
|
||||
}
|
||||
|
|
@ -183,6 +196,19 @@ class TravelUserBookingFewoController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
public function loadModal(){
|
||||
$data = Request::all();
|
||||
$ret = "";
|
||||
if(Request::ajax()) {
|
||||
if($data['action'] === "edit_notice") {
|
||||
$value = TravelUserBookingFewoNotice::findOrFail($data['id']);
|
||||
$ret = view("travel.user.booking.edit_notice_modal", compact('data', 'value'))->render();
|
||||
}
|
||||
}
|
||||
return response()->json(['response' => $data, 'html'=>$ret]);
|
||||
}
|
||||
|
||||
|
||||
public function delete($id, $del="travel_user_booking_fewo"){
|
||||
|
||||
if($del === 'travel_user_booking_fewo') {
|
||||
|
|
@ -206,6 +232,14 @@ class TravelUserBookingFewoController extends Controller
|
|||
\Session()->flash('alert-success', __('Buchung gelöscht sowie die Reservierung im Sterntrous Kalender'));
|
||||
}
|
||||
|
||||
|
||||
if($del === 'booking_fewo_notices'){
|
||||
$booking_fewo_notice = TravelUserBookingFewoNotice::findOrFail($id);
|
||||
$travel_user_booking_fewo = $booking_fewo_notice->travel_user_booking_fewo;
|
||||
$booking_fewo_notice->delete();
|
||||
\Session()->flash('alert-success', 'Notiz gelöscht');
|
||||
return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]));
|
||||
}
|
||||
|
||||
if($del === 'booking_fewo_files'){
|
||||
$booking_fewo_file = TravelUserBookingFile::findOrFail($id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue