first change
This commit is contained in:
16
Modules/Meeting/resources/views/meeting/create.blade.php
Normal file
16
Modules/Meeting/resources/views/meeting/create.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
|
||||
{{ html()->form('POST')->route('meeting.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('meeting::meeting.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
12
Modules/Meeting/resources/views/meeting/edit.blade.php
Normal file
12
Modules/Meeting/resources/views/meeting/edit.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
{{ html()->modelForm($meeting, 'PUT')->route('meeting.update', $meeting->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
@include('meeting::meeting.partials.action')
|
||||
{{ html()->closeModelForm() }}
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
95
Modules/Meeting/resources/views/meeting/index.blade.php
Normal file
95
Modules/Meeting/resources/views/meeting/index.blade.php
Normal file
@@ -0,0 +1,95 @@
|
||||
@extends('layouts.app')
|
||||
@inject('employeeRepository', 'Modules\Employee\Repositories\EmployeeRepository')
|
||||
|
||||
@use('Carbon\Carbon')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
|
||||
<div class="mb-1 text-end">
|
||||
@can('meeting.create')
|
||||
<a href="{{ route('meeting.create') }}" class="btn btn-primary waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create</a>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body table-layoutt">
|
||||
<table id="datatable" class="display table-sm table-bordered table">
|
||||
<thead class="table-dark">
|
||||
<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"> Team Member</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-success fs-12">[{{ Carbon::parse($item->start_time)->format('h:i A') }}</span> -
|
||||
<span class="text-danger fs-12">
|
||||
{{ Carbon::parse($item->end_time)->format('h:i A') }} ]</span>
|
||||
|
||||
</td>
|
||||
<td class="tb-col">{{ $item->meeting_with }}
|
||||
<br>
|
||||
{{ $item->meeting_with == 'client' ? $item->client?->name : '-' }}
|
||||
</td>
|
||||
<td class="tb-col">
|
||||
<div class="avatar-group flex-nowrap">
|
||||
@isset($item->assignedUser)
|
||||
@foreach ($item->assignedUser as $assignedId)
|
||||
<div class="avatar-group-item">
|
||||
<a href="javascript: void(0);" class="d-inline-block" data-bs-toggle="tooltip"
|
||||
data-bs-trigger="hover" data-bs-placement="top" title="{{ $assignedId->full_name }}">
|
||||
<img src="{{ asset($assignedId->profile_pic) }}" alt=""
|
||||
class="rounded-circle avatar-xxs">
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
|
||||
</div>
|
||||
|
||||
{{-- @endif --}}
|
||||
</td>
|
||||
{{-- <td class="tb-col">-</td> --}}
|
||||
<td class="tb-col">{{ $item->location }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
@can('meeting.show')
|
||||
<a href="{{ route('meeting.show', $item->id) }}" class="link-secondary fs-15 view-item-btn">
|
||||
<i class="ri-eye-fill"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('meeting.edit')
|
||||
<a href="{{ route('meeting.edit', $item->id) }}" class="link-primary fs-15 edit-item-btn"><i
|
||||
class="ri-edit-2-fill"></i></a>
|
||||
@endcan
|
||||
@can('meeting.destroy')
|
||||
<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-fill"></i></a>
|
||||
@endcan
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@@ -0,0 +1,140 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row gy-3">
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Meeting Title')->required() }}
|
||||
{{ html()->div('Please mention meeting title')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Location')->class('form-label') }}
|
||||
{{ html()->text('location')->class('form-control')->placeholder('Meeting Location')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-3">
|
||||
{{ html()->label('Meeting with:')->class('form-label') }}
|
||||
<div class="form-check form-radio-success">
|
||||
{{ html()->radio('meeting_with', false, 'client')->class('form-check-input meeting-with')->checked($editable && $meeting->meeting_with == 'client') }}
|
||||
{{ html()->label('Client')->class('form-check-label me-1')->for('meeting_with_client') }}
|
||||
</div>
|
||||
|
||||
<div class="form-check form-radio-success">
|
||||
{{ html()->radio('meeting_with', false, 'team')->class('form-check-input meeting-with')->checked($editable && $meeting->meeting_with == 'team') }}
|
||||
{{ html()->label('Office Team')->class('form-check-label me-1')->for('meeting_with_team') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 col-md-9 client-dropdown d-none">
|
||||
{{ html()->label('Client')->class('form-label') }}
|
||||
{{ html()->select('client_id', $clientList)->class('form-select select2')->placeholder('Select client')->value($editable ? $meeting->client?->id : null) }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-9 col-md-9 team-dropdown d-none">
|
||||
{{ html()->label('Team Member')->class('form-label') }}
|
||||
{{ html()->multiselect('members[ids][]', $employeeList)->class('form-control select2')->value($meeting->members['ids'] ?? null)->attributes(['multiple', 'id' => 'teams']) }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control ckeditor-classic') }}
|
||||
</div>
|
||||
|
||||
<x-form-buttons :editable='$editable' label='Add' href="{{ route('meeting.index') }}" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', $status)->class('form-select select2') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Date</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row gy-2">
|
||||
<div class="col-12">
|
||||
<div class="input-group">
|
||||
{{ html()->text('date')->class('form-control flatpickr-date')->value(date('Y-m-d'))->required() }}
|
||||
<span class="input-group-text"><i class="ri-calendar-line"></i></span>
|
||||
{{ html()->div('Event Date is required')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
{{ html()->label('Start Time')->class('form-label') }}
|
||||
<div class="input-group">
|
||||
{{ html()->time('start_time')->value(date('h:i'))->class('form-control') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
{{ html()->label('End Time')->class('form-label') }}
|
||||
<div class="input-group">
|
||||
{{ html()->time('end_time')->class('form-control') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// Trigger the change event on page load to set initial visibility
|
||||
$('.meeting-with').trigger('change');
|
||||
|
||||
// Check the initial state and show/hide dropdowns accordingly
|
||||
const selectedValue = $('.meeting-with:checked').val();
|
||||
if (selectedValue === 'team') {
|
||||
$('.team-dropdown').removeClass('d-none');
|
||||
$('.client-dropdown').addClass('d-none');
|
||||
} else if (selectedValue === 'client') {
|
||||
$('.client-dropdown').removeClass('d-none');
|
||||
$('.team-dropdown').addClass('d-none');
|
||||
}
|
||||
|
||||
// Change event for radio buttons
|
||||
$('.meeting-with').change(function() {
|
||||
let value = $(this).val();
|
||||
if (value === 'team') {
|
||||
$('.team-dropdown').removeClass('d-none');
|
||||
$('.client-dropdown').addClass('d-none');
|
||||
} else if (value === 'client') {
|
||||
$('.client-dropdown').removeClass('d-none');
|
||||
$('.team-dropdown').addClass('d-none');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
246
Modules/Meeting/resources/views/meeting/show.blade.php
Normal file
246
Modules/Meeting/resources/views/meeting/show.blade.php
Normal file
@@ -0,0 +1,246 @@
|
||||
@extends('layouts.app')
|
||||
@inject('employeeRepository', 'Modules\Employee\Repositories\EmployeeRepository')
|
||||
@use('Carbon\Carbon')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card card-body">
|
||||
<div class="col-md">
|
||||
<h4 class="fw-bold">{{ $item->title }}</h4>
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<div><i class="ri-building-line me-1 align-bottom"></i> {{ $item->location }}</div>
|
||||
<div class="vr"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-top border-top-dashed mt-4 pt-3">
|
||||
<div class="row gy-2">
|
||||
<div class="col-lg-2 col-sm-4">
|
||||
<div>
|
||||
<p class="text-uppercase fw-medium mb-2">Date :</p>
|
||||
<h5 class="fs-15 mb-0">
|
||||
{{ $item->date }}
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-sm-4">
|
||||
<div>
|
||||
<p class="text-uppercase fw-medium mb-2">Start Time :</p>
|
||||
<h5 class="fs-15 mb-0">{{ Carbon::parse($item->start_time)->format('h:i A') }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-sm-4">
|
||||
<div>
|
||||
<p class="text-uppercase fw-medium mb-2">End Time:</p>
|
||||
<h5 class="fs-15 mb-0">{{ Carbon::parse($item->end_time)->format('h:i A') }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-sm-4">
|
||||
<div>
|
||||
<p class="text-uppercase fw-medium mb-2">Type:</p>
|
||||
<span class="fs-15 badge bg-primary mb-0">{{ $item->meeting_with }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-sm-4">
|
||||
<div>
|
||||
<p class="text-uppercase fw-medium mb-2">Client:</p>
|
||||
<h5 class="fs-15 mb-0">{{ @$item->client?->client_name }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card card-body">
|
||||
<div class="text-muted">
|
||||
<h6 class="fw-semibold text-uppercase mb-3">Description</h6>
|
||||
{!! Str::limit($item->description, 666) !!}
|
||||
@if (strlen($item->description) > 666)
|
||||
<div id="description-full" style="display: none;">
|
||||
{!! $item->description !!}
|
||||
</div>
|
||||
<a href="javascript:void(0);" id="see-more-btn" class="text-primary">See More</a>
|
||||
<a href="javascript:void(0);" id="see-less-btn" class="text-primary"
|
||||
style="display: none;">See
|
||||
Less</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Meeting Minute List</h5>
|
||||
@foreach ($minutes as $minute)
|
||||
<div class="simplebar-scrollable-y py-3" data-simplebar style="max-height: 400px;">
|
||||
<div class="acitivity-timeline">
|
||||
<div class="acitivity-item d-flex py-2">
|
||||
<div class="avatar-xs acitivity-avatar flex-shrink-0">
|
||||
<div class="avatar-title bg-primary-subtle text-primary rounded-circle">
|
||||
{{ substr($minute->agenda, 0, 1) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-grow-1 ms-3">
|
||||
<h6 class="mb-1">{{ $minute->agenda }}</h6>
|
||||
<p class="text-muted mb-0">{!! $minute->description !!}</p>
|
||||
</div>
|
||||
<div class="d-flex flex-column ms-3 flex-shrink-0">
|
||||
<div class="avatar-group flex-nowrap">
|
||||
@isset($minute->assignedUser)
|
||||
@foreach ($minute->assignedUser as $assignedId)
|
||||
<div class="avatar-group-item">
|
||||
<a href="javascript: void(0);" class="d-inline-block"
|
||||
data-bs-toggle="tooltip" data-bs-trigger="hover"
|
||||
data-bs-placement="top" title="{{ $assignedId->full_name }}">
|
||||
<img src="{{ asset($assignedId->profile_pic) }}" alt=""
|
||||
class="rounded-circle avatar-xxs">
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@endisset
|
||||
</div>
|
||||
<small class="text-primary mb-2">{{ $minute->created_at?->format('d M, Y') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<!--end card-body-->
|
||||
</div>
|
||||
|
||||
<div class="card card-body">
|
||||
<h6 class="fw-semibold text-uppercase mb-3">Meeting Minute</h6>
|
||||
|
||||
{{ html()->form('POST')->route('meeting.storeSubTask')->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
{{ html()->hidden('meeting_id', $item->id) }}
|
||||
<div class="row gy-1">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Agenda')->class('form-label') }}
|
||||
{{ html()->textarea('agenda')->class('form-control')->placeholder('Enter Agenda')->required() }}
|
||||
{{ html()->div('Please enter agenda')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Attendees')->class('form-label') }}
|
||||
{{ html()->multiselect('attendees[ids][]', $employeeList)->class('form-control select2')->value($item->members['ids'] ?? null)->attributes(['multiple', 'id' => 'teams']) }}
|
||||
{{ html()->div('Please enter attendees')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control ckeditor-classic')->placeholder('..') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-3 text-end">
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
|
||||
</div>
|
||||
{{ html()->form()->close() }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="list-group mb-2">
|
||||
<li class="list-group-item active">Action</li>
|
||||
|
||||
<a href="{{ route('meeting.sendmail', $item->id) }}" class="list-group-item list-group-item-action"
|
||||
data-bs-toggle="modal" data-bs-target="#emailModal"><i
|
||||
class="ri-mail-fill text-danger me-2 align-middle"></i>Send Email</a>
|
||||
<a href="{{ route('meeting.edit', $item->id) }}" class="list-group-item list-group-item-action"><i
|
||||
class="ri-pencil-fill text-primary me-2 align-middle"></i>Edit</a>
|
||||
<a href="{{ route('meeting.index') }}" class="list-group-item list-group-item-action"><i
|
||||
class="ri-user-add-fill text-secondary me-2 align-middle"></i>Back</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex mb-3">
|
||||
<h6 class="card-title flex-grow-1 mb-0">Team Members</h6>
|
||||
</div>
|
||||
<ul class="list-unstyled vstack mb-0 gap-3">
|
||||
@foreach ($item->assignedUser as $assignedUser)
|
||||
<li>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-shrink-0">
|
||||
<img src="{{ $assignedUser->profile_pic }}" alt=""
|
||||
class="avatar-xs rounded-circle material-shadow">
|
||||
</div>
|
||||
<div class="flex-grow-1 ms-2">
|
||||
<h6 class="mb-1"><a href="#">{{ $assignedUser->full_name }}</a>
|
||||
</h6>
|
||||
<p class="text-muted mb-0">{{ $assignedUser->email }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#see-less-btn').hide();
|
||||
|
||||
$('#see-more-btn').on('click', function() {
|
||||
$('#description-preview').hide();
|
||||
$('#description-full').show();
|
||||
$(this).hide();
|
||||
$('#see-less-btn').show();
|
||||
});
|
||||
|
||||
$('#see-less-btn').on('click', function() {
|
||||
$('#description-full').hide();
|
||||
$('#description-preview').show();
|
||||
$(this).hide();
|
||||
$('#see-more-btn').show();
|
||||
});
|
||||
|
||||
$('#send-email-btn').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const url = $btn.attr('href');
|
||||
|
||||
$btn.prop('disabled', true).text('Sending mail...');
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
alert(response.message || 'Email sent successfully!');
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
const errorMsg = xhr.responseJSON?.error ||
|
||||
'Failed to send email. Please try again.';
|
||||
alert(errorMsg);
|
||||
},
|
||||
complete: function() {
|
||||
$btn.prop('disabled', false).text('Send Email');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
Reference in New Issue
Block a user