parent
e1a6b3babb
commit
71f113a5e6
29 changed files with 2105 additions and 68 deletions
@ -0,0 +1,241 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin; |
||||||
|
|
||||||
|
use App\Http\Controllers\Controller; |
||||||
|
use App\Models\VisaService; |
||||||
|
use App\Models\ServicePoint; |
||||||
|
use App\Models\Setting; |
||||||
|
use Illuminate\Http\Request; |
||||||
|
use App\Models\User; |
||||||
|
use Illuminate\Support\Facades\Auth; |
||||||
|
use Illuminate\Support\Facades\Session; |
||||||
|
|
||||||
|
class VisaServiceController extends Controller |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Display a listing of the resource. |
||||||
|
* |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
|
||||||
|
protected $view = 'admin.visa_service.'; |
||||||
|
protected $redirect = 'admin/visa_services'; |
||||||
|
|
||||||
|
public function index() |
||||||
|
{ |
||||||
|
$services = VisaService::orderBy('order_by','ASC'); |
||||||
|
|
||||||
|
if(\request('name')){ |
||||||
|
$key = \request('name'); |
||||||
|
$services = $services->where('name','like','%'.$key.'%'); |
||||||
|
} |
||||||
|
if(\request('status')){ |
||||||
|
$key = \request('status'); |
||||||
|
$services = $services->where('status',$key); |
||||||
|
} |
||||||
|
$services = $services->paginate(config('custom.per_page')); |
||||||
|
return view($this->view.'index',compact('services')); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Show the form for creating a new resource. |
||||||
|
* |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function create() |
||||||
|
{ |
||||||
|
return view($this->view.'create'); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Store a newly created resource in storage. |
||||||
|
* |
||||||
|
* @param \Illuminate\Http\Request $request |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function store(Request $request) |
||||||
|
{ |
||||||
|
|
||||||
|
$this->validate(\request(),[ |
||||||
|
'name' => 'required', |
||||||
|
'seo_title' => 'required', |
||||||
|
'short_description' => 'required', |
||||||
|
'keywords'=>'required', |
||||||
|
'icon' => 'file|mimes:jpeg,png,jpg,svg,' |
||||||
|
]); |
||||||
|
$service = new VisaService(); |
||||||
|
$service->name = \request('name'); |
||||||
|
// $service->image = \request('image'); |
||||||
|
// $service->image_title = \request('image_title'); |
||||||
|
// $service->top_description = \request('top_description'); |
||||||
|
// $service->image_description = \request('image_description'); |
||||||
|
// $service->bottom_description = \request('bottom_description'); |
||||||
|
$service->seo_description = strip_tags(\request('seo_description')); |
||||||
|
$service->seo_title = \request('seo_title'); |
||||||
|
$service->keywords = \request('keywords'); |
||||||
|
// $service->icon = \request('icon'); |
||||||
|
$service->meta_keywords = strip_tags(\request('meta_keywords')); |
||||||
|
$service->short_description = strip_tags(\request('short_description')); |
||||||
|
// $service->point_title = \request('point_title'); |
||||||
|
// $service->description_title = \request('description_title'); |
||||||
|
$service->status = \request('status'); |
||||||
|
$service->order_by = \request('order_by'); |
||||||
|
// $service->image_alt = \request('image_alt'); |
||||||
|
$service->slug = Setting::create_slug(\request('seo_title')); |
||||||
|
|
||||||
|
|
||||||
|
if($request->hasFile('icon')){ |
||||||
|
$extension = \request()->file('icon')->getClientOriginalExtension(); |
||||||
|
$image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder |
||||||
|
|
||||||
|
$count = rand(100,999); |
||||||
|
|
||||||
|
$out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); |
||||||
|
is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
if($service->save()){ |
||||||
|
// $points = $request->points; |
||||||
|
// foreach($points as $point){ |
||||||
|
// $service_point = new ServicePoint(); |
||||||
|
// $service_point->service_id = $service->id; |
||||||
|
// $service_point->point = $point; |
||||||
|
// $service_point->save(); |
||||||
|
// } |
||||||
|
Session::flash('success','Service has been created!'); |
||||||
|
return redirect($this->redirect); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Display the specified resource. |
||||||
|
* |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function show($id) |
||||||
|
{ |
||||||
|
$service = new VisaService(); |
||||||
|
|
||||||
|
|
||||||
|
$service = $service->findorfail($id); |
||||||
|
|
||||||
|
|
||||||
|
return view($this->view . 'show', compact('service')); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Show the form for editing the specified resource. |
||||||
|
* |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function edit($id) |
||||||
|
{ |
||||||
|
$service = new VisaService(); |
||||||
|
|
||||||
|
|
||||||
|
$service = $service->findorfail($id); |
||||||
|
|
||||||
|
|
||||||
|
return view($this->view . 'edit', compact('service')); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Update the specified resource in storage. |
||||||
|
* |
||||||
|
* @param \Illuminate\Http\Request $request |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function update(Request $request, $id) |
||||||
|
{ |
||||||
|
$this->validate(\request(),[ |
||||||
|
|
||||||
|
'name' => 'required', |
||||||
|
'short_description' => 'required', |
||||||
|
'seo_title' => 'required', |
||||||
|
'keywords'=>'required', |
||||||
|
|
||||||
|
]); |
||||||
|
$service = new VisaService(); |
||||||
|
$service = $service->findorfail($id); |
||||||
|
$service->name = \request('name'); |
||||||
|
$service->short_description = \request('short_description'); |
||||||
|
$service->seo_description = \request('seo_description'); |
||||||
|
$service->seo_title = \request('seo_title'); |
||||||
|
$service->keywords = \request('keywords'); |
||||||
|
|
||||||
|
$service->meta_keywords = \request('meta_keywords'); |
||||||
|
$service->status = \request('status'); |
||||||
|
$service->order_by = \request('order_by'); |
||||||
|
$service->slug = Setting::create_slug(\request('seo_title')); |
||||||
|
|
||||||
|
if($request->hasFile('icon')){ |
||||||
|
|
||||||
|
$extension = \request()->file('icon')->getClientOriginalExtension(); |
||||||
|
|
||||||
|
$image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder |
||||||
|
$count = rand(100,999); |
||||||
|
$out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); |
||||||
|
|
||||||
|
|
||||||
|
if (is_file(public_path().'/'.$service->icon) && file_exists(public_path().'/'.$service->icon)){ |
||||||
|
unlink(public_path().'/'.$service->icon); |
||||||
|
} |
||||||
|
is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
if($service->update()){ |
||||||
|
Session::flash('success','Visa Service has been successfully updated!'); |
||||||
|
return redirect($this->redirect); |
||||||
|
// $service_point = $service->service_point(); |
||||||
|
// $service_point->delete(); |
||||||
|
// $points = $request->points; |
||||||
|
// foreach($points as $point){ |
||||||
|
// $service_point = new ServicePoint(); |
||||||
|
// $service_point->service_id = $service->id; |
||||||
|
// $service_point->point = $point; |
||||||
|
// $service_point->save(); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Remove the specified resource from storage. |
||||||
|
* |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function delete($id) |
||||||
|
{ |
||||||
|
$setting=VisaService::findorfail($id); |
||||||
|
if (is_file(public_path().'/'.$setting->icon) && file_exists(public_path().'/'.$setting->icon)){ |
||||||
|
unlink(public_path().'/'.$setting->icon); |
||||||
|
} |
||||||
|
$setting->delete(); |
||||||
|
Session::flash('success','Service has been sucessfully deleted!'); |
||||||
|
return redirect($this->redirect); |
||||||
|
//dd("here"); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public function service_point($service_point_id){ |
||||||
|
if(Auth::user()){ |
||||||
|
$setting = VisaServicePoint::findorfail($service_point_id); |
||||||
|
$setting->delete(); |
||||||
|
return response()->json(['service_point_id' => $service_point_id]); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,281 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin; |
||||||
|
|
||||||
|
use App\Http\Controllers\Controller; |
||||||
|
use App\Models\VisaService; |
||||||
|
use App\Models\VisaServiceSection; |
||||||
|
use App\Models\VisaServiceSectionPoint; |
||||||
|
use App\Models\Setting; |
||||||
|
use Illuminate\Http\Request; |
||||||
|
use App\Models\User; |
||||||
|
use Illuminate\Support\Facades\Auth; |
||||||
|
use Illuminate\Support\Facades\Session; |
||||||
|
|
||||||
|
class VisaServiceSectionController extends Controller |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Display a listing of the resource. |
||||||
|
* |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
|
||||||
|
protected $view = 'admin.visa_service_section.'; |
||||||
|
protected $redirect = 'admin/visa_services/{id}/sections'; |
||||||
|
|
||||||
|
public function index($id) |
||||||
|
{ |
||||||
|
$service_name = VisaService::findorfail($id)->name; |
||||||
|
$service_section = VisaServiceSection::where('visa_service_id',$id); |
||||||
|
|
||||||
|
|
||||||
|
// if(\request('name')){ |
||||||
|
// $key = \request('name'); |
||||||
|
// $services = $services->where('name','like','%'.$key.'%'); |
||||||
|
// } |
||||||
|
// if(\request('status')){ |
||||||
|
// $key = \request('status'); |
||||||
|
// $services = $services->where('status',$key); |
||||||
|
// } |
||||||
|
$service_sections = $service_section->paginate(config('custom.per_page')); |
||||||
|
return view($this->view.'index',compact('service_sections','service_name','id')); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Show the form for creating a new resource. |
||||||
|
* |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function create($id) |
||||||
|
{ |
||||||
|
$service_name = VisaService::findorfail($id)->name; |
||||||
|
return view($this->view.'create',compact('service_name','id')); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Store a newly created resource in storage. |
||||||
|
* |
||||||
|
* @param \Illuminate\Http\Request $request |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function store(Request $request,$id) |
||||||
|
{ |
||||||
|
|
||||||
|
|
||||||
|
$this->validate(\request(),[ |
||||||
|
|
||||||
|
// 'title' => 'required', |
||||||
|
'status' => 'required', |
||||||
|
'order_by' => 'required' |
||||||
|
|
||||||
|
]); |
||||||
|
$service_section = new VisaServiceSection(); |
||||||
|
|
||||||
|
$service_section->right_title = \request('right_title'); |
||||||
|
$service_section->right_sub_title = \request('right_sub_title'); |
||||||
|
$service_section->left_title = \request('left_title'); |
||||||
|
$service_section->left_sub_title = \request('left_sub_title'); |
||||||
|
$service_section->top_description = strip_tags(\request('top_description')); |
||||||
|
$service_section->left_description = strip_tags(\request('left_description')); |
||||||
|
$service_section->point_title = strip_tags(\request('point_title')); |
||||||
|
$service_section->visa_length = strip_tags(\request('visa_length')); |
||||||
|
|
||||||
|
$service_section->visa_service_id = $id; |
||||||
|
$service_section->status = \request('status'); |
||||||
|
$service_section->order_by = \request('order_by'); |
||||||
|
// $service->image_alt = \request('image_alt'); |
||||||
|
// $service->slug = Setting::create_slug(\request('seo_title')); |
||||||
|
|
||||||
|
|
||||||
|
if($request->hasFile('image')){ |
||||||
|
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||||
|
$image_folder_type = array_search('visa_service',config('custom.image_folders')); //for image saved in folder |
||||||
|
// dd($image_folder_type); |
||||||
|
$count = rand(100,999); |
||||||
|
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||||
|
$image_path = $out_put_path[0]; |
||||||
|
$service_section->image = $image_path; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
if($service_section->save()){ |
||||||
|
$points = $request->points; |
||||||
|
// $point_descriptions = $request->point_descriptions ?? []; |
||||||
|
// $icons = $request->icons ?? []; |
||||||
|
|
||||||
|
if($points[0] != null){ |
||||||
|
|
||||||
|
foreach($points as $key => $point){ |
||||||
|
|
||||||
|
$service_section_point = new VisaServiceSectionPoint(); |
||||||
|
|
||||||
|
$service_section_point->visa_service_section_id = $service_section->id; |
||||||
|
|
||||||
|
$service_section_point->point = $point; |
||||||
|
$service_section_point->save(); |
||||||
|
} |
||||||
|
} |
||||||
|
Session::flash('success','Visa Service Section has been created!'); |
||||||
|
return redirect('admin/visa_services/'.$id.'/sections'); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Display the specified resource. |
||||||
|
* |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function show($id,$secId) |
||||||
|
{ |
||||||
|
|
||||||
|
|
||||||
|
// $service = new Service(); |
||||||
|
// $service_section = new ServiceSection(); |
||||||
|
$service = VisaService::findorfail($id); |
||||||
|
|
||||||
|
$service_section = VisaServiceSection::findorfail($secId); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return view($this->view . 'show', compact('service','service_section')); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Show the form for editing the specified resource. |
||||||
|
* |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function edit($id,$secId) |
||||||
|
{ |
||||||
|
$service = new VisaService(); |
||||||
|
$service_section = new VisaServiceSection(); |
||||||
|
$service = $service->findorfail($id); |
||||||
|
$service_section = $service_section->findorfail($secId); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return view($this->view . 'edit', compact('service','service_section')); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Update the specified resource in storage. |
||||||
|
* |
||||||
|
* @param \Illuminate\Http\Request $request |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function update(Request $request, $id, $secId) |
||||||
|
{ |
||||||
|
$this->validate(\request(),[ |
||||||
|
'top_description' => 'required', |
||||||
|
'status' => 'required', |
||||||
|
'order_by' => 'required' |
||||||
|
]); |
||||||
|
$service_section = VisaServiceSection::findOrFail($secId); |
||||||
|
$service_section->right_title = \request('right_title'); |
||||||
|
$service_section->right_sub_title = \request('right_sub_title'); |
||||||
|
$service_section->left_title = \request('left_title'); |
||||||
|
$service_section->left_sub_title = \request('left_sub_title'); |
||||||
|
$service_section->top_description = strip_tags(\request('top_description')); |
||||||
|
$service_section->left_description = strip_tags(\request('left_description')); |
||||||
|
$service_section->point_title = strip_tags(\request('point_title')); |
||||||
|
$service_section->visa_length = strip_tags(\request('visa_length')); |
||||||
|
|
||||||
|
$service_section->visa_service_id = $id; |
||||||
|
$service_section->status = \request('status'); |
||||||
|
$service_section->order_by = \request('order_by'); |
||||||
|
|
||||||
|
// if($request->hasFile('image')){ |
||||||
|
// $extension = \request()->file('image')->getClientOriginalExtension(); |
||||||
|
// $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||||
|
// $count = rand(100,999); |
||||||
|
// $out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||||
|
// $image_path = $out_put_path[0]; |
||||||
|
// if (is_file(public_path().'/'.$service_section->image) && file_exists(public_path().'/'.$service_section->image)){ |
||||||
|
// unlink(public_path().'/'.$service_section->image); |
||||||
|
// } |
||||||
|
// $service_section->image = $image_path; |
||||||
|
// } |
||||||
|
if($service_section->update()){ |
||||||
|
$points = $request->points; |
||||||
|
if($points[0] != null){ |
||||||
|
|
||||||
|
if($request['point_ids'] !== null){ |
||||||
|
|
||||||
|
foreach($request['point_ids'] as $key => $pid){ |
||||||
|
$service_section_point = new VisaServiceSectionPoint(); |
||||||
|
$service_section_point = $service_section_point->find($pid); |
||||||
|
// $service_section_point = ServiceSectionPoint::find($id); |
||||||
|
|
||||||
|
$service_section_point->point = $points[$key]; |
||||||
|
$service_section_point->update(); |
||||||
|
} |
||||||
|
}else{ |
||||||
|
foreach($points as $key => $point){ |
||||||
|
|
||||||
|
$service_section_point = new VisaServiceSectionPoint(); |
||||||
|
|
||||||
|
$service_section_point->visa_service_section_id = $service_section->id; |
||||||
|
|
||||||
|
$service_section_point->point = $point; |
||||||
|
$service_section_point->save(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
// $service_point = $service_section->service_section_point(); |
||||||
|
// $service_point->delete(); |
||||||
|
// foreach($points as $key => $point){ |
||||||
|
|
||||||
|
// $service_section_point = new ServiceSectionPoint(); |
||||||
|
// $service_section_point->service_section_id = $service_section->id; |
||||||
|
// if(array_key_exists($key,$point_descriptions)){ |
||||||
|
// $service_section_point->point_description = $point_descriptions[$key]; |
||||||
|
// } |
||||||
|
// if(array_key_exists($key,$icons)){ |
||||||
|
// $extension = $icons[$key]->getClientOriginalExtension(); |
||||||
|
// $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||||
|
|
||||||
|
// $count = rand(100,999); |
||||||
|
|
||||||
|
// $out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); |
||||||
|
// is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; |
||||||
|
// // $service_section_point->icon = $points_descriptions[$key]; |
||||||
|
// } |
||||||
|
// $service_section_point->point = $point; |
||||||
|
// $service_section_point->update(); |
||||||
|
// } |
||||||
|
|
||||||
|
Session::flash('success','Visa Service Section has been successfully updated!'); |
||||||
|
return redirect('admin/visa_services/'.$id.'/sections'); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Remove the specified resource from storage. |
||||||
|
* |
||||||
|
* @param int $id |
||||||
|
* @return \Illuminate\Http\Response |
||||||
|
*/ |
||||||
|
public function destroy($id) |
||||||
|
{ |
||||||
|
// |
||||||
|
} |
||||||
|
|
||||||
|
public function service_point($service_point_id){ |
||||||
|
if(Auth::user()){ |
||||||
|
$setting = ServiceSectionPoint::findorfail($service_point_id); |
||||||
|
$setting->delete(); |
||||||
|
return response()->json(['service_point_id' => $service_point_id]); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
namespace App\Models; |
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||||
|
use Illuminate\Database\Eloquent\Model; |
||||||
|
|
||||||
|
class VisaServiceSection extends Model |
||||||
|
{ |
||||||
|
use HasFactory; |
||||||
|
|
||||||
|
public function visa_service(){ |
||||||
|
return $this->belongsTo(VisaService::class); |
||||||
|
} |
||||||
|
public function visa_service_section_point(){ |
||||||
|
return $this->hasMany(VisaServiceSectionPoint::class); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
namespace App\Models; |
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||||
|
use Illuminate\Database\Eloquent\Model; |
||||||
|
|
||||||
|
class VisaServiceSectionPoint extends Model |
||||||
|
{ |
||||||
|
use HasFactory; |
||||||
|
|
||||||
|
public function visa_service_section() |
||||||
|
{ |
||||||
|
return $this->belongsTo(VisaServiceSection::class); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration; |
||||||
|
use Illuminate\Database\Schema\Blueprint; |
||||||
|
use Illuminate\Support\Facades\Schema; |
||||||
|
|
||||||
|
return new class extends Migration |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Run the migrations. |
||||||
|
* |
||||||
|
* @return void |
||||||
|
*/ |
||||||
|
public function up() |
||||||
|
{ |
||||||
|
Schema::table('about_us', function (Blueprint $table) { |
||||||
|
$table->string('point_title')->nullable(); |
||||||
|
$table->string('bottom_title')->nullable(); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Reverse the migrations. |
||||||
|
* |
||||||
|
* @return void |
||||||
|
*/ |
||||||
|
public function down() |
||||||
|
{ |
||||||
|
Schema::table('about_us', function (Blueprint $table) { |
||||||
|
// |
||||||
|
}); |
||||||
|
} |
||||||
|
}; |
@ -0,0 +1,45 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration; |
||||||
|
use Illuminate\Database\Schema\Blueprint; |
||||||
|
use Illuminate\Support\Facades\Schema; |
||||||
|
|
||||||
|
return new class extends Migration |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Run the migrations. |
||||||
|
* |
||||||
|
* @return void |
||||||
|
*/ |
||||||
|
public function up() |
||||||
|
{ |
||||||
|
Schema::create('visa_service_sections', function (Blueprint $table) { |
||||||
|
$table->id(); |
||||||
|
$table->bigInteger('visa_service_id')->unsigned(); |
||||||
|
$table->foreign('visa_service_id')->references('id')->on('visa_services')->onDelete('cascade'); |
||||||
|
$table->longText('top_description')->nullable(); |
||||||
|
$table->string('image')->nullable(); |
||||||
|
$table->string('left_title'); |
||||||
|
$table->string('left_sub_title'); |
||||||
|
$table->longText('left_description'); |
||||||
|
$table->string('right_title')->nullable(); |
||||||
|
$table->string('right_sub_title')->nullable(); |
||||||
|
// $table->longText('sub_description')->nullable(); |
||||||
|
$table->longText('point_title')->nullable(); |
||||||
|
$table->string('visa_length')->nullable(); |
||||||
|
$table->enum('status',[1,2]); |
||||||
|
$table->string('order_by'); |
||||||
|
$table->timestamps(); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Reverse the migrations. |
||||||
|
* |
||||||
|
* @return void |
||||||
|
*/ |
||||||
|
public function down() |
||||||
|
{ |
||||||
|
Schema::dropIfExists('visa_service_sections'); |
||||||
|
} |
||||||
|
}; |
@ -0,0 +1,34 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration; |
||||||
|
use Illuminate\Database\Schema\Blueprint; |
||||||
|
use Illuminate\Support\Facades\Schema; |
||||||
|
|
||||||
|
return new class extends Migration |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Run the migrations. |
||||||
|
* |
||||||
|
* @return void |
||||||
|
*/ |
||||||
|
public function up() |
||||||
|
{ |
||||||
|
Schema::create('visa_service_section_points', function (Blueprint $table) { |
||||||
|
$table->id(); |
||||||
|
$table->bigInteger('visa_service_section_id')->unsigned(); |
||||||
|
$table->foreign('visa_service_section_id')->references('id')->on('visa_service_sections')->onDelete('cascade'); |
||||||
|
$table->text('point'); |
||||||
|
$table->timestamps(); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Reverse the migrations. |
||||||
|
* |
||||||
|
* @return void |
||||||
|
*/ |
||||||
|
public function down() |
||||||
|
{ |
||||||
|
Schema::dropIfExists('visa_service_section_points'); |
||||||
|
} |
||||||
|
}; |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,197 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<!-- Content Wrapper. Contains page content --> |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
|
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<!-- SELECT2 EXAMPLE --> |
||||||
|
<div class="card card-default"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">Create Visa Service</h3> |
||||||
|
<a href="{{url('admin/visa_services')}}" class="back-button btn-green">List</a> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
{!! Form::open(['url' => '/admin/visa_service', 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!} |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="service_name">Service Name <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="service_name" name="name" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<!-- <div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image_title">Image Title <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="image_title" name="image_title" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image">Image <span style="color: red">*</span></label> |
||||||
|
<input type="file" class="form-control" id="image" name="image" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image">Image Alt</label> |
||||||
|
<input type="text" class="form-control" id="image_alt" name="image_alt"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="description_title">Description Title <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="description_title" name="description_title" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image_description">Image Description <span style="color: red">*</span></label> |
||||||
|
<textarea class="summernote_class" name="image_description" required></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="top_description">Top Description <span style="color: red">*</span></label> |
||||||
|
<textarea class="summernote_class" name="top_description" required></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="bottom_description">Bottom Description <span style="color: red">*</span></label> |
||||||
|
<textarea class="summernote_class" name="bottom_description" required></textarea> |
||||||
|
</div> |
||||||
|
</div> --> |
||||||
|
|
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_title">Seo Title <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" name="seo_title" id = "seo_title" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="keywords">Keywords <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" name="keywords" id = "keywords" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="short_description">Short Description</label> |
||||||
|
<textarea class="summernote_class" name="short_description"></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_description">Seo Description</label> |
||||||
|
<textarea class="summernote_class" name="seo_description"></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_description">Meta Key Word</label> |
||||||
|
<textarea class="summernote_class" name="meta_keywords"></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="icon"> Icon <span style="color: red">*</span></label> |
||||||
|
<input type="file" class="form-control" id="icon" name="icon" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Status <span style="color: red">*</span> </label> |
||||||
|
<select name="status" class="form-control" id="type" required> |
||||||
|
<option value="" selected disabled>Please select Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}">{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
|
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Order BY <span style="color: red">*</span></label> |
||||||
|
<input type="number" class="form-control" id="order_by" name="order_by" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</br> |
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="row" id="point_dom"> |
||||||
|
<div class="col-md-6 rel-close" id="point_row_1"> |
||||||
|
<div class="dom-box"> |
||||||
|
<div class="add-points card"> |
||||||
|
<div class="form-group" id="point_g_1" > |
||||||
|
<label> Service Point Title <span style="color: red">*</span></label><br> |
||||||
|
<input type="text" name="point_title" id="title1" placeholder="Title"> <br> |
||||||
|
<div id="point1" class="point1" > |
||||||
|
<label> Service Point <span style="color: red">*</span></label><br> |
||||||
|
<input type="text" class="point" name="points[]" placeholder="Points"> <br> |
||||||
|
<button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
<button type="button" class="add-point-btn btn btn-primary" onclick="getPoint(1)">Add Points</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> --> |
||||||
|
|
||||||
|
<div class="form-group row create-button"> |
||||||
|
<div class="col-sm-10 col-md-12"> |
||||||
|
<button type="submit" class="btn btn-green">Create</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{!! Form::close() !!} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
</div> |
||||||
|
@endsection |
||||||
|
@section('script') |
||||||
|
<script> |
||||||
|
$(function () { |
||||||
|
// Summernote |
||||||
|
$('.summernote_class').summernote() |
||||||
|
|
||||||
|
}) |
||||||
|
var point_count = 1; |
||||||
|
function getPoint(count){ |
||||||
|
point_count = point_count +1; |
||||||
|
debugger; |
||||||
|
var html = '<div id="point'+point_count+'" class="point1">'+ |
||||||
|
'<input type="text" class="point" name="points[]" placeholder="points"> <br>'+ |
||||||
|
'<button type="button" class="close-point" onclick="deletePoint('+point_count+')"><i class="fa fa-trash" aria-hidden="true"></i></button>'+ |
||||||
|
'</div>'; |
||||||
|
$('#point_g_1').append(html); |
||||||
|
} |
||||||
|
function deletePoint(count){ |
||||||
|
if($('.point').length > 1){ |
||||||
|
$('#point'+count).remove(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
</script> |
||||||
|
@endsection |
@ -0,0 +1,193 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<!-- Content Wrapper. Contains page content --> |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
|
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<!-- SELECT2 EXAMPLE --> |
||||||
|
<div class="card card-default"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">Edit Service</h3> |
||||||
|
<a href="{{url('admin/services')}}" class="back-button btn-green">List</a> |
||||||
|
<a href="{{url('admin/services/create')}}" class="back-button btn-green mx-2">Create</a> |
||||||
|
</div> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
{!! Form::open(['url' => '/admin/services/'.$service->id, 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!} |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="service_name">Service Name <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="service_name" name="name" value="{{$service->name}}" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_title">Seo Title <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" name="seo_title" id = "seo_title" required value="{{$service->seo_title}}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="keywords">Keywords <span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" name="keywords" id = "keywords" value="{{$service->keywords}}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="short_description">Short Description</label> |
||||||
|
<textarea class="summernote_class" name="short_description">{{$service->short_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_description">Seo Description </label> |
||||||
|
<textarea class="summernote_class" name="seo_description">{{$service->seo_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_description">Meta Key Word</label> |
||||||
|
<textarea class="summernote_class" name="meta_keywords">{{$service->meta_keywords}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="icon"> Icon <span style="color: red">*</span></label> |
||||||
|
<input type="file" class="form-control" id="icon" name="icon"> |
||||||
|
@if($service->icon != null) |
||||||
|
<span> |
||||||
|
<a href="{{url($service->icon)}}" target="_blank"> |
||||||
|
<img src="{{url($service->icon)}}" alt="" style="width: 100px;"> |
||||||
|
</a> |
||||||
|
</span> |
||||||
|
@endif |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Status <span style="color: red">*</span></label> |
||||||
|
<select name="status" class="form-control" id="type" required> |
||||||
|
<option value="" selected disabled>Please select Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}" @if($service->status == $in) selected @endif>{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
|
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Order BY <span style="color: red">*</span></label> |
||||||
|
<input type="number" class="form-control" id="order_by" name="order_by" required value="{{$service->order_by}}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</br> |
||||||
|
|
||||||
|
|
||||||
|
<!-- @if($service->service_point) |
||||||
|
<div class="row" id="point_dom"> |
||||||
|
<div class="col-md-6 rel-close" id="point_row_1"> |
||||||
|
<div class="dom-box"> |
||||||
|
<div class="add-points card"> |
||||||
|
<div class="form-group" id="point_g_1" > |
||||||
|
<label> Service Title <span style="color: red">*</span></label> |
||||||
|
<br> |
||||||
|
<input type="text" name="point_title" id="title1" value="{{$service->point_title}}" placeholder="title"> <br> |
||||||
|
|
||||||
|
<label for="">Service Points <span style="color: red">*</span></label> |
||||||
|
<br> |
||||||
|
@foreach($service->service_point as $service_point) |
||||||
|
<div id="point_old{{$service_point->id}}" class="point1" > |
||||||
|
<input type="text" class="point" name="points[]" value="{{$service_point->point}}" placeholder="points"> <br> |
||||||
|
|
||||||
|
<button class="close-point" onclick="deletePointPermanently({{$service_point->id}})" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> |
||||||
|
</div> |
||||||
|
@endforeach |
||||||
|
</div> |
||||||
|
<button type="button" class="add-point-btn btn btn-primary" onclick="getPoint(1)">Add Points</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@endif --> |
||||||
|
|
||||||
|
<div class="form-group row create-button"> |
||||||
|
<div class="col-sm-10 col-md-12"> |
||||||
|
<button type="submit" class="btn btn-green">Update</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{!! Form::close() !!} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
</div> |
||||||
|
|
||||||
|
@endsection |
||||||
|
@section('script') |
||||||
|
<script> |
||||||
|
$(function () { |
||||||
|
// Summernote |
||||||
|
$('.summernote_class').summernote() |
||||||
|
|
||||||
|
}) |
||||||
|
var point_count = 1; |
||||||
|
function getPoint(count){ |
||||||
|
point_count = point_count +1; |
||||||
|
var html = '<div id="point'+point_count+'" class="point1">'+ |
||||||
|
'<input type="text" class="point" name="points[]" placeholder="Points"> <br>'+ |
||||||
|
'<button type="button" class="close-point" onclick="deletePoint('+point_count+')"><i class="fa fa-trash" aria-hidden="true"></i></button>'+ |
||||||
|
'</div>'; |
||||||
|
$('#point_g_1').append(html); |
||||||
|
} |
||||||
|
function deletePoint(count){ |
||||||
|
if($('.point').length > 1){ |
||||||
|
$('#point'+count).remove(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function deletePointPermanently(id){ |
||||||
|
if($('.point').length > 1){ |
||||||
|
if (confirm("Are you sure Delete?")) { |
||||||
|
$.ajax({ |
||||||
|
/* the route pointing to the post function */ |
||||||
|
type: 'GET', |
||||||
|
url: Laravel.url +"/admin/service_point/"+id, |
||||||
|
dataType: 'json', |
||||||
|
processData: false, // tell jQuery not to process the data |
||||||
|
contentType: false, |
||||||
|
/* remind that 'data' is the response of the AjaxController */ |
||||||
|
|
||||||
|
success: function (data) { |
||||||
|
debugger; |
||||||
|
$('#point_old'+data.service_point_id).remove(); |
||||||
|
}, |
||||||
|
error: function(error) { |
||||||
|
|
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
@endsection |
@ -0,0 +1,131 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="card"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">Visa Services</h3> |
||||||
|
<div class="card-tools"> |
||||||
|
<a class="btn btn-green" href="{{url('admin/visa_services/create')}}" role="button">Create</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<!-- /.card-header --> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
<form id="search" class="search-form"> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="input-group input-group-sm mb-3 table-search w-100"> |
||||||
|
<input type="search" name="name" class="form-control ds-input" placeholder="name" aria-label="Small" aria-describedby="inputGroup-sizing-sm" onchange="filterList()"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="input-group input-group-sm mb-3 table-search w-100"> |
||||||
|
<select name="status" class="form-control ds-input" onchange="filterList()"> |
||||||
|
<option value="" disabled selected>Search By Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}">{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
|
||||||
|
<table class="table table-bordered"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th style = "width: 10px">S.N.</th> |
||||||
|
<th class="text-center">Service Name</th> |
||||||
|
<th class="text-center">Slug</th> |
||||||
|
<th class="text-center">Icon</th> |
||||||
|
<th class="text-center">Seo Title</th> |
||||||
|
<th class="text-center">Order By</th> |
||||||
|
<th class="text-center">Status</th> |
||||||
|
<th class="text-center">Action</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
@foreach($services as $service) |
||||||
|
<tr> |
||||||
|
<th scope="row">{{$loop->iteration}}</th> |
||||||
|
<td class="text-center">{{$service->name}}</td> |
||||||
|
<td class="text-center">{{$service->slug}}</td> |
||||||
|
<td class="text-center"> |
||||||
|
<a href="{{url($service->icon ?? '')}}" target="_blank"> |
||||||
|
<img src="{{url($service->icon ?? '')}}" alt="" style="width: 100px;"> |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
<td class="text-center">{{$service->seo_title}}</td> |
||||||
|
<td class="text-center">{{$service->order_by}}</td> |
||||||
|
|
||||||
|
<td class="text-center">{{config('custom.status')[$service->status]}}</td> |
||||||
|
|
||||||
|
<!-- <td class="text-center"> |
||||||
|
<a class="btn btn-primary btn-sm" href="{{url('admin/services/'.$service->id.'/sections')}}"> |
||||||
|
<i class="fas fa-folder"> |
||||||
|
</i> |
||||||
|
Sections |
||||||
|
</a> |
||||||
|
<a class="btn btn-info btn-sm" href="{{url('admin/services/'.$service->id.'/edit')}}"> |
||||||
|
<i class="fas fa-pencil-alt"> |
||||||
|
</i> |
||||||
|
Edit |
||||||
|
</a> |
||||||
|
</td> --> |
||||||
|
<td class="d-flex justify-content-center action-icons"> |
||||||
|
<a href="{{url('admin/visa_services/'.$service->id.'/sections')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="sections"> |
||||||
|
<i class="fa-solid fa-rectangle-list"></i> |
||||||
|
</a> |
||||||
|
<a href="{{url('admin/visa_services/'.$service->id.'/edit')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="edit"> |
||||||
|
<i class="fas fa-pencil-alt"></i> |
||||||
|
</a> |
||||||
|
<a href="{{url('admin/visa_services/'.$service->id.'/delete')}}" class="btn btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="delete" onclick="return confirm('Are you sure you want to delete?');"> |
||||||
|
<i class="fas fa-trash"></i> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
@endforeach |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
<div class="pagination-default" style="margin-top: 10px;"> |
||||||
|
{!! $services->links() !!} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
<!-- /.card --> |
||||||
|
|
||||||
|
</div> |
||||||
|
<!-- /.col --> |
||||||
|
</div> |
||||||
|
<!-- /.row --> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
<!-- /.content --> |
||||||
|
</div> |
||||||
|
|
||||||
|
<script> |
||||||
|
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') |
||||||
|
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl)) |
||||||
|
</script> |
||||||
|
|
||||||
|
<script> |
||||||
|
const exampleEl = document.getElementById('example') |
||||||
|
const tooltip = new bootstrap.Tooltip(exampleEl, options) |
||||||
|
</script> |
||||||
|
@endsection |
@ -0,0 +1,172 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<!-- Content Wrapper. Contains page content --> |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
|
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<!-- SELECT2 EXAMPLE --> |
||||||
|
<div class="card card-default"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">Show Service</h3> |
||||||
|
<a href="{{url('admin/services')}}" class="back-button">Back</a> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="service_name">Service Name</label> |
||||||
|
<input type="text" class="form-control" id="service_name" name="name" value="{{$service->name}}" required disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image_title">Image Title</label> |
||||||
|
<input type="text" class="form-control" id="image_title" name="image_title" value="{{$service->image_title}}" required disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image">Image</label><br> |
||||||
|
<span> |
||||||
|
<a href="{{url($service->image)}}" target="_blank"> |
||||||
|
<img src="{{url($service->image)}}" alt="" style="width: 100px;"> |
||||||
|
</a> |
||||||
|
</span> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image">Image Alt</label> |
||||||
|
<input type="text" class="form-control" id="image_alt" name="image_alt" value="{{$service->image_alt}}" disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="description_title">Description Title</label> |
||||||
|
<input type="text" class="form-control" id="description_title" name="description_title" required value="{{$service->description_title}}" disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image_description">Image Description</label> |
||||||
|
<textarea class="summernote_class" name="image_description" required>{{$service->image_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="top_description">Top Description</label> |
||||||
|
<textarea class="summernote_class" name="top_description" required>{{$service->top_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="bottom_description">Bottom Description</label> |
||||||
|
<textarea class="summernote_class" name="bottom_description" required>{{$service->bottom_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_title">Seo Title</label> |
||||||
|
<input type="text" class="form-control" name="seo_title" id = "seo_title" required value="{{$service->seo_title}}" disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="keywords">Keywords</label> |
||||||
|
<input type="text" class="form-control" name="keywords" id = "keywords" value="{{$service->keywords}}" disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_description">Seo Description</label> |
||||||
|
<textarea class="form-control summernote_class" name="seo_description">{{$service->seo_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="seo_description">Meta Key Word</label> |
||||||
|
<textarea class="form-control summernote_class" name="meta_keywords">{{$service->meta_keywords}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Status</label> |
||||||
|
<select name="status" class="form-control" id="type" required disabled> |
||||||
|
<option value="" selected disabled>Please select Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}" @if($service->status == $in) selected @endif>{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
|
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Order BY</label> |
||||||
|
<input type="number" class="form-control" id="order_by" name="order_by" required disabled value="{{$service->order_by}}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</br> |
||||||
|
|
||||||
|
|
||||||
|
@if($service->service_point) |
||||||
|
<div class="row" id="point_dom"> |
||||||
|
<div class="col-md-6 rel-close" id="point_row_1"> |
||||||
|
<div class="dom-box"> |
||||||
|
<div class="add-points card"> |
||||||
|
<div class="form-group" id="point_g_1" > |
||||||
|
<label> Title</label> |
||||||
|
<br> |
||||||
|
<input type="text" name="point_title" id="title1" value="{{$service->point_title}}" placeholder="title" disabled> <br> |
||||||
|
|
||||||
|
<label for="">Points</label> |
||||||
|
<br> |
||||||
|
@foreach($service->service_point as $service_point) |
||||||
|
<div id="point_old{{$service_point->id}}" class="point1" > |
||||||
|
<input type="text" class="point" name="points[]" value="{{$service_point->point}}" placeholder="points" disabled> <br> |
||||||
|
|
||||||
|
</div> |
||||||
|
@endforeach |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@endif |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
</div> |
||||||
|
@endsection |
||||||
|
|
||||||
|
@section('script') |
||||||
|
<script> |
||||||
|
$(function () { |
||||||
|
// Summernote |
||||||
|
$('.summernote_class').summernote() |
||||||
|
|
||||||
|
}) |
||||||
|
</script> |
||||||
|
@endsection |
@ -0,0 +1,163 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<!-- Content Wrapper. Contains page content --> |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
|
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<!-- SELECT2 EXAMPLE --> |
||||||
|
<div class="card card-default"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">Create {{$service_name}}'s section</h3> |
||||||
|
<a href="{{url('admin/visa_services/'.$id.'/sections')}}" class="back-button btn-green">List Section</a> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
{!! Form::open(['url' => '/admin/visa_service/'.$id.'/section', 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!} |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="top_description">Top Description</label> |
||||||
|
<textarea class="summernote_class" id="top_description" name="top_description"></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="left_title">Left Title<span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="left_title" name="left_title" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="left_sub_title">Left Sub Title</label> |
||||||
|
<input type="text" class="form-control" id="left_sub_title" name="left_sub_title"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="left_description">Left Description</label> |
||||||
|
<textarea class="summernote_class" id="left_description" name="left_description"></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="right_title">Right Title<span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="right_title" name="right_title" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="right_sub_title">Right Sub Title</label> |
||||||
|
<input type="text" class="form-control" id="right_sub_title" name="right_sub_title"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="point_title">Point Title</label> |
||||||
|
<textarea class="summernote_class" name="point_title"></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="visa_length">Visa Length</label> |
||||||
|
<input type="text" id = "visa_length" name="visa_length"/> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Status <span style="color: red">*</span> </label> |
||||||
|
<select name="status" class="form-control" id="type" required> |
||||||
|
<option value="" selected disabled>Please select Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}">{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
|
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Order BY <span style="color: red">*</span></label> |
||||||
|
<input type="number" class="form-control" id="order_by" name="order_by" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</br> |
||||||
|
|
||||||
|
|
||||||
|
<div class="row" id="point_dom"> |
||||||
|
<div class="col-md-6 rel-close" id="point_row_1"> |
||||||
|
<div class="dom-box"> |
||||||
|
<div class="add-points card"> |
||||||
|
<div class="form-group" id="point_g_1" > |
||||||
|
<div id="point1" class="point1" > |
||||||
|
<label> Section Points</label><br> |
||||||
|
<input type="text" class="point" name="points[]" placeholder="Point"> <br> |
||||||
|
<!-- <button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> --> |
||||||
|
<!-- <label>Description</label><br> |
||||||
|
<textarea class="summernote_class" name="point_descriptions[]"> </textarea><br> |
||||||
|
<label>Icon</label><br> |
||||||
|
<input type="file" class="form-control" name="icons[]" placeholder="Point"> <br> --> |
||||||
|
<button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
<button type="button" class="add-point-btn btn btn-green" onclick="getPoint(1)">Add Points</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="form-group row create-button"> |
||||||
|
<div class="col-sm-10 col-md-12"> |
||||||
|
<button type="submit" class="btn btn-green">Create</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{!! Form::close() !!} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
</div> |
||||||
|
@endsection |
||||||
|
@section('script') |
||||||
|
<script> |
||||||
|
$(function () { |
||||||
|
// Summernote |
||||||
|
$('.summernote_class').summernote() |
||||||
|
|
||||||
|
}) |
||||||
|
var point_count = 1; |
||||||
|
function getPoint(count){ |
||||||
|
point_count = point_count +1; |
||||||
|
debugger; |
||||||
|
var html = '<div id="point'+point_count+'" class="point1">'+ |
||||||
|
'<input type="text" class="point" name="points[]" placeholder="Point"> <br>'+ |
||||||
|
'<button type="button" class="close-point" onclick="deletePoint('+point_count+')"><i class="fa fa-trash" aria-hidden="true"></i></button>'+ |
||||||
|
'</div>'; |
||||||
|
$('#point_g_1').append(html); |
||||||
|
} |
||||||
|
function deletePoint(count){ |
||||||
|
if($('.point').length > 1){ |
||||||
|
$('#point'+count).remove(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
</script> |
||||||
|
@endsection |
@ -0,0 +1,186 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<!-- Content Wrapper. Contains page content --> |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
|
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<!-- SELECT2 EXAMPLE --> |
||||||
|
<div class="card card-default"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">Edit Visa Service Section</h3> |
||||||
|
<a href="{{url('admin/visa_services/'.$service->id.'/sections')}}" class="back-button btn-green">List Sections</a> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
{!! Form::open(['url' => '/admin/visa_services/'.$service->id.'/section/'.$service_section->id, 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!} |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="top_description">Top Description</label> |
||||||
|
<textarea class="summernote_class" id="top_description" name="top_description">{{$service_section->top_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="left_title">Left Title<span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="left_title" name="left_title" value = "{{$service_section->left_title}}" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="left_sub_title">Left Sub Title</label> |
||||||
|
<input type="text" class="form-control" id="left_sub_title" value = "{{$service_section->left_sub_title}}" name="left_sub_title"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="left_description">Left Description</label> |
||||||
|
<textarea class="summernote_class" id="left_description" name="left_description">{{$service_section->left_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="right_title">Right Title<span style="color: red">*</span></label> |
||||||
|
<input type="text" class="form-control" id="right_title" name="right_title" value = "{{$service_section->right_title}}" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="right_sub_title">Right Sub Title</label> |
||||||
|
<input type="text" class="form-control" id="right_sub_title" name="right_sub_title" value="{{$service_section->right_sub_title}}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="point_title">Point Title</label> |
||||||
|
<textarea class="summernote_class" name="point_title">{{$service_section->point_title}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="visa_length">Visa Length</label> |
||||||
|
<input type="text" class="form-control" id = "visa_length" value = "{{$service_section->visa_length}}" name="visa_length"/> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Status <span style="color: red">*</span> </label> |
||||||
|
<select name="status" class="form-control" id="type" required> |
||||||
|
<option value="" selected disabled>Please select Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}" @if($service_section->status == $in) selected @endif>{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
|
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Order BY <span style="color: red">*</span></label> |
||||||
|
<input type="number" class="form-control" id="order_by" name="order_by" value = "{{$service_section->order_by}}" required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</br> |
||||||
|
|
||||||
|
|
||||||
|
<div class="row" id="point_dom"> |
||||||
|
<div class="col-md-6 rel-close" id="point_row_1"> |
||||||
|
<div class="dom-box"> |
||||||
|
<div class="add-points card"> |
||||||
|
<div class="form-group" id="point_g_1" > |
||||||
|
|
||||||
|
<label for="">Service Section Points <span style="color: red">*</span></label> |
||||||
|
<br> |
||||||
|
@foreach($service_section->visa_service_section_point as $section_point) |
||||||
|
<input type = "hidden" name = "point_ids[]" value = "{{$section_point->id}}"/> |
||||||
|
<div id="point_old{{$section_point->id}}" class="point1" > |
||||||
|
<input type="text" class="point" name="points[]" value="{{$section_point->point}}" placeholder="points"> <br> |
||||||
|
<button class="close-point" onclick="deletePointPermanently({{$section_point->id}})" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> |
||||||
|
</div> |
||||||
|
@endforeach |
||||||
|
</div> |
||||||
|
<button type="button" class="add-point-btn btn btn-green" onclick="getPoint(1)">Add Points</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="form-group row create-button"> |
||||||
|
<div class="col-sm-10 col-md-12"> |
||||||
|
<button type="submit" class="btn btn-green">Update</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{!! Form::close() !!} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
</div> |
||||||
|
|
||||||
|
@endsection |
||||||
|
@section('script') |
||||||
|
<script> |
||||||
|
$(function () { |
||||||
|
// Summernote |
||||||
|
$('.summernote_class').summernote() |
||||||
|
|
||||||
|
}) |
||||||
|
var point_count = 1; |
||||||
|
function getPoint(count){ |
||||||
|
point_count = point_count +1; |
||||||
|
var html = '<div id="point'+point_count+'" class="point1">'+ |
||||||
|
'<input type="text" class="point" name="points[]" placeholder="Point"> <br>'+ |
||||||
|
'<button type="button" class="close-point" onclick="deletePoint('+point_count+')"><i class="fa fa-trash" aria-hidden="true"></i></button>'+ |
||||||
|
'</div>'; |
||||||
|
$('#point_g_1').append(html); |
||||||
|
} |
||||||
|
function deletePoint(count){ |
||||||
|
if($('.point').length > 1){ |
||||||
|
$('#point'+count).remove(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function deletePointPermanently(id){ |
||||||
|
if($('.point').length > 1){ |
||||||
|
if (confirm("Are you sure Delete?")) { |
||||||
|
$.ajax({ |
||||||
|
/* the route pointing to the post function */ |
||||||
|
type: 'GET', |
||||||
|
url: Laravel.url +"/admin/service_point/"+id, |
||||||
|
dataType: 'json', |
||||||
|
processData: false, // tell jQuery not to process the data |
||||||
|
contentType: false, |
||||||
|
/* remind that 'data' is the response of the AjaxController */ |
||||||
|
|
||||||
|
success: function (data) { |
||||||
|
|
||||||
|
$('#point_old'+data.service_point_id).remove(); |
||||||
|
}, |
||||||
|
error: function(error) { |
||||||
|
|
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
@endsection |
@ -0,0 +1,113 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-12"> |
||||||
|
<div class="card"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">{{$service_name}} Sections Table</h3> |
||||||
|
<div class="card-tools"> |
||||||
|
<a class="btn btn-green" href="{{url('admin/visa_services/'.$id.'/section/create')}}" role="button">Create Section</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<!-- /.card-header --> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
<form id="search" class="search-form"> |
||||||
|
<div class="row"> |
||||||
|
<div class="input-group input-group-sm mb-3 table-search col-md-3"> |
||||||
|
<input type="search" name="name" class="form-control ds-input" placeholder="name" aria-label="Small" aria-describedby="inputGroup-sizing-sm" onchange="filterList()"> |
||||||
|
</div> |
||||||
|
<div class="input-group input-group-sm mb-3 table-search col-md-3"> |
||||||
|
<select name="status" class="form-control ds-input" onchange="filterList()"> |
||||||
|
<option value="" disabled selected>Search By Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}">{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
|
||||||
|
<table class="table table-bordered"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th style = "width: 10px">S.N.</th> |
||||||
|
<th class="text-center">Service Name</th> |
||||||
|
<!-- <th class="text-center">Section Title</th> --> |
||||||
|
<th class="text-center">Image</th> |
||||||
|
<th class="text-center">Description</th> |
||||||
|
<th class="text-center">Order By</th> |
||||||
|
|
||||||
|
<!-- <th class="text-center">Image</th> |
||||||
|
<th class="text-center">Image Title</th> --> |
||||||
|
<th class="text-center">Status</th> |
||||||
|
<th class="text-center">Action</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
@foreach($service_sections as $section) |
||||||
|
<tr> |
||||||
|
<th scope="row">{{$loop->iteration}}</th> |
||||||
|
<td class="text-center">{{$section->visa_service->name}}</td> |
||||||
|
<!-- <td class="text-center">{{$section->title}}</td> --> |
||||||
|
<td class="text-center"> |
||||||
|
@if($section->image != null) |
||||||
|
<a href="{{url($section->image)}}" target="_blank"> |
||||||
|
<img src="{{url($section->image)}}" alt="Failed to display image" style="width: 100px;"> |
||||||
|
</a> |
||||||
|
@else |
||||||
|
Image not available |
||||||
|
@endif |
||||||
|
</td> |
||||||
|
<td class="text-center">{{$section->top_description}}</td> |
||||||
|
<td class="text-center">{{$section->order_by}}</td> |
||||||
|
|
||||||
|
<td class="text-center">{{config('custom.status')[$section->status]}}</td> |
||||||
|
<td class="text-center d-flex"> |
||||||
|
<a class="btn btn-outline-secondary btn-sm mr-2" href="{{url('admin/visa_services/'.$id.'/section/'.$section->id.'/view')}}"> |
||||||
|
<i class="fa-sharp fa-solid fa-eye"></i> |
||||||
|
View |
||||||
|
</a> |
||||||
|
<a class="btn btn-outline-dark btn-sm" href="{{url('admin/visa_services/'.$id.'/section/'.$section->id.'/edit')}}"> |
||||||
|
<i class="fas fa-pencil-alt"> |
||||||
|
</i> |
||||||
|
Edit |
||||||
|
</a> |
||||||
|
|
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
@endforeach |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
<div class="pagination-default" style="margin-top: 10px;"> |
||||||
|
{!! $service_sections->links() !!} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
<!-- /.card --> |
||||||
|
|
||||||
|
</div> |
||||||
|
<!-- /.col --> |
||||||
|
</div> |
||||||
|
<!-- /.row --> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
<!-- /.content --> |
||||||
|
</div> |
||||||
|
@endsection |
@ -0,0 +1,146 @@ |
|||||||
|
@extends('admin.layouts.app') |
||||||
|
@section('content') |
||||||
|
<!-- Content Wrapper. Contains page content --> |
||||||
|
<div class="content-wrapper"> |
||||||
|
<!-- Content Header (Page header) --> |
||||||
|
<section class="content-header"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row mb-2"> |
||||||
|
<div class="col-sm-6"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div><!-- /.container-fluid --> |
||||||
|
</section> |
||||||
|
|
||||||
|
<!-- Main content --> |
||||||
|
<section class="content"> |
||||||
|
<div class="container-fluid"> |
||||||
|
<!-- SELECT2 EXAMPLE --> |
||||||
|
<div class="card card-default"> |
||||||
|
<div class="card-header"> |
||||||
|
<h3 class="card-title">Show Section</h3> |
||||||
|
<a href="{{url('admin/services/'.$service->id.'/sections/')}}" class="back-button btn-green">List Section</a> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="card-body"> |
||||||
|
@include('success.success') |
||||||
|
@include('errors.error') |
||||||
|
<div class="row"> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="service_name">Service Name</label> |
||||||
|
<input type="text" class="form-control" id="service_name" name="name" value="{{$service->name}}" required disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="title">Section Title</label> |
||||||
|
<input type="text" class="form-control" id="title" name="title" value="{{$service_section->title}}" disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@if($service_section->sub_title != null) |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="title">Section Sub Title</label> |
||||||
|
<input type="text" class="form-control" id="title" name="title" value="{{$service_section->sub_title}}" disabled> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@endif |
||||||
|
<div class="col-md-4"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image">Image</label><br> |
||||||
|
@if($service_section->image != null) |
||||||
|
<span> |
||||||
|
<a href="{{url($service_section->image)}}" target="_blank"> |
||||||
|
<img src="{{url($service_section->image)}}" alt="" style="width: 100px;"> |
||||||
|
</a> |
||||||
|
</span> |
||||||
|
@else |
||||||
|
<input type="text" class="form-control" id="image" name="image" value="Image not available" required disabled> |
||||||
|
@endif |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="image">Description</label> |
||||||
|
<textarea class="summernote_class" class="form-control" value="" disabled>{{$service_section->description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@if($service_section->sub_description != null) |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label for="description_title">Sub Description</label> |
||||||
|
<textarea class="summernote_class" class="form-control" id="description_title" name="description_title" required value="" disabled>{{$service_section->sub_description}}</textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@endif |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Status</label> |
||||||
|
<select name="status" class="form-control" id="type" required disabled> |
||||||
|
<option value="" selected disabled>Please select Status</option> |
||||||
|
@foreach(config('custom.status') as $in => $val) |
||||||
|
<option value="{{$in}}" @if($service->status == $in) selected @endif>{{$val}}</option> |
||||||
|
@endforeach |
||||||
|
|
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-md-6"> |
||||||
|
<div class="form-group"> |
||||||
|
<label>Order BY</label> |
||||||
|
<input type="number" class="form-control" id="order_by" name="order_by" required disabled value="{{$service->order_by}}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@if($service_section->service_section_point) |
||||||
|
<div class="row" id="point_dom"> |
||||||
|
<div class="col-md-6 rel-close" id="point_row_1"> |
||||||
|
<div class="dom-box"> |
||||||
|
<div class="add-points card"> |
||||||
|
<div class="form-group" id="point_g_1" > |
||||||
|
|
||||||
|
|
||||||
|
<label for="">Points</label> |
||||||
|
<br> |
||||||
|
@foreach($service_section->service_section_point as $service_point) |
||||||
|
<div id="point_old{{$service_point->id}}" class="point1" > |
||||||
|
<input type="text" class="point" name="points[]" value="{{$service_point->point}}" placeholder="points" disabled> <br> |
||||||
|
|
||||||
|
</div> |
||||||
|
@endforeach |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@endif |
||||||
|
<a href="{{url('admin/services/'.$service->id.'/section/'.$service_section->id.'/edit')}}" class="back-button">Edit Section</a> |
||||||
|
|
||||||
|
</div> |
||||||
|
</br> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</section> |
||||||
|
</div> |
||||||
|
@endsection |
||||||
|
|
||||||
|
@section('script') |
||||||
|
<script> |
||||||
|
$(function () { |
||||||
|
// Summernote |
||||||
|
$('.summernote_class').summernote() |
||||||
|
|
||||||
|
}) |
||||||
|
</script> |
||||||
|
@endsection |
Loading…
Reference in new issue