Sh3ll
OdayForums


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/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/www/storage/framework/views/b49ec42f1491e50681b3727d0eace0edf6f9f0ef.php
`

<?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.therapists.index'); ?>"><?php echo e(trans('users::therapists.breadcrumbs_title')); ?></a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="<?php echo route('admin.users.therapists.index'); ?>"><?php echo e(trans('users::therapists.page_title')); ?></a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <?php if(isset($obj)): ?>
                        <a href="#"><?php echo e(trans('users::therapists.edit_title')); ?></a>
                    <?php else: ?>
                        <a href="#"><?php echo e(trans('users::therapists.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">
                                <?php echo e($obj->role); ?> 
                            </div>
                        </div>
                        <!-- END SIDEBAR USER TITLE -->

                        <!-- SIDEBAR MENU -->
                        <div class="profile-usermenu">
                            <ul class="nav">
                                <li>
                                    <a href="<?php echo e(route('admin.users.therapists.show', ['id' => $obj->id])); ?>">
                                        <i class="icon-home"></i>
                                        <?php echo e(trans('users::therapists.overview_title')); ?>

                                    </a>
                                </li>
                                <li class="active">
                                    <a href="#">
                                        <i class="icon-settings"></i>
                                        <?php echo e(trans('users::therapists.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::therapists.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::therapists.tab_personal_info')); ?></a>
                                        </li>
                                        <li>
                                            <a href="#tab_1_2"
                                                data-toggle="tab"><?php echo e(trans('users::therapists.tab_avatar')); ?></a>
                                        </li>
                                        
                                        <li>
                                            <a href="#tab_gallery" data-toggle="tab">My Work</a>
                                        </li>
                                       
                                        <?php if(!isset($salon_id)): ?>
                                        <li>
                                            <a href="#tab_1_3"
                                                data-toggle="tab"><?php echo e(trans('users::therapists.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_1_5"
                                                data-toggle="tab"><?php echo e(trans('users::therapists.tab_services_duration_prices')); ?></a>
                                        </li>
                                        <li>
                                            <a href="#tab_1_6"
                                                data-toggle="tab"><?php echo e(trans('users::therapists.travel_costs')); ?></a>
                                        </li>
                                        <?php endif; ?>
                                    </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, ['url' => URL::to('admin/users/therapists') . '/' .
                                            $obj->id, 'method' => 'put', 'class' => 'bf', 'files' => true]); ?>

                                            <div class="row">
                                                <div class="col-md-9">
                                                    <!--email-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('first_name') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_email')); ?>

                                                            <span class="required" aria-required="true">*</span>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('email', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('email', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end email-->

                                                    <!--name-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('first_name') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_first_name')); ?>

                                                            <span class="required" aria-required="true">*</span>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('first_name', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('first_name', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end name-->

                                                    <!--payment_method-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('payment_method') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_payment_method')); ?>

                                                            <?php /*<span class="required"
                                                                aria-required="true">*</span>*/ ?>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('payment_method', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('payment_method', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end payment_method-->
                                                    
                                                    <?php if(Auth::user()->hasRole('developer')): ?>
                                                    <!--website_url-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('tictok_id') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_website_url')); ?>

                                                            <?php /*<span class="required"
                                                                aria-required="true">*</span>*/ ?>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('website_url', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('website_url', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end website_url-->
                                                   
                                                    <!--instagram_id-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('instagram_id') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_instagram_id')); ?>

                                                            <?php /*<span class="required"
                                                                aria-required="true">*</span>*/ ?>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('instagram_id', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('instagram_id', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end payment_method-->

                                                    <!--facebook_id-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('facebook_id') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_facebook_id')); ?>

                                                            <?php /*<span class="required"
                                                                aria-required="true">*</span>*/ ?>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('facebook_id', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('facebook_id', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end facebook_id-->

                                                    <!--tictok_id-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('tictok_id') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_tictok_id')); ?>

                                                            <?php /*<span class="required"
                                                                aria-required="true">*</span>*/ ?>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('tictok_id', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('tictok_id', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end tictok_id-->

                                                    <!--tictok_id-->
                                                    <div
                                                        class="form-group clearfix <?php echo e($errors->has('youtube_id') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_youtube_id')); ?>

                                                            <?php /*<span class="required"
                                                                aria-required="true">*</span>*/ ?>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('youtube_id', null, ['class' => 'form-control',
                                                            'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('youtube_id', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end tictok_id-->
                                                    <?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::therapists.form_mobile_number')); ?>

                                                            <span class="required" aria-required="true">*</span>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::text('mobile_number', null, ['class' =>
                                                            'form-control', 'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('mobile_number', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end mobile number-->

                                                    <!--techniques-->
                                                    <div class="form-group clearfix <?php echo e($errors->has('about') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_techniques')); ?>

                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::select('service_id[]', $form['services'],
                                                            $form['saved_services'], ['class' => 'form-control select2',
                                                            'multiple']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('product_id', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end techniques-->

                                                    <!--about-->
                                                    <div class="form-group clearfix <?php echo e($errors->has('about') ? 'has-error' : ''); ?>">
                                                        <label class="control-label col-md-3">
                                                            <?php echo e(trans('users::therapists.form_about')); ?>

                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::textarea('about', null, ['class' => 'form-control
                                                            ckeditor', 'placeholder' => '']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('about', ':message')); ?></span>
                                                        </div>
                                                    </div>
                                                    <!--end about-->
                                                </div>
                                            </div>

                                            <!--MODES OF TRANSPORT-->
                                            <div class="row">
                                                <div class="col-md-9">
                                                    <div class="portlet">
                                                        <div class="portlet-title">
                                                            <div class="caption">
                                                                <i class="fa fa-location-arrow"></i> Modes of Transport
                                                            </div>
                                                        </div>
                                                        <div class="portlet-body">
                                                            <!--modes-->
                                                            <div
                                                                class="form-group <?php echo e($errors->has('transport_modes') ? 'has-error' : ''); ?>">

                                                                <?php echo Form::select('transport_mode', $form['transport_modes'],
                                                                null, ['class' => 'form-control']); ?>

                                                                <span
                                                                    class="help-block text-danger"><?php echo e($errors->first('transport_modes', ':message')); ?></span>

                                                            </div>
                                                            <!--end modes-->
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END MODES OF TRANSPORT-->

                                            <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>

                                            <?php if(Auth::user()->hasRole('developer')): ?>
                                            <!--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-->
                                            <?php endif; ?>


                                            <?php if(!isset($salon_id)): ?>
                                            <!--MASSAGE TABLE-->
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="portlet">
                                                        <div class="portlet-title">
                                                            <div class="caption">
                                                                <i class="fa fa-cogs"></i> Equipment
                                                            </div>
                                                        </div>
                                                        <div class="portlet-body">
                                                            <div class="checkbox-list">
                                                                <label class="text-left checkbox-inline col-md-12">
                                                                    <?php echo Form::checkbox('massage_table_status', 1,
                                                                    $form['massage_table_status']); ?> Equipment included
                                                                </label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END MASSAGE TABLE-->
                                            <?php endif; ?>
                                            <!-- END PERSONAL INFO TAB -->
                                            <!--actions-->
                                            <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 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, ['url' => URL::to('admin/users/therapists/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;">
                                                        <img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image"
                                                            alt="" />
                                                    </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.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>
                                                <!--/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, ['url' => URL::to('admin/users/therapists/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::therapists.form_password')); ?>

                                                            <span class="required" aria-required="true">*</span>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::password('password', ['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::therapists.form_confirm_password')); ?>

                                                            <span class="required" aria-required="true">*</span>
                                                        </label>

                                                        <div class="col-md-9">
                                                            <?php echo Form::password('password_confirmation', ['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.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>
                                                <!--/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">&nbsp;</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 /*THERAPIST COMMISION
                                        TAB*/ ?>
                                        <div class="tab-pane" id="tab_1_5">
                                            <?php echo Form::model($obj, ['url' =>
                                            URL::to('admin/users/therapists/updatecommisions') . '/' . $obj->id, 'method' =>
                                            'put', 'class' => 'bf', 'files' => true]); ?>

                                            <div class="row">
                                                <div class="col-md-12">
                                                    <!--commision-->
                                                    <div class="form-group">
                                                        <div class="col-md-2">
                                                            <div class="therapist-commision-table-header">
                                                                Category
                                                            </div>
                                                        </div>
                                                        <div class="col-md-2">
                                                            <div class="therapist-commision-table-header">
                                                                Sub Category
                                                            </div>
                                                        </div>
                                                        <div class="col-md-2">
                                                            <div class="therapist-commision-table-header">
                                                                <?php echo e(trans('users::therapists.tabel_services_duration_name')); ?>

                                                            </div>
                                                        </div>

                                                        <div class="col-md-2">
                                                            <div class="therapist-commision-table-header">
                                                                <?php echo e(trans('users::therapists.tabel_services_duration_price')); ?>

                                                            </div>
                                                        </div>

                                                        <div class="col-md-2">
                                                            <div class="therapist-commision-table-header">
                                                                <?php echo e(trans('users::therapists.tabel_services_duration_commision_co')); ?>

                                                            </div>
                                                        </div>

                                                        <div class="col-md-2">
                                                            <div class="therapist-commision-table-header">
                                                                <?php echo e(trans('users::therapists.tab_services_duration_commision_th')); ?>

                                                            </div>
                                                        </div>

                                                    </div>
                                                    <!--end commision-->
                                                </div>
                                                <?php /*<?php echo e(dd($errors)); ?>*/ ?>
                                                <div class="col-md-12">
                                                    <?php foreach($form['services_duration_commisions'] as $service): ?>
                                                        
                                                        <?php /*<?php echo e(dd($service)); ?>*/ ?>
                                                        <!--commision-->
                                                        <div class="col-md-2 category_name">
                                                            <?php echo e($service['category_name']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('first_name', ':message')); ?></span>
                                                        </div>

                                                        <div class="col-md-2 category_name">
                                                                <?php echo e($service['subcategory_name']); ?>

                                                            <span
                                                                class="help-block text-danger"><?php echo e($errors->first('first_name', ':message')); ?></span>
                                                        </div>

                                                        <div
                                                            class="form-group clearfix <?php echo e($errors->has('price_' . $service['services_duration_id']) ? 'has-error' : ''); ?>">
                                                            <label class="control-label col-md-2 <?php if(!$service['is_custom']): ?> text-danger <?php endif; ?>">
                                                                <?php echo e($service['name']); ?>

                                                                <?php if($service['is_default']): ?>
                                                                    <span
                                                                        class='badge badge-primary badge-roundless'><?php echo e(trans('services::duration.text_default_session')); ?></span>
                                                                <?php elseif($service['is_extra']): ?>
                                                                    <span
                                                                        class='badge badge-warning badge-roundless'><?php echo e(trans('services::duration.text_extra_session')); ?></span>
                                                                <?php endif; ?>
                                                            </label>

                                                            <div class="col-md-2">
                                                                <?php echo Form::text('services_duration_commisions[' .
                                                                $service['services_duration_id'] . '][price_' .
                                                                $service['services_duration_id'] . ']', $service['price'],
                                                                ['class' => 'form-control', 'placeholder' => '']); ?>

                                                                <span
                                                                    class="help-block text-danger"><?php echo e($errors->first('first_name', ':message')); ?></span>
                                                            </div>

                                                            <div class="col-md-2">
                                                                <?php echo Form::text('services_duration_commisions[' .
                                                                $service['services_duration_id'] . '][commision_co]',
                                                                $service['commision_co'], ['class' => 'form-control',
                                                                'placeholder' => '']); ?>

                                                                <span
                                                                    class="help-block text-danger"><?php echo e($errors->first('first_name', ':message')); ?></span>
                                                            </div>

                                                            <div class="col-md-2">
                                                                <?php echo Form::text('services_duration_commisions[' .
                                                                $service['services_duration_id'] . '][commision_th]',
                                                                $service['commision_th'], ['class' => 'form-control',
                                                                'placeholder' => '']); ?>

                                                                <span
                                                                    class="help-block text-danger"><?php echo e($errors->first('first_name', ':message')); ?></span>
                                                            </div>
                                                        </div>
                                                        <!--end commision-->
                                                    <?php endforeach; ?>
                                                </div>
                                            </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>
                                            <?php echo Form::close(); ?>


                                        </div>
                                        <?php /*END THERAPIST
                                        COMMISION*/ ?>

                                        <!-- Travel Costs Therapists -->
                                        <div class="tab-pane" id="tab_1_6">
                                            <a href="#travel_cost_coverage_area" data-toggle="modal" class="create_invoice"><i
                                                    class="fa fa-plus-circle"></i> Add Travel Costs</a>

                                            <div class="modal fade bs-modal-lg" id="travel_cost_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 Travel Costs for Coverage area</h4>
                                                        </div>
                                                        <div class="modal-body">
                                                            <button type="button" class="btn default blue"
                                                                id="enable_transport_Polygon" value="Calculate Area" />Add new
                                                            polygon</button>
                                                            <button type="button" class="btn default blue" id="reset_TravelPolygon"
                                                                value="Reset" style="display: none;" />Reset</button>
                                                            <button type="button" class="btn default blue" id="delete_all_travel_polygons"
                                                                value="Delete" style="display: none;" />Delete All Locations</button>

                                                            <input id="pac-travel-input" class="controls form-control" type="text" placeholder="Search Box">
                                                            <div id="map_canvas_travel_cost"></div>
                                                        </div>
                                                    </div>
                                                    <!-- /.modal-content -->
                                                </div>
                                                <!-- /.modal-dialog -->
                                            </div>
                                            <input type="hidden" value="<?php echo e($obj->id); ?>" id="therapist-id">  

                                            <!-- /travel price popup -->
                                            <div class="modal fade bs-modal-md" id="travel_price_popup" tabindex="-1"
                                                role="basic" aria-hidden="true" style="display: none;">
                                                <div class="modal-dialog modal-md" style="margin-top: 15%">
                                                    <div class="modal-content">
                                                        <div class="modal-header">
                                                            <h4 class="modal-title"> <strong>Add Price for this Region</strong></h4>
                                                        </div>
                                                        <div class="modal-body">
                                                            <div class="costs_field_wrap col-md-10 text-left">
                                                                <label>Travel Cost: </label>
                                                                <input type="number" id="travel_cost" class="form-control travel_cost" value="0">
                                                                <button type="submit" id="save_travel_costs"
                                                                name="save_travel_costs" class="btn blue action_create_invoice"
                                                                therapist-id="<?php echo e($obj->id); ?>">Save</button>
                                                            </div>
                                                            <div class="col-md-2">
                                                                <button type="button" class="btn default cancel_price"
                                                                data-dismiss="modal">Cancel</button>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <!-- /.modal-content -->
                                                </div>
                                                <!-- /.modal-dialog -->
                                            </div>

                                        
                                        </div>
                                        <!-- My Work -->
                                        <div class="tab-pane" id="tab_gallery">
                                            <?php echo Form::open(array('url' => URL::to('admin/users/mywork/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>
                                        <!-- My work end -->
                                    </div>
                                </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,drawing&key=AIzaSyCzFbEC7RwxFSYrWp8aqEQfiPn0TrdQJAs"></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>
    google.maps.event.addDomListener(window, "load", initialize);

    var geocoder;
    var map;
    var all_overlays = [];
    var polygonArray1 = [];
    var travel_polygonArray1 = [];

    function initialize() {
        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
            });


        var polyOptions = {
            strokeWeight: 0,
            fillOpacity: 0.35,
            editable: true,
            fillColor: '#FF0000'
        };

        var selectedShape;
        infoWindow = new google.maps.InfoWindow();

        // 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 
            });
        var travel_drawingManager = new google.maps.drawing.DrawingManager({
            drawingMode: google.maps.drawing.OverlayType.POLYGON,
            drawingControl: false,
            markerOptions: {
                draggable: true
            },
            polygonOptions: polyOptions
        });

        var drawingManager = new google.maps.drawing.DrawingManager({
            drawingMode: google.maps.drawing.OverlayType.POLYGON,
            drawingControl: false,
            markerOptions: {
                draggable: true
            },
            polygonOptions: polyOptions
        });

        

        $('#enablePolygon').click(function() {
            drawingManager.setMap(map);
            drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON);
        });

        

        $('#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();      
        });

        // 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();
            });
        });

        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;
        }


        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);
        }

        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) {
            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);
              });  
            }

        // 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);


             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));

           });

           // 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*/
        

        $('#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>
    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.mywork.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(); ?>

ZeroDay Forums Mini