update for version 1.0.1
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::open(['action'=>'Agent\helpdesk\UserController@store','method'=>'post']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="content-header">
|
||||
|
||||
<h4>Create {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Email Address : Email : Required -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!}
|
||||
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::email('email',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Full Name : Text : Required-->
|
||||
|
||||
<div class="col-xs-4 form-group {{ $errors->has('full_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('full_name',Lang::get('lang.full_name')) !!}
|
||||
{!! $errors->first('full_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('full_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- mobile Number : Text : -->
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="ext">EXT</label>
|
||||
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-5 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="phone_number">Phone</label>
|
||||
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('active',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('active', '<spam class="help-block">:message</spam>') !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','0') !!}{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Internal Notes : Textarea -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_note',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,149 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::model($users,['url'=>'user/'.$users->id,'method'=>'PATCH']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="content-header">
|
||||
|
||||
<h4>{{Lang::get('lang.edit')}} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Email Address : Email : Required -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!}
|
||||
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::email('email',null,['disabled'=>'disabled', 'class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Full Name : Text : Required-->
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('user_name',Lang::get('lang.full_name')) !!}
|
||||
{!! $errors->first('user_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- mobile Number : Text : -->
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="ext">EXT</label>
|
||||
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-5 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="phone_number">Phone</label>
|
||||
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('active',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('active', '<spam class="help-block">:message</spam>') !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','0') !!}{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('ban',Lang::get('lang.ban')) !!}
|
||||
{!! $errors->first('ban', '<spam class="help-block">:message</spam>') !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('ban','1',true) !!}{{Lang::get('lang.enable')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('ban','0') !!}{{Lang::get('lang.disable')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Internal Notes : Textarea -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_note',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,112 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{Lang::get('lang.user')}}</h3><a href="{{route('user.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_user')}}</a></div>
|
||||
|
||||
<div class="box-body table-responsive no-padding">
|
||||
|
||||
|
||||
<!-- check whether success or not -->
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Failed.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<?php
|
||||
$users = App\User::where('role','=','user')->orderBy('id', 'ASC')->paginate(20);
|
||||
?>
|
||||
<table class="table table-hover" style="overflow:hidden;">
|
||||
<tr>
|
||||
<th width="100px">{{Lang::get('lang.name')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.status')}}</th>
|
||||
<th width="100px">Last Login</th>
|
||||
<th width="100px">{{Lang::get('lang.action')}}</th>
|
||||
|
||||
</tr>
|
||||
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
<td><a href="{{route('user.show', $user->id)}}"> {{$user->user_name }}</a></td>
|
||||
<td><?php if($user->active == 1) { ?> <button class="btn btn-success btn-xs">Active</button> <?php } else { ?> <button class="btn btn-danger btn-xs">Inactive</button> <?php } ?></td>
|
||||
<td>{{ UTC::usertimezone($user->updated_at) }}</td>
|
||||
<td>
|
||||
{!! Form::open(['route'=>['user.destroy', $user->id],'method'=>'DELETE']) !!}
|
||||
<a href="{{route('user.edit', $user->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> Edit</a>
|
||||
{{-- <div class="form-group"> --}}
|
||||
<!-- To pop up a confirm Message -->
|
||||
{!! Form::button(' <i class="fa fa-trash" style="color:black;"> </i> Delete',['type' => 'submit',
|
||||
'class'=> 'btn btn-warning btn-xs btn-flat',
|
||||
'onclick'=>'return confirm("Are you sure?")'])
|
||||
!!}
|
||||
|
||||
{{-- </div> --}}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
<div class="pull-right">
|
||||
<?php echo $users->setPath(url('/user'))->render();?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,214 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Dashboard')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('dashboard-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('profile')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
{!! Form::model($user,['url'=>'agent-profile', 'method' => 'PATCH','files'=>true]) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<div class="content-header">
|
||||
|
||||
<h4>Profile {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Success.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- fail message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Failed.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- first name -->
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}
|
||||
{!! $errors->first('first_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- last name -->
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
|
||||
{!! $errors->first('last_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- gender -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('gender',Lang::get('lang.gender')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<!-- email address -->
|
||||
{!! Form::label('email',Lang::get('lang.email_address')) !!}
|
||||
<div>
|
||||
{{$user->email}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
|
||||
<!-- company -->
|
||||
{!! Form::label('company',Lang::get('lang.company')) !!}
|
||||
{!! $errors->first('company', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('company',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- phone extension -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('ext',Lang::get('lang.ext')) !!}
|
||||
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- phone number -->
|
||||
<div class="col-xs-9 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
|
||||
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- mobile -->
|
||||
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
|
||||
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('agent_sign') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('agent_sign',Lang::get('lang.agent_sign')) !!}
|
||||
{!! $errors->first('agent_sign', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::textarea('agent_sign',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
|
||||
<!-- profile pic -->
|
||||
<div type="file" class="btn btn-default btn-file" style="color:orange">
|
||||
<i class="fa fa-user"> </i>
|
||||
{!! Form::label('profile_pic',Lang::get('lang.profile_pic')) !!}
|
||||
{!! $errors->first('profile_pic', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::file('profile_pic',['class' => 'form-file']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::token() !!}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
{!! Form::model($user,['url'=>'agent-profile-password/'.$user->id , 'method' => 'PATCH']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<div class="content-header">
|
||||
|
||||
<h4>Change Password {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
@if(Session::has('success1'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Success.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success1')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- fail message -->
|
||||
@if(Session::has('fails1'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Failed.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails1')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- old password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('old_password',Lang::get('lang.old_password')) !!}
|
||||
{!! Form::password('old_password',['placeholder'=>'Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<!-- new password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('new_password',Lang::get('lang.new_password')) !!}
|
||||
{!! Form::password('new_password',['placeholder'=>'New Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<!-- confirm password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!}
|
||||
{!! Form::password('confirm_password',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@@ -0,0 +1,75 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
@section('Dashboard')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('dashboard-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('profile')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
|
||||
@section('profileimg')
|
||||
@if(Auth::user() && Auth::user()->profile_pic)
|
||||
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
|
||||
@else
|
||||
@if(Auth::user())
|
||||
<img src="{{ Gravatar::src(Auth::user()->email,200) }}" class="img-circle" alt="User Image">
|
||||
@endif
|
||||
@endif
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
{{-- style="background-image:url({{ URL::asset('/dist/img/boxed-bg.jpg')}}); color:#DBDBDB;" --}}
|
||||
<div class="col-md-12 box box-primary">
|
||||
<div class="col-md-6">
|
||||
{{-- <div class="box box-success"> --}}
|
||||
{{-- <section class="content"> --}}
|
||||
{{-- <div class=" box-header"> --}}
|
||||
<h3><b>User Information</b> <a href="{{URL::route('agent-profile-edit')}}"><i class="fa fa-fw fa-edit"> </i></a></h3>
|
||||
{{-- </div> --}}
|
||||
<div class="box-body">
|
||||
<table class="row">
|
||||
@if($user->gender == 1)
|
||||
<tr><th class="col-md-8"><h4><b>Gender:<b></h4></th><td class="col-md-6"><h4>{{ 'Male' }}</h4></td></tr>
|
||||
@else
|
||||
<tr><th class="col-md-8"><h4><b>gender:</b></h4></th><td class="col-md-6"><h4>{{ 'Female' }}</h4></td></tr>
|
||||
@endif
|
||||
<tr><th class="col-md-8"><h4><b>department:</b></h4></th><td class="col-md-6"><h4>{{ $user->primary_dpt }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>group:</b></h4></th><td class="col-md-6"><h4>{{ $user->assign_group }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Company:</b></h4></th><td class="col-md-6"> <h4>{{ $user->company }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Time-zone:</b></h4></th><td class="col-md-6"><h4> {{ $user->agent_tzone }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Role:</b></h4></th><td class="col-md-6"> <h4>{{ $user->role }}</h4></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
{{-- </section> --}}
|
||||
{{-- </div> --}}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{-- <div class="box box-primary"> --}}
|
||||
{{-- <section class="content"> --}}
|
||||
<h3><b>Contact Information</b></h3>
|
||||
<div class="box-body">
|
||||
<table>
|
||||
<tr><th class="col-md-8"><h4><b>Email:</b></h4> </th> <td class="col-md-6"><h4> {{ $user->email }}</h4> </td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Phone Number:</b></h4> </th> <td class="col-md-6"><h4> {{ $user->ext }}{{ $user->phone_number }}</h4> </td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Moble:</b></h4></th><td class="col-md-6"><h4> {{ $user->mobile }}</h4></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
{{-- </section> --}}
|
||||
</div>
|
||||
{{-- </div> --}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@stop
|
||||
@@ -0,0 +1,755 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<div class="box-header" style="margin-top:-15px;margin-bottom:-15px;"><h3 class="box-title">User Profile</h3><a href="{{route('user.edit', $users->id)}}" class="btn btn-info btn-sm btn-flat pull-right"><i class="fa fa-edit" style="color:black;"> </i> Edit</a></div>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
{{-- style="display:none" --}}
|
||||
<!-- success message -->
|
||||
<div id="alert-success" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success <span id="get-success"></span></b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<center>
|
||||
<img src="{{ Gravatar::src($users -> email) }}" class="img-circle" alt="User Image" style="border:3px solid #CBCBDA;padding:3px;">
|
||||
@if($users->first_name || $users->last_name)
|
||||
<h3 class="">{{$users->first_name}} {{$users->last_name}}</h3>
|
||||
@else
|
||||
<h3 class="">{{$users->user_name}}</h3>
|
||||
@endif
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.email')}}</b>
|
||||
<a class="pull-right">
|
||||
{{$users->email }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div id="refresh-org">
|
||||
<?php
|
||||
$user_org = App\Model\helpdesk\Agent_panel\User_org::where('user_id','=', $users->id)->first();
|
||||
?>
|
||||
@if($user_org == null)
|
||||
<b>Organisation</b>
|
||||
|
||||
<a href="" class="pull-right" data-toggle="modal" data-target="#assign"><i class="fa fa-hand-o-right" style="color:orange;"> </i> Assign </a>
|
||||
<a href="" data-toggle="modal" data-target="#create_org" class="pull-right"> {{Lang::get('lang.create')}} <b style="color:#000"> / </b> </a>
|
||||
@else
|
||||
<?php $org_id = $user_org->org_id;
|
||||
$organization = App\Model\helpdesk\Agent_panel\Organization::where('id','=',$org_id)->first(); ?>
|
||||
<b>Organisations</b>
|
||||
<a href="{!! URL::route('organizations.show',$organization->id) !!}" class="pull-right">{!! $organization->name !!}</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.status')}}</b>
|
||||
<a class="pull-right">
|
||||
@if($users->active == '1')
|
||||
<span style="color:green;">Active</span>
|
||||
@else
|
||||
<span style="color:red;">Inactive</span>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
@if($users->phone_number)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.phone')}}</b>
|
||||
<a class="pull-right">{{$users->phone_number}}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($users->internal_note)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.internal_notes')}}</b>
|
||||
<br/>
|
||||
{!! $users->internal_note !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{-- detals table starts --}}
|
||||
<?php $user = App\User::where('id',$users->id)->first(); ?>
|
||||
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
|
||||
$deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Custom Tabs -->
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab_1" data-toggle="tab">Open Tickets ({{$open}})</a></li>
|
||||
<li><a href="#tab_2" data-toggle="tab">Closed Tickets ({{$counted}})</a></li>
|
||||
<li><a href="#tab_3" data-toggle="tab">Deleted Tickets ({{$deleted}})</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
{{-- open tab --}}
|
||||
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get()); ?>
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title) {
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null) {
|
||||
$assigned = "Unassigned";
|
||||
} else {
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{-- end deleted tickets --}}
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_2">
|
||||
{{-- open tab --}}
|
||||
<?php $closed = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', 2)->get()); ?>
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding">
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title) {
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null) {
|
||||
$assigned = "Unassigned";
|
||||
} else {
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{-- end deleted tickets --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_3">
|
||||
{{-- open tab --}}
|
||||
<?php $deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" id="close-alert" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</div><!-- /.col -->
|
||||
</div> <!-- /.row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- END CUSTOM TABS -->
|
||||
|
||||
{{-- MODAL POPUPS --}}
|
||||
|
||||
<div class="modal fade" id="create_org">
|
||||
<div class="modal-dialog" style="width:84%;height:70%;">
|
||||
<div class="modal-content">
|
||||
{!! Form::model($users->id, ['id'=>'form','method' => 'PATCH'] )!!}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidd en="true">×</span></button>
|
||||
<h4 class="modal-title">Create Organization</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- failure message -->
|
||||
<div class="alert alert-danger alert-dismissable" id="alert-danger" style="display:none;">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! <span id="get-danger"></span> </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="row" id="hide">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Name</label>
|
||||
<input type="text" name="name" class="form-control">
|
||||
<spam id="error-name" style="display:none;position:fixed" class="call-out text-red">This is a required field</spam>
|
||||
<spam id="error-name1" style="display:none;position:fixed" class="call-out text-red">! Allready Taken</spam>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Phone</label>
|
||||
<input type="number" name="phone" class="form-control">
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Website</label>
|
||||
<input type="url" name="website" placeholder="https://www.example.com" class="form-control">
|
||||
<spam id="error-website" style="display:none" class="help-block text-red">! Allready Taken</spam>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Address</label>
|
||||
<textarea name="address" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Internal</label>
|
||||
<textarea name="internal" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="show2" style="display:none;">
|
||||
<div class="row row-md-12">
|
||||
<div class="col-xs-5">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}">
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis">Close</button>
|
||||
<input type="submit" class="btn btn-primary pull-right" value="Update">
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
// create org
|
||||
$('#form').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../user-org/{{$users->id}}",
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#hide").hide();
|
||||
$("#show2").show();
|
||||
},
|
||||
success: function(response) {
|
||||
$("#show2").hide();
|
||||
$("#hide").show();
|
||||
|
||||
if (response == 0) {
|
||||
message = "Organization added successfully."
|
||||
$("#dismis").trigger("click");
|
||||
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
|
||||
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
|
||||
// $("#show").show();
|
||||
$("#alert-success").show();
|
||||
$('#get-success').html(message);
|
||||
setInterval(function(){$("#alert-success").hide(); },4000);
|
||||
|
||||
} else {
|
||||
message = response;
|
||||
$("#alert-danger").show();
|
||||
$('#get-danger').html(message);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Organisation Assign Modal -->
|
||||
<div class="modal fade" id="assign">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
{!! Form::model($users->id, ['id'=>'org_assign','method' => 'PATCH'] )!!}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" id="dismiss" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Assign</h4>
|
||||
</div>
|
||||
<div id="assign_alert" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<button id="assign_dismiss" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i>Alert!</h4>
|
||||
<div id="message-success1"></div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="col-md-6" id="assign_loader" style="display:none;">
|
||||
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}"><br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="assign_body">
|
||||
<p>Please Select an Organization</p>
|
||||
<select id="org" class="form-control" name="org">
|
||||
<?php
|
||||
$orgs = App\Model\helpdesk\Agent_panel\Organization::all();
|
||||
?>
|
||||
<optgroup label="Select Organizations">
|
||||
@foreach($orgs as $org)
|
||||
<option value="{{$org->id}}">{!! $org->name !!}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">Close</button>
|
||||
<button type="submit" class="btn btn-success pull-right" id="submt2">Assign</button>
|
||||
</div>
|
||||
{!! Form::close()!!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// Assign a ticket
|
||||
jQuery(document).ready(function($) {
|
||||
// create org
|
||||
$('#org_assign').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../user-org-assign/{{$users->id}}",
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#hide").hide();
|
||||
$("#show2").show();
|
||||
},
|
||||
success: function(response) {
|
||||
$("#show2").hide();
|
||||
$("#hide").show();
|
||||
|
||||
if (response == 1) {
|
||||
message = "Organization added successfully."
|
||||
$("#dismiss").trigger("click");
|
||||
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
|
||||
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
|
||||
// $("#show").show();
|
||||
$("#alert-success").show();
|
||||
$('#get-success').html(message);
|
||||
setInterval(function(){$("#alert-success").hide(); },4000);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
<!-- /content -->
|
||||
Reference in New Issue
Block a user