Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

95 lines
5.9 KiB
PHP

@extends('layouts.app')
@use('Carbon\Carbon')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class="card">
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
<div class="flex-shrink-0">
<a href="{{ route('meeting.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create</a>
</div>
</div>
<div class="card-body">
<table id="buttons-datatables" class="display table-sm table-bordered table">
<thead class="table-light">
<tr>
<th class="tb-col"><span class="overline-title">S.N</span></th>
<th class="tb-col"><span class="overline-title">Title</span></th>
<th class="tb-col"><span class="overline-title">Date</span></th>
<th class="tb-col"><span class="overline-title">Meeting with</span></th>
<th class="tb-col"><span class="overline-title"> Client</span></th>
<th class="tb-col"><span class="overline-title"> Team Member</span></th>
<th class="tb-col"><span class="overline-title">Start Time</span></th>
<th class="tb-col"><span class="overline-title">End Time</span></th>
<th class="tb-col"><span class="overline-title">Location</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($meetingLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->title }}</td>
<td class="tb-col">{{ $item->date?->format('Y-m-d') }}
<br><span
class="text-danger">({{ $item->date?->diffForHumans(Carbon::now()) }})</span>
</td>
<td class="tb-col">{{ $item->meeting_with }}</td>
<td class="tb-col">
{{ $item->meeting_with == 'client' ? $item->client?->client_name : '-' }}</td>
<td class="tb-col">
@if ($item->meeting_with == 'member')
<div class="avatar-group flex-nowrap">
@isset($item->members)
@foreach ($item->members 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>
@else
-
@endif
</td>
<td class="tb-col">{{ Carbon::parse($item->start_time)->format('h:i A') }}</td>
<td class="tb-col">{{ Carbon::parse($item->end_time)->format('h:i A') }}</td>
<td class="tb-col">{{ $item->location }}</td>
<td class="tb-col">
<div class="hstack flex-wrap gap-3">
<a href="javascript:void(0);" class="link-info fs-15 view-item-btn"
data-bs-toggle="modal" data-bs-target="#viewModal">
<i class="ri-eye-line"></i>
</a>
<a href="{{ route('meeting.edit', $item->id) }}"
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
<a href="javascript:void(0);"
data-link="{{ route('meeting.destroy', $item->id) }}"
data-id="{{ $item->id }}" class="link-danger fs-15 remove-item-btn"><i
class="ri-delete-bin-line"></i></a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection