141 lines
6.1 KiB
PHP
141 lines
6.1 KiB
PHP
<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
|