Server : Apache System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64 User : tradze ( 1001) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/tradze/www/storage-old/framework/views/ |
`
<?php $__env->startSection('content'); ?>
<div class="page-content">
<!-- BEGIN PAGE HEADER-->
<div class="page-bar">
<ul class="page-breadcrumb">
<li>
<i class="fa fa-home"></i>
<a href="<?php echo url(''); ?>"><?php echo e(trans('general.breadcrumbs_home')); ?></a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="<?php echo route('admin.users.salon.index'); ?>"><?php echo e(trans('users::salon.breadcrumbs_title')); ?></a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="<?php echo route('admin.users.salon.index'); ?>"><?php echo e(trans('users::salon.page_title')); ?></a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<?php if(isset($obj)): ?>
<a href="#"><?php echo e(trans('users::salon.edit_title')); ?></a>
<?php else: ?>
<a href="#"><?php echo e(trans('users::salon.create_new_title')); ?></a>
<?php endif; ?>
</li>
</ul>
</div>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row margin-top-20">
<div class="col-md-12">
<!-- BEGIN PROFILE SIDEBAR -->
<div class="profile-sidebar">
<!-- PORTLET MAIN -->
<div class="portlet light profile-sidebar-portlet">
<!-- SIDEBAR USERPIC -->
<div class="profile-userpic">
<img src="data:image/jpeg;base64,<?php echo e(base64_encode($obj->avatar)); ?>" class="img-responsive" alt="">
</div>
<!-- END SIDEBAR USERPIC -->
<!-- SIDEBAR USER TITLE -->
<div class="profile-usertitle">
<div class="profile-usertitle-name">
<?php echo e($obj->name); ?>
</div>
<div class="profile-usertitle-job">
Owner
</div>
</div>
<!-- END SIDEBAR USER TITLE -->
<!-- SIDEBAR MENU -->
<div class="profile-usermenu">
<ul class="nav">
<li>
<a href="<?php echo e(route('admin.users.salon.show',['id'=>$obj->id])); ?>">
<i class="icon-home"></i>
<?php echo e(trans('users::salon.overview_title')); ?>
</a>
</li>
<li class="active">
<a href="#">
<i class="icon-settings"></i>
<?php echo e(trans('users::salon.settings_title')); ?>
</a>
</li>
</ul>
</div>
<!-- END MENU -->
</div>
<!-- END PORTLET MAIN -->
</div>
<!-- END BEGIN PROFILE SIDEBAR -->
<!-- BEGIN PROFILE CONTENT -->
<div class="profile-content">
<div class="row">
<div class="col-md-12">
<div class="portlet light">
<div class="portlet-title tabbable-line">
<div class="caption caption-md">
<i class="icon-globe theme-font hide"></i>
<span class="caption-subject font-blue-madison bold uppercase"><?php echo e(trans('users::salon.profile_title')); ?></span>
</div>
<ul class="nav nav-tabs">
<li class="active">
<a href="#tab_1_1" data-toggle="tab"><?php echo e(trans('users::salon.tab_personal_info')); ?></a>
</li>
<li>
<a href="#tab_1_2" data-toggle="tab"><?php echo e(trans('users::salon.tab_avatar')); ?></a>
</li>
<li>
<a href="#tab_1_3" data-toggle="tab"><?php echo e(trans('users::salon.tab_change_password')); ?></a>
</li>
<li>
<a href="#tab_1_4"
data-toggle="tab"><?php echo e(trans('users::therapists.tab_areas')); ?></a>
</li>
<li>
<a href="#tab_gallery" data-toggle="tab">Gallery</a>
</li>
<li>
<a href="#tab_seo" data-toggle="tab">Seo</a>
</li>
</ul>
</div>
<div class="portlet-body">
<div class="tab-content">
<!-- PERSONAL INFO TAB -->
<div class="tab-pane active" id="tab_1_1">
<?php echo Form::model($obj, array('url' => URL::to('admin/users/salon').'/'.$obj->id, 'method' => 'put', 'class' => 'bf', 'files'=> true)); ?>
<div class="row">
<div class="col-md-9 clearfix">
<!--name-->
<div class="form-group clearfix <?php echo e($errors->has('first_name') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Establishment Name
<span class="required" aria-required="true">*</span>
</label>
<div class="col-md-9">
<?php echo Form::text('salon_name', null, array('class' => 'form-control','placeholder'=>'', 'required'=>'true')); ?>
<span class="help-block"><?php echo e($errors->first('salon_name', ':message')); ?></span>
</div>
</div>
<!--end name-->
<input type="hidden" name="salon_id" value="<?php echo e($obj->id); ?>">
<!--last name-->
<!-- <div class="form-group <?php echo e($errors->has('last_name') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
<?php echo e(trans('users::salon.form_last_name')); ?>
<span class="required" aria-required="true">*</span>
</label>
<div class="col-md-9">
<?php echo Form::text('last_name', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('last_name', ':message')); ?></span>
</div>
</div> -->
<!--end last name-->
<?php if(Auth::user()->hasRole('developer')): ?>
<!--Email-->
<div class="form-group clearfix <?php echo e($errors->has('email') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Email
<span class="required" aria-required="true">*</span>
</label>
<div class="col-md-9">
<?php echo Form::email('email', null, array('class' => 'form-control','placeholder'=>'', 'required'=>"true")); ?>
</div>
</div>
<!--Email-->
<?php endif; ?>
<!--mobile number-->
<div class="form-group clearfix <?php echo e($errors->has('mobile_number') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
<?php echo e(trans('users::salon.form_mobile_number')); ?>
<!-- <span class="required" aria-required="true">*</span> -->
</label>
<div class="col-md-9">
<?php echo Form::text('mobile_number', null, array('class' => 'form-control','placeholder'=>'')); ?>
<?php if($errors->has('mobile_number')): ?>
<span class="help-block"><?php echo e($errors->first('mobile_number', ':message')); ?></span>
<?php endif; ?>
</div>
</div>
<!--end mobile number-->
<!--name-->
<div class="form-group clearfix <?php echo e($errors->has('website_url') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Website URL
</label>
<div class="col-md-9">
<?php echo Form::text('website_url', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('website_url', ':message')); ?></span>
</div>
</div>
<!--end name-->
<!--name-->
<div class="form-group clearfix <?php echo e($errors->has('instagram_id') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Instagram ID
</label>
<div class="col-md-9">
<?php echo Form::text('instagram_id', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('instagram_id', ':message')); ?></span>
</div>
</div>
<!--end name-->
<!--name-->
<div class="form-group clearfix <?php echo e($errors->has('facebook_id') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Facebook ID
</label>
<div class="col-md-9">
<?php echo Form::text('facebook_id', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('facebook_id', ':message')); ?></span>
</div>
</div>
<!--end name-->
<!--name-->
<div class="form-group clearfix <?php echo e($errors->has('tictok_id') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Tictok ID
</label>
<div class="col-md-9">
<?php echo Form::text('tictok_id', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('tictok_id', ':message')); ?></span>
</div>
</div>
<!--end name-->
<!--name-->
<div class="form-group clearfix <?php echo e($errors->has('youtube_id') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Youtube ID
</label>
<div class="col-md-9">
<?php echo Form::text('youtube_id', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('youtube_id', ':message')); ?></span>
</div>
</div>
<!--end name-->
<!--name-->
<div class="form-group clearfix <?php echo e($errors->has('website_redirect_url') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
Website Redirect URL
</label>
<div class="col-md-9">
<?php echo Form::text('website_redirect_url', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('website_redirect_url', ':message')); ?></span>
</div>
</div>
<!--end name-->
<!--mobile number-->
<div class="form-group clearfix <?php echo e($errors->has('mobile_number') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
About Venue
<!-- <span class="required" aria-required="true">*</span> -->
</label>
<div class="col-md-9">
<?php echo Form::textarea('about', null, ['class' => 'ckeditor form-control
wysihtml5', 'placeholder' => '']); ?>
<!-- <span class="help-block"><?php echo e($errors->first('mobile_number', ':message')); ?></span> -->
</div>
</div>
<!--end mobile number-->
</div>
</div>
<div class="row margin-top-10">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-title">
<div class="caption">Address</div>
<div class="actions">
<button type="button" id="add_address" class="btn btn-sm blue tooltips" title="<?php echo e(trans("general.action_add")); ?>"><i class="fa fa-plus"></i></button>
</div>
</div>
<div class="portlet-body" id="address">
<?php if(isset($form['saved_addr'])): ?>
<?php foreach($form['saved_addr'] as $adr): ?>
<?php echo $__env->make('users::admin.salon_partial_saved_address',['adr'=>$adr,'form'=>$form], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if(isset($form['useraddress']['postcode'])): ?>
<?php foreach(@$form['useraddress']['postcode'] as $key=>$val): ?>
<?php echo $__env->make('users::admin.salon_partial_new_address',['fields'=>$form['useraddress'],'key'=>$key,'form'=>$form], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<!-- END PERSONAL INFO TAB -->
<div class="row">
<div class="col-md-9">
<div class="portlet">
<div class="portlet-title">
<div class="caption">
<i class="icon-calendar"></i> Working Days
</div>
</div>
<div class="portlet-body">
<table class="table table-hover table-bordered">
<thead>
<tr class="heading">
<th width="15%">Day of week</th>
<th width="10%">Day off</th>
<th width="35%">From</th>
<th width="35%">Until</th>
<th width="35%"></th>
</tr>
</thead>
<tbody>
<?php $initial = true;
$status = 0;
$day_weekday_status = 0;
?>
<?php foreach($form['workingdays'] as $day): ?>
<?php
$day_weekday = $day->weekday;
if($day_weekday == $day_weekday_status){
$status++;
}else{
$day_weekday_status = $day_weekday;
$status = 0;
}
?>
<tr>
<td>
<?php if($status == 0 || $initial == true){ ?>
<label class="control-label">
<?php echo e($day->name); ?>
<?php echo Form::hidden("dayname[{$day->weekday}]",
$day->name); ?>
</label>
<?php } ?>
</td>
<td>
<?php if($status == 0 || $initial == true){ ?>
<label class="checkbox-inline">
<?php echo Form::checkbox("dayoff[{$day->weekday}]",
1, $day->dayoff); ?>
</label>
<?php } ?>
</td>
<td>
<div class="input-group">
<?php echo Form::text("bo_start[{$day->weekday}][]",
$day->bo_start, ['class' =>
'form-control timepicker
timepicker-no-seconds', 'placeholder' =>
'']); ?>
<span class="input-group-btn">
<button class="btn default"
type="button"><i
class="fa fa-clock-o"></i></button>
</span>
</div>
<div class="new_bo_start"></div>
<span
class="help-block"><?php echo e($errors->first('bo_start', ':message')); ?></span>
</td>
<td>
<div class="input-group">
<?php echo Form::text("bo_end[{$day->weekday}][]",
$day->bo_end, ['class' => 'form-control
timepicker timepicker-no-seconds',
'placeholder' => '']); ?>
<span class="input-group-btn">
<button class="btn default"
type="button"><i
class="fa fa-clock-o"></i></button>
</span>
</div>
<div class="new_bo_end"></div>
</td>
<td>
<?php if($status == 0 || $initial == true){ ?>
<button id="addRow" type="button" class="btn btn-success add_new_time" weekday="<?php echo e($day->weekday); ?>"><i
class="fa fa-plus"></i></button>
<?php }else{ ?>
<button id="removeRow" type="button" class="btn btn-danger remove_time" weekday="0"><i
class="fa fa-minus"></i></button>
<?php }
$initial = false;
?>
</td>
</tr><tr class="new_row"></tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!--show Contact details-->
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-phone fa-2x"></i> Show Contact Details
</div>
</div>
<div class="portlet-body">
<div class="checkbox-list">
<label class="text-left checkbox-inline col-md-12">
<?php echo Form::checkbox('show_email', 1,
$form['show_email']); ?> Show Email
</label>
</div>
</div>
<div class="portlet-body">
<div class="checkbox-list">
<label class="text-left checkbox-inline col-md-12">
<?php echo Form::checkbox('show_mobile_number', 1,
$form['show_mobile_number']); ?> Show Mobile Number
</label>
</div>
</div>
</div>
</div>
</div>
<!-- <hr> -->
<!--Show Contact Details end-->
<!--actions-->
<div class="portlet-title">
<hr>
<div class="actions btn-set pull-right">
<a href="<?php echo e(route('admin.users.salon.index')); ?>" name="back" class="btn btn-sm default"><i class="fa fa-angle-left"></i> <?php echo e(trans('general.action_back')); ?></a>
<button class="btn default btn-sm" type="reset"><i class="fa fa-reply"></i> <?php echo e(trans('general.action_reset')); ?></button>
<button class="btn green btn-sm" name="save" value="save"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save')); ?></button>
<button class="btn green btn-sm" name="save_exit" value="save_exit"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save_exit')); ?></button>
</div>
</div>
<!--/actions-->
<?php echo Form::close(); ?>
</div>
<!-- END PERSONAL INFO TAB -->
<!-- CHANGE AVATAR TAB -->
<div class="tab-pane" id="tab_1_2">
<?php echo Form::model($obj, array('url' => URL::to('admin/users/salon/updateavatar/').'/'.$obj->id, 'method' => 'put', 'class' => 'bf', 'files'=> true)); ?>
<div class="form-group <?php echo e($errors->has('avatar') ? 'has-error' : ''); ?>">
<div class="fileinput fileinput-new" data-provides="fileinput">
<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
<?php if(isset($obj->avatar)): ?>
<img src="data:image/jpeg;base64,<?php echo e(base64_encode($obj->avatar)); ?>" alt=""/>
<?php else: ?>
<img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" alt=""/>
<?php endif; ?>
</div>
<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">
</div>
<div>
<span class="btn default btn-file">
<span class="fileinput-new">Select image </span>
<span class="fileinput-exists">Change </span>
<input type="file" name="avatar"></span>
<a href="#" class="btn default fileinput-exists" data-dismiss="fileinput">Remove </a>
</div>
</div>
<div class="clearfix margin-top-10">
<span class="help-block"><?php echo e($errors->first('avatar', ':message')); ?></span>
</div>
</div>
<div class="margin-top-10">
<!--actions-->
<div class="portlet-title">
<hr>
<div class="actions btn-set pull-right">
<a href="<?php echo e(route('admin.users.salon.index')); ?>" name="back" class="btn btn-sm default"><i class="fa fa-angle-left"></i> <?php echo e(trans('general.action_back')); ?></a>
<button class="btn green btn-sm" name="save" value="save"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save')); ?></button>
<button class="btn green btn-sm" name="save_exit" value="save_exit"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save_exit')); ?></button>
</div>
</div>
<!--/actions-->
</div>
<?php echo Form::close(); ?>
</div>
<!-- END CHANGE AVATAR TAB -->
<!-- CHANGE PASSWORD TAB -->
<div class="tab-pane" id="tab_1_3">
<?php echo Form::model($obj, array('url' => URL::to('admin/users/salon/updatepass').'/'.$obj->id, 'method' => 'put', 'class' => 'bf', 'files'=> true)); ?>
<div class="row">
<div class="col-md-9">
<!--password-->
<div class="form-group <?php echo e($errors->has('password') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
<?php echo e(trans('users::salon.form_password')); ?>
<span class="required" aria-required="true">*</span>
</label>
<div class="col-md-9">
<?php echo Form::password('password', array('class' => 'form-control','placeholder'=>'password')); ?>
<span class="help-block"><?php echo e($errors->first('password', ':message')); ?></span>
</div>
</div>
<!--end password-->
<!--confirm password-->
<div class="form-group <?php echo e($errors->has('password_confirmation') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
<?php echo e(trans('users::salon.form_confirm_password')); ?>
<span class="required" aria-required="true">*</span>
</label>
<div class="col-md-9">
<?php echo Form::password('password_confirmation', array('class' => 'form-control','placeholder'=>'confirm password')); ?>
<span class="help-block"><?php echo e($errors->first('confirm_password', ':message')); ?></span>
</div>
</div>
<!--end confirm password-->
</div>
</div>
<div class="margin-top-10">
<!--actions-->
<div class="portlet-title">
<hr>
<div class="actions btn-set pull-right">
<a href="<?php echo e(route('admin.users.salon.index')); ?>" name="back" class="btn btn-sm default"><i class="fa fa-angle-left"></i> <?php echo e(trans('general.action_back')); ?></a>
<button class="btn green btn-sm" name="save" value="save"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save')); ?></button>
<button class="btn green btn-sm" name="save_exit" value="save_exit"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save_exit')); ?></button>
</div>
</div>
<!--/actions-->
</div>
<?php echo Form::close(); ?>
</div>
<!-- END CHANGE PASSWORD TAB -->
<!--CHANGE ZONES TAB-->
<div class="tab-pane" id="tab_1_4">
<?php echo Form::model($obj, ['url' => URL::to('admin/users/therapists/updateareas') .
'/' . $obj->id, 'method' => 'put', 'class' => 'bf']); ?>
<style type="text/css">
#map_canvas, #map_canvas_travel_cost {
height: 500px;
width: 100%;
margin: 0px;
padding: 0px
}
.modal { z-index: 1001 !important;}
.modal-backdrop {z-index: 1000 !important;}
.pac-container {z-index: 1055 !important;}
#pac-input, #pac-travel-input{
width: 220px;
display: inline-block;
}
.costs_field_wrap #travel_cost{
width: 50%;
}
.costs_field_wrap label, .costs_field_wrap #travel_cost, .costs_field_wrap .btn{
display: inline-block;
}
</style>
<a href="#add_coverage_area" data-toggle="modal" class="create_invoice"><i
class="fa fa-plus-circle"></i> Add New Coverage area</a>
<div class="modal fade bs-modal-lg" id="add_coverage_area" tabindex="-1"
role="basic" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true"></button>
<h4 class="modal-title"> Add New Coverage area</h4>
</div>
<div class="modal-body">
<?php /*error*/ ?>
<div class="invoice_error"></div>
<?php /*end
error*/ ?>
<!-- <div id="map_canvas" style=" border: 2px solid #3872ac;"></div>
<div id="info"></div> -->
<button type="button" class="btn default blue"
id="enablePolygon" value="Calculate Area" />Add new coverage location</button>
<button type="button" class="btn default blue" id="resetPolygon"
value="Reset" style="display: none;" />Reset</button>
<button type="button" class="btn default blue" id="delete_all_polygons"
value="Delete" style="display: none;" />Delete All Locations</button>
<input id="pac-input" class="controls form-control" type="text" placeholder="Search Box">
<div id="map_canvas"></div>
<!-- <div id="showonPolygon" style="display:none;"><b>Area:</b> <span id="areaPolygon"> </span>
</div> -->
</div>
<div class="modal-footer">
<button type="button" class="btn default"
data-dismiss="modal">Cancel</button>
<button type="submit" id="save_coverage_area"
name="create_invoice" class="btn blue action_create_invoice"
therapist-id="<?php echo e($obj->id); ?>">Save</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<input type="hidden" value="<?php echo e($obj->id); ?>" id="therapist-id">
<!-- <div class="portlet">
<div class="portlet-title">
<div class="actions btn-set pull-right">
<a href="<?php echo e(route('admin.users.therapists.index')); ?>" name="back" class="btn btn-sm default"><i class="fa fa-angle-left"></i> <?php echo e(trans('general.action_back')); ?></a>
<button class="btn green btn-sm" name="save" value="save"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save')); ?></button>
<button class="btn green btn-sm" name="save_exit" value="save_exit"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save_exit')); ?></button>
</div>
</div>
<div class="portl et-body">
<?php if($errors->has('zone_id')): ?>
<div class="alert alert-danger">
<?php echo e(trans('users::therapists.message_therapists_zone_id_required')); ?>
</div>
<?php endif; ?>
<div class="portlet">
<div class="portlet-title">
<div class="caption">HEADQUATER</div>
</div>
<div class="portlet-body">
<?php echo Form::select('district_id', $form['districts'], $obj->profile->district_id, ['class' => 'form-control']); ?>
</div>
</div>
<?php $__empty_1 = true; foreach($form['zones'] as $district=>$zones): $__empty_1 = false; ?>
<div class="portlet">
<div class="portlet-title">
<div class="caption">
<input type="checkbox" class="triggerall" id="<?php echo e(str_slug($district)); ?>">
<?php echo e($district); ?>
</div>
<div class="tools">
<span class="badge badge-primary"><?php echo count($zones); ?></span>
<a href="javascript:;" class="collapse" data-original-title="" title="">
</a>
</div>
</div>
<div class="portlet-body">
<?php foreach(collect($zones)->chunk(3) as $chunk): ?>
<div class="row" style="margin-bottom:5px;">
<?php foreach($chunk as $zone_id => $zone_name): ?>
<div class="col-xs-4">
<div class="checkbox-list">
<label class="text-left checkbox-inline col-md-12 <?php if(in_array($zone_id, $form['saved_zones'])): ?> label bg-blue-hoki <?php endif; ?>" style="font-size:12px;">
<?php echo Form::checkbox('zone_id[]', $zone_id, null, ['class' => 'zone_' . str_slug($district)]); ?> <?php echo e($zone_name); ?>
</label>
</div>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; if ($__empty_1): ?>
<div>No areas</div>
<?php endif; ?>
</div>
<div class="portlet-title">
<hr>
<div class="actions btn-set pull-right">
<a href="<?php echo e(route('admin.users.therapists.index')); ?>" name="back" class="btn btn-sm default"><i class="fa fa-angle-left"></i> <?php echo e(trans('general.action_back')); ?></a>
<button class="btn green btn-sm" name="save" value="save"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save')); ?></button>
<button class="btn green btn-sm" name="save_exit" value="save_exit"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save_exit')); ?></button>
</div>
</div>
</div> -->
<?php echo Form::close(); ?>
</div>
<!--END CHANGE ZONES TAB-->
<?php /*tab gallery*/ ?>
<div role="tabpanel" class="tab-pane" id="tab_gallery">
<?php echo Form::open(array('url' => URL::to('admin/users/gallery/add').'/'.$obj->id, 'method' => 'post', 'class' => 'bf form-horizontal', 'files'=> true)); ?>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-title">
<div class="actions">
<button type="button" class="btn btn-xs blue tooltips add_gallery" title="" data-original-title="<?php echo e(trans('general.action_add')); ?>"><i class="fa fa-plus"></i></button>
</div>
</div>
<div class="portlet-body" id="gallery">
<?php if($errors->has('photo')): ?>
<div class="alert alert-danger">
<?php echo $errors->first('photo', ':message'); ?>
</div>
<?php endif; ?>
<?php if(isset($form['saved_gallery'])): ?>
<?php foreach($form['saved_gallery'] as $gal): ?>
<?php echo $__env->make('users::admin.partial_saved_salon_gallery',['gal'=>$gal,'form'=>$form], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if(isset($form['gallery']['file_title'])): ?>
<?php foreach(@$form['gallery']['file_title'] as $key=>$val): ?>
<?php echo $__env->make("banners::admin.partial_new_gallery",['fields'=>$form['gallery'],'key'=>$key,'form'=>$form], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="margin-top-10">
<!--actions-->
<div class="portlet-title">
<hr>
<div class="actions btn-set pull-right">
<a href="<?php echo e(route('admin.users.salon.index')); ?>" name="back" class="btn btn-sm default"><i class="fa fa-angle-left"></i> <?php echo e(trans('general.action_back')); ?></a>
<button class="btn green btn-sm" name="save" value="save"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save')); ?></button>
<button class="btn green btn-sm" name="save_exit" value="save_exit"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save_exit')); ?></button>
</div>
</div>
<!--/actions-->
</div>
<?php echo Form::close(); ?>
</div>
<?php /*end tab gallery*/ ?>
<!--seo-->
<div role="tabpanel" class="tab-pane" id="tab_seo">
<?php echo Form::open(array('url' => URL::to('admin/users/seo/update').'/'.$obj->id, 'method' => 'post', 'class' => 'bf form-horizontal', 'files'=> true)); ?>
<div class="row">
<div class="col-md-8">
<!--meta_title-->
<div class="form-group <?php echo e($errors->has('meta_title') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
<?php echo e(trans('pages::pages.form_meta_title')); ?>
<span class="required" aria-required="true">*</span>
</label>
<?php if(isset($obj->meta_title) && $obj->meta_title != null): ?>
<div class="col-md-9">
<?php echo Form::text('meta_title', $obj->meta_title, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('meta_title', ':message')); ?></span>
</div>
<?php else: ?>
<div class="col-md-9">
<?php echo Form::text('meta_title', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('meta_title', ':message')); ?></span>
</div>
<?php endif; ?>
</div>
<!--end meta_title-->
<!--meta_desc-->
<div class="form-group <?php echo e($errors->has('meta_description') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
<?php echo e(trans('pages::pages.form_meta_description')); ?>
</label>
<?php if(isset($obj->meta_description) && $obj->meta_description != null): ?>
<div class="col-md-9">
<?php echo Form::text('meta_description', $obj->meta_description, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('meta_description', ':message')); ?></span>
</div>
<?php else: ?>
<div class="col-md-9">
<?php echo Form::text('meta_description', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('meta_description', ':message')); ?></span>
</div>
<?php endif; ?>
</div>
<!--end meta_desc-->
<!--meta_keywords-->
<div class="form-group <?php echo e($errors->has('meta_keywords') ? 'has-error' : ''); ?>">
<label class="control-label col-md-3">
<?php echo e(trans('pages::pages.form_meta_keywords')); ?>
</label>
<?php if(isset($obj->meta_keywords) && $obj->meta_keywords != null): ?>
<div class="col-md-9">
<?php echo Form::text('meta_keywords', $obj->meta_keywords, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('meta_keywords', ':message')); ?></span>
</div>
<?php else: ?>
<div class="col-md-9">
<?php echo Form::text('meta_keywords', null, array('class' => 'form-control','placeholder'=>'')); ?>
<span class="help-block"><?php echo e($errors->first('meta_keywords', ':message')); ?></span>
</div>
<?php endif; ?>
</div>
<!--end meta_keywords-->
</div>
</div>
<!--actions-->
<div class="portlet-title">
<hr>
<div class="actions btn-set pull-right">
<a href="<?php echo e(route('admin.users.salon.index')); ?>" name="back" class="btn btn-sm default"><i class="fa fa-angle-left"></i> <?php echo e(trans('general.action_back')); ?></a>
<button class="btn green btn-sm" name="save" value="save"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save')); ?></button>
<button class="btn green btn-sm" name="save_exit" value="save_exit"><i class="fa fa-check"></i> <?php echo e(trans('general.action_save_exit')); ?></button>
</div>
</div>
<!--/actions-->
<?php echo Form::close(); ?>
</div>
<!--end seo-->
</div>
</div>
</div>
</div>
</div>
<!-- END PROFILE CONTENT -->
</div>
<!-- END PROFILE CONTENT -->
</div>
<!-- END PAGE CONTENT-->
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts_custom2'); ?>
<script>
jQuery(document).ready(function() {
$('.triggerall').click(function() {
var el = $(this);
$(".zone_" + el.attr('id')).each(function(index, value) {
$(value).attr('checked', el.is(":checked"));
$.uniform.update();
});
});
});
</script>
<script
src="https://maps.googleapis.com/maps/api/js?libraries=geometry,places,drawing&sensor=false&key=<?php echo e(config('googlemaps.key')); ?>">
</script>
<script>
console.log("here");
google.maps.event.addDomListener(window, "load", initialize);
console.log("here 1");
var geocoder;
var map;
var all_overlays = [];
var polygonArray1 = [];
var travel_polygonArray1 = [];
function initialize() {
console.log("here in 1");
var map = new google.maps.Map(
document.getElementById("map_canvas"), {
center: new google.maps.LatLng(51.5074, 0.1278),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
console.log("here in 2");
var polyOptions = {
strokeWeight: 0,
fillOpacity: 0.35,
editable: true,
fillColor: '#FF0000'
};
console.log("here in 2.5");
var selectedShape;
infoWindow = new google.maps.InfoWindow();
console.log("here in 3");
// // Travel cost initialize
// var travel_cost_map = new google.maps.Map(
// document.getElementById("map_canvas_travel_cost"), {
// center: new google.maps.LatLng(51.5074, 0.1278),
// zoom: 13,
// mapTypeId: google.maps.MapTypeId.ROADMAP
// });
console.log("here in 4");
var travel_drawingManager = new google.maps.drawing.DrawingManager({
drawingMode: google.maps.drawing.OverlayType.POLYGON,
drawingControl: false,
markerOptions: {
draggable: true
},
polygonOptions: polyOptions
});
console.log("here in 5");
var drawingManager = new google.maps.drawing.DrawingManager({
drawingMode: google.maps.drawing.OverlayType.POLYGON,
drawingControl: false,
markerOptions: {
draggable: true
},
polygonOptions: polyOptions
});
console.log("here in 6");
$('#enablePolygon').click(function() {
drawingManager.setMap(map);
drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON);
});
console.log("here 2");
$('#resetPolygon').click(function() {
if(!confirm('Are you sure want to remove..?')){
return false;
}
var remove_listarr = [];
if (selectedShape) {
selectedShape.setMap(null);
}
// console.log(polygonArray1);
for (var i = 0; i < selectedShape.getPath().getLength(); i++) {
// document.getElementById('areaPolygon').innerHTML += polygon.getPath().getAt(i).toUrlValue(6) + "<br>";
remove_listarr.push(selectedShape.getPath().getAt(i).toUrlValue(6));
}
console.log(remove_listarr);
// ajax call to remove it from database table
var CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
var therapist_id = $('input#therapist-id').val();
$.ajax({
url: "<?php echo e(route('admin.users.therapists.delete_coverage_areas')); ?>",
data: {
_token: CSRF_TOKEN,
therapist_id: therapist_id,
remove_locations: remove_listarr
},
method: "POST",
dataType: 'json',
cache: false,
})
.done(function(response) {
alert(response.message);
});
drawingManager.setMap(null);
google.maps.event.addListener(drawingManager, 'overlaycomplete', function(polygon) {
var coordinatesArray = polygon.overlay.getPath().getArray();
//console.log(coordinatesArray);
});
//$('#showonPolygon').hide();
//$('#resetPolygon').hide();
});
console.log("here 3");
// Delete all coverage locations
$('#delete_all_polygons').click(function() {
if(!confirm('Are you sure want to remove all coverage locations..?')){
return false;
}
// ajax call to remove it from database table
var CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
var therapist_id = $('input#therapist-id').val();
$.ajax({
url: "<?php echo e(route('admin.users.therapists.delete_all_coverage_areas')); ?>",
data: {
_token: CSRF_TOKEN,
therapist_id: therapist_id,
},
method: "POST",
dataType: 'json',
cache: false,
})
.done(function(response) {
alert(response.message);
location.reload();
});
});
console.log("here 4");
google.maps.event.addListener(drawingManager, 'polygoncomplete', function(polygon) {
var polygonArray = [];
// document.getElementById('areaPolygon').innerHTML += "polygon points:" + "<br>";
for (var i = 0; i < polygon.getPath().getLength(); i++) {
// document.getElementById('areaPolygon').innerHTML += polygon.getPath().getAt(i).toUrlValue(6) + "<br>";
polygonArray.push(polygon.getPath().getAt(i).toUrlValue(6));
}
polygonArray1.push(polygonArray);
//polygonA rray.push(polygon);
//polygonArray1.push(polygonArray);
//var area = google.maps.geometry.spherical.computeArea(selectedShape.getPath());
//$('#areaPolygon').html(area.toFixed(2)+' Sq meters');
$('#resetPolygon').show();
//$('#showonPolygon').show();
console.log(polygonArray1);
});
function removeA(arr,value) {
for( var i = 0; i < arr.length; i++){
if ( arr[i] === value) {
arr.splice(i, 1);
}
}
return arr;
}
console.log("here 5");
function showArrays(event) {
var vertices = this.getPath();
// var contentString = '<b>' + this.name + '</b><br>' +
// 'Clicked location: <br>' + event.latLng.lat() + ',' + event.latLng.lng() +
// '<br>';
// for (var i = 0; i < vertices.getLength(); i++) {
// var xy = vertices.getAt(i);
// contentString += '<br>' + 'Coordinate ' + i + ':<br>' + xy.lat() + ',' + xy.lng();
// }
var contentString = '<b>' + this.name + '</b>';
infoWindow.setContent(contentString);
infoWindow.setPosition(event.latLng);
infoWindow.open(map);
}
function clearSelection() {
if (selectedShape) {
selectedShape.setEditable(false);
selectedShape = null;
}
}
function setSelection(shape) {
clearSelection();
selectedShape = shape;
shape.setEditable(true);
}
console.log("here 6");
google.maps.event.addListener(drawingManager, 'overlaycomplete', function(e) {
all_overlays.push(e);
if (e.type != google.maps.drawing.OverlayType.MARKER) {
// Switch back to non-drawing mode after drawing a shape.
drawingManager.setDrawingMode(null);
// Add an event listener that selects the newly-drawn shape when the user
// mouses down on it.
var newShape = e.overlay;
newShape.type = e.type;
google.maps.event.addListener(newShape, 'click', function() {
setSelection(newShape);
});
setSelection(newShape);
}
});
// Get coverage areas of therapists
var CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
var therapist_id = $('input#therapist-id').val();
$.ajax({
url: "<?php echo e(route('admin.users.therapists.get_therapists_coverage_areas')); ?>",
data: {
_token: CSRF_TOKEN,
therapist_id: therapist_id
},
method: "POST",
dataType: 'json',
cache: false,
}).done(function(response) {
console.log("here 7 ajax called");
var count = 1;
$.each(response.data, function(key, value) {
let path = [];
value.forEach(element => {
path.push(new google.maps.LatLng(element.lat, element.lng))
})
var otherTriangle = new google.maps.Polygon({
paths: path,
strokeColor: '#FF0000',
strokeOpacity: 0.8,
strokeWeight: 1,
editable: true,
fillColor: '#FF0000',
fillOpacity: 0.35,
name: 'Polygon '+count,
map: map,
indexID: count
});
google.maps.event.addListener(otherTriangle, 'click', showArrays);
google.maps.event.addListener(otherTriangle, 'click', function() {
setSelection(otherTriangle);
});
setSelection(otherTriangle);
addListenersOnPolygon(otherTriangle);
count++;
$('#resetPolygon').show();
$('#delete_all_polygons').show();
});
});
var addListenersOnPolygon = function(polygon) {
google.maps.event.addListener(polygon, 'click', function (event) {
// alert(polygon.indexID);
});
}
console.log("here 8");
// Search Box for coverage location
var searchBox = new google.maps.places.SearchBox(document.getElementById('pac-input'));
var input = document.getElementById('pac-input');
new google.maps.places.Autocomplete(input);
map.controls[google.maps.ControlPosition.TOP_CENTER].push(document.getElementById('pac-input'));
google.maps.event.addListener(searchBox, 'places_changed', function() {
searchBox.set('map', null);
console.log("here 9");
var places = searchBox.getPlaces();
console.log(places);
var bounds = new google.maps.LatLngBounds();
var i, place;
for (i = 0; place = places[i]; i++) {
(function(place) {
var marker = new google.maps.Marker({
position: place.geometry.location
});
marker.bindTo('map', searchBox, 'map');
google.maps.event.addListener(marker, 'map_changed', function() {
if (!this.getMap()) {
this.unbindAll();
}
});
bounds.extend(place.geometry.location);
}(place));
}
map.fitBounds(bounds);
searchBox.set('map', map);
map.setZoom(Math.min(map.getZoom(),12));
});
console.log("here 10");
// // Search Box for travle cost
// var searchBox_travel_cost = new google.maps.places.SearchBox(document.getElementById('pac-travel-input'));
// var input = document.getElementById('pac-travel-input');
// new google.maps.places.Autocomplete(input);
// travel_cost_map.controls[google.maps.ControlPosition.TOP_CENTER].push(document.getElementById('pac-travel-input'));
// google.maps.event.addListener(searchBox_travel_cost, 'places_changed', function() {
// searchBox_travel_cost.set('map', null);
// var trave_places = searchBox_travel_cost.getPlaces();
// console.log(trave_places);
// var bounds = new google.maps.LatLngBounds();
// var i, place;
// for (i = 0; place = trave_places[i]; i++) {
// (function(place) {
// var marker = new google.maps.Marker({
// position: place.geometry.location
// });
// marker.bindTo('map', searchBox_travel_cost, 'map');
// google.maps.event.addListener(marker, 'map_changed', function() {
// if (!this.getMap()) {
// this.unbindAll();
// }
// });
// bounds.extend(place.geometry.location);
// }(place));
// }
// travel_cost_map.fitBounds(bounds);
// searchBox_travel_cost.set('map', travel_cost_map);
// travel_cost_map.setZoom(Math.min(map.getZoom(),12));
// });
/* Travel Cost Javascript starts*/
console.log("here 11");
// $('#enable_transport_Polygon').click(function() {
// travel_drawingManager.setMap(travel_cost_map);
// travel_drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON);
// });
// google.maps.event.addListener(travel_drawingManager, 'polygoncomplete', function(polygon) {
// var travel_polygonArray = [];
// // document.getElementById('areaPolygon').innerHTML += "polygon points:" + "<br>";
// for (var i = 0; i < polygon.getPath().getLength(); i++) {
// // document.getElementById('areaPolygon').innerHTML += polygon.getPath().getAt(i).toUrlValue(6) + "<br>";
// travel_polygonArray.push(polygon.getPath().getAt(i).toUrlValue(6));
// }
// travel_polygonArray1.push(travel_polygonArray);
// //polygonA rray.push(polygon);
// //polygonArray1.push(polygonArray);
// //var area = google.maps.geometry.spherical.computeArea(selectedShape.getPath());
// //$('#areaPolygon').html(area.toFixed(2)+' Sq meters');
// $('#reset_TravelPolygon').show();
// //$('#showonPolygon').show();
// console.log("travel",travel_polygonArray1);
// $("#travel_price_popup").modal('show');
// });
// google.maps.event.addListener(travel_drawingManager, 'overlaycomplete', function(e) {
// all_overlays.push(e);
// if (e.type != google.maps.drawing.OverlayType.MARKER) {
// // Switch back to non-drawing mode after drawing a shape.
// travel_drawingManager.setDrawingMode(null);
// // Add an event listener that selects the newly-drawn shape when the user
// // mouses down on it.
// var newShape = e.overlay;
// newShape.type = e.type;
// google.maps.event.addListener(newShape, 'click', function() {
// setSelection(newShape);
// });
// setSelection(newShape);
// }
// });
// $('button.cancel_price').click(function() {
// if(!confirm('Are you sure want to cancel..?')){
// return false;
// }
// var remove_listarr = [];
// if (selectedShape) {
// selectedShape.setMap(null);
// }
// for (var i = 0; i < selectedShape.getPath().getLength(); i++) {
// // document.getElementById('areaPolygon').innerHTML += polygon.getPath().getAt(i).toUrlValue(6) + "<br>";
// remove_listarr.push(selectedShape.getPath().getAt(i).toUrlValue(6));
// }
// console.log(remove_listarr);
// travel_drawingManager.setMap(null);
// travel_polygonArray1 = [];
// console.log("after delete travel",travel_polygonArray1);
// google.maps.event.addListener(travel_drawingManager, 'overlaycomplete', function(polygon) {
// var coordinatesArray = polygon.overlay.getPath().getArray();
// //console.log(coordinatesArray);
// });
// });
// // Show existing travel cost regioins
// $.ajax({
// url: "<?php echo e(route('admin.users.therapists.get_therapists_travel_cost_areas')); ?>",
// data: {
// _token: CSRF_TOKEN,
// therapist_id: therapist_id
// },
// method: "POST",
// dataType: 'json',
// cache: false,
// }).done(function(response) {
// var count = 1;
// $.each(response.data, function(key, value) {
// let path = [];
// value.forEach(element => {
// path.push(new google.maps.LatLng(element.lat, element.lng))
// })
// var otherTriangle = new google.maps.Polygon({
// paths: path,
// strokeColor: '#FF0000',
// strokeOpacity: 0.8,
// strokeWeight: 1,
// editable: true,
// fillColor: '#FF0000',
// fillOpacity: 0.35,
// name: 'Polygon '+count,
// map: travel_cost_map,
// indexID: count
// });
// google.maps.event.addListener(otherTriangle, 'click', showArrays);
// google.maps.event.addListener(otherTriangle, 'click', function() {
// setSelection(otherTriangle);
// });
// setSelection(otherTriangle);
// addListenersOnPolygon(otherTriangle);
// count++;
// $('#reset_TravelPolygon').show();
// $('#delete_all_travel_polygons').show();
// });
// });
// // Delete selected travel region
// $('#reset_TravelPolygon').click(function() {
// if(!confirm('Are you sure want to remove..?')){
// return false;
// }
// var remove_listarr = [];
// if (selectedShape) {
// selectedShape.setMap(null);
// }
// // console.log(polygonArray1);
// for (var i = 0; i < selectedShape.getPath().getLength(); i++) {
// // document.getElementById('areaPolygon').innerHTML += polygon.getPath().getAt(i).toUrlValue(6) + "<br>";
// remove_listarr.push(selectedShape.getPath().getAt(i).toUrlValue(6));
// }
// console.log(remove_listarr);
// // ajax call to remove it from database table
// var CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
// var therapist_id = $('input#therapist-id').val();
// $.ajax({
// url: "<?php echo e(route('admin.users.therapists.delete_travel_cost_areas')); ?>",
// data: {
// _token: CSRF_TOKEN,
// therapist_id: therapist_id,
// remove_locations: remove_listarr
// },
// method: "POST",
// dataType: 'json',
// cache: false,
// })
// .done(function(response) {
// alert(response.message);
// });
// travel_drawingManager.setMap(null);
// travel_polygonArray1 = [];
// google.maps.event.addListener(travel_drawingManager, 'overlaycomplete', function(polygon) {
// var coordinatesArray = polygon.overlay.getPath().getArray();
// //console.log(coordinatesArray);
// });
// });
// // Delete all tarvel cost locations
// $('#delete_all_travel_polygons').click(function() {
// if(!confirm('Are you sure want to remove all travel cost locations..?')){
// return false;
// }
// // ajax call to remove it from database table
// var CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
// var therapist_id = $('input#therapist-id').val();
// $.ajax({
// url: "<?php echo e(route('admin.users.therapists.delete_all_travel_cost_areas')); ?>",
// data: {
// _token: CSRF_TOKEN,
// therapist_id: therapist_id,
// },
// method: "POST",
// dataType: 'json',
// cache: false,
// })
// .done(function(response) {
// alert(response.message);
// location.reload();
// });
// travel_drawingManager.setMap(null);
// travel_polygonArray1 = [];
// });
/* Travel Cost Javascript ends */
}
// Save coverage area
jQuery(document).ready(function() {
$('#save_coverage_area').click(function() {
var CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
// alert(CSRF_TOKEN);
var el = $(this);
var therapist_id = el.attr('therapist-id');
$.ajax({
url: "<?php echo e(route('admin.users.therapists.add_coverage_areas')); ?>",
data: {
_token: CSRF_TOKEN,
therapist_id: therapist_id,
polygondata: polygonArray1
},
method: "POST",
dataType: 'json',
cache: false,
})
.done(function(response) {
alert(response.message);
polygonArray1 = [];
drawingManager.setMap(null);
});
});
});
// Save travel cost price
jQuery(document).ready(function() {
$('#save_travel_costs').click(function() {
var CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
// alert(CSRF_TOKEN);
var el = $(this);
var therapist_id = el.attr('therapist-id');
var region_price = $('input#travel_cost').val();
$.ajax({
url: "<?php echo e(route('admin.users.therapists.add_travel_cost_for_areas')); ?>",
data: {
_token: CSRF_TOKEN,
therapist_id: therapist_id,
polygondata: travel_polygonArray1,
region_price: region_price,
},
method: "POST",
dataType: 'json',
cache: false,
})
.done(function(response) {
alert(response.message);
travel_polygonArray1 = [];
$('input#travel_cost').val(0);
$("#travel_price_popup").modal('hide');
//travel_drawingManager.setMap(null);
});
});
});
$('button.add_new_time').click(function() {
var el = $(this);
var weekday = el.attr('weekday');
//alert(weekday);
var html = '';
html += '<tr class="new_row"><td></td><td></td><td>';
html += '<div class="input-group">';
html += '<input class="form-control timepicker timepicker-no-seconds" placeholder="" name="bo_start['+weekday+'][]" type="text" value="">';
html += '<span class="input-group-btn"><button class="btn default" type="button"><i class="fa fa-clock-o"></i></button></span>';
html += '</div></td>';
html += '<td><div class="input-group">';
html += '<input class="form-control timepicker timepicker-no-seconds" placeholder="" name="bo_end['+weekday+'][]" type="text" value="">';
html += '<span class="input-group-btn"><button class="btn default" type="button"><i class="fa fa-clock-o"></i></button></span>';
html += '</div></td>';
html += '<td><button id="removeRow" type="button" class="btn btn-danger remove_time" weekday="0"><i class="fa fa-minus"></i></button></td></tr>';
el.parents('tr').next('tr.new_row').after(html);
// el.parents('tr').find("div.new_bo_start").append(html);
// el.parents('tr').find("div.new_bo_end").append(bo_end_html);
// el.parents('tr').find("tr.new_row.timepicker-no-seconds, div.new_bo_end .timepicker-no-seconds").timepicker({
// autoclose: true,
// minuteStep: 5
// });
$('tr.new_row .timepicker-no-seconds').timepicker({
autoclose: true,
minuteStep: 5
});
// handle input group button click
// $('.timepicker').parent('.input-group').on('click', '.input-group-btn', function(e){
// e.preventDefault();
// $(this).parent('.input-group').find('.timepicker').timepicker('showWidget');
// });
});
// remove row
$(document).on('click', '#removeRow', function () {
$(this).closest('tr').remove();
});
</script>
<script src="<?php echo e(asset('/themes/admin/assets/global/plugins/bootstrap-wysihtml5/wysihtml5-0.3.0.js')); ?>"
type="text/javascript"></script>
<script src="<?php echo e(asset('/themes/admin/assets/global/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.js')); ?>"
type="text/javascript"></script>
<script>
jQuery(document).ready(function(){
//add new address
$('#add_address').click(function(){
$.ajax({
url: "<?php echo e(route('admin.users.salon.addaddress')); ?>",
method: "GET",
dataType: "html",
cache: false,
})
.done(function(html) {
$( "#address" ).append(html);
});
});
//delete address
$("body").on('click','.delete_address', function(){
$(this).closest('.addr').remove();
var delId = $(this).attr('adr_id');
if (delId != undefined){
$.ajax({
url: "<?php echo e(route('admin.users.salon.delladdress',['id'=>''])); ?>/"+delId,
method: "GET",
cache: false,
});
} //endif
});
});
</script>
<script>
jQuery(document).ready(function(){
//add new address
$('.add_gallery').click(function(){
$.ajax({
url: "<?php echo e(route('admin.banners.addgallery')); ?>",
method: "GET",
dataType: "html",
cache: false,
})
.done(function(html) {
$("#gallery").append(html);
$(".tooltips").tooltip();
});
});
//delete address
$("body").on('click','.delete_gallery', function(){
$(this).closest('.gal').remove();
var delId = $(this).attr('gal_id');
if (delId != undefined){
$.ajax({
url: "<?php echo e(route('admin.user.salon.delgallery',['id'=>''])); ?>/"+delId,
method: "GET",
cache: false,
});
} //endif
});
});
$('button.add_new_time').click(function() {
var el = $(this);
var weekday = el.attr('weekday');
//alert(weekday);
var html = '';
html += '<tr class="new_row"><td></td><td></td><td>';
html += '<div class="input-group">';
html += '<input class="form-control timepicker timepicker-no-seconds" placeholder="" name="bo_start['+weekday+'][]" type="text" value="">';
html += '<span class="input-group-btn"><button class="btn default" type="button"><i class="fa fa-clock-o"></i></button></span>';
html += '</div></td>';
html += '<td><div class="input-group">';
html += '<input class="form-control timepicker timepicker-no-seconds" placeholder="" name="bo_end['+weekday+'][]" type="text" value="">';
html += '<span class="input-group-btn"><button class="btn default" type="button"><i class="fa fa-clock-o"></i></button></span>';
html += '</div></td>';
html += '<td><button id="removeRow" type="button" class="btn btn-danger remove_time" weekday="0"><i class="fa fa-minus"></i></button></td></tr>';
el.parents('tr').next('tr.new_row').after(html);
// el.parents('tr').find("div.new_bo_start").append(html);
// el.parents('tr').find("div.new_bo_end").append(bo_end_html);
// el.parents('tr').find("tr.new_row.timepicker-no-seconds, div.new_bo_end .timepicker-no-seconds").timepicker({
// autoclose: true,
// minuteStep: 5
// });
$('tr.new_row .timepicker-no-seconds').timepicker({
autoclose: true,
minuteStep: 5
});
// handle input group button click
// $('.timepicker').parent('.input-group').on('click', '.input-group-btn', function(e){
// e.preventDefault();
// $(this).parent('.input-group').find('.timepicker').timepicker('showWidget');
// });
});
// remove row
$(document).on('click', '#removeRow', function () {
$(this).closest('tr').remove();
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.profile', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>