Ticket Tweaks
This commit is contained in:
parent
4351c8b678
commit
57577c95b4
3 changed files with 19 additions and 17 deletions
|
@ -145,7 +145,8 @@ class TicketsController extends Controller
|
||||||
return __($tickets->priority);
|
return __($tickets->priority);
|
||||||
})
|
})
|
||||||
->editColumn('updated_at', function (Ticket $tickets) {
|
->editColumn('updated_at', function (Ticket $tickets) {
|
||||||
return $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '';
|
return ['display' => $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '',
|
||||||
|
'raw' => $tickets->updated_at ? strtotime($tickets->updated_at) : ''];
|
||||||
})
|
})
|
||||||
->addColumn('actions', function (Ticket $tickets) {
|
->addColumn('actions', function (Ticket $tickets) {
|
||||||
return '
|
return '
|
||||||
|
|
|
@ -46,14 +46,14 @@
|
||||||
</div>
|
</div>
|
||||||
@if ($servers->count() >= 1)
|
@if ($servers->count() >= 1)
|
||||||
<div class="form-group col-sm-12 {{ $errors->has('server') ? ' has-error' : '' }}">
|
<div class="form-group col-sm-12 {{ $errors->has('server') ? ' has-error' : '' }}">
|
||||||
<label for="server" class="control-label">Servers</label>
|
<label for="server" class="control-label">{{__("Server")}}</label>
|
||||||
<select id="server" type="server" class="form-control" name="server">
|
<select id="server" type="server" class="form-control" name="server">
|
||||||
<option value="">Select Servers</option>
|
<option value="">{{__("Select Servers")}}</option>
|
||||||
@foreach ($servers as $server)
|
@foreach ($servers as $server)
|
||||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@if ($errors->has('category'))
|
@if ($errors->has('category'))
|
||||||
<span class="help-block">
|
<span class="help-block">
|
||||||
<strong>{{ $errors->first('ticketcategory') }}</strong>
|
<strong>{{ $errors->first('ticketcategory') }}</strong>
|
||||||
|
@ -62,14 +62,14 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div class="form-group col-sm-12 {{ $errors->has('ticketcategory') ? ' has-error' : '' }}">
|
<div class="form-group col-sm-12 {{ $errors->has('ticketcategory') ? ' has-error' : '' }}">
|
||||||
<label for="ticketcategory" class="control-label">Category</label>
|
<label for="ticketcategory" class="control-label">{{__("Category")}}</label>
|
||||||
<select id="ticketcategory" type="ticketcategory" class="form-control" name="ticketcategory">
|
<select id="ticketcategory" type="ticketcategory" class="form-control" required name="ticketcategory">
|
||||||
<option value="">Select Category</option>
|
<option value="" disabled selected>{{__("Select Category")}}</option>
|
||||||
@foreach ($ticketcategories as $ticketcategory)
|
@foreach ($ticketcategories as $ticketcategory)
|
||||||
<option value="{{ $ticketcategory->id }}">{{ $ticketcategory->name }}</option>
|
<option value="{{ $ticketcategory->id }}">{{ $ticketcategory->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@if ($errors->has('category'))
|
@if ($errors->has('category'))
|
||||||
<span class="help-block">
|
<span class="help-block">
|
||||||
<strong>{{ $errors->first('ticketcategory') }}</strong>
|
<strong>{{ $errors->first('ticketcategory') }}</strong>
|
||||||
|
@ -79,10 +79,10 @@
|
||||||
<div class="form-group col-sm-12 {{ $errors->has('priority') ? ' has-error' : '' }}">
|
<div class="form-group col-sm-12 {{ $errors->has('priority') ? ' has-error' : '' }}">
|
||||||
<label for="priority" class="control-label">Priority</label>
|
<label for="priority" class="control-label">Priority</label>
|
||||||
<select id="priority" type="" class="form-control" name="priority">
|
<select id="priority" type="" class="form-control" name="priority">
|
||||||
<option value="">Select Priority</option>
|
<option value="" disabled selected>{{__("Select Priority")}}</option>
|
||||||
<option value="Low">Low</option>
|
<option value="Low">{{__("Low")}}</option>
|
||||||
<option value="Medium">Medium</option>
|
<option value="Medium">{{__("Medium")}}</option>
|
||||||
<option value="High">High</option>
|
<option value="High">{{__("High")}}</option>
|
||||||
</select>
|
</select>
|
||||||
@if ($errors->has('priority'))
|
@if ($errors->has('priority'))
|
||||||
<span class="help-block">
|
<span class="help-block">
|
||||||
|
@ -124,12 +124,12 @@
|
||||||
</section>
|
</section>
|
||||||
<!-- END CONTENT -->
|
<!-- END CONTENT -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(".ticket-form").submit(function (e) {
|
$(".ticket-form").submit(function (e) {
|
||||||
|
|
||||||
$(".ticket-once").attr("disabled", true);
|
$(".ticket-once").attr("disabled", true);
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
|
@ -86,12 +86,13 @@
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
ajax: "{{route('ticket.datatable')}}",
|
ajax: "{{route('ticket.datatable')}}",
|
||||||
|
order: [[ 4, "desc" ]],
|
||||||
columns: [
|
columns: [
|
||||||
{data: 'category'},
|
{data: 'category'},
|
||||||
{data: 'title'},
|
{data: 'title'},
|
||||||
{data: 'priority'},
|
{data: 'priority'},
|
||||||
{data: 'status'},
|
{data: 'status'},
|
||||||
{data: 'updated_at', sortable: false},
|
{data: 'updated_at', type: 'num', render: {_: 'display', sort: 'raw'}},
|
||||||
{data: 'actions', sortable: false},
|
{data: 'actions', sortable: false},
|
||||||
],
|
],
|
||||||
fnDrawCallback: function( oSettings ) {
|
fnDrawCallback: function( oSettings ) {
|
||||||
|
|
Loading…
Reference in a new issue