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

110 lines
4.4 KiB
PHP

<div class="row gy-3">
<div class="col-lg-4 col-md-6">
<div class="row">
<div class="col-lg-12">
{{ html()->label('Meeting with')->class('form-label') }}
<div class="row mt-2">
<div class="col-sm-3">
<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') }}
</div>
</div>
<div class="col-sm-6">
<div class="form-check form-radio-success">
{{ html()->radio('meeting_with', false, 'member')->class('form-check-input meeting-with')->checked($editable && $meeting->meeting_with == 'member') }}
{{ html()->label('Office Members')->class('form-check-label me-1') }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 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-4 col-md-6">
{{ html()->label('Date')->class('form-label') }}
<div class="input-group">
{{ html()->text('date')->class('form-control flatpickr-date')->required() }}
<span class="input-group-text"><i class="ri-calendar-line"></i></span>
</div>
</div>
<div class="col-lg-4 col-md-6 client-dropdown d-none">
{{ html()->label('Client')->class('form-label') }}
{{ html()->select('client_id', $clientList)->class('form-select select2')->placeholder('Select Client') }}
</div>
<div class="col-lg-4 col-md-6 member-dropdown d-none">
{{ html()->label('Members')->class('form-label') }}
{{ html()->multiselect('members[]', $memberList)->class('form-control select2')->placeholder('Select Members')->value($task->members ?? null)->attributes(['multiple', 'id' => 'members']) }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Start Time')->class('form-label') }}
<div class="input-group">
{{ html()->text('start_time')->class('form-control')->placeholder('Event Start Time')->attributes(['data-provider' => 'timepickr', 'data-time-basic' => 'true']) }}
<span class="input-group-text"><i class="ri-time-line"></i></span>
</div>
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('End Time')->class('form-label') }}
<div class="input-group">
{{ html()->text('end_time')->class('form-control')->placeholder('Event End Time')->attributes(['data-provider' => 'timepickr', 'data-time-basic' => 'true']) }}
<span class="input-group-text"><i class="ri-time-line"></i></span>
</div>
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Location')->class('form-label') }}
{{ html()->text('location')->class('form-control')->placeholder('Meeting Location')->required() }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->class('form-control ckeditor-classic')->placeholder('Meeting Description') }}
</div>
<x-form-buttons :editable='$editable' label='Add' href="{{ route('meeting.index') }}" />
</div>
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.meeting-with').change(function() {
let value = $(this).val();
console.log(value);
if (value == 'member') {
$('.member-dropdown').removeClass('d-none');
$('.client-dropdown').addClass('d-none');
} else {
$('.member-dropdown').addClass('d-none');
$('.client-dropdown').removeClass('d-none');
}
});
});
</script>
@endpush