diff --git a/.gitignore b/.gitignore index 30bc16279..e9c8e8112 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/node_modules \ No newline at end of file +/node_modules +/nbproject/private/ \ No newline at end of file diff --git a/app/Http/Controllers/Admin/helpdesk/SettingsController.php b/app/Http/Controllers/Admin/helpdesk/SettingsController.php index 9f3bd209c..4b3e18aea 100644 --- a/app/Http/Controllers/Admin/helpdesk/SettingsController.php +++ b/app/Http/Controllers/Admin/helpdesk/SettingsController.php @@ -27,6 +27,7 @@ use App\Model\helpdesk\Utility\Time_format; use Illuminate\Http\Request; use Input; use Exception; +use DB; /** * SettingsController @@ -54,7 +55,25 @@ class SettingsController extends Controller { public function settings() { return view('themes.default1.admin.helpdesk.setting'); } - +public function RatingSettings() { + $ratings = DB::table('settings_ratings')->get(); + + return view('themes.default1.admin.helpdesk.settings.ratings',compact('ratings')); + } + public function PostRatingSettings($slug) { + $name = Input::get('rating_name'); + $publish = Input::get('publish'); + $modify = Input::get('modify'); + + DB::table('settings_ratings')->whereSlug($slug)->update(array('rating_name' => $name,'publish' => $publish, 'modify' => $modify)); + + return redirect()->back()->with('success', 'Successfully updated'); + } + public function RatingDelete($slug) { + DB::table('settings_ratings')->whereSlug($slug)->delete(); + + return redirect()->back()->with('success', 'Successfully Deleted'); + } /** * @param int $id * @return Response diff --git a/app/Http/Controllers/Agent/helpdesk/TicketController.php b/app/Http/Controllers/Agent/helpdesk/TicketController.php index 01514501b..09fe3ab29 100644 --- a/app/Http/Controllers/Agent/helpdesk/TicketController.php +++ b/app/Http/Controllers/Agent/helpdesk/TicketController.php @@ -2182,5 +2182,15 @@ class TicketController extends Controller { return view('themes.default1.agent.helpdesk.dept-ticket.inprogress',compact('id')); } } + public function rating($id,$rating) { + + Tickets::where('id', $id)->update(array('rating' => $rating)); + return redirect()->back()->with('Success','Thank you for your rating!'); + } + public function ratingReply($id,$rating) { + + Tickets::where('id', $id)->update(array('ratingreply' => $rating)); + return redirect()->back()->with('Success','Thank you for your rating!'); + } } diff --git a/app/Http/routes.php b/app/Http/routes.php index 65ddc7911..b4ef3ebad 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -1,6 +1,6 @@ 'role.agent', 'middleware' => 'auth'], function () Route::get('agen1', 'Agent\helpdesk\DashboardController@ChartData'); - Route::post('chart-range', ['as' => 'post.chart', 'uses' => 'Agent\helpdesk\DashboardController@ChartData']); + Route::post('chart-range/{date1}/{date2}', ['as' => 'post.chart', 'uses' => 'Agent\helpdesk\DashboardController@ChartData']); Route::resource('user', 'Agent\helpdesk\UserController'); /* User router is used to control the CRUD of user */ @@ -216,7 +216,11 @@ Route::group(['middleware' => 'role.agent', 'middleware' => 'auth'], function () Route::get('/test', ['as' => 'thr', 'uses' => 'Agent\helpdesk\MailController@fetchdata']); /* Fetch Emails */ - Route::get('/ticket', ['as' => 'ticket', 'uses' => 'Agent\helpdesk\TicketController@ticket_list']); /* Get Ticket */ + Route::post('rating/{id}/{rating}', ['as' => 'ticket.rating' , 'uses' => 'Agent\helpdesk\TicketController@rating']); /* Get overall Ratings */ + + Route::post('rating2/{id}/{rating}', ['as' => 'ticket.rating2' , 'uses' => 'Agent\helpdesk\TicketController@ratingReply']); /* Get reply Ratings */ + + Route::get('/ticket', ['as' => 'ticket', 'uses' => 'Agent\helpdesk\TicketController@ticket_list']); /* Get Ticket */ Route::get('/ticket/inbox', ['as' => 'inbox.ticket', 'uses' => 'Agent\helpdesk\TicketController@inbox_ticket_list']); /* Get Inbox Ticket */ @@ -529,6 +533,12 @@ $router->get('test', 'ArticleController@test'); $router->post('image', 'Agent\kb\SettingsController@image'); +Route::get('getratings', 'Admin\helpdesk\SettingsController@RatingSettings'); +Route::get('deleter/{rating}',[ + 'as'=>'ratings.delete' ,'uses'=>'Admin\helpdesk\SettingsController@RatingDelete' + ]); +Route::patch('postratings/{slug}',['as'=>'settings.rating','uses'=> 'Admin\helpdesk\SettingsController@PostRatingSettings']); + $router->get('direct', function () { return view('direct'); }); diff --git a/database/migrations/2016_01_25_075608_create_tickets_table.php b/database/migrations/2016_01_25_075608_create_tickets_table.php index 0223ce530..ecfcccd25 100644 --- a/database/migrations/2016_01_25_075608_create_tickets_table.php +++ b/database/migrations/2016_01_25_075608_create_tickets_table.php @@ -26,6 +26,8 @@ class CreateTicketsTable extends Migration { $table->integer('flags'); $table->integer('ip_address'); $table->integer('assigned_to')->unsigned()->nullable()->index('assigned_to'); + $table->integer('rating'); + $table->integer('ratingreply'); $table->integer('lock_by'); $table->integer('lock_at'); $table->integer('source')->unsigned()->nullable()->index('source'); diff --git a/database/migrations/2016_02_01_052219_settings_ratings.php b/database/migrations/2016_02_01_052219_settings_ratings.php new file mode 100644 index 000000000..379444d8c --- /dev/null +++ b/database/migrations/2016_02_01_052219_settings_ratings.php @@ -0,0 +1,52 @@ +increments('id'); + $table->string('rating_name'); + $table->integer('publish'); + $table->integer('modify'); + $table->string('slug')->unique(); + $table->timestamps(); + }); + DB::table('settings_ratings')->insert(array( + array( + 'rating_name' => 'Overall Rating', + 'publish' => '1', + 'modify' => '1', + 'slug' => Str::slug(ucfirst('Overall Rating')) + ), + array( + 'rating_name' => 'Reply Rating', + 'publish' => '1', + 'modify' => '1', + 'slug' => Str::slug(ucfirst('Reply Rating')) + ) + ) + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('settings_ratings'); + } + +} diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 000000000..d37ef9563 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,7 @@ +include.path=${php.global.include.path} +php.version=PHP_54 +source.encoding=UTF-8 +src.dir=. +tags.asp=false +tags.short=false +web.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 000000000..035db715d --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.php.project + + + Faveo.v1.0.5.2 + + + diff --git a/public/lb-faveo/dist/css/jquery.rating.css b/public/lb-faveo/dist/css/jquery.rating.css new file mode 100644 index 000000000..2f2389177 --- /dev/null +++ b/public/lb-faveo/dist/css/jquery.rating.css @@ -0,0 +1,12 @@ +/* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */ +div.rating-cancel,div.star-rating{float:left;width:17px;height:15px;text-indent:-999em;cursor:pointer;display:block;background:transparent;overflow:hidden} +div.rating-cancel,div.rating-cancel a{background:url('http://stsinfosystems.kayako.com/__swift/themes/client/images/icon_ratingdelete.gif') no-repeat 0 -16px} +div.star-rating,div.star-rating a{background:url('http://stsinfosystems.kayako.com/__swift/themes/client/images/icon_ratingstar.gif') no-repeat 0 0px} +div.rating-cancel a,div.star-rating a{display:block;width:16px;height:100%;background-position:0 0px;border:0} +div.star-rating-on a{background-position:0 -16px!important} +div.star-rating-hover a{background-position:0 -32px} +/* Read Only CSS */ +div.star-rating-readonly a{cursor:default !important} +/* Partial Star CSS */ +div.star-rating{background:transparent!important;overflow:hidden!important} +/* END jQuery.Rating Plugin CSS */ \ No newline at end of file diff --git a/public/lb-faveo/dist/images/delete.gif b/public/lb-faveo/dist/images/delete.gif new file mode 100644 index 000000000..43c6ca876 Binary files /dev/null and b/public/lb-faveo/dist/images/delete.gif differ diff --git a/public/lb-faveo/dist/images/star.gif b/public/lb-faveo/dist/images/star.gif new file mode 100644 index 000000000..d0948a708 Binary files /dev/null and b/public/lb-faveo/dist/images/star.gif differ diff --git a/public/lb-faveo/dist/images/stars.png b/public/lb-faveo/dist/images/stars.png new file mode 100644 index 000000000..b55a9b381 Binary files /dev/null and b/public/lb-faveo/dist/images/stars.png differ diff --git a/public/lb-faveo/dist/js/jquery.rating.pack.js b/public/lb-faveo/dist/js/jquery.rating.pack.js new file mode 100644 index 000000000..10bbeb217 --- /dev/null +++ b/public/lb-faveo/dist/js/jquery.rating.pack.js @@ -0,0 +1,9 @@ +/* + ### jQuery Star Rating Plugin v4.11 - 2013-03-14 ### + * Home: http://www.fyneworks.com/jquery/star-rating/ + * Code: http://code.google.com/p/jquery-star-rating-plugin/ + * + * Licensed under http://en.wikipedia.org/wiki/MIT_License + ### +*/ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';5(1W.1C)(8($){5((!$.1s.1V&&!$.1s.1U))2d{1j.1X("1T",C,s)}1R(e){};$.o.4=8(j){5(3.u==0)9 3;5(M V[0]==\'1m\'){5(3.u>1){7 k=V;9 3.18(8(){$.o.4.K($(3),k)})};$.o.4[V[0]].K(3,$.27(V).26(1)||[]);9 3};7 j=$.1b({},$.o.4.1w,j||{});$.o.4.P++;3.1y(\'.l-4-1g\').p(\'l-4-1g\').18(8(){7 b,m=$(3);7 c=(3.2g||\'28-4\').1f(/\\[|\\]/g,\'Y\').1f(/^\\Y+|\\Y+$/g,\'\');7 d=$(3.2h||1j.1H);7 e=d.6(\'4\');5(!e||e.1o!=$.o.4.P)e={E:0,1o:$.o.4.P};7 f=e[c]||d.6(\'4\'+c);5(f)b=f.6(\'4\');5(f&&b)b.E++;R{b=$.1b({},j||{},($.1d?m.1d():($.25?m.6():w))||{},{E:0,L:[],v:[]});b.z=e.E++;f=$(\'<1G 13="l-4-1I"/>\');m.1J(f);f.p(\'4-12-11-10\');5(m.Z(\'G\')||m.14(\'G\'))b.n=s;5(m.14(\'1c\'))b.1c=s;f.1r(b.D=$(\'\'+b.1B+\'\').q(\'1e\',8(){$(3).4(\'N\');$(3).p(\'l-4-T\')}).q(\'1h\',8(){$(3).4(\'x\');$(3).I(\'l-4-T\')}).q(\'1i\',8(){$(3).4(\'y\')}).6(\'4\',b))};7 g=$(\'\'+3.1k+\'\');f.1r(g);5(3.X)g.Z(\'X\',3.X);5(3.1x)g.p(3.1x);5(b.29)b.B=2;5(M b.B==\'1l\'&&b.B>0){7 h=($.o.15?g.15():0)||b.1n;7 i=(b.E%b.B),17=1K.1L(h/b.B);g.15(17).1M(\'a\').1N({\'1O-1P\':\'-\'+(i*17)+\'1Q\'})};5(b.n)g.p(\'l-4-1p\');R g.p(\'l-4-1S\').q(\'1e\',8(){$(3).4(\'1q\');$(3).4(\'J\')}).q(\'1h\',8(){$(3).4(\'x\');$(3).4(\'H\')}).q(\'1i\',8(){$(3).4(\'y\')});5(3.S)b.r=g;5(3.1Y=="A"){5($(3).14(\'1Z\'))b.r=g};m.1t();m.q(\'1u.4\',8(a){5(a.1v)9 C;$(3).4(\'y\')});g.6(\'4.m\',m.6(\'4.l\',g));b.L[b.L.u]=g[0];b.v[b.v.u]=m[0];b.t=e[c]=f;b.23=d;m.6(\'4\',b);f.6(\'4\',b);g.6(\'4\',b);d.6(\'4\',e);d.6(\'4\'+c,f)});$(\'.4-12-11-10\').4(\'x\').I(\'4-12-11-10\');9 3};$.1b($.o.4,{P:0,J:8(){7 a=3.6(\'4\');5(!a)9 3;5(!a.J)9 3;7 b=$(3).6(\'4.m\')||$(3.19==\'1a\'?3:w);5(a.J)a.J.K(b[0],[b.Q(),$(\'a\',b.6(\'4.l\'))[0]])},H:8(){7 a=3.6(\'4\');5(!a)9 3;5(!a.H)9 3;7 b=$(3).6(\'4.m\')||$(3.19==\'1a\'?3:w);5(a.H)a.H.K(b[0],[b.Q(),$(\'a\',b.6(\'4.l\'))[0]])},1q:8(){7 a=3.6(\'4\');5(!a)9 3;5(a.n)9;3.4(\'N\');3.1z().1A().O(\'.t-\'+a.z).p(\'l-4-T\')},N:8(){7 a=3.6(\'4\');5(!a)9 3;5(a.n)9;a.t.2a().O(\'.t-\'+a.z).I(\'l-4-q\').I(\'l-4-T\')},x:8(){7 a=3.6(\'4\');5(!a)9 3;3.4(\'N\');7 b=$(a.r);7 c=b.u?b.1z().1A().O(\'.t-\'+a.z):w;5(c)c.p(\'l-4-q\');a.D[a.n||a.1c?\'1t\':\'2b\']();3.2c()[a.n?\'p\':\'I\'](\'l-4-1p\')},y:8(a,b){7 c=3.6(\'4\');5(!c)9 3;5(c.n)9;c.r=w;5(M a!=\'F\'||3.u>1){5(M a==\'1l\')9 $(c.L[a]).4(\'y\',F,b);5(M a==\'1m\'){$.18(c.L,8(){5($(3).6(\'4.m\').Q()==a)$(3).4(\'y\',F,b)});9 3}}R{c.r=3[0].19==\'1a\'?3.6(\'4.l\'):(3.2e(\'.t-\'+c.z)?3:w)};3.6(\'4\',c);3.4(\'x\');7 d=$(c.r?c.r.6(\'4.m\'):w);7 e=$(c.v).O(\':S\');7 f=$(c.v).1y(d);f.1D(\'S\',C);d.1D(\'S\',s);$(d.u?d:e).2f({1E:\'1u\',1v:s});5((b||b==F)&&c.1F)c.1F.K(d[0],[d.Q(),$(\'a\',c.r)[0]]);9 3},n:8(a,b){7 c=3.6(\'4\');5(!c)9 3;c.n=a||a==F?s:C;5(b)$(c.v).Z("G","G");R $(c.v).2i("G");3.6(\'4\',c);3.4(\'x\')},2j:8(){3.4(\'n\',s,s)},2k:8(){3.4(\'n\',C,C)}});$.o.4.1w={D:\'2l 2m\',1B:\'\',B:0,1n:16};$(8(){$(\'m[1E=2n].l\').4()})})(1C);',62,148,'|||this|rating|if|data|var|function|return||||||||||||star|input|readOnly|fn|addClass|on|current|true|rater|length|inputs|null|draw|select|serial||split|false|cancel|count|undefined|disabled|blur|removeClass|focus|apply|stars|typeof|drain|filter|calls|val|else|checked|hover|title|arguments|div|id|_|attr|drawn|be|to|class|hasClass|width||spw|each|tagName|INPUT|extend|required|metadata|mouseover|replace|applied|mouseout|click|document|value|number|string|starWidth|call|readonly|fill|append|support|hide|change|selfTriggered|options|className|not|prevAll|addBack|cancelValue|jQuery|prop|type|callback|span|body|control|before|Math|floor|find|css|margin|left|px|catch|live|BackgroundImageCache|style|opacity|window|execCommand|nodeName|selected|role|text|aria|context|label|meta|slice|makeArray|unnamed|half|children|show|siblings|try|is|trigger|name|form|removeAttr|disable|enable|Cancel|Rating|radio'.split('|'),0,{})) \ No newline at end of file diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php index da026ba97..6107f776c 100644 --- a/resources/lang/en/lang.php +++ b/resources/lang/en/lang.php @@ -21,7 +21,9 @@ return array( 'success' => 'Success', 'fails' => 'Fails', 'alert' => 'Alert', - + 'ratings' => 'Ratings', + 'please_rate' => 'Please rate:', + 'ticket_ratings' => 'TICKET RATING', /* |-------------------------------------- | Login Page diff --git a/resources/views/themes/default1/admin/helpdesk/settings/ratings.blade.php b/resources/views/themes/default1/admin/helpdesk/settings/ratings.blade.php new file mode 100644 index 000000000..c8b22d21d --- /dev/null +++ b/resources/views/themes/default1/admin/helpdesk/settings/ratings.blade.php @@ -0,0 +1,171 @@ +@extends('themes.default1.admin.layout.admin') + +@section('Settings') +class="active" +@stop + +@section('settings-bar') +active +@stop + +@section('system') +class="active" +@stop + +@section('HeadInclude') + +@stop + +@section('PageHeader') + +@stop + + +@section('breadcrumbs') + +@stop + + +@section('content') + +
+
+

{{Lang::get('lang.ratings')}}

+
+@if(Session::has('success')) +
+ + Success! + + {{Session::get('success')}} +
+ @endif + + @if(Session::has('fails')) +
+ + Fail! + + {{Session::get('fails')}} +
+ @endif + +
+ + + + + + + + + + + + + @foreach($ratings as $rating) + + + + + + + + + @endforeach + +
IDTitleAction
{!! $rating->id !!}{!! $rating->rating_name !!} + + + + + + + + +
+ +
+ @stop +
\ No newline at end of file diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php index d3e8cc8bb..065dd6161 100644 --- a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php +++ b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php @@ -16,6 +16,7 @@ active ?> @section('sidebar') +
  • {!! Lang::get('lang.Ticket_Information') !!}
  • @@ -41,6 +42,19 @@ active @endif
  • + +
  • + {!! Lang::get('lang.ticket_ratings') !!} +
  • + + +
    + {!! $tickets->rating !!}
    + + +

    + {!! $tickets->ratingreply !!}

    +
  • @stop @section('content') @@ -1053,7 +1067,22 @@ $count_teams = count($teams); - {{-- // --}} - {{-- // --}} - - + + + @yield('HeadInclude') @@ -287,9 +311,7 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where( {!! Lang::get('lang.copyright') !!} © {!! date('Y') !!} {!! $company->company_name !!}. {!! Lang::get('lang.all_rights_reserved') !!}. {!! Lang::get('lang.powered_by') !!} Faveo - {{-- // --}} - - + {{-- // --}} diff --git a/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php b/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php index fac73421b..1acf8b10d 100644 --- a/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php +++ b/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php @@ -23,9 +23,12 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',\Crypt:
    - +
    +

    {{$thread->title}}

    ( {{$tickets->ticket_number}} )
    +
    +
    {{-- --}} @@ -42,6 +45,42 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id','=',\Crypt:
    {!! Form::close() !!}
    +
    +
    +
    +
    +
    + + + +   + + + + + + +   + + +
    Overall Satisfaction  
    + rating=='1')?'checked':'' ?> /> + rating=='2')?'checked':'' ?> /> + rating=='3')?'checked':'' ?>/> + rating=='4')?'checked':'' ?>/> + rating=='5')?'checked':'' ?> /> +
    Reply rating  
    + ratingreply=='1')?'checked':'' ?> /> + ratingreply=='2')?'checked':'' ?> /> + ratingreply=='3')?'checked':'' ?> /> + ratingreply=='4')?'checked':'' ?> /> + ratingreply=='5')?'checked':'' ?> /> + +
    +
    +
    +
    +
    @@ -340,7 +379,71 @@ $data = $ConvDate[0]; +