StocksNew/Modules/PMS/resources/views/project/index.blade.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

92 lines
3.9 KiB
PHP

@extends('layouts.app')
@inject('employeeRepository', 'Modules\Employee\Repositories\EmployeeRepository')
@section('content')
<div class="page-content">
<div class="container-fluid">
@include('layouts.partials.breadcrumb', ['title' => $title])
<div class="mb-2 text-end">
<a href="{{ route('project.create') }}" class="btn btn-success btn-md waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Add</a>
</div>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
<thead>
<tr>
<th>S.N</th>
<th>Code</th>
<th>Project Name</th>
<th>Members</th>
<th>Start Date</th>
<th>Deadline</th>
<th>Client</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse ($projects as $key => $project)
<tr>
<td>{{ $key + 1 }}</td>
<td>{{ $project->project_code }}</td>
<td>{{ $project->project_name }}</td>
<td>
<div class="avatar-group flex-nowrap">
@isset($project->members_id)
@foreach ($project->members_id as $memberId)
<div class="avatar-group-item">
<a href="javascript: void(0);" class="d-inline-block">
<img
src="{{ asset(optional($employeeRepository->getEmployeeById($memberId))->profile_pic) }}"
alt="" class="rounded-circle avatar-xxs">
</a>
</div>
@endforeach
@endisset
</div>
</td>
<td>{{ $project->start_date }}</td>
<td class="text-danger">{{ $project->end_date }}</td>
<td>{{ optional($project->client)->client_name }}</td>
<td>{!! $project->status_name !!}</td>
<td>
<div class="hstack flex-wrap gap-3">
@can('project.show')
<a href="{{ route('project.show', $project->id) }}" class="link-info fs-15">
<i class="ri-eye-line"></i>
</a>
@endcan
@can('project.edit')
<a href="{{ route('project.edit', $project->id) }}"
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
@endcan
@can('project.destroy')
<a href="javascript:void(0);" data-link="{{ route('project.destroy', $project->id) }}"
data-id="{{ $project->id }}" class="link-danger fs-15 remove-item-btn"><i
class="ri-delete-bin-line"></i></a>
@endcan
</div>
</td>
</tr>
@empty
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!--end row-->
</div>
</div>
@endsection