add separate flight_fields table and move over to flight_field_values

This commit is contained in:
Nabeel Shahzad
2018-03-20 13:06:06 -05:00
parent a9454c319a
commit 485c6e86bb
17 changed files with 147 additions and 45 deletions

View File

@@ -1,15 +1,15 @@
<div id="flight_fields_wrapper">
<h3>custom fields</h3><br />
<table class="table table-responsive" id="flight-fields-table">
@if(count($flight->fields))
@if(count($flight->field_values))
<thead>
<th>Name</th>
<th style="text-align: center;">Value</th>
<th style="text-align: center;">Actions</th>
<th>Value</th>
<th></th>
</thead>
@endif
<tbody>
@foreach($flight->fields as $field)
@foreach($flight->field_values as $field)
<tr>
<td>{{ $field->name }}</td>
<td>

View File

@@ -62,11 +62,13 @@ $(document).ready(function () {
$(document).on('submit', 'form.pjax_flight_fields', function (event) {
event.preventDefault();
$.pjax.submit(event, '#flight_fields_wrapper', {push: false});
setEditable();
});
$(document).on('submit', 'form.pjax_subfleet_form', function (event) {
event.preventDefault();
$.pjax.submit(event, '#subfleet_flight_wrapper', {push: false});
setEditable();
});
$(document).on('submit', 'form.pjax_fares_form', function (event) {