Set expenses on specific flight types #348 (#549)

* Set expenses on specific flight types #348

* Formatting

* Use strict check for in_array
This commit is contained in:
Nabeel S
2020-02-12 10:40:52 -05:00
committed by GitHub
parent f16af4d9b1
commit b9993b9c23
8 changed files with 199 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
<div class="row">
<!-- Code Field -->
<div class="form-group col-sm-6">
<div class="form-group col-sm-4">
{{ Form::label('airline_id', 'Airline:') }}
{{ Form::select('airline_id', $airlines_list, null , ['class' => 'form-control select2']) }}
@@ -11,12 +11,20 @@
@endcomponent
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
<div class="form-group col-sm-4">
{{ Form::label('type', 'Expense Type:') }}&nbsp;<span class="required">*</span>
{{ Form::select('type', $expense_types, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('type') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('flight_type', 'Flight Types:') }}&nbsp;
{{ Form::select('flight_type[]', $flight_types, null , ['class' => 'form-control select2', 'multiple']) }}
<p class="text-danger">{{ $errors->first('type') }}</p>
@component('admin.components.info')
If selected and the expense type is "flight", this expense will only apply to the specified flight types
@endcomponent
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">