diff --git a/app/Http/Controllers/BookingController.php b/app/Http/Controllers/BookingController.php
index 3bee785..6b51f24 100755
--- a/app/Http/Controllers/BookingController.php
+++ b/app/Http/Controllers/BookingController.php
@@ -52,7 +52,7 @@ class BookingController extends Controller
$data = [
'booking' => $booking,
'id' => $id,
-
+ 'show_modal_quill_preview' => true,
];
return view('booking.detail', $data);
@@ -117,7 +117,6 @@ class BookingController extends Controller
return redirect(route('booking_detail', [$booking->id])."#collapseBookingProvider");
}
-
if($data['action'] === 'update_booking_participant'){
$booking = $this->bookingRepo->updateBookingParticipant($id, $data);
\Session()->flash('alert-save', '1');
@@ -366,7 +365,7 @@ class BookingController extends Controller
if($del === 'booking') {
//$model = Booking::findOrFail($id);
//$model->delete();
- \Session()->flash('alert-success', __('Buchung gelöscht sowie die Reservierung im Sterntrous Kalender'));
+ \Session()->flash('alert-success', __('Löschen noch nicht programmiert'));
}
if($del === 'booking_file'){
$booking_file = BookingFile::findOrFail($id);
diff --git a/app/Http/Controllers/CustomerFewoMailController.php b/app/Http/Controllers/CustomerFewoMailController.php
index a81d3ca..b169304 100755
--- a/app/Http/Controllers/CustomerFewoMailController.php
+++ b/app/Http/Controllers/CustomerFewoMailController.php
@@ -2,20 +2,21 @@
namespace App\Http\Controllers;
+use Carbon;
+use Request;
+use Response;
+use App\Services\Util;
+use App\Models\EmailTemplate;
+use App\Services\Placeholder;
use App\Models\CustomerFewoFile;
use App\Models\CustomerFewoMail;
-use App\Models\EmailTemplate;
+use Illuminate\Support\Facades\URL;
use App\Models\TravelUserBookingFewo;
use App\Models\TravelUserBookingFile;
+use Illuminate\Database\Eloquent\Collection;
use App\Repositories\BookingFewoFileRepository;
use App\Repositories\CustomerFewoFileRepository;
use App\Repositories\CustomerFewoMailRepository;
-use App\Services\Util;
-use Carbon;
-use Illuminate\Database\Eloquent\Collection;
-use Illuminate\Support\Facades\URL;
-use Request;
-use Response;
class CustomerFewoMailController extends Controller
{
@@ -198,7 +199,13 @@ class CustomerFewoMailController extends Controller
$data = Request::all();
$ret = "";
$status = false;
- if(Request::ajax()){
+ if(Request::ajax() && isset($data['action'])){
+ if($data['action'] === 'load_preview_mail'){
+ $booking_fewo = TravelUserBookingFewo::findOrFail($data['booking_fewo_id']);
+ $ret = Placeholder::replaceBookingFewo($booking_fewo, $data['content']);
+ $data['subject'] = Placeholder::replaceBookingFewo($booking_fewo, $data['subject']);
+ $status = 'success';
+ }
if($data['action'] === 'toggle_important'){
$customer_mail = CustomerFewoMail::find($data['id']);
$customer_mail->important = ($customer_mail->important ? false : true);
diff --git a/app/Http/Controllers/CustomerMailController.php b/app/Http/Controllers/CustomerMailController.php
index ba205f4..352a629 100755
--- a/app/Http/Controllers/CustomerMailController.php
+++ b/app/Http/Controllers/CustomerMailController.php
@@ -2,20 +2,22 @@
namespace App\Http\Controllers;
+use Carbon;
+use Request;
+use Response;
+use App\Services\Util;
+use App\Models\Booking;
use App\Models\Customer;
-use App\Models\CustomerFewoMail;
use App\Models\CustomerFile;
use App\Models\CustomerMail;
use App\Models\EmailTemplate;
-use App\Repositories\CustomerFewoMailRepository;
-use App\Repositories\CustomerMailRepository;
-use App\Repositories\CustomerFileRepository;
-use App\Services\Util;
-use Carbon;
-use Illuminate\Database\Eloquent\Collection;
+use App\Services\Placeholder;
+use App\Models\CustomerFewoMail;
use Illuminate\Support\Facades\URL;
-use Request;
-use Response;
+use App\Repositories\CustomerFileRepository;
+use App\Repositories\CustomerMailRepository;
+use Illuminate\Database\Eloquent\Collection;
+use App\Repositories\CustomerFewoMailRepository;
class CustomerMailController extends Controller
{
@@ -216,7 +218,13 @@ class CustomerMailController extends Controller
$data = Request::all();
$ret = "";
$status = false;
- if(Request::ajax()){
+ if(Request::ajax() && isset($data['action'])){
+ if($data['action'] === 'load_preview_mail'){
+ $booking = Booking::findOrFail($data['booking_id']);
+ $ret = Placeholder::replaceBooking($booking, $data['content']);
+ $data['subject'] = Placeholder::replaceBooking($booking, $data['subject']);
+ $status = 'success';
+ }
if($data['action'] === 'toggle_important'){
$customer_mail = CustomerMail::find($data['id']);
$customer_mail->important = ($customer_mail->important ? false : true);
diff --git a/app/Http/Controllers/LeadController.php b/app/Http/Controllers/LeadController.php
index bf71e3d..7dbe8d8 100755
--- a/app/Http/Controllers/LeadController.php
+++ b/app/Http/Controllers/LeadController.php
@@ -7,6 +7,7 @@ use Request;
use App\Models\Lead;
use App\Models\LeadFile;
use App\Models\LeadNotice;
+use App\Models\LeadParticipant;
use App\Models\StatusHistory;
use App\Repositories\LeadRepository;
use App\Repositories\CustomerRepository;
@@ -42,11 +43,13 @@ class LeadController extends Controller
}else{
$lead = Lead::findOrFail($id);
+ $lead->getPassolutionPDF(true);
$id = $lead->id;
}
$data = [
'lead' => $lead,
'id' => $id,
+ 'show_modal_quill_preview' => true,
];
return view('lead.detail', $data);
@@ -84,11 +87,34 @@ class LeadController extends Controller
\Session()->flash('alert-save', '1');
return redirect(route('lead_detail', [$lead->id])."#collapseLeadNotice");
}
+ if($data['action'] === 'update_lead_participant'){
+ $lead = $this->leadRepo->updateLeadParticipant($id, $data);
+ \Session()->flash('alert-save', '1');
+ return redirect(route('lead_detail', [$lead->id])."#collapseBookingParticipant");
+ }
return back();
}
+ public function action($action, $id=false){
+
+ if(!$lead = Lead::find($id)){
+ abort(404);
+ }
+ if($action === 'lead_participant_add'){
+ LeadParticipant::create([
+ 'lead_id' => $lead->id,
+ 'nationality_id' => 1,
+ 'participant_salutation_id' => 1,
+
+ ]);
+ \Session()->flash('alert-success', __('Neuen Teilnehmer hinzugefügt'));
+ return redirect(route('lead_detail', [$lead->id])."#collapseLeadParticipant");
+ }
+ }
+
+
public function getAjaxRequests(){
$data = Request::all();
@@ -142,13 +168,19 @@ class LeadController extends Controller
$lead->delete();
\Session()->flash('alert-success', __('Anfrage gelöscht'));
}
-
+ if($del === 'passolution_file'){
+ $lead = Lead::findOrFail($id);
+ $lead->resyncPassolutionPDF();
+ \Session()->flash('alert-success', 'Passolution erneuert');
+ return redirect(route('lead_detail', [$lead->id]).'#collapseLeadFiles');
+
+ }
if($del === 'lead_notice'){
$leadNotice = LeadNotice::findOrFail($id);
$lead = $leadNotice->lead;
$leadNotice->delete();
\Session()->flash('alert-success', 'Notiz gelöscht');
- return redirect(route('lead_detail', [$lead->id]));
+ return redirect(route('lead_detail', [$lead->id]).'#collapseLeadNotice');
}
if($del === 'lead_files'){
@@ -159,7 +191,7 @@ class LeadController extends Controller
$fileRepo->delete();
$leadFile->delete();
\Session()->flash('alert-success', 'Datei gelöscht');
- return redirect(route('lead_detail', [$lead->id]));
+ return redirect(route('lead_detail', [$lead->id]).'#collapseLeadFiles');
}
return redirect(route('leads'));
}
diff --git a/app/Http/Controllers/LeadMailController.php b/app/Http/Controllers/LeadMailController.php
index 800e5b4..e87efa4 100644
--- a/app/Http/Controllers/LeadMailController.php
+++ b/app/Http/Controllers/LeadMailController.php
@@ -11,6 +11,7 @@ use App\Models\LeadFile;
use App\Models\LeadMail;
use App\Models\EmailTemplate;
+use App\Services\Placeholder;
use Illuminate\Support\Facades\URL;
use App\Models\TravelUserBookingFewo;
use App\Repositories\LeadFileRepository;
@@ -53,8 +54,6 @@ class LeadMailController extends Controller
\Session()->flash('alert-success', __('E-Mail weitergeleitet'));
}
-
-
return back();
}
@@ -68,7 +67,6 @@ class LeadMailController extends Controller
return back();
}
-
public function loadModal(){
$data = Request::all();
$ret = "";
@@ -184,7 +182,13 @@ class LeadMailController extends Controller
$data = Request::all();
$ret = "";
$status = false;
- if(Request::ajax()){
+ if(Request::ajax() && isset($data['action'])){
+ if($data['action'] === 'load_preview_mail'){
+ $lead = Lead::findOrFail($data['lead_id']);
+ $ret = Placeholder::replaceLead($lead, $data['content']);
+ $data['subject'] = Placeholder::replaceLead($lead, $data['subject']);
+ $status = 'success';
+ }
if($data['action'] === 'toggle_important'){
$lead_mail = LeadMail::find($data['id']);
$lead_mail->important = ($lead_mail->important ? false : true);
diff --git a/app/Http/Controllers/TravelUserBookingFewoController.php b/app/Http/Controllers/TravelUserBookingFewoController.php
index c277be2..bd4c6f6 100755
--- a/app/Http/Controllers/TravelUserBookingFewoController.php
+++ b/app/Http/Controllers/TravelUserBookingFewoController.php
@@ -76,6 +76,7 @@ class TravelUserBookingFewoController extends Controller
'max_adults' => $max_adults,
'max_children' => $max_children,
'id' => $id,
+ 'show_modal_quill_preview' => true,
];
return view('travel.user.booking.detail', $data);
}
@@ -258,7 +259,7 @@ class TravelUserBookingFewoController extends Controller
$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]));
+ return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id])."#collapseBookingNotice");
}
if($del === 'booking_fewo_files'){
@@ -269,7 +270,7 @@ class TravelUserBookingFewoController extends Controller
$fileRepo->delete();
$booking_fewo_file->delete();
\Session()->flash('alert-success', 'Datei gelöscht');
- return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]));
+ return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]).'#collapseBookingFiles');
}
return redirect(route('travel_user_booking_fewos'));
}
diff --git a/app/Models/Lead.php b/app/Models/Lead.php
index 32770fd..2296cff 100644
--- a/app/Models/Lead.php
+++ b/app/Models/Lead.php
@@ -6,10 +6,11 @@
namespace App\Models;
-use App\Models\Lead as ModelsLead;
use Carbon\Carbon;
-use Illuminate\Database\Eloquent\Collection;
+use App\Services\Passolution;
+use App\Models\Lead as ModelsLead;
use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\Collection;
/**
* Class Lead
@@ -153,7 +154,8 @@ class Lead extends Model
'participant_birthdate',
'participant_salutation_id'
];
-
+ protected $passolutionPDFs = [];
+
public static $lead_mail_dirs = [
11 => ['name' => 'Entwürfe', 'icon'=>'ion-md-create'],
12 => ['name' => 'Papierkorb', 'icon'=>'ion-md-trash'],
@@ -340,4 +342,45 @@ class Lead extends Model
}
return $this->lead_mails->where('dir', $dir)->count();
}
+
+ public function getPassolutionPDF($create = false, $resync = false){
+
+ $nats = [];
+
+ if(count($this->passolutionPDFs)){
+ return $this->passolutionPDFs;
+ }
+
+ if(!$this->travel_country){
+ return $this->passolutionPDFs;
+ }
+
+ $destco = $this->travel_country->destco;
+ //default no travel_nationality
+ $nats['de'] = 'de';
+
+ if($this->lead_participants->count()){
+ foreach ($this->lead_participants as $participant){
+ if($participant->travel_nationality){
+ $nats[$participant->travel_nationality->nat] = $participant->travel_nationality->nat;
+ }
+ }
+ }
+ if(empty($nats)){
+ $nats['de'] = 'de';
+ }
+ foreach ($nats as $nat){
+ $data = [
+ 'nat' => $nat,
+ 'destco' => $destco,
+ ];
+ $passolution = new Passolution($data);
+ $this->passolutionPDFs[] = $passolution->findOrCreatePDF($create, $resync);
+ }
+ return $this->passolutionPDFs;
+ }
+
+ public function resyncPassolutionPDF(){
+ return $this->getPassolutionPDF(true, true);
+ }
}
diff --git a/app/Models/LeadParticipant.php b/app/Models/LeadParticipant.php
index 8a18d88..ac7b432 100644
--- a/app/Models/LeadParticipant.php
+++ b/app/Models/LeadParticipant.php
@@ -53,7 +53,9 @@ class LeadParticipant extends Model
'participant_name',
'participant_firstname',
'participant_birthdate',
- 'participant_salutation_id'
+ 'participant_salutation_id',
+ 'participant_child',
+ 'nationality_id'
];
public function lead()
@@ -65,4 +67,9 @@ class LeadParticipant extends Model
{
return $this->belongsTo(Salutation::class, 'participant_salutation_id');
}
+
+ public function travel_nationality()
+ {
+ return $this->belongsTo(TravelNationality::class, 'nationality_id');
+ }
}
diff --git a/app/Repositories/LeadRepository.php b/app/Repositories/LeadRepository.php
index 4600798..2965156 100644
--- a/app/Repositories/LeadRepository.php
+++ b/app/Repositories/LeadRepository.php
@@ -5,6 +5,7 @@ namespace App\Repositories;
use App\Models\Lead;
use App\Models\LeadNotice;
+use App\Models\LeadParticipant;
use App\Models\StatusHistory;
class LeadRepository extends BaseRepository {
@@ -42,7 +43,6 @@ class LeadRepository extends BaseRepository {
return $model;
}
-
public function updateLead($id, $data)
{
$this->model = Lead::findOrFail($id);
@@ -91,9 +91,34 @@ class LeadRepository extends BaseRepository {
StatusHistory::create($fill);
}
-
}
return $this->model;
}
+ public function updateLeadParticipant($id, $data){
+ $this->model = Lead::findOrFail($id);
+ if(isset($data['participant'])){
+ foreach($data['participant'] as $p_id => $fill){
+ $Participant = LeadParticipant::findOrFail($p_id);
+ if($Participant->lead_id !== $this->model->id){
+ abort(500);
+ }
+ $fill['participant_child'] = isset($fill['participant_child']) ? true : false;
+ $fill['participant_birthdate'] = isset($fill['participant_birthdate']) ? _reformat_date($fill['participant_birthdate']) : null;
+ $Participant->fill($fill);
+ $Participant->save();
+ }
+ }
+ //main
+ $this->model->participant_salutation_id = isset($data['participant_salutation_id']) ? $data['participant_salutation_id'] : null;
+ $this->model->participant_name = isset($data['participant_name']) ? $data['participant_name'] : null;
+ $this->model->participant_firstname = isset($data['participant_firstname']) ? $data['participant_firstname'] : null;
+ //$this->model->nationality_id = isset($data['nationality_id']) ? $data['nationality_id'] : null;
+ $this->model->participant_birthdate = isset($data['participant_birthdate']) ? _reformat_date($data['participant_birthdate']) : null;
+
+ $this->model->save();
+ return $this->model;
+ }
+
+
}
\ No newline at end of file
diff --git a/app/Services/Placeholder.php b/app/Services/Placeholder.php
index cadfac8..2a79c7e 100644
--- a/app/Services/Placeholder.php
+++ b/app/Services/Placeholder.php
@@ -9,7 +9,7 @@ use App\Models\Lead;
class Placeholder
{
- public static $booking = [
+ public static $placeholder_booking = [
'dear' => '#geehrte/r#',
'salutation' => '#Anrede#',
'title' => '#Titel#',
@@ -24,9 +24,51 @@ class Placeholder
'airline' => '#Airline#'
];
- public static function getBookingQuill(){
+ public static $placeholder_lead = [
+ 'dear' => '#geehrte/r#',
+ 'salutation' => '#Anrede#',
+ 'title' => '#Titel#',
+ 'first_name' => '#Vorname#',
+ 'last_name' => '#Nachname#',
+ 'country' => '#Reiseland#',
+ 'program' => '#Programm#',
+ 'start_date' => '#Anreisedatum#',
+ 'end_date' => '#Abreisedatum#',
+ 'participants' => '#Teilnehmer#',
+ 'booking_date' => '#Buchungsdatum#',
+ ];
+
+ public static $placeholder_fewo= [
+ 'dear' => '#geehrte/r#',
+ 'salutation' => '#Anrede#',
+ 'title' => '#Titel#',
+ 'first_name' => '#Vorname#',
+ 'last_name' => '#Nachname#',
+ 'program' => '#Programm#',
+ 'start_date' => '#Anreisedatum#',
+ 'end_date' => '#Abreisedatum#',
+ 'booking_date' => '#Buchungsdatum#',
+ ];
+
+ public static function getOptionsQuill($key){
$ret = "";
- foreach (self::$booking as $key => $value) {
+ switch ($key) {
+ case 'booking':
+ $placehoder = self::$placeholder_booking;
+ break;
+ case 'lead':
+ $placehoder = self::$placeholder_lead;
+ break;
+ case 'fewo':
+ $placehoder = self::$placeholder_fewo;
+ break;
+ default:
+ $placehoder = self::$placeholder_booking;
+
+ break;
+
+ }
+ foreach ($placehoder as $key => $value) {
$value = str_replace('#', '', $value);
$ret .= "{id: '".$value."', label: '".$value."'},"."\n";
}
@@ -35,12 +77,31 @@ class Placeholder
public static function getBookingOptions(){
$ret = "";
- foreach (self::$booking as $key => $value) {
+ foreach (self::$placeholder_booking as $key => $value) {
$value = str_replace('#', '', $value);
$ret .= ''."\n";
}
return $ret;
}
+ public static function getLeadOptions(){
+ $ret = "";
+ foreach (self::$placeholder_lead as $key => $value) {
+ $value = str_replace('#', '', $value);
+ $ret .= ''."\n";
+ }
+ return $ret;
+ }
+
+ public static function getFewoOptions(){
+ $ret = "";
+ foreach (self::$placeholder_fewo as $key => $value) {
+ $value = str_replace('#', '', $value);
+ $ret .= ''."\n";
+ }
+ return $ret;
+ }
+
+
public static function replaceBooking(Booking $booking, $content)
{
@@ -50,7 +111,7 @@ class Placeholder
$title = $booking->customer->title;
$country = $booking->travel_country_id ? $booking->travel_country->name : "-";
$program = $booking->travelagenda_id ? $booking->travel_agenda->name : "-";
- $salutation = isset($booking->customer->salutation) ? $booking->customer->salutation->name : '';
+ $salutation = isset($booking->customer->salutation) ? $booking->customer->salutation->name : '-';
$start_date = $booking->getStartDateFormat();
$end_date = $booking->getEndDateFormat();
$booking_date = $booking->getBookingDateFormat();
@@ -78,7 +139,7 @@ class Placeholder
$search = [];
$replace = [];
- foreach (self::$booking as $key => $value) {
+ foreach (self::$placeholder_booking as $key => $value) {
$search[] = $value;
$replace[] = ${$key};
}
@@ -94,18 +155,14 @@ class Placeholder
$first_name = $booking_fewo->travel_user->first_name;
$last_name = $booking_fewo->travel_user->last_name;
$title = $booking_fewo->travel_user->title;
- $country = "";
$program = $booking_fewo->fewo_lodging_id ? $booking_fewo->fewo_lodging->name : "-";
$salutation = $booking_fewo->travel_user->salutation_id == 1 ? 'Herr' : 'Frau';
$start_date = $booking_fewo->from_date;
$end_date = $booking_fewo->to_date;
$booking_date = $booking_fewo->booking_date;
- $participants = "";
- $airline = "";
$search = [];
$replace = [];
-
- foreach (self::$booking as $key => $value) {
+ foreach (self::$placeholder_fewo as $key => $value) {
$search[] = $value;
$replace[] = ${$key};
}
@@ -121,14 +178,13 @@ class Placeholder
$first_name = $lead->customer->firstname;
$last_name = $lead->customer->name;
$title = $lead->customer->title;
- $country = "";
- $program = "";
+ $country = $lead->travelcountry_id ? $lead->travel_country->name : "-";
+ $program = $lead->travelagenda_id ? $lead->travel_agenda->name : "-";
$salutation = $lead->customer->salutation_id == 1 ? 'Herr' : 'Frau';
- $start_date = $lead->travelperiod_start ? _format_date($lead->travelperiod_start) : '';
- $end_date = $lead->travelperiod_end ? _format_date($lead->travelperiod_end) : '';
- $booking_date = $lead->request_date ? _format_date($lead->request_date) : '';
+ $start_date = $lead->travelperiod_start ? _format_date($lead->travelperiod_start) : '-';
+ $end_date = $lead->travelperiod_end ? _format_date($lead->travelperiod_end) : '-';
+ $booking_date = $lead->request_date ? _format_date($lead->request_date) : '-';
$participants = "";
- $airline = "";
if($lead->lead_participants->count()){
$participants = "Teilnehmer:
";
foreach($lead->lead_participants as $participant){
@@ -140,12 +196,9 @@ class Placeholder
$participants .= '
';
}
}
-
-
$search = [];
$replace = [];
-
- foreach (self::$booking as $key => $value) {
+ foreach (self::$placeholder_lead as $key => $value) {
$search[] = $value;
$replace[] = ${$key};
}
diff --git a/database/migrations/2020_01_29_151358_create_lead_participant_table.php b/database/migrations/2020_01_29_151358_create_lead_participant_table.php
index 0f66de2..41679e0 100644
--- a/database/migrations/2020_01_29_151358_create_lead_participant_table.php
+++ b/database/migrations/2020_01_29_151358_create_lead_participant_table.php
@@ -24,7 +24,9 @@ class CreateLeadParticipantTable extends Migration
$table->string('participant_firstname', 255)->nullable();
$table->date('participant_birthdate')->nullable();
$table->bigInteger('participant_salutation_id')->nullable();
-
+ $table->tinyInteger('participant_child')->nullable()->default(0);
+ $table->unsignedInteger('nationality_id')->nullable();
+
$table->index('lead_id', 'lead_participant_lead_id_idx');
$table->index('participant_salutation_id', 'lead_participant_participant_salutation_id_idx');
diff --git a/public/js/custom.js b/public/js/custom.js
index 2668aee..7186c6f 100644
--- a/public/js/custom.js
+++ b/public/js/custom.js
@@ -143,8 +143,42 @@ $(function() {
});
});
+function loadModalPreviewInner(self, data){
+ var url = data.route;
+ $.ajax({
+ url: url,
+ data: data,
+ type: "POST",
+ dataType: "json",
+ cache: false,
+ contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
+ encode: true,
+ headers: {
+ 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
+ },
+ success: function(data) {
+ console.log(data);
+ $(data.response.target).find('.modal-title').html(data.response.subject);
+ $(data.response.target).find('.modal-body').html(data.html);
+ },
+ error: function(xhr, status, errorThrown) {
+ console.log(xhr);
+ console.log(xhr.responseText);
+ console.log(errorThrown);
+ console.log("Sorry, there was a problem!");
+ }
+ });
+ return false;
+}
+
$(function () {
+ $('.modal').on("hidden.bs.modal", function (e) {
+ if ($('.modal:visible').length) {
+ $('body').addClass('modal-open');
+ }
+ });
+
$('#modals-load-content').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
if (!button.data('id')) {
diff --git a/resources/views/booking/_detail_files.blade.php b/resources/views/booking/_detail_files.blade.php
index 5139b1b..2daf55d 100755
--- a/resources/views/booking/_detail_files.blade.php
+++ b/resources/views/booking/_detail_files.blade.php
@@ -297,7 +297,7 @@
@if(Auth::user()->isPermission('sua-st-co'))