ok
Direktori : /home2/selectio/www/fms-worksuite/storage/framework/views/ |
Current File : /home2/selectio/www/fms-worksuite/storage/framework/views/29fdf4ac5139870c645c8062524c7224.php |
<?php $addLeadAgentPermission = user()->permission('manage_leave_setting'); $approveRejectPermission = user()->permission('approve_or_reject_leaves'); ?> <link rel="stylesheet" href="<?php echo e(asset('vendor/css/dropzone.min.css')); ?>"> <div class="row"> <div class="col-sm-12"> <?php if (isset($component)) { $__componentOriginal18ad2e0d264f9740dc73fff715357c28 = $component; } ?> <?php $component = App\View\Components\Form::resolve(['method' => 'put'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('form'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Form::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['id' => 'save-lead-data-form']); ?> <div class="add-client bg-white rounded"> <h4 class="mb-0 p-20 f-21 font-weight-normal text-capitalize border-bottom-grey"> <?php echo app('translator')->get('app.menu.editLeaves'); ?></h4> <div class="row p-20"> <div class="col-lg-3 col-md-6"> <?php if(isset($defaultAssign)): ?> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => '','fieldLabel' => __('app.name'),'fieldRequired' => 'true'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <input type="hidden" name="user_id" id="user_id" value="<?php echo e($defaultAssign->id); ?>"> <input type="text" value="<?php echo e($defaultAssign->name); ?>" class="form-control height-35 f-15 readonly-background" readonly> <?php else: ?> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => '','fieldLabel' => __('modules.messages.chooseMember'),'fieldRequired' => 'true'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <select class="form-control select-picker" name="user_id" id="user_id" data-live-search="true"> <option value="">--</option> <?php $__currentLoopData = $employees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $employee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if (isset($component)) { $__componentOriginal6c7097547485b98631a37d273a171e9f = $component; } ?> <?php $component = App\View\Components\UserOption::resolve(['user' => $employee,'selected' => (request()->has('default_assign') && request('default_assign') == $employee->id) || ($leave->user_id == $employee->id)] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('user-option'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\UserOption::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal6c7097547485b98631a37d273a171e9f)): ?> <?php $component = $__componentOriginal6c7097547485b98631a37d273a171e9f; ?> <?php unset($__componentOriginal6c7097547485b98631a37d273a171e9f); ?> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php endif; ?> </div> <div class="col-lg-3 col-md-6"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => '','fieldLabel' => __('modules.leaves.leaveType'),'fieldRequired' => 'true'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <select class="form-control select-picker" name="leave_type_id" id="leave_type_id" data-live-search="true"> <option value="">--</option> <?php $__currentLoopData = $leaveQuotas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $leaveQuota): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $leaveType = new \App\Models\LeaveType(); ?> <?php if($leaveType->leaveTypeCodition($leaveQuota, $userRole)): ?> <option <?php if($leave->leave_type_id == $leaveQuota->id): ?> selected <?php endif; ?> value="<?php echo e($leaveQuota->id); ?>"> <?php echo e(mb_ucwords($leaveQuota->type_name)); ?></option> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($addLeadAgentPermission == 'all' || $addLeadAgentPermission == 'added'): ?> <?php $__env->slot('append', null, []); ?> <button type="button" class="btn btn-outline-secondary border-grey add-lead-type" data-toggle="tooltip" data-original-title="<?php echo e(__('modules.leaves.addLeaveType')); ?>"><?php echo app('translator')->get('app.add'); ?></button> <?php $__env->endSlot(); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> <?php if($approveRejectPermission == 'all'): ?> <div class="col-lg-3 col-md-6"> <?php if (isset($component)) { $__componentOriginal67cd5dc9866c6185ad92d933c387fa86 = $component; } ?> <?php $component = App\View\Components\Forms\Select::resolve(['fieldId' => 'status','fieldLabel' => __('app.status'),'fieldName' => 'status','search' => 'true'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.select'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Select::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <option <?php if($leave->status == 'approved'): ?> selected <?php endif; ?> value="approved"><?php echo app('translator')->get('app.approved'); ?></option> <option <?php if($leave->status == 'pending'): ?> selected <?php endif; ?> value="pending"><?php echo app('translator')->get('app.pending'); ?></option> <option <?php if($leave->status == 'rejected'): ?> selected <?php endif; ?> value="rejected"><?php echo app('translator')->get('app.rejected'); ?></option> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86)): ?> <?php $component = $__componentOriginal67cd5dc9866c6185ad92d933c387fa86; ?> <?php unset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86); ?> <?php endif; ?> </div> <?php endif; ?> <div class="col-lg-3 col-md-6"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldLabel' => __('app.date'),'fieldName' => 'leave_date','fieldId' => 'single_date','fieldPlaceholder' => __('app.date'),'fieldValue' => $leave->leave_date->translatedFormat(company()->date_format)] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.text'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Text::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal4e45e801405ab67097982370a6a83cba)): ?> <?php $component = $__componentOriginal4e45e801405ab67097982370a6a83cba; ?> <?php unset($__componentOriginal4e45e801405ab67097982370a6a83cba); ?> <?php endif; ?> </div> <div class="col-md-12"> <div class="form-group my-3"> <?php if (isset($component)) { $__componentOriginal2f60389a9e230471cd863683376c182f = $component; } ?> <?php $component = App\View\Components\Forms\Textarea::resolve(['fieldLabel' => __('modules.leaves.reason'),'fieldName' => 'reason','fieldId' => 'reason','fieldPlaceholder' => __('placeholders.leave.reason'),'fieldValue' => $leave->reason,'fieldRequired' => true] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.textarea'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Textarea::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0 mr-lg-2 mr-md-2']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal2f60389a9e230471cd863683376c182f)): ?> <?php $component = $__componentOriginal2f60389a9e230471cd863683376c182f; ?> <?php unset($__componentOriginal2f60389a9e230471cd863683376c182f); ?> <?php endif; ?> </div> </div> <?php if($leave->status == 'rejected'): ?> <div class="col-md-12"> <div class="form-group my-3"> <?php if (isset($component)) { $__componentOriginal2f60389a9e230471cd863683376c182f = $component; } ?> <?php $component = App\View\Components\Forms\Textarea::resolve(['fieldLabel' => __('modules.leaves.rejectReason'),'fieldName' => 'reject_reason','fieldId' => 'reject_reason','fieldPlaceholder' => '','fieldValue' => $leave->reject_reason] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.textarea'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Textarea::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0 mr-lg-2 mr-md-2']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal2f60389a9e230471cd863683376c182f)): ?> <?php $component = $__componentOriginal2f60389a9e230471cd863683376c182f; ?> <?php unset($__componentOriginal2f60389a9e230471cd863683376c182f); ?> <?php endif; ?> </div> </div> <?php endif; ?> <div class="col-md-12 mt-3"> <a class="f-15 f-w-500" href="javascript:;" id="add-file"><i class="icons icon-plus font-weight-bold mr-1"></i><?php echo app('translator')->get('modules.events.uploadFile'); ?></a> </div> <div class="col-md-12 d-none" id="leave-file"> <?php if (isset($component)) { $__componentOriginal22e84ee8172e1045de536542f4ffc9a0 = $component; } ?> <?php $component = App\View\Components\Forms\FileMultiple::resolve(['fieldLabel' => __('app.menu.addFile'),'fieldName' => 'file','fieldId' => 'file-upload-dropzone'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.file-multiple'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\FileMultiple::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-0','popover' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('messages.leaveFileMessage'))]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal22e84ee8172e1045de536542f4ffc9a0)): ?> <?php $component = $__componentOriginal22e84ee8172e1045de536542f4ffc9a0; ?> <?php unset($__componentOriginal22e84ee8172e1045de536542f4ffc9a0); ?> <?php endif; ?> <div class="w-100 justify-content-end d-flex mt-2"> <button id="cancel-file" type="button" class="btn btn-secondary border-grey rounded f-14"><?php echo app('translator')->get('app.cancel'); ?></button> </div> </div> <div class="col-sm-12"> <div div class="d-flex flex-wrap mt-3" id="leave-file-list"> <?php $__empty_1 = true; $__currentLoopData = $leave->files; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $file): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <?php if (isset($component)) { $__componentOriginalcc3eadf431dc104666da55af50a04915 = $component; } ?> <?php $component = App\View\Components\FileCard::resolve(['fileName' => $file->filename,'dateAdded' => $file->created_at->diffForHumans()] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('file-card'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FileCard::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php if($file->icon == 'images'): ?> <img src="<?php echo e($file->file_url); ?>"> <?php else: ?> <i class="fa <?php echo e($file->icon); ?> text-lightest"></i> <?php endif; ?> <?php $__env->slot('action', null, []); ?> <div class="dropdown ml-auto file-action"> <button class="btn btn-lg f-14 p-0 text-lightest text-capitalize rounded dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-ellipsis-h"></i> </button> <div class="dropdown-menu dropdown-menu-right border-grey rounded b-shadow-4 p-0" aria-labelledby="dropdownMenuLink" tabindex="0"> <?php if($file->icon = 'images'): ?> <a class="cursor-pointer d-block text-dark-grey f-13 pt-3 px-3 " target="_blank" href="<?php echo e($file->file_url); ?>"><?php echo app('translator')->get('app.view'); ?></a> <?php endif; ?> <a class="cursor-pointer d-block text-dark-grey f-13 py-3 px-3 " href="<?php echo e(route('leave-files.download', md5($file->id))); ?>"><?php echo app('translator')->get('app.download'); ?></a> <a class="cursor-pointer d-block text-dark-grey f-13 pb-3 px-3 delete-file" data-row-id="<?php echo e($file->id); ?>" href="javascript:;"><?php echo app('translator')->get('app.delete'); ?></a> </div> </div> <?php $__env->endSlot(); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcc3eadf431dc104666da55af50a04915)): ?> <?php $component = $__componentOriginalcc3eadf431dc104666da55af50a04915; ?> <?php unset($__componentOriginalcc3eadf431dc104666da55af50a04915); ?> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <div class="col-md-12" id="no-files"> <?php if (isset($component)) { $__componentOriginal269164c77d9d34462c34359c03da6a68 = $component; } ?> <?php $component = App\View\Components\Cards\NoRecord::resolve(['message' => __('messages.noFileUploaded'),'icon' => 'file'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('cards.no-record'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Cards\NoRecord::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal269164c77d9d34462c34359c03da6a68)): ?> <?php $component = $__componentOriginal269164c77d9d34462c34359c03da6a68; ?> <?php unset($__componentOriginal269164c77d9d34462c34359c03da6a68); ?> <?php endif; ?> </div> <?php endif; ?> </div> </div> </div> <?php if (isset($component)) { $__componentOriginalb19caa501eea72410c04d1917a586963 = $component; } ?> <?php $component = App\View\Components\FormActions::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('form-actions'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FormActions::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php if (isset($component)) { $__componentOriginalcf8d12533ff890e0d6573daf32b7618d = $component; } ?> <?php $component = App\View\Components\Forms\ButtonPrimary::resolve(['icon' => 'check'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-primary'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonPrimary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['id' => 'save-leave-form','class' => 'mr-3']); ?><?php echo app('translator')->get('app.save'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d)): ?> <?php $component = $__componentOriginalcf8d12533ff890e0d6573daf32b7618d; ?> <?php unset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalc35c79ed7e812580313ad04118477974 = $component; } ?> <?php $component = App\View\Components\Forms\ButtonCancel::resolve(['link' => route('leaves.index')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-cancel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonCancel::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'border-0']); ?><?php echo app('translator')->get('app.cancel'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalc35c79ed7e812580313ad04118477974)): ?> <?php $component = $__componentOriginalc35c79ed7e812580313ad04118477974; ?> <?php unset($__componentOriginalc35c79ed7e812580313ad04118477974); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalb19caa501eea72410c04d1917a586963)): ?> <?php $component = $__componentOriginalb19caa501eea72410c04d1917a586963; ?> <?php unset($__componentOriginalb19caa501eea72410c04d1917a586963); ?> <?php endif; ?> </div> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal18ad2e0d264f9740dc73fff715357c28)): ?> <?php $component = $__componentOriginal18ad2e0d264f9740dc73fff715357c28; ?> <?php unset($__componentOriginal18ad2e0d264f9740dc73fff715357c28); ?> <?php endif; ?> </div> </div> <script src="<?php echo e(asset('vendor/jquery/dropzone.min.js')); ?>"></script> <script> $(document).ready(function() { Dropzone.autoDiscover = false; //Dropzone class leaveDropzone = new Dropzone("div#file-upload-dropzone", { dictDefaultMessage: "<?php echo e(__('app.dragDrop')); ?>", url: "<?php echo e(route('leave-files.store')); ?>", headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' }, paramName: "file", maxFilesize: DROPZONE_MAX_FILESIZE, maxFiles: DROPZONE_MAX_FILES, autoProcessQueue: false, uploadMultiple: true, addRemoveLinks: true, parallelUploads: DROPZONE_MAX_FILES, acceptedFiles: DROPZONE_FILE_ALLOW, init: function() { leaveDropzone = this; } }); leaveDropzone.on('sending', function(file, xhr, formData) { var ids = "<?php echo e($leave->id); ?>"; formData.append('leave_id', ids); $.easyBlockUI(); }); leaveDropzone.on('uploadprogress', function() { $.easyBlockUI(); }); leaveDropzone.on('queuecomplete', function() { window.location.href = "<?php echo e(route('leaves.index')); ?>" }); leaveDropzone.on('removedfile', function () { var grp = $('div#file-upload-dropzone').closest(".form-group"); var label = $('div#file-upload-box').siblings("label"); $(grp).removeClass("has-error"); $(label).removeClass("is-invalid"); }); leaveDropzone.on('error', function (file, message) { leaveDropzone.removeFile(file); var grp = $('div#file-upload-dropzone').closest(".form-group"); var label = $('div#file-upload-box').siblings("label"); $(grp).find(".help-block").remove(); var helpBlockContainer = $(grp); if (helpBlockContainer.length == 0) { helpBlockContainer = $(grp); } helpBlockContainer.append('<div class="help-block invalid-feedback">' + message + '</div>'); $(grp).addClass("has-error"); $(label).addClass("is-invalid"); }); const dp1 = datepicker('#single_date', { position: 'bl', dateSelected: new Date("<?php echo e(str_replace('-', '/', $leave->leave_date)); ?>"), ...datepickerConfig }); $('#add-file').click(function() { $(this).addClass('d-none'); $('#leave-file').removeClass('d-none'); $('#no-files').addClass('d-none'); }); $('#cancel-file').click(function() { $('#leave-file').toggleClass('d-none'); $('#add-file').toggleClass('d-none'); $('#no-files').toggleClass('d-none'); }); $('body').on('click', '.delete-file', function() { var id = $(this).data('row-id'); Swal.fire({ title: "<?php echo app('translator')->get('messages.sweetAlertTitle'); ?>", text: "<?php echo app('translator')->get('messages.recoverRecord'); ?>", icon: 'warning', showCancelButton: true, focusConfirm: false, confirmButtonText: "<?php echo app('translator')->get('messages.confirmDelete'); ?>", cancelButtonText: "<?php echo app('translator')->get('app.cancel'); ?>", customClass: { confirmButton: 'btn btn-primary mr-3', cancelButton: 'btn btn-secondary' }, showClass: { popup: 'swal2-noanimation', backdrop: 'swal2-noanimation' }, buttonsStyling: false }).then((result) => { if (result.isConfirmed) { var url = "<?php echo e(route('leave-files.destroy', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ type: 'POST', url: url, data: { '_token': token, '_method': 'DELETE' }, success: function(response) { if (response.status == "success") { $('#leave-file-list').html(response.view); } } }); } }); }); $('#save-leave-form').click(function() { const url = "<?php echo e(route('leaves.update', $leave->id)); ?>"; $.easyAjax({ url: url, container: '#save-lead-data-form', type: "POST", disableButton: true, blockUI: true, buttonSelector: "#save-leave-form", data: $('#save-lead-data-form').serialize(), success: function(response) { if (response.status == 'success') { if (response.status == 'success') { if(leaveDropzone.getQueuedFiles().length > 0) { leaveDropzone.processQueue(); } window.location.href = response.redirectUrl; } } } }); }); $('body').on('click', '.add-lead-type', function() { var url = "<?php echo e(route('leaveType.create')); ?>"; $(MODAL_LG + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_LG, url); }); init(RIGHT_MODAL); }); </script> <?php /**PATH /home2/selectio/public_html/fms-worksuite/resources/views/leaves/ajax/edit.blade.php ENDPATH**/ ?>