last changes since 6-2023
This commit is contained in:
parent
561c5875a7
commit
c1c613a4b9
53 changed files with 1351 additions and 93 deletions
|
|
@ -52,4 +52,8 @@ class CustomerFewoFileRepository extends FileRepository {
|
|||
], 200);
|
||||
}
|
||||
|
||||
public function returnFile(){
|
||||
return $this->customer_file;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -77,6 +77,15 @@ class FileRepository extends BaseRepository {
|
|||
return $this->response();
|
||||
}
|
||||
|
||||
public function storeReturnFile( $content )
|
||||
{
|
||||
$this->makeFilename();
|
||||
$this->store($content);
|
||||
$this->size = Storage::disk($this->disk)->size($this->dir.$this->allowed_filename);
|
||||
$this->save();
|
||||
return $this->returnFile();
|
||||
}
|
||||
|
||||
public function store($content){
|
||||
if(!Storage::disk($this->disk)->exists( $this->dir )){
|
||||
Storage::disk($this->disk)->makeDirectory($this->dir); //creates directory
|
||||
|
|
@ -88,6 +97,11 @@ class FileRepository extends BaseRepository {
|
|||
|
||||
}
|
||||
|
||||
public function returnFile(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function response(){
|
||||
return Response::json([
|
||||
'error' => false,
|
||||
|
|
|
|||
|
|
@ -249,11 +249,21 @@ class TravelUserBookingFewoRepository extends BaseRepository {
|
|||
if ($model->is_calendar_stern_tours) {
|
||||
$model->fewo_reservation->from_date = $model->getFromDateRaw();
|
||||
$model->fewo_reservation->to_date = $model->getToDateRaw();
|
||||
$model->fewo_reservation->save();
|
||||
|
||||
} else {
|
||||
$model->fewo_reservation->from_date = null;
|
||||
$model->fewo_reservation->to_date = null;
|
||||
$FewoReservation = FewoReservation::find($model->fewo_reservation_id);
|
||||
$model->fewo_reservation_id = NULL;
|
||||
$model->save();
|
||||
$FewoReservation->delete();
|
||||
|
||||
$FewoReservations = FewoReservation::where('lodging_id', $model->fewo_lodging_id)->where('from_date', $model->getFromDateRaw())->where('to_date', $model->getToDateRaw())->get();
|
||||
foreach ($FewoReservations as $FewoReservation) {
|
||||
$FewoReservation->delete();
|
||||
}
|
||||
// $model->fewo_reservation->from_date = null;
|
||||
// $model->fewo_reservation->to_date = null;
|
||||
}
|
||||
$model->fewo_reservation->save();
|
||||
} else {
|
||||
if ($model->is_calendar_stern_tours) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue