application status draft
This commit is contained in:
parent
79904f22f6
commit
2c5f68a6f0
|
|
@ -138,8 +138,9 @@ protected function setupListOperation()
|
|||
}
|
||||
|
||||
public function accept($id){
|
||||
$entry = Application::find($id);
|
||||
$entry->accepted_by = backpack_user()->email;
|
||||
$entry = Application::findOrfail($id);
|
||||
$entry->accepted_by = backpack_user()->name;
|
||||
$entry->state = 'accepted';
|
||||
$entry->accepted_date = Carbon::now();
|
||||
$entry->save();
|
||||
return redirect()->back();
|
||||
|
|
|
|||
|
|
@ -63,9 +63,18 @@
|
|||
'upload_success' => 'Uploaded successfully',
|
||||
'upload_failure' => 'File upload failed',
|
||||
'upload_max_size' => 'Max size exceeded',
|
||||
'created_at' => 'Created at'
|
||||
'created_at' => 'Created at',
|
||||
|
||||
'accept_application' => 'Accepted application',
|
||||
'approve' => 'Approve',
|
||||
'accepted' => 'Accepted',
|
||||
'attachments' => 'Attachments',
|
||||
'name' => 'Name',
|
||||
'size' => 'Size (kb)',
|
||||
'type' => 'Type',
|
||||
],
|
||||
'dashboard' => [
|
||||
'title' => 'Dashboard',
|
||||
'total_tickets' => "Total tickets",
|
||||
'open_tickets' => "Open tickets",
|
||||
'closed_tickets' => "Closed tickets",
|
||||
|
|
@ -126,6 +135,8 @@
|
|||
'application_id' => 'Application id',
|
||||
'category' => 'Category',
|
||||
'last_sender' => 'Last sender',
|
||||
|
||||
'create' => 'Create ticket'
|
||||
],
|
||||
'contract' => [
|
||||
'title' => 'Contract',
|
||||
|
|
|
|||
|
|
@ -18,162 +18,166 @@
|
|||
|
||||
<nav aria-label="breadcrumb" class="d-none d-lg-block">
|
||||
<ol class="breadcrumb m-0 mb-3">
|
||||
<li class="breadcrumb-item"><a href="{{backpack_url()}}">Admin</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{backpack_url('application')}}">Application</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{backpack_url()}}">@lang('app.dashboard.tite')</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{backpack_url('application')}}">@lang('app.application.listTitle')</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ $application->id }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@if ($application->state == 'new')
|
||||
<form class="form-horizontal" action="{{ route('accepted_application',['id'=>$application->id]) }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<button class="btn btn-primary mb-4" type="button" data-toggle="modal" data-target="#successModal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-check2-square" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M3 14.5A1.5 1.5 0 0 1 1.5 13V3A1.5 1.5 0 0 1 3 1.5h8a.5.5 0 0 1 0 1H3a.5.5 0 0 0-.5.5v10a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V8a.5.5 0 0 1 1 0v5a1.5 1.5 0 0 1-1.5 1.5H3z" />
|
||||
<path
|
||||
d="m8.354 10.354 7-7a.5.5 0 0 0-.708-.708L8 9.293 5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0z" />
|
||||
</svg>
|
||||
Accept Application
|
||||
</button>
|
||||
</form>
|
||||
@elseif ($application->state == 'accepted')
|
||||
<div class="col-12">
|
||||
@if ($application->state == 'new')
|
||||
<form class="form-horizontal" action="{{ route('accepted_application',['id'=>$application->id]) }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<button class="btn btn-primary mb-4" type="button" data-toggle="modal" data-target="#successModal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-check2-square" viewBox="0 0 16 16">
|
||||
class="bi bi-check2-square" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M3 14.5A1.5 1.5 0 0 1 1.5 13V3A1.5 1.5 0 0 1 3 1.5h8a.5.5 0 0 1 0 1H3a.5.5 0 0 0-.5.5v10a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V8a.5.5 0 0 1 1 0v5a1.5 1.5 0 0 1-1.5 1.5H3z" />
|
||||
<path
|
||||
d="m8.354 10.354 7-7a.5.5 0 0 0-.708-.708L8 9.293 5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0z" />
|
||||
</svg>
|
||||
Approve
|
||||
@lang('app.application.accept_application')
|
||||
</button>
|
||||
<div class="modal fade" id="successModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-primary" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Fill the form</h4>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<form class="form-horizontal" action="/admin/approve-application/{{ $application->id }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id" value="{{ $application->id }}">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-5 col-form-label" for="input-normal">Legalizatnio
|
||||
number</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="legalization_number" class="form-control" id="input-normal"
|
||||
type="text" name="input-normal" placeholder="Normal">
|
||||
</div>
|
||||
</form>
|
||||
@elseif ($application->state == 'accepted')
|
||||
<button class="btn btn-primary mb-4" type="button" data-toggle="modal" data-target="#successModal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-check2-square" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M3 14.5A1.5 1.5 0 0 1 1.5 13V3A1.5 1.5 0 0 1 3 1.5h8a.5.5 0 0 1 0 1H3a.5.5 0 0 0-.5.5v10a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V8a.5.5 0 0 1 1 0v5a1.5 1.5 0 0 1-1.5 1.5H3z" />
|
||||
<path
|
||||
d="m8.354 10.354 7-7a.5.5 0 0 0-.708-.708L8 9.293 5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0z" />
|
||||
</svg>
|
||||
@lang('app.application.approve')
|
||||
</button>
|
||||
<div class="modal fade" id="successModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-primary" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Fill the form</h4>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<form class="form-horizontal" action="/admin/approve-application/{{ $application->id }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id" value="{{ $application->id }}">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-5 col-form-label" for="input-normal">Legalizatnio
|
||||
number</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="legalization_number" class="form-control" id="input-normal"
|
||||
type="text" name="input-normal" placeholder="Normal">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-5 col-form-label" for="input-normal">Expiration
|
||||
date</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="expires_at" class="form-control" id="input-normal"
|
||||
type="date" name="input-normal" placeholder="Normal">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-5 col-form-label" for="input-normal">Expiration
|
||||
date</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="expires_at" class="form-control" id="input-normal"
|
||||
type="date" name="input-normal" placeholder="Normal">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Close</button>
|
||||
<button class="btn btn-success" type="submit">Save</button>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Close</button>
|
||||
<button class="btn btn-success" type="submit">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.modal-content-->
|
||||
</div>
|
||||
<!-- /.modal-dialog-->
|
||||
</div>
|
||||
@else
|
||||
<button class="btn btn-secondary mb-4" style="text-transform: capitalize"
|
||||
type="button">{{ $application->state }}</button>
|
||||
@endif
|
||||
@if($application->ticket)
|
||||
<a class="btn btn-success mb-4" href="/admin/chat?ticket_id={{ $application->ticket->id }}">Go to ticket</a>
|
||||
@else
|
||||
<button class="btn btn-success mb-4" type="button" data-toggle="modal" data-target="#ticketModal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
||||
class="bi bi-ticket-perforated" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M4 4.85v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Zm-7 1.8v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Zm-7 1.8v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Zm-7 1.8v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Z" />
|
||||
<path
|
||||
d="M1.5 3A1.5 1.5 0 0 0 0 4.5V6a.5.5 0 0 0 .5.5 1.5 1.5 0 1 1 0 3 .5.5 0 0 0-.5.5v1.5A1.5 1.5 0 0 0 1.5 13h13a1.5 1.5 0 0 0 1.5-1.5V10a.5.5 0 0 0-.5-.5 1.5 1.5 0 0 1 0-3A.5.5 0 0 0 16 6V4.5A1.5 1.5 0 0 0 14.5 3h-13ZM1 4.5a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v1.05a2.5 2.5 0 0 0 0 4.9v1.05a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-1.05a2.5 2.5 0 0 0 0-4.9V4.5Z" />
|
||||
</svg>
|
||||
@lang('app.ticket.create')
|
||||
</button>
|
||||
<div class="modal fade" id="ticketModal" tabindex="-1" aria-labelledby="myModalLabel"
|
||||
style="display: none;" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-success" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Create ticket for the application</h4>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post" action="/admin/create-application-ticket" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="application_id" value="{{ $application->id }}">
|
||||
<input type="hidden" name="client_id" value={{ $application->account_id }}>
|
||||
<input type="hidden" name="status_id" value="1" class="form-control">
|
||||
<input type="hidden" name="last_sender" value="admin" class="form-control">
|
||||
<div class="card">
|
||||
<div class="card-body row">
|
||||
<!-- text input -->
|
||||
|
||||
<div class="form-group col-sm-12" element="div" bp-field-wrapper="true"
|
||||
bp-field-name="title" bp-field-type="text">
|
||||
<label>Title</label>
|
||||
|
||||
<input type="text" name="title" value="" class="form-control">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12" element="div" bp-field-wrapper="true"
|
||||
bp-field-name="title" bp-field-type="text">
|
||||
<label>Content</label>
|
||||
|
||||
<textarea name="content" value="" class="form-control"></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="saveActions" class="form-group">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-success">
|
||||
<span class="la la-save" role="presentation" aria-hidden="true"></span>
|
||||
|
||||
<span data-value="save_and_back">Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.modal-content-->
|
||||
</div>
|
||||
<!-- /.modal-dialog-->
|
||||
</div>
|
||||
@else
|
||||
<button class="btn btn-secondary mb-4" style="text-transform: capitalize"
|
||||
type="button">{{ $application->state }}</button>
|
||||
@endif
|
||||
@if($application->ticket)
|
||||
<a class="btn btn-success mb-4" href="/admin/chat?ticket_id={{ $application->ticket->id }}">Go to ticket</a>
|
||||
@else
|
||||
<button class="btn btn-success mb-4" type="button" data-toggle="modal" data-target="#ticketModal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
|
||||
class="bi bi-ticket-perforated" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M4 4.85v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Zm-7 1.8v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Zm-7 1.8v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Zm-7 1.8v.9h1v-.9H4Zm7 0v.9h1v-.9h-1Z" />
|
||||
<path
|
||||
d="M1.5 3A1.5 1.5 0 0 0 0 4.5V6a.5.5 0 0 0 .5.5 1.5 1.5 0 1 1 0 3 .5.5 0 0 0-.5.5v1.5A1.5 1.5 0 0 0 1.5 13h13a1.5 1.5 0 0 0 1.5-1.5V10a.5.5 0 0 0-.5-.5 1.5 1.5 0 0 1 0-3A.5.5 0 0 0 16 6V4.5A1.5 1.5 0 0 0 14.5 3h-13ZM1 4.5a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v1.05a2.5 2.5 0 0 0 0 4.9v1.05a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-1.05a2.5 2.5 0 0 0 0-4.9V4.5Z" />
|
||||
</svg>
|
||||
Create ticket
|
||||
</button>
|
||||
<div class="modal fade" id="ticketModal" tabindex="-1" aria-labelledby="myModalLabel"
|
||||
style="display: none;" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-success" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Create ticket for the application</h4>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post" action="/admin/create-application-ticket" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="application_id" value="{{ $application->id }}">
|
||||
<input type="hidden" name="client_id" value={{ $application->account_id }}>
|
||||
<input type="hidden" name="status_id" value="1" class="form-control">
|
||||
<input type="hidden" name="last_sender" value="admin" class="form-control">
|
||||
<div class="card">
|
||||
<div class="card-body row">
|
||||
<!-- text input -->
|
||||
|
||||
<div class="form-group col-sm-12" element="div" bp-field-wrapper="true"
|
||||
bp-field-name="title" bp-field-type="text">
|
||||
<label>Title</label>
|
||||
|
||||
<input type="text" name="title" value="" class="form-control">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12" element="div" bp-field-wrapper="true"
|
||||
bp-field-name="title" bp-field-type="text">
|
||||
<label>Content</label>
|
||||
|
||||
<textarea name="content" value="" class="form-control"></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="saveActions" class="form-group">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-success">
|
||||
<span class="la la-save" role="presentation" aria-hidden="true"></span>
|
||||
|
||||
<span data-value="save_and_back">Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content-->
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
<!-- /.modal-dialog-->
|
||||
</div>
|
||||
@endif
|
||||
<!-- /.modal-content-->
|
||||
</div>
|
||||
<!-- /.modal-dialog-->
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
@include('admin.application.'.$application->account->type)
|
||||
|
||||
</div>
|
||||
|
|
@ -190,7 +194,7 @@ class="bi bi-ticket-perforated" viewBox="0 0 16 16">
|
|||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" />
|
||||
</svg>
|
||||
Attachments
|
||||
@lang('app.application.attachments')
|
||||
<span class="badge badge-pill badge-secondary">{{ count($application->attachments) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -200,9 +204,9 @@ class="bi bi-ticket-perforated" viewBox="0 0 16 16">
|
|||
<table class="table table-responsive-sm table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Size (Kb)</th>
|
||||
<th>Type</th>
|
||||
<th>@lang('app.application.name')</th>
|
||||
<th>@lang('app.application.size')</th>
|
||||
<th>@lang('app.application.type')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue