ok
Direktori : /home2/selectio/www/fms-worksuite/storage/framework/views/ |
Current File : /home2/selectio/www/fms-worksuite/storage/framework/views/d5350978955fb921a8b1b976dd07f486.php |
<?php $addProjectMemberPermission = user()->permission('add_project_members'); $viewProjectMemberPermission = user()->permission('view_project_members'); $editProjectMemberPermission = user()->permission('edit_project_members'); $deleteProjectMemberPermission = user()->permission('delete_project_members'); $viewProjectHourlyRatePermission = user()->permission('view_project_hourly_rates'); ?> <!-- 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(($addProjectMemberPermission == 'all' || $addProjectMemberPermission == 'added' || $project->project_admin == user()->id) && !$project->trashed()): ?> <?php if (isset($component)) { $__componentOriginalcf8d12533ff890e0d6573daf32b7618d = $component; } ?> <?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-member','class' => 'type-btn mb-3']); ?> <?php echo app('translator')->get('modules.projects.addMemberTitle'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d)): ?> <?php $component = $__componentOriginalcf8d12533ff890e0d6573daf32b7618d; ?> <?php unset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d); ?> <?php endif; ?> <?php endif; ?> <?php if($viewProjectMemberPermission == 'all'): ?> <?php if (isset($component)) { $__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9 = $component; } ?> <?php $component = App\View\Components\Cards\Data::resolve(['title' => __('modules.projects.members'),'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 $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">#</th> <th><?php echo app('translator')->get('app.name'); ?></th> <?php if($viewProjectHourlyRatePermission == 'all'): ?> <th><?php echo app('translator')->get('modules.employees.hourlyRate'); ?></th> <?php endif; ?> <th><?php echo app('translator')->get('app.role'); ?> <i class="fa fa-question-circle" data-toggle="popover" data-placement="top" data-content="<?php echo app('translator')->get('modules.projects.projectAdminInfo'); ?>" data-html="true" data-trigger="hover"></i></th> <th class="text-right pr-20"><?php echo app('translator')->get('app.action'); ?></th> <?php $__env->endSlot(); ?> <?php $__empty_1 = true; $__currentLoopData = $project->members; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$member): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr id="row-<?php echo e($member->id); ?>"> <td class="pl-20"><?php echo e($key + 1); ?></td> <td> <?php if (isset($component)) { $__componentOriginal9a71dc76dd25d4db3618f7b2896e958f = $component; } ?> <?php $component = App\View\Components\Employee::resolve(['user' => $member->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; ?> </td> <?php if($viewProjectHourlyRatePermission == 'all'): ?> <td> <?php if($editProjectMemberPermission == 'all'): ?> <input type="number" min="0" step=".01" class="height-35 f-14 p-2 border rounded change-hourly-rate form-control" value="<?php echo e($member->hourly_rate); ?>" data-row-id="<?php echo e($member->id); ?>"> <?php else: ?> <?php echo e($member->hourly_rate); ?> <?php endif; ?> </td> <?php endif; ?> <td> <?php if($editProjectMemberPermission == 'all'): ?> <?php if (isset($component)) { $__componentOriginalc709ddc147ddde534205d9546b4fb0db = $component; } ?> <?php $component = App\View\Components\Forms\Radio::resolve(['fieldId' => 'project_admin_'.e($member->user->id).'','fieldLabel' => __('app.projectAdmin'),'fieldName' => 'project_admin','fieldValue' => ''.e($member->user->id).'','checked' => ($member->user->id == $project->project_admin) ? 'checked' : ''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.radio'); ?> <?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\Radio::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'assign_role','data-user-id' => ''.e($member->user->id).'']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalc709ddc147ddde534205d9546b4fb0db)): ?> <?php $component = $__componentOriginalc709ddc147ddde534205d9546b4fb0db; ?> <?php unset($__componentOriginalc709ddc147ddde534205d9546b4fb0db); ?> <?php endif; ?> <?php elseif($member->user->id == $project->project_admin): ?> <?php echo app('translator')->get('app.projectAdmin'); ?> <?php else: ?> -- <?php endif; ?> </td> <td class="text-right pr-20"> <?php if($member->user->id == $project->project_admin && $editProjectMemberPermission == 'all'): ?> <?php if (isset($component)) { $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad = $component; } ?> <?php $component = App\View\Components\Forms\ButtonSecondary::resolve(['icon' => 'times'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-secondary'); ?> <?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\ButtonSecondary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['data-row-id' => ''.e($member->id).'','class' => 'remove-admin']); ?> <?php echo app('translator')->get('app.remove'); ?> <?php echo app('translator')->get('app.projectAdmin'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad)): ?> <?php $component = $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad; ?> <?php unset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad); ?> <?php endif; ?> <?php endif; ?> <?php if($deleteProjectMemberPermission == 'all'): ?> <?php if (isset($component)) { $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad = $component; } ?> <?php $component = App\View\Components\Forms\ButtonSecondary::resolve(['icon' => 'trash'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-secondary'); ?> <?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\ButtonSecondary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['data-row-id' => ''.e($member->id).'','class' => 'delete-row']); ?> <?php echo app('translator')->get('app.delete'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad)): ?> <?php $component = $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad; ?> <?php unset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad); ?> <?php endif; ?> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <tr> <td colspan="5"> <?php if (isset($component)) { $__componentOriginal269164c77d9d34462c34359c03da6a68 = $component; } ?> <?php $component = App\View\Components\Cards\NoRecord::resolve(['icon' => 'user','message' => __('messages.noMemberAddedToProject')] + (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; ?> </td> </tr> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal7d9f6e0b9001f5841f72577781b2d17f)): ?> <?php $component = $__componentOriginal7d9f6e0b9001f5841f72577781b2d17f; ?> <?php unset($__componentOriginal7d9f6e0b9001f5841f72577781b2d17f); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9)): ?> <?php $component = $__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9; ?> <?php unset($__componentOriginalbc9540fa671f26a0f8028a5a8d8f93e9); ?> <?php endif; ?> <?php endif; ?> </div> </div> <!-- ROW END --> <script> $(document).ready(function () { setTimeout(function () { $('[data-toggle="popover"]').popover(); }, 500); }); $('#add-project-member').click(function() { const url = "<?php echo e(route('project-members.create')); ?>" + "?id=<?php echo e($project->id); ?>"; $(MODAL_LG + ' ' + MODAL_HEADING).html('...'); $.ajaxModal(MODAL_LG, url); }); $('.delete-row').click(function() { var id = $(this).data('row-id'); var url = "<?php echo e(route('project-members.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(); } } }); } }); }); $('.change-hourly-rate').blur(function() { let id = $(this).data('row-id'); let value = $(this).val(); var url = "<?php echo e(route('project-members.update', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ url: url, container: '#row-' + id, type: "POST", blockUI: true, data: { 'hourly_rate': value, '_token': token, '_method': 'PUT' } }); }); $('body').on('click', '.assign_role', function() { var userId = $(this).data('user-id'); var projectId = '<?php echo e($project->id); ?>'; var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ url: "<?php echo e(route('projects.assign_project_admin')); ?>", type: "POST", data: { userId: userId, projectId: projectId, _token: token }, blockUI: true, container: '.admin-dash-table', success: function(response) { if (response.status == "success") { window.location.reload(); } } }); }); $('body').on('click', '.remove-admin', function() { var userId = null; var projectId = '<?php echo e($project->id); ?>'; var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ url: "<?php echo e(route('projects.assign_project_admin')); ?>", type: "POST", data: { userId: userId, projectId: projectId, _token: token }, success: function(response) { if (response.status == "success") { window.location.reload(); } } }); }); </script> <?php /**PATH /home2/selectio/public_html/fms-worksuite/resources/views/projects/ajax/members.blade.php ENDPATH**/ ?>