initial commit
This commit is contained in:
142
resources/views/support/list.blade.php
Normal file
142
resources/views/support/list.blade.php
Normal file
@@ -0,0 +1,142 @@
|
||||
|
||||
@extends( isClient() ? 'layouts.app' : 'layouts.admin')
|
||||
|
||||
@push('css')
|
||||
<link href="{{ asset('css/support/support.css') }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@php
|
||||
$pageLimit = $searchData['pageLimit'];
|
||||
$status = $searchData['status'];
|
||||
$search_value = $searchData['search_value'];
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="row" style="padding-left: 20px;padding-right: 15px">
|
||||
<h3 class="pull-left">Client Support</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_content">
|
||||
<form action="{{route('list.client.support')}}" method="get" role="search">
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Show</label>
|
||||
<select name="pageLimit" id="pagination" class="form-control"
|
||||
onchange="this.form.submit()">
|
||||
<option value="10" @if($pageLimit == 10) selected @endif>10</option>
|
||||
<option value="20" @if($pageLimit == 20) selected @endif>20</option>
|
||||
<option value="50" @if($pageLimit == 50) selected @endif>50</option>
|
||||
<option value="100" @if($pageLimit == 100) selected @endif>100</option>
|
||||
<option value="500" @if($pageLimit == 500) selected @endif>500</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Status</label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="All" >All</option>
|
||||
<option value="0" @if($status == 0) selected @endif>Open</option>
|
||||
<option value="2" @if($status == 2) selected @endif>Close</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>Title/Email</label>
|
||||
<input id="search_value"
|
||||
type="text"
|
||||
value="{{$searchData['search_value']}}"
|
||||
placeholder="Search By Title/Email"
|
||||
class="form-control" name="search_value" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
<button class="btn btn-primary btn-outline-primary" style="width:100%" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="table-responsive py-5">
|
||||
<table id="table-clients" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Title</th>
|
||||
{{-- <th>Priority</th>--}}
|
||||
<th>Created</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($supports))
|
||||
@foreach ($supports as $key => $obj)
|
||||
@php
|
||||
$message = '';
|
||||
@endphp
|
||||
|
||||
@if(!($obj->supportreplays->isEmpty()))
|
||||
@php
|
||||
$message = $obj->supportreplays->first()->message ;
|
||||
@endphp
|
||||
@endif
|
||||
<tr class="tr-height">
|
||||
<td>{{ $obj->id }}</td>
|
||||
<td>
|
||||
<a style="color:black;" data-toggle="tooltip" title="" href="#" data-original-title="{{$message}}">{{ $obj->title }}</a>
|
||||
</td>
|
||||
{{-- <td>{{ config('constant.SUPPORT_PRIORITY.'.$obj->priority) }}</td>--}}
|
||||
<td>{{ getStringToDateTime($obj->created_at,'m/d/Y h:i:s a') }}</td>
|
||||
<td>{{ config('constant.SUPPORT_STATUS.'.$obj->status) }}</td>
|
||||
<td>
|
||||
@if(isShowContent('view.client.support'))
|
||||
<a href="{{route('view.client.support',$obj->id)}}"
|
||||
class="btn" title="View Ticket" style="padding: 5px;"> <span
|
||||
class="glyphicon glyphicon-eye-open text-success" ></span></a>
|
||||
@if($obj->status == config('constant.SUPPORT_STATUS.Open'))
|
||||
<button onclick="return closeTicket({{$obj}},'{{route('process.ajax')}}')" class="btn" title="Close Ticket" style="padding: 5px;">
|
||||
<span class="glyphicon glyphicon-remove text-danger"></span>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div id="pagination_panel">
|
||||
{{ $supports->links('basic.pagination') }}
|
||||
<input type="hidden" name="redirect_url" value="{{route('list.client.support')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@push('script')
|
||||
<script src="{{asset('/')}}js/support/support.js"></script>
|
||||
@endpush
|
||||
155
resources/views/support/view.blade.php
Normal file
155
resources/views/support/view.blade.php
Normal file
@@ -0,0 +1,155 @@
|
||||
|
||||
@extends( isClient() ? 'layouts.app' : 'layouts.admin')
|
||||
@push('css')
|
||||
<link href="{{ asset('css/support/support.css') }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
@php
|
||||
$support = $supports->first();
|
||||
$max_file_size = 5 * 1024;
|
||||
@endphp
|
||||
|
||||
<div class="row" id="support-panel">
|
||||
<div class="col-xs-12 col-sm-12 column col-sm-offset-0">
|
||||
<div class="panel panel-default panel-frm">
|
||||
|
||||
<div class="panel-heading">
|
||||
<div class="row" style="padding-left: 20px;padding-right: 15px">
|
||||
<h3 class="pull-left">Client Support</h3>
|
||||
@if($support->status == config('constant.SUPPORT_STATUS.Open') && (isSupport() || isAdmin()))
|
||||
<button class="btn btn2 pull-right" onclick="reminder_btn_click({{$support->id}},'{{route('process.ajax')}}')" >Reminder</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="clearfix"></div>
|
||||
<div class="x_content">
|
||||
<div class="col-md-12">
|
||||
<form method="post" action="{{route('insert.client.support')}}" id="client_support_form"
|
||||
autocomplete="off"
|
||||
enctype=multipart/form-data
|
||||
class="input-form-section">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{$support->id}}">
|
||||
<input type="hidden" name="support_title" value="{{$support->title}}">
|
||||
<h4> Title : {{$support->title}} </h4>
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<textarea id="supporttxt" name="support_text" placeholder="Please write what is your problem or needs"> </textarea>
|
||||
{{-- <textarea rows="4" cols="50" class="form-control" id="support_text" name="support_text" placeholder="Please write what is your problem or needs" ></textarea>--}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h4> Add attachment (if needed)</h4>
|
||||
<input id="doc_file" type="file" class="form-control"
|
||||
name="doc_file"
|
||||
onchange="return common_helper.fileValidation(this,{{$max_file_size}})"
|
||||
accept="image/jpeg,image/gif,image/png,image/x-eps,application/pdf,application/zip">
|
||||
<span class="text-bold"><strong>(Max. file size {{sizeFilter($max_file_size)}} and File Type jpeg, jpg, png, x-eps,pdf,zip)</strong></span>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
@if($support->status == config('constant.SUPPORT_STATUS.Open'))
|
||||
<button type="submit" class="btn btn2 pull-right" >Send</button>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel msger-chat">
|
||||
@if(!empty($supports))
|
||||
@foreach ($supports as $obj)
|
||||
@php
|
||||
$isadmin = getSupportIsAdmin($obj);
|
||||
@endphp
|
||||
@if($obj->srsender_id == auth()->user()->id)
|
||||
<div class="msg left-msg">
|
||||
<div class="msg-img"
|
||||
style="background-image: url('{{asset('images/user.png')}}')">
|
||||
</div>
|
||||
<div class="msg-bubble">
|
||||
<div class="msg-info">
|
||||
<div class="msg-info-name">{{$obj->first_name}}</div>
|
||||
<div class="msg-info-time">{{getStringToDateTime($obj->sr_create)}}</div>
|
||||
</div>
|
||||
|
||||
<div class="msg-text">
|
||||
@php echo $obj->message; @endphp
|
||||
</div>
|
||||
@if(!empty($obj->attachment_path))
|
||||
<a href="{{ getSupportFile($obj->id.'/'.$obj->attachment_path) }}" target="_blank">Attachment</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@elseif($isadmin)
|
||||
|
||||
<div class="msg left-msg">
|
||||
<div class="msg-img"
|
||||
style="background-image: url('{{asset('images/user.png')}}')">
|
||||
</div>
|
||||
<div class="msg-bubble">
|
||||
<div class="msg-info">
|
||||
<div class="msg-info-name">{{$obj->first_name}}</div>
|
||||
<div class="msg-info-time">{{getStringToDateTime($obj->sr_create)}}</div>
|
||||
</div>
|
||||
|
||||
<div class="msg-text">
|
||||
@php echo $obj->message; @endphp
|
||||
</div>
|
||||
@if(!empty($obj->attachment_path))
|
||||
<a href="{{ getSupportFile($obj->id.'/'.$obj->attachment_path) }}" target="_blank">Attachment</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="msg right-msg">
|
||||
<div class="msg-img"
|
||||
style="background-image: url('{{asset('images/user.png')}}')">
|
||||
</div>
|
||||
|
||||
<div class="msg-bubble">
|
||||
<div class="msg-info">
|
||||
<div class="msg-info-name">{{$obj->first_name}}</div>
|
||||
@if(isAdmin() || isEmployee())
|
||||
<div class="msg-info-name">{{$obj->email}}</div>
|
||||
@endif
|
||||
<div class="msg-info-time">{{getStringToDateTime($obj->sr_create)}}</div>
|
||||
</div>
|
||||
|
||||
<div class="msg-text">
|
||||
@php echo $obj->message; @endphp
|
||||
</div>
|
||||
@if(!empty($obj->attachment_path))
|
||||
<a href="{{ getSupportFile($obj->id.'/'.$obj->attachment_path) }}" target="_blank">Attachment</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('script')
|
||||
<script src="{{asset('/')}}js/support/support.js?v=1.0.1"></script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user