parent
715cd76f78
commit
41f88d9e24
11 changed files with 410 additions and 387 deletions
@ -0,0 +1,94 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
|
||||
|
||||
use App\Models\Appointment; |
||||
use Illuminate\Http\Request; |
||||
|
||||
class AppointmentController extends Controller |
||||
{ |
||||
protected $view= 'admin.appointment.'; |
||||
protected $redirect = 'admin/appointments'; |
||||
|
||||
public function index(){ |
||||
$appointments = Appointment::orderBy('id','DESC'); |
||||
if(\request('date')){ |
||||
$key = \request('date'); |
||||
$appointments = $appointments->whereDate('date',$key); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$appointments = $appointments->where('status',$key); |
||||
} |
||||
$appointments = $appointments->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('appointments')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
$request->validate([ |
||||
'date' => 'required|date', |
||||
'start_time' => 'required|date_format:H:i', |
||||
'end_time' => 'required|date_format:H:i', |
||||
// 'location' => 'required|max:255', |
||||
// 'description' => 'required', |
||||
]); |
||||
|
||||
$appointment = new Appointment([ |
||||
'date' => $request->get('date'), |
||||
'start_time' => $request->get('start_time'), |
||||
'end_time' => $request->get('end_time'), |
||||
'location' => $request->get('location'), |
||||
'description' => $request->get('description'), |
||||
]); |
||||
|
||||
$appointment->save(); |
||||
|
||||
return redirect($this->redirect)->with('success', 'Appointment has been added'); |
||||
} |
||||
|
||||
public function edit($id) |
||||
{ |
||||
$appointment = Appointment::find($id); |
||||
|
||||
return view($this->view.'edit', compact('appointment')); |
||||
} |
||||
|
||||
public function update(Request $request, $id) |
||||
{ |
||||
$request->validate([ |
||||
'date' => 'required|date', |
||||
'start_time' => 'required|date_format:H:i', |
||||
'end_time' => 'required|date_format:H:i', |
||||
// 'location' => 'required|max:255', |
||||
// 'description' => 'required', |
||||
]); |
||||
|
||||
$appointment = Appointment::find($id); |
||||
$appointment->date = $request->get('date'); |
||||
$appointment->start_time = $request->get('start_time'); |
||||
$appointment->end_time = $request->get('end_time'); |
||||
$appointment->location = $request->get('location'); |
||||
$appointment->description = $request->get('description'); |
||||
$appointment->save(); |
||||
|
||||
return redirect($this->redirect)->with('success', 'Appointment has been updated'); |
||||
} |
||||
|
||||
public function destroy($id) |
||||
{ |
||||
$appointment = Appointment::find($id); |
||||
$appointment->delete(); |
||||
|
||||
return redirect($this->redirect)->with('success', 'Appointment has been deleted'); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,13 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Appointment extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
protected $guarded = ['id']; |
||||
} |
@ -0,0 +1,37 @@ |
||||
<?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('appointments', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->date('date'); |
||||
$table->string('start_time'); |
||||
$table->string('end_time'); |
||||
$table->string('location')->nullable(); |
||||
$table->string('description')->nullable(); |
||||
$table->enum('status',[1,2]); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('appointments'); |
||||
} |
||||
}; |
@ -1,157 +0,0 @@ |
||||
@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"> |
||||
<h1>Career</h1> |
||||
</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 Career</h3> |
||||
<a href="{{url('admin/careers')}}" class="back-button">List</a> |
||||
|
||||
</div> |
||||
<div class="card-body"> |
||||
@include('success.success') |
||||
@include('errors.error') |
||||
{!! Form::open(['url' => '/admin/careers', 'class' => 'form-horizontal', 'method'=> 'POST','files' => true,'autocomplete' => 'OFF']) !!} |
||||
<div class="row"> |
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Image <span style="color: red";> * </span> </label> |
||||
<input type="file" class="form-control" name="image" required> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label> Title <span style="color: red";> * </span> </label> |
||||
<input type="text" class="form-control" id="inputPassword3" name="title" value="{{old('title')}}" required> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6" > |
||||
<div class="form-group" > |
||||
<label>Sub Title <span style="color: red";> * </span></label> |
||||
<textarea name="sub_title" class="summernote_class" rows="5" required style="height: 658px;" >{{old('sub_title')}}</textarea> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6" > |
||||
<div class="form-group" > |
||||
<label>Point Title <span style="color: red";> * </span> </label> |
||||
<textarea name="point_title" class="summernote_class" rows="5" required style="height: 658px;" >{{old('point_title')}} |
||||
</textarea> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Seo Title</label> |
||||
<input type="text" class="form-control" id="inputPassword3" name="seo_title" value="{{old('seo_title')}}"> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label> Keyword <span style="color: red";> * </span> </label> |
||||
<input type="text" class="form-control" id="inputPassword3" name="keyword" value="{{old('keyword')}}" required> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Seo Description </label> |
||||
<textarea class="summernote_class" name="seo_description">{{old('seo_description')}}</textarea> |
||||
{{-- <input type="text" class="form-control" id="inputPassword3" name="seo_description" >--}} |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Meta Keyword</label> |
||||
<textarea class="summernote_class" name="meta_keyword" >{{old('meta_keyword')}}</textarea> |
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
<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=""> 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 for="">Points <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 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}}" {{(old('status')==$in) ? 'selected':''}}>{{$val}}</option> |
||||
@endforeach |
||||
|
||||
</select> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group row create-button"> |
||||
<div class="col-sm-10 col-md-12"> |
||||
<button type="submit" class="btn btn-primary">Create</button> |
||||
</div> |
||||
</div> |
||||
{!! Form::close() !!} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
</div> |
||||
@endsection |
||||
@section('script') |
||||
<script> |
||||
$(document).ready(function() { |
||||
$('.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 |
||||
|
@ -1,203 +0,0 @@ |
||||
@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"> |
||||
<h1>Career</h1> |
||||
</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 Career</h3> |
||||
<a href="{{url('admin/careers')}}" class="back-button">Back</a> |
||||
|
||||
</div> |
||||
<div class="card-body"> |
||||
@include('success.success') |
||||
@include('errors.error') |
||||
{!! Form::open(['url' => '/admin/careers/'.$about_us->id, 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!} |
||||
<div class="row"> |
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Image</label> |
||||
<input type="file" class="form-control" name="image" > |
||||
<br> |
||||
<span> |
||||
<a href="{{url($about_us->image)}}" target="_blank"> |
||||
<img src="{{url($about_us->image)}}" alt="" style="width: 100px"> |
||||
</a> |
||||
</span> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label> Title <span style="color: red";> * </span> </label> |
||||
<input type="text" class="form-control" id="inputPassword3" name="title" value="{{$about_us->title}}" required> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6" > |
||||
<div class="form-group" > |
||||
<label>Sub Title <span style="color: red";> * </span></label> |
||||
<textarea name="sub_title" class="summernote_class" rows="5" required style="height: 658px;" >{{$about_us->sub_title}}</textarea> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6" > |
||||
<div class="form-group" > |
||||
<label>Point Title <span style="color: red";> * </span> </label> |
||||
<textarea name="point_title" class="summernote_class" rows="5" required style="height: 658px;" >{{$about_us->point_title}} |
||||
</textarea> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Seo Title</label> |
||||
<input type="text" class="form-control" id="inputPassword3" name="seo_title" value="{{$about_us->seo_title}}"> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label> Keyword <span style="color: red";> * </span> </label> |
||||
<input type="text" class="form-control" id="inputPassword3" name="keyword" value="{{$about_us->keyword}}"> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Seo Description</label> |
||||
<textarea class="summernote_class" name="seo_description">{{$about_us->seo_description}}</textarea> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Meta Keyword</label> |
||||
<textarea class="summernote_class" name="meta_keyword" >{{$about_us->meta_keyword}}</textarea> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
|
||||
@if($about_us->career_points->count() > 0) |
||||
<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="">Point Title <span style="color: red";> * </span> </label> <br> --> |
||||
<!-- <input type="text" name="point_title" id="title1" placeholder="title" value="{{$about_us->point_title}}"> <br> --> |
||||
<label for="">Points <span style="color: red";> * </span> </label> |
||||
<br> |
||||
@foreach($about_us->career_points as $point) |
||||
<div id="point_old{{$point->id}}" class="point1" > |
||||
<input type="text" class="point" name="points[]" placeholder="Point" value="{{$point->point}}"> <br> |
||||
<input type="hidden" name="point_old_id[]" placeholder="points" value="{{$point->id}}"> <br> |
||||
<button class="close-point" onclick="deletePointPermanently({{$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 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}}" {{($about_us->status ==$in) ? 'selected':''}}>{{$val}}</option> |
||||
@endforeach |
||||
|
||||
</select> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endif |
||||
<div class="form-group row"> |
||||
<div class="col-sm-10"> |
||||
<button type="submit" class="btn btn-primary">Update</button> |
||||
</div> |
||||
</div> |
||||
{!! Form::close() !!} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
</div> |
||||
@endsection |
||||
@section('script') |
||||
<script> |
||||
$.ajaxSetup({ |
||||
headers: { |
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
||||
} |
||||
}); |
||||
|
||||
$(document).ready(function() { |
||||
$('.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/blog_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.blog_point_id).remove(); |
||||
}, |
||||
error: function(error) { |
||||
|
||||
} |
||||
}); |
||||
} |
||||
return false; |
||||
} |
||||
} |
||||
</script> |
||||
@endsection |
||||
|
@ -0,0 +1,104 @@ |
||||
@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"> |
||||
<h1>Appointment</h1> |
||||
</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 Appointment</h3> |
||||
<a href="{{url('admin/appointments')}}" class="back-button">List</a> |
||||
|
||||
</div> |
||||
<div class="card-body"> |
||||
@include('success.success') |
||||
@include('errors.error') |
||||
{!! Form::open(['url' => '/admin/appointments', 'class' => 'form-horizontal', 'method'=> 'POST','files' => true,'autocomplete' => 'OFF']) !!} |
||||
<div class="row"> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label> Date <span style="color: red";> * </span> </label> |
||||
<input type="date" class="form-control" id="inputPassword3" name="date" value="{{old('date')}}" required> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>Start Time</label> |
||||
<input type="time" class="form-control" id="inputPassword3" name="start_time" value="{{old('start_time')}}"> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label>End Time <span style="color: red";> * </span> </label> |
||||
<input type="time" class="form-control" id="inputPassword3" name="end_time" value="{{old('end_time')}}" required> |
||||
</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}}" {{(old('status')==$in) ? 'selected':''}}>{{$val}}</option> |
||||
@endforeach |
||||
|
||||
</select> |
||||
</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> |
||||
$(document).ready(function() { |
||||
$('.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,127 @@ |
||||
@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"> |
||||
<h1>Appointment</h1> |
||||
</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 Appointment</h3> |
||||
<a href="{{url('admin/appointments')}}" class="back-button">List</a> |
||||
|
||||
</div> |
||||
<div class="card-body"> |
||||
@include('success.success') |
||||
@include('errors.error') |
||||
{!! Form::open(['url' => '/admin/appointments/'.$appointment->id, 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!} |
||||
<div class="row"> |
||||
<div class="col-md-6"> |
||||
<div class="form-group"> |
||||
<label> Date <span style="color: red";> * </span> </label> |
||||
<input type="date" class="form-control" id="inputPassword3" name="date" value="{{$appointment->date}}" required> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6" > |
||||
<div class="form-group" > |
||||
<label>Start Time <span style="color: red";> * </span></label> |
||||
<input type="time" name="start_time" class="form-control" required value = "{{$appointment->start_time}}"/> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-6" > |
||||
<div class="form-group" > |
||||
<label>End Time <span style="color: red";> * </span></label> |
||||
<input type="time" name="end_time" class="form-control" required value = "{{$appointment->end_time}}"/> |
||||
</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}}" {{($appointment->status ==$in) ? 'selected':''}}>{{$val}}</option> |
||||
@endforeach |
||||
</select> |
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
<div class="form-group row"> |
||||
<div class="col-sm-10"> |
||||
<button type="submit" class="btn btn-primary">Update</button> |
||||
</div> |
||||
</div> |
||||
{!! Form::close() !!} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
</div> |
||||
@endsection |
||||
@section('script') |
||||
<script> |
||||
$.ajaxSetup({ |
||||
headers: { |
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
||||
} |
||||
}); |
||||
|
||||
$(document).ready(function() { |
||||
$('.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/blog_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.blog_point_id).remove(); |
||||
}, |
||||
error: function(error) { |
||||
|
||||
} |
||||
}); |
||||
} |
||||
return false; |
||||
} |
||||
} |
||||
</script> |
||||
@endsection |
||||
|
Loading…
Reference in new issue