Fewos in CRM,
Fewo Clients Bookings create / edit / delelte via API in DB
This commit is contained in:
parent
aebfb0586a
commit
c0c2a1822c
55 changed files with 9787 additions and 1486 deletions
|
|
@ -4,11 +4,15 @@ namespace App\Services;
|
|||
use App\Models\Country;
|
||||
use App\Models\Draft;
|
||||
use App\Models\DraftType;
|
||||
use App\Models\FewoLodging;
|
||||
use App\Models\IndustrySector;
|
||||
use App\Models\Interest;
|
||||
use App\Models\TravelBookingFewoChannel;
|
||||
use App\Models\TravelClass;
|
||||
use App\Models\TravelCountry;
|
||||
use App\Models\TravelNationality;
|
||||
use App\Models\TravelProgram;
|
||||
use App\Models\TravelUser;
|
||||
use Form;
|
||||
|
||||
class HTMLHelper
|
||||
|
|
@ -48,6 +52,13 @@ class HTMLHelper
|
|||
];
|
||||
|
||||
|
||||
private static $salutation = [
|
||||
1 => 'Herr',
|
||||
2 => 'Frau',
|
||||
3 => 'Firma',
|
||||
];
|
||||
|
||||
|
||||
public static function getMonth($i){
|
||||
return self::$months[intval($i)];
|
||||
}
|
||||
|
|
@ -84,6 +95,15 @@ class HTMLHelper
|
|||
}
|
||||
|
||||
|
||||
public static function getSalutationOptions($id){
|
||||
$ret = "";
|
||||
foreach (self::$salutation as $s_id => $value){
|
||||
$attr = ($s_id == $id) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$s_id.'" '.$attr.'>'.$value.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public static function getYearSelectOptions(){
|
||||
$start = date("Y", strtotime("-5 years", time()));
|
||||
|
|
@ -152,6 +172,45 @@ class HTMLHelper
|
|||
return $ret;
|
||||
}
|
||||
|
||||
public static function getTravelUserOptions($id = false){
|
||||
$options = TravelUser::all();
|
||||
$ret = '';
|
||||
foreach ($options as $option){
|
||||
$attr = ($option->id === $id) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->first_name.' '.$option->last_name.' | '.$option->email.' ('.$option->id.')</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function getFewoLodgingOptions($id = false){
|
||||
$options = FewoLodging::all();
|
||||
$ret = '';
|
||||
foreach ($options as $option){
|
||||
$attr = ($option->id === $id) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->name.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
public static function getTravelBookingFewoChannelOptions($id = false){
|
||||
$options = TravelBookingFewoChannel::all();
|
||||
$ret = '';
|
||||
foreach ($options as $option){
|
||||
$attr = ($option->id === $id) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->name.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function getTravelNationalityOptions($id = false){
|
||||
$options = TravelNationality::where('active',1)->get();
|
||||
$ret = '';
|
||||
foreach ($options as $option){
|
||||
$attr = ($option->id === $id) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->name.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function getWeekdaysOptions($programId = false, $weekdays = []){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue