

<?php $__env->startSection('title', trans('user.views.index.title')); ?>

<?php $__env->startSection('content'); ?>
<div class="tp-dashboard-head"><!-- page header -->
  <div class="container">
    <div class="row">
      <div class="col-md-12 profile-header">
        <div class="profile-pic col-md-2">
          <?php if($user->logo != null): ?>

          <img src="<?php echo e($user->logo_thumb); ?>" alt="" class="img-circle">
          <?php else: ?>
          <img src="<?php echo e(asset('images/couple-profile.jpg')); ?>" alt="" class="img-circle">
          <?php endif; ?>
        </div>
        <div class="profile-info col-md-9">
          <h1 class="profile-title"><?php echo e($user->name); ?><small>#</small></h1>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- /.page header -->
<div class="tp-dashboard-nav">
  <div class="container">
    <div class="row">
      <div class="col-md-12 dashboard-nav">
          <?php echo $__env->make('vendor._partials.navigation', ['_active_navigation' => 'profile.mesaje'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      </div>
    </div>
  </div>
</div>
<div class="main-container">
	<div class="container">
		    <div class="row">
        <div class="col-md-12">
            <div class="page-header">
                <h1><?php echo e($job->title); ?></h1>
            </div>


            <div class="row">
                <div class="col-lg-12">
                    <?php echo Notification::showAll(); ?>

                    <?php if(count($services) > 0): ?>
                        <form method="POST" class="form-horizontal" action="<?php echo e(route('user.job.services.order', $job->id)); ?>">
                            <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                            <fieldset>
                                <legend>Promovare</legend>
                                <?php foreach($services as $serviceType => $paidServices): ?>
                                    <div class="form-group <?php if($errors->has('service_' . $serviceType)): ?> has-error <?php endif; ?>">
                                        <label class="col-md-4 control-label">Promovare furnizor</label>
                                        <div class="col-md-6">
											<div class="checkbox checkbox-success">
												<input name="service_<?php echo e($serviceType); ?>" id="gratuit" type="radio" class="styled" value="" <?php if(old('service_' . $serviceType) == ''): ?> checked <?php endif; ?>>
												<label for="gratuit" class="control-label"> Gratuit </label>
											</div>										
                                            <?php foreach($paidServices as $paidService): ?>
												<div class="checkbox checkbox-success">											
													<input name="service_<?php echo e($serviceType); ?>" id="service_<?php echo e($serviceType); ?>_<?php echo e($paidService->id); ?>" type="radio" value="<?php echo e($paidService->id); ?>" <?php if(old('service_' . $serviceType) == $paidService->id): ?> checked <?php endif; ?>>
													<label for="service_<?php echo e($serviceType); ?>_<?php echo e($paidService->id); ?>" class="control-label">
														<span class="badge">
															<?php if(!is_null($paidService->price)): ?>
																<?php echo e(format_balance($paidService->price)); ?>

															<?php else: ?>
																<?php echo e(trans('user.views.create_job.form.services.free')); ?>

															<?php endif; ?>
														</span>
														<?php echo e($paidService->title); ?>

														<small class="text-muted"><?php echo e($paidService->description); ?></small>
													</label>
												</div>
                                            <?php endforeach; ?>
                                        </div>
                                    </div>
                                <?php endforeach; ?>
                                <hr>
                                <div class="form-group">
                                    <div class="col-md-6 col-md-offset-4">
                                        <button type="submit" class="btn btn-primary">
                                            <?php echo e(trans('user.views.job_services.form.order')); ?>

                                        </button>
                                    </div>
                                </div>
                            </fieldset>
                        </form>
                    <?php else: ?>
                        <div class="alert alert-info"><?php echo e(trans('user.views.job_services.no_services')); ?></div>
                    <?php endif; ?>

                    <hr>

                    <?php if(count($job_services) > 0): ?>
                        <h4><?php echo e(trans('user.views.job.services.header')); ?></h4>
                        <table class="table table-hover no-margin">
                            <thead>
                            <tr>
                                <th><?php echo e(trans('user.views.job_services.services.active')); ?></th>
                                <th><?php echo e(trans('user.views.job_services.services.title')); ?></th>
                                <th><?php echo e(trans('user.views.job_services.services.type')); ?></th>
                                <th><?php echo e(trans('user.views.job_services.services.price')); ?></th>
                                <th><?php echo e(trans('user.views.job_services.services.active_from')); ?></th>
                                <th><?php echo e(trans('user.views.job_services.services.active_to')); ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach($job_services as $job_service): ?>
                                <tr>
                                    <td>
                                        <?php if($job_service->active): ?>
                                            <span class="label label-success"><?php echo e(trans('user.views.job_services.services.active_yes')); ?></span>
                                        <?php else: ?>
                                            <span class="label label-danger"><?php echo e(trans('user.views.job_services.services.active_no')); ?></span>
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($job_service->title); ?></td>
                                    <td><?php echo e(trans('user.views.job_services.services.type_' . $job_service->type)); ?></td>
                                    <td>
                                        <?php if(!is_null($job_service->price)): ?>
                                            <?php echo e(format_balance($job_service->price)); ?>

                                        <?php else: ?>
                                            <span class="label label-default"><?php echo e(trans('user.views.job_services.services.price_free')); ?></span>
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($job_service->active_from); ?></td>
                                    <td><?php echo e($job_service->active_to); ?></td>
                                </tr>
                            <?php endforeach; ?>
                            </tbody>
                        </table>
                    <?php else: ?>
                        <div class="alert alert-info"><?php echo e(trans('user.views.job_services.services.not_ordered')); ?></div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
	</div>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>