ok
Direktori : /home2/selectio/www/fms-worksuite/storage/framework/views/ |
Current File : /home2/selectio/www/fms-worksuite/storage/framework/views/88f05235bf689a2f6881f55dab845da3.php |
<div class="row"> <div class="col-sm-12"> <?php if (isset($component)) { $__componentOriginal18ad2e0d264f9740dc73fff715357c28 = $component; } ?> <?php $component = App\View\Components\Form::resolve([] + (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-timelog-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.timeLog'); ?> <?php echo app('translator')->get('app.details'); ?></h4> <div class="row p-20"> <div class="col-md-12"> <div class="row"> <div class="col-md-6 col-lg-4"> <?php if (isset($component)) { $__componentOriginal67cd5dc9866c6185ad92d933c387fa86 = $component; } ?> <?php $component = App\View\Components\Forms\Select::resolve(['fieldId' => 'project_id2','fieldName' => 'project_id','fieldLabel' => __('app.project'),'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 value="">--</option> <?php $__currentLoopData = $projects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $project): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php echo e(request()->default_project == $project->id ? 'selected' : ''); ?> value="<?php echo e($project->id); ?>"> <?php echo e($project->project_name); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86)): ?> <?php $component = $__componentOriginal67cd5dc9866c6185ad92d933c387fa86; ?> <?php unset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86); ?> <?php endif; ?> </div> <div class="col-md-6 col-lg-4"> <?php if (isset($component)) { $__componentOriginal67cd5dc9866c6185ad92d933c387fa86 = $component; } ?> <?php $component = App\View\Components\Forms\Select::resolve(['fieldId' => 'task_id2','fieldName' => 'task_id','fieldLabel' => __('app.task'),'fieldRequired' => 'true','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 value="">--</option> <?php $__currentLoopData = $tasks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($field->id); ?>"> <?php echo e($field->heading); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86)): ?> <?php $component = $__componentOriginal67cd5dc9866c6185ad92d933c387fa86; ?> <?php unset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86); ?> <?php endif; ?> </div> <?php if($addTimelogPermission == 'all'): ?> <div class="col-md-6 col-lg-4"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => 'user_id2','fieldLabel' => __('app.employee'),'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' => 'mt-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="user_id" id="user_id2" data-live-search="true" data-size="8"> <option value="">--</option> </select> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> <?php else: ?> <input type="hidden" name="user_id" value="<?php echo e(user()->id); ?>"> <div class="col-md-6 col-lg-4"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => 'user_id2','fieldLabel' => ' '] + (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' => 'mt-3']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginal9a71dc76dd25d4db3618f7b2896e958f = $component; } ?> <?php $component = App\View\Components\Employee::resolve(['user' => user()] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('employee'); ?> <?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\Employee::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($__componentOriginal9a71dc76dd25d4db3618f7b2896e958f)): ?> <?php $component = $__componentOriginal9a71dc76dd25d4db3618f7b2896e958f; ?> <?php unset($__componentOriginal9a71dc76dd25d4db3618f7b2896e958f); ?> <?php endif; ?> </div> <?php endif; ?> </div> <div class="row"> <div class="col-md-3 col-lg-3"> <?php if (isset($component)) { $__componentOriginalf704f069031d81dfb7cf95f6709a6a66 = $component; } ?> <?php $component = App\View\Components\Forms\Datepicker::resolve(['fieldId' => 'start_date','fieldRequired' => 'true','fieldLabel' => __('modules.timeLogs.startDate'),'fieldName' => 'start_date','fieldValue' => \Carbon\Carbon::now(company()->timezone)->format(company()->date_format),'fieldPlaceholder' => __('placeholders.date')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.datepicker'); ?> <?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\Datepicker::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($__componentOriginalf704f069031d81dfb7cf95f6709a6a66)): ?> <?php $component = $__componentOriginalf704f069031d81dfb7cf95f6709a6a66; ?> <?php unset($__componentOriginalf704f069031d81dfb7cf95f6709a6a66); ?> <?php endif; ?> </div> <div class="col-md-3 col-lg-3"> <div class="bootstrap-timepicker timepicker"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldLabel' => __('modules.timeLogs.startTime'),'fieldPlaceholder' => __('placeholders.hours'),'fieldName' => 'start_time','fieldId' => 'start_time','fieldRequired' => 'true'] + (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> <div class="col-md-3 col-lg-3"> <?php if (isset($component)) { $__componentOriginalf704f069031d81dfb7cf95f6709a6a66 = $component; } ?> <?php $component = App\View\Components\Forms\Datepicker::resolve(['fieldId' => 'end_date','fieldRequired' => 'true','fieldLabel' => __('modules.timeLogs.endDate'),'fieldName' => 'end_date','fieldValue' => \Carbon\Carbon::now(company()->timezone)->format(company()->date_format),'fieldPlaceholder' => __('placeholders.date')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.datepicker'); ?> <?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\Datepicker::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($__componentOriginalf704f069031d81dfb7cf95f6709a6a66)): ?> <?php $component = $__componentOriginalf704f069031d81dfb7cf95f6709a6a66; ?> <?php unset($__componentOriginalf704f069031d81dfb7cf95f6709a6a66); ?> <?php endif; ?> </div> <div class="col-md-3 col-lg-3"> <div class="bootstrap-timepicker timepicker"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldLabel' => __('modules.timeLogs.endTime'),'fieldPlaceholder' => __('placeholders.hours'),'fieldName' => 'end_time','fieldId' => 'end_time','fieldRequired' => 'true'] + (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> </div> </div> <div class="col-md-6"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldLabel' => __('modules.timeLogs.memo'),'fieldName' => 'memo','fieldRequired' => 'true','fieldId' => 'memo','fieldPlaceholder' => __('placeholders.timelog.memo')] + (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-6"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => 'total_time','fieldLabel' => __('modules.timeLogs.totalHours')] + (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; ?> <p id="total_time" class="f-w-500 text-primary f-21">0 <?php echo app('translator')->get('app.hrs'); ?></p> </div> </div> <?php if (isset($component)) { $__componentOriginalfa1d9407bf58c9650823154ec52dea3e = $component; } ?> <?php $component = App\View\Components\Forms\CustomField::resolve(['fields' => $fields] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.custom-field'); ?> <?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\CustomField::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($__componentOriginalfa1d9407bf58c9650823154ec52dea3e)): ?> <?php $component = $__componentOriginalfa1d9407bf58c9650823154ec52dea3e; ?> <?php unset($__componentOriginalfa1d9407bf58c9650823154ec52dea3e); ?> <?php endif; ?> <?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-timelog-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('timelogs.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> $(document).ready(function() { $('.custom-date-picker').each(function(ind, el) { datepicker(el, { position: 'bl', ...datepickerConfig }); }); const dp1 = datepicker('#start_date', { position: 'bl', onSelect: (instance, date) => { if (typeof dp2.dateSelected !== 'undefined' && dp2.dateSelected.getTime() < date .getTime()) { dp2.setDate(date, true) } if (typeof dp2.dateSelected === 'undefined') { dp2.setDate(date, true) } dp2.setMin(date); calculateTime(); }, ...datepickerConfig }); const dp2 = datepicker('#end_date', { position: 'bl', onSelect: (instance, date) => { dp1.setMax(date); calculateTime(); }, ...datepickerConfig }); $('#start_time, #end_time').timepicker({ <?php if(company()->time_format == 'H:i'): ?> showMeridian: false, <?php endif; ?> }).on('hide.timepicker', function(e) { calculateTime(); }); $('#project_id2').change(function() { var id = $(this).val(); if (id == '') { id = 0; } var url = "<?php echo e(route('tasks.project_tasks', ':id').'?for_timelogs=true'); ?>"; url = url.replace(':id', id); $.easyAjax({ url: url, type: "GET", container: '#save-timelog-data-form', blockUI: true, redirect: true, success: function(data) { $('#task_id2').html(data.data); $('#task_id2').selectpicker('refresh'); } }) }); $('#task_id2').change(function() { var id = $(this).val(); if (id == '') { id = 0; } var url = "<?php echo e(route('tasks.members', ':id')); ?>"; url = url.replace(':id', id); $.easyAjax({ url: url, type: "GET", container: '#save-timelog-data-form', blockUI: true, redirect: true, success: function(data) { $('#user_id2').html(data.data); $('#user_id2').selectpicker('refresh'); } }) }); $('#save-timelog-form').click(function() { const url = "<?php echo e(route('timelogs.store')); ?>"; $.easyAjax({ url: url, container: '#save-timelog-data-form', type: "POST", disableButton: true, blockUI: true, file: true, buttonSelector: "#save-timelog-form", data: $('#save-timelog-data-form').serialize(), success: function(response) { if (response.status == 'success') { if ($(RIGHT_MODAL).hasClass('in')) { document.getElementById('close-task-detail').click(); window.LaravelDataTables["timelogs-table"].draw(false); } else { window.location.href = response.redirectUrl; } } } }); }); function calculateTime() { var format = '<?php echo e(company()->moment_date_format); ?>'; var startDate = $('#start_date').val(); var endDate = $('#end_date').val(); var startTime = $("#start_time").val(); var endTime = $("#end_time").val(); startDate = moment(startDate, format).format('YYYY-MM-DD'); endDate = moment(endDate, format).format('YYYY-MM-DD'); var timeStart = new Date(startDate + " " + startTime); var timeEnd = new Date(endDate + " " + endTime); var diff = (timeEnd - timeStart) / 60000; //dividing by seconds and milliseconds var minutes = diff % 60; var hours = (diff - minutes) / 60; if (hours < 0 || minutes < 0) { Swal.fire({ icon: 'warning', text: "<?php echo app('translator')->get('messages.totalTimeZero'); ?>", customClass: { confirmButton: 'btn btn-primary', }, showClass: { popup: 'swal2-noanimation', backdrop: 'swal2-noanimation' }, buttonsStyling: false }); $("#start_time").val(startTime); $('#end_time').val(endTime); return false; var numberOfDaysToAdd = 1; timeEnd.setDate(timeEnd.getDate() + numberOfDaysToAdd); var dd = timeEnd.getDate(); if (dd < 10) { dd = "0" + dd; } var mm = timeEnd.getMonth() + 1; if (mm < 10) { mm = "0" + mm; } var y = timeEnd.getFullYear(); $('#end_date').val(mm + '/' + dd + '/' + y); calculateTime(); } else { $('#total_time').html(hours + "Hrs " + minutes + "Mins"); } } init(RIGHT_MODAL); }); function checkboxChange(parentClass, id){ var checkedData = ''; $('.'+parentClass).find("input[type= 'checkbox']:checked").each(function () { checkedData = (checkedData !== '') ? checkedData+', '+$(this).val() : $(this).val(); }); $('#'+id).val(checkedData); } </script> <?php /**PATH /home2/selectio/public_html/fms-worksuite/resources/views/timelogs/ajax/create.blade.php ENDPATH**/ ?>