 <?php $__env->startSection('styles'); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <?php if(session()->has('error')): ?> <div class="alert alert-danger"><?php echo e(session()->get('error')); ?></div> <?php endif; ?> <?php if(session()->has('success')): ?> <div class="alert alert-success"><?php echo e(session()->get('success')); ?></div> <?php endif; ?> <?php if(count($errors) > 0): ?> <div class="alert alert-danger"> <ul> <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li><?php echo e($error); ?></li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> </div> <?php endif; ?> <?php $user = auth('backend')->user();
    if($user->type == \App\User::STAFF)
        {
            $user = \App\User::find($user->staff_owner_id);
        }

    ?> <div class="row"> <div class="col-md-6"> <div class="portlet light bordered"> <div class="portlet-title"> <div class="caption font-red-sunglo"> <i class="icon-settings font-red-sunglo"></i> <span class="caption-subject bold uppercase"> Cài đặt chung</span> </div> </div> <div class="portlet-body form"> <form role="form" action="<?php echo e(url('admin2/setting/update')); ?>" method="POST" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <div class="form-body"> <div class="form-group"> <label>Nhắc thông báo hợp đồng sắp hết hạn trước bao nhiêu ngày</label> <input class="form-control" name="day_remind_empty_room" type="number" min="1" value="<?php echo e($user->day_remind_empty_room); ?>"/> </div> <div class="form-group"> <label>Ngày tự động lập hóa đơn tiền phòng</label> <input class="form-control" name="day_generate_money_info" type="number" min="0" value="<?php echo e($user->day_generate_money_info); ?>"/> </div> <div class="form-group"> <label>Cho phép khách thuê tạo group chat</label> <select class="form-control" name="allow_renter_make_group"> <option <?php if($user->allow_renter_make_group == 1): ?> selected <?php endif; ?> value="1">Có </option> <option <?php if($user->allow_renter_make_group == 0): ?> selected <?php endif; ?> value="0">Không </option> </select> </div> <div class="form-group"> <label>Cho phép khách thuê xem group chat nhà tạo bởi hệ thống</label> <select class="form-control" name="allow_renter_view_hostel_group"> <option <?php if($user->allow_renter_view_hostel_group == 1): ?> selected <?php endif; ?> value="1">Có </option> <option <?php if($user->allow_renter_view_hostel_group == 0): ?> selected <?php endif; ?> value="0">Không </option> </select> </div> <div class="form-group"> <label>Cho phép khách thuê xem group chat phòng tạo bởi hệ thống</label> <select class="form-control" name="allow_renter_view_room_group"> <option <?php if($user->allow_renter_view_room_group == 1): ?> selected <?php endif; ?> value="1">Có </option> <option <?php if($user->allow_renter_view_room_group == 0): ?> selected <?php endif; ?> value="0">Không </option> </select> </div> <div class="form-group"> <label> Xem hóa đơn tiền nhà tháng này + tiền dịch vụ tháng trước </label> <select class="form-control" name="type_display_money_info"> <option <?php if($user->type_display_money_info == \App\User::TYPE_DISPLAY_MONEY_INFO_PREVIOUS_MONTH): ?> selected <?php endif; ?> value="<?php echo e(\App\User::TYPE_DISPLAY_MONEY_INFO_PREVIOUS_MONTH); ?>">Có </option> <option <?php if($user->type_display_money_info == \App\User::TYPE_DISPLAY_MONEY_INFO_CURRENT_MONTH): ?> selected <?php endif; ?> value="<?php echo e(\App\User::TYPE_DISPLAY_MONEY_INFO_CURRENT_MONTH); ?>">Không </option> </select> </div> <div class="form-group"> <label>Cho phép khách thuê thanh toán bằng momo</label> <select class="form-control" name="allow_renter_momo_payment"> <option <?php if($user->allow_renter_momo_payment == 1): ?> selected <?php endif; ?> value="1">Có </option> <option <?php if($user->allow_renter_momo_payment == 0): ?> selected <?php endif; ?> value="0">Không </option> </select> </div> <div class="form-group"> <label>Đơn vị tiền tệ</label> <?php
                                    $money_list = \App\Models\MoneyUnit::all();
                                    $user_money = \App\Models\UserMoney::where('user_id', $user->id)->first();
                                ?> <select class="form-control" name="money_unit"> <?php $__currentLoopData = $money_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($item->id); ?>" <?php if(!empty($user_money)): ?> <?php echo e($item->id==$user_money->money_unit?"selected":""); ?> <?php endif; ?>> <?php echo e($item->unit); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="form-actions"> <button type="submit" class="btn blue">Lưu</button> </div> </form> </div> </div> </div> </div> <?php $__env->stopSection(); ?>
<?php echo $__env->make('admin2', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>