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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/www/dev/storage/framework/views/d72850c587ec56a857c3138e47ccefce9b205f98.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->profile->business_name ? $obj->profile->business_name : $obj->first_name); ?> 
                        </div>
                        <div class="profile-usertitle-job">
                            Service Provider
                        </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>
                                    <li>
                                        <a href="#tab_1_7"
                                            data-toggle="tab"><?php echo e(trans('users::therapists.tab_my_docs')); ?></a>
                                    </li>
                                    <li>
                                        <a href="#tab_1_8"
                                            data-toggle="tab"><?php echo e(trans('users::therapists.tab_membership')); ?></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-lg-9 col-md-12">
                                                <!--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-->

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

                                                    </label>

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

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

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

                                                    </label>

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

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


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

                                                    </label>

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

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

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

                                                    </label>

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

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

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

                                                    </label>

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

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

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

                                                    </label>

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

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

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

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

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

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

                                                    </label>
                                                    <div class="col-md-9">
                                                        <?php echo Form::select('business_type', [
                                                        'solo_trader' => 'Solo Trader',
                                                        'ltd_company' => 'Ltd Company'
                                                        ], old('business_type', $form['business_type'] ?? null), ['class' => 'form-control', 'placeholder' => 'Select Business Type']); ?>

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

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

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

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

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

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

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

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

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

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

                                                <!--techniques-->
                                                <div class="form-group clearfix <?php echo e($errors->has('about') ? 'has-error' : ''); ?>">
                                                    <label class="control-label col-md-3">
                                                        Services
                                                    </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>
                                                        <button userId="<?php echo e($form['userId']); ?>" id="generate-bio" class="btn btn-sm">Generate using AI</button>
                                                    </div>
                                                </div>
                                                <!--end about-->
                                            </div>
                                        </div>

                                        <!--MODES OF TRANSPORT-->
                                        <div class="row">
                                            <div class="col-lg-9 col-md-12">
                                                <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-lg-9 col-md-12">
                                                <div class="portlet">
                                                    <div class="portlet-title">
                                                        <div class="caption">
                                                            <i class="icon-calendar"></i> Working Days
                                                        </div>
                                                    </div>
                                                    <div class="portlet-body table-min-width">
                                                        <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-lg-6 col-md-12">
                                                <!--password-->
                                                <div
                                                    class="form-group <?php echo e($errors->has('password') ? 'has-error' : ''); ?>">
                                                    <label class="control-label col-lg-12">
                                                        <?php echo e(trans('users::therapists.form_password')); ?>

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

                                                    <div class="col-md-12">
                                                        <div class="input-group">
                                                            <?php echo Form::password('password', ['class' => 'form-control', 'placeholder' => 'password', 'id' => 'password']); ?>

                                                            <span class="input-group-addon" onclick="togglePassword('password')" style="cursor:pointer;">
                                                                <i class="fa fa-eye"></i>
                                                            </span>
                                                        </div>
                                                        <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-lg-12">
                                                        <?php echo e(trans('users::therapists.form_confirm_password')); ?>

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

                                                    <div class="col-md-12">
                                                        <div class="input-group">
                                                            <?php echo Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => 'confirm password', 'id' => 'password_confirmation']); ?>

                                                            <span class="input-group-addon" onclick="togglePassword('password_confirmation')" style="cursor:pointer;">
                                                                <i class="fa fa-eye"></i>
                                                            </span>
                                                        </div>
                                                        <span class="help-block"><?php echo e($errors->first('password_confirmation', ':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*/ ?>


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

                                    <!-- My Documents -->
                                    <div class="tab-pane" id="tab_1_7">
                                        <div class="row">
                                            <div class="col-md-12">
                                                <div class="portlet">
                                                    <?php /* Error Message */ ?>
                                                    <?php if($errors->has('document')): ?>
                                                    <div class="alert alert-danger">
                                                        <?php echo $errors->first('document', ':message'); ?>

                                                    </div>
                                                    <?php endif; ?>

                                                    <?php /* Success Message */ ?>
                                                    <?php if(session('success')): ?>
                                                    <div class="alert alert-success">
                                                        <?php echo e(session('success')); ?>

                                                    </div>
                                                    <?php endif; ?>


                                                    <form class="form" action="<?php echo e(url('/admin/users/document/upload')); ?>" enctype="multipart/form-data" method="post">
                                                        <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                                                        <input type="hidden" name="user_id" value="<?php echo e($form['user_docs'][0]['user_id'] ?? $obj->id); ?>">
                                                        <div style="display: flex; flex-wrap:wrap; align-items: center; gap: 10px;">
                                                            <div>
                                                                <label style="display: block;font-weight:bold;" for="document">Document File</label>
                                                                <span class="btn default btn-file">
                                                                    <span class="fileinput-new">Select Document File</span>
                                                                    <input type="file" name="document" id="document">
                                                                </span>
                                                            </div>
                                                            <div>
                                                                <label style="font-weight:bold" for="start_date">Start Date</label>
                                                                <input type="date" name="start_date" id="start_date" class="form-control" style="width: 150px; padding: 4px 6px;">
                                                            </div>
                                                            <div>
                                                                <label style="font-weight:bold" for="expire_date">Expire Date</label>
                                                                <input type="date" name="expire_date" id="expire_date" class="form-control" style="width: 150px; padding: 4px 6px;">
                                                            </div>
                                                            <button type="submit" class="btn btn-primary" style="margin-top: 20px;">Upload</button>
                                                        </div>
                                                    </form>

                                                    <div class="portlet-body table-min-width" id="gallery">
                                                        <?php if(isset($form['user_docs'])): ?>
                                                        <table class="table table-hover table-bordered">
                                                            <thead>
                                                                <tr class="heading">
                                                                    <th width="20%">Document</th>
                                                                     <th width="20%">Start Date</th>
                                                                    <th width="20%">Expire Date</th>
                                                                    <th width="10%">Verified</th>
                                                                    <th width="10%">Manadatory Document</th>
                                                                    <th width="10%">Uploaded At</th>
                                                                    <th width="20%">Action</th>
                                                                </tr>
                                                            </thead>
                                                            <tbody>
                                                                <?php foreach($form['user_docs'] as $doc): ?>
                                                                <tr>
                                                                    <td>

                                                                        <a href="<?php echo e($doc['document_url']); ?>" target="_blank">Click to view document</a>

                                                                    </td>
                                                                    
                                                                    
                                                                    <td>
                                                                        <?php if(!empty($doc['start_date'])): ?>
                                                                            <?php echo e(\Carbon\Carbon::parse($doc['start_date'])->format('F j, Y')); ?>

                                                                        <?php else: ?>
                                                                            Add Start Date
                                                                        <?php endif; ?>

                                                                        <?php /* Always show the form for start date update */ ?>
                                                                        <form method="POST" action="<?php echo e(url('/admin/users/therapists/start-update/' . $doc['id'])); ?>" accept-charset="UTF-8">
                                                                            <?php echo e(csrf_field()); ?>

                                                                            <input type="hidden" name="user_id" value="<?php echo e($doc['user_id']); ?>">
                                                                            <div class="form-group">
                                                                                <input
                                                                                    type="date"
                                                                                    id="start_date"
                                                                                    name="start_date"
                                                                                    class="form-control"
                                                                                    value="<?php echo e(old('start_date', isset($doc['start_date']) ? $doc['start_date'] : '')); ?>">
                                                                            </div>
                                                                            <button type="submit" class="btn btn-primary">Save</button>
                                                                        </form>
                                                                    </td>

                                                                    <td>
                                                                        <?php /* Show existing expire date if available */ ?>
                                                                        <?php if(!empty($doc['expire_date'])): ?>
                                                                            <?php echo e(\Carbon\Carbon::parse($doc['expire_date'])->format('F j, Y')); ?>

                                                                        <?php else: ?>
                                                                            Add Expire Date
                                                                        <?php endif; ?>
                                                                                                                            
                                                                        <?php /* Always show the form for expire date update */ ?>
                                                                        <form method="POST" action="<?php echo e(url('/admin/users/therapists/expiry-update/' . $doc['id'])); ?>" accept-charset="UTF-8">
                                                                            <?php echo e(csrf_field()); ?>

                                                                            <input type="hidden" name="user_id" value="<?php echo e($doc['user_id']); ?>">
                                                                            <div class="form-group">
                                                                                <input
                                                                                    type="date"
                                                                                    id="expire_date"
                                                                                    name="expire_date"
                                                                                    class="form-control"
                                                                                    value="<?php echo e(old('expire_date', isset($doc['expire_date']) ? $doc['expire_date'] : '')); ?>">
                                                                            </div>
                                                                            <button type="submit" class="btn btn-primary">Save</button>
                                                                        </form>
                                                                    </td>
                                                                    <td>
                                                                        <?php if(!empty($doc['is_expired']) && $doc['is_expired']): ?>
                                                                            <span class="label label-danger">Expired</span>
                                                                        <?php elseif($doc['is_approved'] == 1): ?>
                                                                            <span class="label label-success">Verified</span>
                                                                        <?php elseif($doc['is_approved'] == 0): ?>
                                                                            <span class="label label-warning">Not Verified</span>
                                                                        <?php elseif($doc['is_approved'] == 2): ?>
                                                                            <span class="label label-danger">Rejected</span>
                                                                        <?php elseif($doc['is_approved'] == 3): ?>
                                                                            <span class="label label-danger">Expired</span>
                                                                        <?php endif; ?>
                                                                    </td>
                                                                    <td id="doc_row_<?php echo e($doc['id']); ?>">  
                                                                        <input type="checkbox" name="legal_document" value="<?php echo e($doc['id']); ?>" <?php if($doc['is_legal_doc']==1): ?> checked <?php endif; ?>>
                                                                    </td>
                                                                    <td>
                                                                            <?php echo e(\Carbon\Carbon::parse($doc['created_at'])->format('F j, Y')); ?> 
                                                                    </td>
                                                                    <td>
                                                                        <select class="form-control select2" name="is_approved" onchange="location = this.value;">
                                                                            <option 
                                                                                value="<?php echo e(url('/admin/users/therapists/status-update/'.$doc['id'].'/0')); ?>" 
                                                                                <?php if(!$doc['is_expired'] && $doc['is_approved'] == 0): ?> selected <?php endif; ?>>
                                                                                Not Verified
                                                                            </option>
                                                                                                                                
                                                                            <option 
                                                                                value="<?php echo e(url('/admin/users/therapists/status-update/'.$doc['id'].'/1')); ?>" 
                                                                                <?php if(!$doc['is_expired'] && $doc['is_approved'] == 1): ?> selected <?php endif; ?>>
                                                                                Verified
                                                                            </option>
                                                                                                                                
                                                                            <option 
                                                                                value="<?php echo e(url('/admin/users/therapists/status-update/'.$doc['id'].'/2')); ?>" 
                                                                                <?php if(!$doc['is_expired'] && $doc['is_approved'] == 2): ?> selected <?php endif; ?>>
                                                                                Rejected
                                                                            </option>
                                                                                                                                
                                                                            <option 
                                                                                value="<?php echo e(url('/admin/users/therapists/status-update/'.$doc['id'].'/3')); ?>" 
                                                                                <?php if($doc['is_expired'] || $doc['is_approved'] == 3): ?> selected <?php endif; ?>>
                                                                                Expired
                                                                            </option>
                                                                        </select>

                                                                        <form action="<?php echo e(url('/admin/users/document/remove/'.$doc['id'].'/'.$doc['user_id'])); ?>" method="post" onsubmit="return confirm('Are you sure you want to delete this document?');">
                                                                            <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                                                                            <input type="hidden" name="_method" value="DELETE">
                                                                            <button type="submit" style="margin-top:4px;" class="btn btn-primary">Remove</button>
                                                                        </form>
                                                                    </td>


                                                                </tr>
                                                                <?php endforeach; ?>
                                                            </tbody>
                                                        </table>
                                                        <?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.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>
                                        <!-- My Documents end-->
                                    </div>
                                    <!-- My Document End -->

                                    <!-- Trial -->
                                    <div class="tab-pane" id="tab_1_8">
                                        <div class="row">
                                            <div class="col-md-12">
                                                <div class="portlet">
                                                    <?php /* Error Message */ ?>
                                                    <?php if($errors->has('membership')): ?>
                                                    <div class="alert alert-danger">
                                                        <?php echo $errors->first('membership', ':message'); ?>

                                                    </div>
                                                    <?php endif; ?>

                                                    <?php /* Success Message */ ?>
                                                    <?php if(session('success')): ?>
                                                    <div class="alert alert-success">
                                                        <?php echo e(session('success')); ?>

                                                    </div>
                                                    <?php endif; ?>


                                                    <form class="form" action="<?php echo e(url('/admin/users/membership/create')); ?>" method="post">
                                                        <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                                                        <input type="hidden" name="user_id" value="<?php echo e($form['user_docs'][0]['user_id'] ?? $obj->id); ?>">
                                                        <h4><b>Add Membership</b></h4>
                                                        <div style="display: flex; flex-wrap:wrap; align-items: center; gap: 10px;">
                                                            <!-- <label style="display: block;font-weight:bold;" for="document">Add Membership</label> -->
                                                            <div>
                                                                <label style="font-weight:bold" for="start_date">Start Date</label>
                                                                <input type="datetime-local" name="start_date" id="start_date" class="form-control" style="width: 150px; padding: 4px 6px;">
                                                            </div>
                                                            <div>
                                                                <label style="font-weight:bold" for="expire_date">End Date</label>
                                                                <input type="datetime-local" name="expire_date" id="expire_date" class="form-control" style="width: 150px; padding: 4px 6px;">
                                                            </div>
                                                            <button type="submit" class="btn btn-primary" style="margin-top: 20px;">Save</button>
                                                        </div>
                                                    </form>

                                                    <div class="portlet-body table-min-width" id="gallery">
                                                        <?php if(isset($form['user_docs'])): ?>
                                                        <table class="table table-hover table-bordered">
                                                            <thead>
                                                                <tr class="heading">
                                                                    <th width="40%">Membership Type</th>
                                                                    <th width="20%">Start Date</th>
                                                                    <th width="20">Expire Date</th>
                                                                    <!-- <th width="20%">Action</th> -->
                                                                </tr>
                                                            </thead>
                                                            <tbody>
                                                                <?php foreach($form['memberships'] as $memebership): ?>
                                                                <tr>
                                                                    <td>
                                                                        <?php if($memebership['membership_type'] == 'subscription'): ?>
                                                                        <span class="label label-success">Subscription</span>
                                                                        <?php elseif($memebership['membership_type'] == 'trial'): ?>
                                                                        <span class="label label-warning">Membership from admin</span>
                                                                        <?php endif; ?>

                                                                    </td>
                                                                    <td>
                                                                        <?php if($memebership['start_date']): ?>
                                                                        <?php echo e(\Carbon\Carbon::parse($memebership['start_date'])->format('F j, Y \a\t h:i A')); ?>

                                                                        <?php endif; ?>

                                                                    </td>
                                                                    <td>
                                                                        <?php if($memebership['expire_date']): ?>
                                                                        <?php echo e(\Carbon\Carbon::parse($memebership['expire_date'])->format('F j, Y \a\t h:i A')); ?>

                                                                        <?php endif; ?>
                                                                    </td>
                                                                </tr>
                                                                <?php endforeach; ?>
                                                            </tbody>
                                                        </table>
                                                        <?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.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>
                                    </div>
                                    <!-- Trial End  -->
                                </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>
    $(document).ready(function() {
        const CSRF_TOKEN = '<?php echo e(csrf_token()); ?>';
        let previousCheckedId = $('input[name="legal_document"]:checked').val() || null;

        // Update checkbox visuals — only one can be checked at a time
        function updateCheckboxVisual(docId, checked) {
            // // Uncheck all first
            // $('input[name="legal_document"]').each(function() {
            //     const otherDocId = $(this).val();
            //     const td = $('#doc_row_' + otherDocId);
            //     const span = td.find('div.checker span');
            //     span.removeClass('checked');
            //     td.removeClass('selected');
            //     $(this).prop('checked', false);
            // });

            // If checked, mark this one
            if (checked) {
                const td = $('#doc_row_' + docId);
                const span = td.find('div.checker span');
                span.addClass('checked');
                td.addClass('selected');
                $('#chkbx-' + docId).prop('checked', true);
            }
        }

        // Handle checkbox click
        $('input[name="legal_document"]').on('click', function() {
            const docId = $(this).val();
            const isChecked = $(this).is(':checked'); // current state after click

            console.log("Clicked DocId:", docId, "Checked state:", isChecked);

            $.ajax({
                url: '/admin/users/therapists/mark-legal-doc',
                method: 'POST',
                data: { 
                    _token: CSRF_TOKEN,
                    value: docId,
                    checked: isChecked ? 1 : 0
                },
                success: function(response) {
                    console.log('Server response:', response);
                    alert(response.message || 'Document updated successfully!');
                    
                    // Update visuals
                    updateCheckboxVisual(response.docId, response.isChecked);
                    previousCheckedId = isChecked ? docId : null;
                },
                error: function(error) {
                    const errorMsg = error.responseJSON?.message || 'Something went wrong!';
                    console.error('Error:', errorMsg);
                    alert(errorMsg);

                    // revert to last successful state
                    if (previousCheckedId) {
                        updateCheckboxVisual(previousCheckedId, true);
                    } else {
                        updateCheckboxVisual(docId, false);
                    }
                }
            });
        });

        // Initialize visuals on page load
        $('input[name="legal_document"]').each(function() {
            const td = $(this).closest('td');
            td.addClass('doc-row');
            if ($(this).is(':checked')) {
                td.addClass('selected');
                td.find('div.checker span').addClass('checked');
            }
        });
    });
</script>

<script>
        google.maps.event.addDomListener(window, "load", initialize);
        console.log("1");
        var geocoder;
        var map;
        var all_overlays = [];
        var polygonArray1 = [];
        var travel_polygonArray1 = [];

        function initialize() {
            console.log("2");
            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
            });

            $('#generate-bio').click(function(e) {
                e.preventDefault(); // prevent default button behavior (like form submission)

                // Get userId from the button's attribute
                var userId = $(this).attr('userId');

                $.ajax({
                    url: "<?php echo e(route('admin.users.generateBio')); ?>",
                    method: "POST",
                    dataType: "html",
                    cache: false,
                    data: {
                        userId: userId,         // send userId in request body
                        _token: "<?php echo e(csrf_token()); ?>" // include CSRF token for Laravel
                    },
                    success: function(response) {
                        var responseJson = JSON.parse(response);
                       if(responseJson.bio) {
                            // Insert the generated bio into the textarea
                            $('textarea[name="about"]').val(responseJson.bio);

                            // If using CKEditor, update its content too
                            if (typeof CKEDITOR !== 'undefined') {
                                for (var instance in CKEDITOR.instances) {
                                    CKEDITOR.instances[instance].setData(responseJson.bio);
                                }
                            }
                        } else {
                            alert('No bio generated.');
                        }
                    },
                    error: function(xhr, status, error) {
                        console.error(error);
                        alert('Failed to generate bio.');
                    }
                });
            });


        });

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

        function togglePassword(id) {
            const input = document.getElementById(id);
            input.type = input.type === "password" ? "text" : "password";
        }

        function togglePassword(id) {
            const input = document.getElementById(id);
            const icon = input.nextElementSibling.querySelector('i');
                
            if (input.type === "password") {
                input.type = "text";
                icon.classList.remove('fa-eye');
                icon.classList.add('fa-eye-slash');
            } else {
                input.type = "password";
                icon.classList.remove('fa-eye-slash');
                icon.classList.add('fa-eye');
            }
        }

</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.profile', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

ZeroDay Forums Mini