whoami7 - Manager
:
/
home
/
kckglobal
/
public_html
/
portal
/
storage
/
framework
/
views
/
Upload File:
files >> /home/kckglobal/public_html/portal/storage/framework/views/2b7383e8834d1e7826e7ef614fb849b4.php
<?php $addProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('add_project_milestones'); $viewProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('view_project_milestones'); $editProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('edit_project_milestones'); $deleteProjectMilestonePermission = ($project->project_admin == user()->id) ? 'all' : user()->permission('delete_project_milestones'); $statuses = ['complete', 'incomplete']; // Define all your possible statuses here ?> <!-- ROW START --> <div class="row py-5"> <div class="col-lg-12 col-md-12 mb-4 mb-xl-0 mb-lg-4"> <?php if(($addProjectMilestonePermission == 'all' || $project->project_admin == user()->id) && !$project->trashed()): ?> <?php if (isset($component)) { $__componentOriginalcf8d12533ff890e0d6573daf32b7618d = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginalcf8d12533ff890e0d6573daf32b7618d = $attributes; } ?> <?php $component = App\View\Components\Forms\ButtonPrimary::resolve(['icon' => 'plus'] + (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' => 'add-project-milestone','class' => 'type-btn mb-3']); ?> <?php echo app('translator')->get('modules.projects.createMilestone'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginalcf8d12533ff890e0d6573daf32b7618d)): ?> <?php $attributes = $__attributesOriginalcf8d12533ff890e0d6573daf32b7618d; ?> <?php unset($__attributesOriginalcf8d12533ff890e0d6573daf32b7618d); ?> <?php endif; ?> <?php if (isset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d)): ?> <?php $component = $__componentOriginalcf8d12533ff890e0d6573daf32b7618d; ?> <?php unset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d); ?> <?php endif; ?> <?php endif; ?> <?php if($viewProjectMilestonePermission == 'all' || $viewProjectMilestonePermission == 'added' || ($viewProjectMilestonePermission == 'owned' && $userId == $project->client_id)): ?> <?php if (isset($component)) { $__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginalbc9540fa671f26a0f8028a5a8d8f93e9 = $attributes; } ?> <?php $component = App\View\Components\Cards\Data::resolve(['title' => __('modules.projects.milestones'),'otherClasses' => 'border-0 p-0 d-flex justify-content-between align-items-center table-responsive-sm'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('cards.data'); ?> <?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\Data::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php if (isset($component)) { $__componentOriginal7d9f6e0b9001f5841f72577781b2d17f = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal7d9f6e0b9001f5841f72577781b2d17f = $attributes; } ?> <?php $component = App\View\Components\Table::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('table'); ?> <?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\Table::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'border-0 pb-3 admin-dash-table table-hover']); ?> <?php $__env->slot('thead', null, []); ?> <th class="pl-20">S. No.</th> <th><?php echo app('translator')->get('modules.projects.milestoneTitle'); ?></th> <th><?php echo app('translator')->get('modules.projects.milestoneCost'); ?></th> <th><?php echo app('translator')->get('modules.projects.taskCount'); ?></th> <th><?php echo app('translator')->get('app.status'); ?></th> <th class="text-right pr-20"><?php echo app('translator')->get('app.action'); ?></th> <?php $__env->endSlot(); ?> <?php $__empty_1 = true; $__currentLoopData = $project->milestones; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr id="row-<?php echo e($item->id); ?>"> <td class="pl-20"><?php echo e($key + 1); ?></td> <td> <a href="javascript:;" class="milestone-detail text-darkest-grey f-w-500" data-milestone-id="<?php echo e($item->id); ?>"><?php echo e($item->milestone_title); ?></a> </td> <td> <?php if(!is_null($item->currency_id)): ?> <?php echo e(currency_format($item->cost, $item->currency->id)); ?> <?php else: ?> <?php echo e(currency_format($item->cost, $item->currency_id)); ?> <?php endif; ?> </td> <td> <?php echo e($item->tasks_count); ?> </td> <td> <select class="form-control select-picker change-milestone-status" id="change-milestone-status" data-size="5" data-milestone-id="<?php echo e($item->id); ?>"> <?php $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $iconClass = $status == 'complete' ? 'fa fa-circle mr-1 text-dark-green' : 'fa fa-circle mr-1 text-red'; ?> <option value="<?php echo e($status); ?>" data-icon="<?php echo e($iconClass); ?>" <?php if($item->status == $status): ?> selected <?php endif; ?>> <?php echo e(trans('app.' . $status)); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </td> <td class="text-right pr-20"> <div class="task_view"> <a href="javascript:;" data-milestone-id="<?php echo e($item->id); ?>" class="taskView milestone-detail text-darkest-grey f-w-500"><?php echo app('translator')->get('app.view'); ?></a> <div class="dropdown"> <a class="task_view_more d-flex align-items-center justify-content-center dropdown-toggle" type="link" id="dropdownMenuLink-<?php echo e($item->id); ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="icon-options-vertical icons"></i> </a> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink-<?php echo e($item->id); ?>" tabindex="0"> <?php if($editProjectMilestonePermission == 'all' || ($editProjectMilestonePermission == 'added' && (user()->id == $item->added_by || $userId == $item->added_by))): ?> <?php if(is_null($project->deleted_at)): ?> <a class="dropdown-item edit-milestone" href="javascript:;" data-row-id="<?php echo e($item->id); ?>"> <i class="fa fa-edit mr-2"></i> <?php echo app('translator')->get('app.edit'); ?> </a> <?php endif; ?> <?php endif; ?> <?php if($deleteProjectMilestonePermission == 'all' || ($deleteProjectMilestonePermission == 'added' && (user()->id == $item->added_by || $userId == $item->added_by))): ?> <a class="dropdown-item delete-row" href="javascript:;" data-row-id="<?php echo e($item->id); ?>"> <i class="fa fa-trash mr-2"></i> <?php echo app('translator')->get('app.delete'); ?> </a> <?php endif; ?> </div> </div> </div> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php if (isset($component)) { $__componentOriginal1cadea97ad834515c6e69c0ef44e7014 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal1cadea97ad834515c6e69c0ef44e7014 = $attributes; } ?> <?php $component = App\View\Components\Cards\NoRecordFoundList::resolve(['colspan' => '5'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('cards.no-record-found-list'); ?> <?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\NoRecordFoundList::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($__attributesOriginal1cadea97ad834515c6e69c0ef44e7014)): ?> <?php $attributes = $__attributesOriginal1cadea97ad834515c6e69c0ef44e7014; ?> <?php unset($__attributesOriginal1cadea97ad834515c6e69c0ef44e7014); ?> <?php endif; ?> <?php if (isset($__componentOriginal1cadea97ad834515c6e69c0ef44e7014)): ?> <?php $component = $__componentOriginal1cadea97ad834515c6e69c0ef44e7014; ?> <?php unset($__componentOriginal1cadea97ad834515c6e69c0ef44e7014); ?> <?php endif; ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal7d9f6e0b9001f5841f72577781b2d17f)): ?> <?php $attributes = $__attributesOriginal7d9f6e0b9001f5841f72577781b2d17f; ?> <?php unset($__attributesOriginal7d9f6e0b9001f5841f72577781b2d17f); ?> <?php endif; ?> <?php if (isset($__componentOriginal7d9f6e0b9001f5841f72577781b2d17f)): ?> <?php $component = $__componentOriginal7d9f6e0b9001f5841f72577781b2d17f; ?> <?php unset($__componentOriginal7d9f6e0b9001f5841f72577781b2d17f); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginalbc9540fa671f26a0f8028a5a8d8f93e9)): ?> <?php $attributes = $__attributesOriginalbc9540fa671f26a0f8028a5a8d8f93e9; ?> <?php unset($__attributesOriginalbc9540fa671f26a0f8028a5a8d8f93e9); ?> <?php endif; ?> <?php if (isset($__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9)): ?> <?php $component = $__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9; ?> <?php unset($__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9); ?> <?php endif; ?> <?php else: ?> <?php if (isset($component)) { $__componentOriginal269164c77d9d34462c34359c03da6a68 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal269164c77d9d34462c34359c03da6a68 = $attributes; } ?> <?php $component = App\View\Components\Cards\NoRecord::resolve(['message' => __('messages.noRecordFound'),'icon' => 'flag'] + (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($__attributesOriginal269164c77d9d34462c34359c03da6a68)): ?> <?php $attributes = $__attributesOriginal269164c77d9d34462c34359c03da6a68; ?> <?php unset($__attributesOriginal269164c77d9d34462c34359c03da6a68); ?> <?php endif; ?> <?php if (isset($__componentOriginal269164c77d9d34462c34359c03da6a68)): ?> <?php $component = $__componentOriginal269164c77d9d34462c34359c03da6a68; ?> <?php unset($__componentOriginal269164c77d9d34462c34359c03da6a68); ?> <?php endif; ?> <?php endif; ?> </div> </div> <!-- ROW END --> <script> $('#add-project-milestone').click(function() { const url = "<?php echo e(route('milestones.create')); ?>" + "?id=<?php echo e($project->id); ?>"; $(MODAL_LG + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_LG, url); }); $('body').on('click', '.edit-milestone', function() { var id = $(this).data('row-id'); var url = "<?php echo e(route('milestones.edit', ':id')); ?>"; url = url.replace(':id', id); $(MODAL_LG + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_LG, url); }); $('body').on('click', '.milestone-detail', function() { var id = $(this).data('milestone-id'); var url = "<?php echo e(route('milestones.show', ':id')); ?>"; url = url.replace(':id', id); $(MODAL_XL + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_XL, url); }); $('.delete-row').click(function() { var id = $(this).data('row-id'); var url = "<?php echo e(route('milestones.destroy', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; 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) { $.easyAjax({ type: 'POST', url: url, data: { '_token': token, '_method': 'DELETE' }, success: function(response) { if (response.status == "success") { $('#row-' + id).fadeOut(); } } }); } }); }); $(document).ready(function() { $('.change-milestone-status').on('change', function() { var milestoneId = $(this).data('milestone-id'); var newStatus = $(this).val(); var url = "<?php echo e(route('milestones.updateStatus', ':id')); ?>"; url = url.replace(':id', milestoneId); var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ type: 'POST', url: url, data: { '_token': token, 'status': newStatus, '_method': 'POST' }, success: function(response) { if(response.status == 'success') { // Optionally, display a success message or update the UI console.log('Status updated successfully'); } } }); }); }); </script> <?php /**PATH /home/kckglobal/public_html/portal/resources/views/projects/ajax/milestones.blade.php ENDPATH**/ ?>
Copyright ©2021 || Defacer Indonesia