Compare commits

..

10 Commits

Author SHA1 Message Date
e075da48fd Commit 2025-08-02 23:14:28 +07:00
RafficMohammed
6568aa45f8 Update issue templates 2024-10-03 14:50:47 +05:30
RafficMohammed
1415a37b5a Update issue templates 2024-10-03 14:38:03 +05:30
RafficMohammed
44d323bd3d Update issue_template.md 2024-10-03 14:31:33 +05:30
Dhanya Chengappa
713868c775 Update README.md
formatting fix
2024-01-25 10:15:57 +05:30
Dhanya Chengappa
e2608e6851 Update README.md
Installation guide updated
2024-01-25 10:15:57 +05:30
Dhanya Chengappa
09e2078c81 Update README.md
minor change to README.md
2024-01-25 10:15:57 +05:30
StyleCI Bot
e8f61f16d5 Apply fixes from StyleCI 2024-01-25 10:15:57 +05:30
RafficMohammed
ac7fc33df2 release v2.0.3 2023-10-31 17:40:05 +05:30
StyleCI Bot
d0c51e89ff Apply fixes from StyleCI 2023-10-31 17:33:15 +05:30
439 changed files with 8009 additions and 4317 deletions

View File

@@ -0,0 +1,29 @@
---
name: Bug report (Community Product).
about: Create a report to help us improve our community Product
title: ''
labels: Customer reported Bug, Open Source
assignees: bhanu2217, RafficMohammed
---
- Faveo Version : #.#.#
- Product Name :
- PHP version :
- Database Driver & Version :
- Server specification :
#### Description:
#### Steps To Reproduce:
#### Downloaded from
- [ ] master-branch
- [ ] development-branch
- [ ] release-tag

View File

@@ -0,0 +1,18 @@
---
name: Bug report (Paid Product)
about: Create a report to help us improve
title: ''
labels: Customer reported Bug, Paid
assignees: bhanu2217, RafficMohammed
---
- Faveo Version : #.#.#
- Product Name :
- Server specification :
#### Description:
#### Steps To Reproduce:

View File

@@ -1,8 +1,15 @@
- Faveo Version : #.#.# - Faveo Version : #.#.#
- Product Name :
- PHP version : - PHP version :
- Database Driver & Version : - Database Driver & Version :
- Server specification : - Server specification :
#### Product Type
- [ ] Open Source
- [ ] Paid
#### Description: #### Description:
@@ -16,3 +23,5 @@
- [ ] development-branch - [ ] development-branch
- [ ] release-tag - [ ] release-tag
- [ ] Billing

45
.lando.yml Normal file
View File

@@ -0,0 +1,45 @@
name: faveo-laravel
recipe: laravel
config:
webroot: public
php: "8.1"
services:
appserver:
type: php:8.1
overrides:
environment:
APP_ENV: local
APP_DEBUG: true
APP_KEY: base64:u0DummyKeyForDev123456==
DB_CONNECTION: mysql
DB_HOST: host.docker.internal # nếu bạn dùng MySQL bên ngoài container
DB_PORT: 3306
DB_DATABASE: faveo
DB_USERNAME: root
DB_PASSWORD: HP_LE1851w
MAIL_MAILER: smtp
MAIL_HOST: smtp.gmail.com
MAIL_PORT: 587
MAIL_USERNAME: pvcuong1965@gmail.com
MAIL_PASSWORD: nwbdxhefdfgjyjtn
MAIL_ENCRYPTION: ssl
MAIL_FROM_ADDRESS: vcuong1965@gmail.com
MAIL_FROM_NAME: "Faveo Helpdesk"
mailhog:
type: mailhog
tooling:
artisan:
service: appserver
composer:
service: appserver
mysql:
service: database
proxy:
appserver:
- faveo.lndo.site

View File

@@ -46,6 +46,10 @@ To run Faveo your host just needs a couple of things:
* PHP Extensions: Imap, Mbstring, Mcrypt, OpenSSL, PDO, Tokenizer, XML, Zip * PHP Extensions: Imap, Mbstring, Mcrypt, OpenSSL, PDO, Tokenizer, XML, Zip
* Web Server Extension: Pretty URLs or Search Engine Friendly URLs have to be enabled in your web server configuration * Web Server Extension: Pretty URLs or Search Engine Friendly URLs have to be enabled in your web server configuration
Installation Guide
--------------------------
The installation steps for Faveo Community is same as that of Faveo. Please refer to our <a href="https://docs.faveohelpdesk.com/" target="_blank">Installation Guide</a> here.
Faveo Web Hosting Faveo Web Hosting
-------------------------- --------------------------
<a href="http://www.store.ladybirdwebhost.com/" target="_blank">Ladybird Web Host</a> Offers hosting with minimum requirement to host Faveo web application. Faveo has been tested on Ladybird Web Host servers &amp; works very well in their server environment. All web hosting packages offered by Ladybird Web Host come with 30 day money back gurantee.</p> <a href="http://www.store.ladybirdwebhost.com/" target="_blank">Ladybird Web Host</a> Offers hosting with minimum requirement to host Faveo web application. Faveo has been tested on Ladybird Web Host servers &amp; works very well in their server environment. All web hosting packages offered by Ladybird Web Host come with 30 day money back gurantee.</p>
@@ -67,16 +71,11 @@ Road Map for Community Edition
-------------------------- --------------------------
See what all features are going to be part of upcoming releases <a href="http://www.faveohelpdesk.com/faveo-helpdesk-road-map" target="_blank">here</a> See what all features are going to be part of upcoming releases <a href="http://www.faveohelpdesk.com/faveo-helpdesk-road-map" target="_blank">here</a>
Faveo Probe
--------------------------
Helps verify whether your server can run Faveo or not.
<a href="https://github.com/ladybirdweb/faveo-probe" target="_blank">Download here</a>
Faveo Community Faveo Community
-------------------------- --------------------------
Join Faveo discussion group and stay tuned to latest updates.<br/> Join Faveo discussion group and stay tuned to latest updates.<br/>
<li><a href="https://www.linkedin.com/groups/8429668" target="_blank">Join us on LinkedIn</a></li> * Join us on <a href="https://www.linkedin.com/groups/8429668" target="_blank">LinkedIn</a>
<li><a href="https://join.slack.com/t/faveocommunity/shared_invite/enQtNDU0NTcxNTA0ODIwLTAzN2VkNDhjMDFmNGJmNmUwYTkxYzE4OGI3ZDUyZGQ2ZDY5NjU2YmY4ZjU3YWNlNTA3N2JkOTk1ZmNiM2ZlY2U" target="_blank">Join us on Slack</a></li> * Join us on <a href="https://join.slack.com/t/faveocommunity/shared_invite/enQtNDU0NTcxNTA0ODIwLTAzN2VkNDhjMDFmNGJmNmUwYTkxYzE4OGI3ZDUyZGQ2ZDY5NjU2YmY4ZjU3YWNlNTA3N2JkOTk1ZmNiM2ZlY2U" target="_blank">Slack</a>
Support the community edition Support the community edition
-------------------------- --------------------------
@@ -105,9 +104,10 @@ Check mark versions are supported with security patches.
| Version | Supported | | Version | Supported |
| ------- | ------------------ | | ------- | ------------------ |
| 2.0.1 | :white_check_mark: | | 2.0.3 | :white_check_mark: |
| 2.0.0 | :x: | | 2.0.2 | :x: |
| < 1.0 | :x: | | 2.0.1 | :x: |
| < 2.0 | :x: |
## Supported Updates ## Supported Updates

View File

@@ -743,6 +743,7 @@ class ApiController extends Controller
$url = $url.'/api/v1/helpdesk/check-url?api_key='.$this->request->input('api_key').'&token='.\Config::get('app.token'); $url = $url.'/api/v1/helpdesk/check-url?api_key='.$this->request->input('api_key').'&token='.\Config::get('app.token');
$result = $this->CallGetApi($url); $result = $this->CallGetApi($url);
//dd($result); //dd($result);
return response()->json(compact('result')); return response()->json(compact('result'));
} catch (\Exception $ex) { } catch (\Exception $ex) {

View File

@@ -42,6 +42,7 @@ class ApiExceptAuthController extends Controller
$url = $url.'api/v1/helpdesk/check-url'; $url = $url.'api/v1/helpdesk/check-url';
//return $url; //return $url;
$result = $this->CallGetApi($url); $result = $this->CallGetApi($url);
// dd($result); // dd($result);
return response()->json(compact('result')); return response()->json(compact('result'));
} catch (\Exception $ex) { } catch (\Exception $ex) {

View File

@@ -64,6 +64,7 @@ class TokenAuthController extends Controller
} }
$user_id = \Auth::user(); $user_id = \Auth::user();
// if no errors are encountered we can return a JWT // if no errors are encountered we can return a JWT
return response()->json(compact('token', 'user_id')); return response()->json(compact('token', 'user_id'));
} }
@@ -91,6 +92,7 @@ class TokenAuthController extends Controller
return response()->json(compact('error')); return response()->json(compact('error'));
} }
//dd($user); //dd($user);
return response()->json(compact('user')); return response()->json(compact('user'));
} }

View File

@@ -235,6 +235,7 @@ class AgentController extends Controller
foreach ($requests as $req) { foreach ($requests as $req) {
DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]); DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]);
} }
//Todo For success and failure conditions //Todo For success and failure conditions
try { try {
if ($request->input('country_code') != '' or $request->input('country_code') != null) { if ($request->input('country_code') != '' or $request->input('country_code') != null) {
@@ -304,6 +305,7 @@ class AgentController extends Controller
for ($i = 0; $i < $length; $i++) { for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)]; $randomString .= $characters[rand(0, $charactersLength - 1)];
} }
// return random string // return random string
return $randomString; return $randomString;
} }

View File

@@ -87,6 +87,7 @@ class BanlistController extends Controller
$use->ban = $request->input('ban'); $use->ban = $request->input('ban');
$use->internal_note = $request->input('internal_note'); $use->internal_note = $request->input('internal_note');
$use->save(); $use->save();
// $user->create($request->input())->save(); // $user->create($request->input())->save();
return redirect('banlist')->with('success', Lang::get('lang.email_banned_sucessfully')); return redirect('banlist')->with('success', Lang::get('lang.email_banned_sucessfully'));
} else { } else {

View File

@@ -380,6 +380,7 @@ class EmailsController extends Controller
} }
//dd($ex->getMessage()); //dd($ex->getMessage());
loging('mail-config', $message); loging('mail-config', $message);
//Log::error($ex->getMessage()); //Log::error($ex->getMessage());
return $this->jsonResponse('fails', $message); return $this->jsonResponse('fails', $message);
} }

View File

@@ -196,6 +196,7 @@ class FormController extends Controller
//dd($form); //dd($form);
if ($form) { if ($form) {
$fields = $form->fields(); $fields = $form->fields();
//dd($fields); //dd($fields);
return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms')); return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms'));
} }
@@ -215,6 +216,7 @@ class FormController extends Controller
//dd($form); //dd($form);
if ($form) { if ($form) {
$fields = $form->fields(); $fields = $form->fields();
//dd($fields); //dd($fields);
return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms')); return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms'));
} }

View File

@@ -168,9 +168,11 @@ class GroupController extends Controller
//Updating admin_notes field //Updating admin_notes field
$adminNotes = $request->input('admin_notes'); $adminNotes = $request->input('admin_notes');
$var->admin_notes = $adminNotes; $var->admin_notes = $adminNotes;
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$var->save(); $var->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully')); return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -198,9 +200,11 @@ class GroupController extends Controller
} }
$group_assign_department->where('group_id', $id)->delete(); $group_assign_department->where('group_id', $id)->delete();
$groups = $group->whereId($id)->first(); $groups = $group->whereId($id)->first();
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$groups->delete(); $groups->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully')); return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully'));
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -118,6 +118,7 @@ class HelptopicController extends Controller
} }
/* Check whether function success or not */ /* Check whether function success or not */
$topic->fill($request->except('custom_form', 'auto_assign'))->save(); $topic->fill($request->except('custom_form', 'auto_assign'))->save();
// $topics->fill($request->except('custom_form','auto_assign'))->save(); // $topics->fill($request->except('custom_form','auto_assign'))->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_created_successfully')); return redirect('helptopic')->with('success', Lang::get('lang.helptopic_created_successfully'));
@@ -192,6 +193,7 @@ class HelptopicController extends Controller
->where('id', '=', 1) ->where('id', '=', 1)
->update(['help_topic' => $id]); ->update(['help_topic' => $id]);
} }
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_updated_successfully')); return redirect('helptopic')->with('success', Lang::get('lang.helptopic_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -238,9 +240,11 @@ class HelptopicController extends Controller
} }
$message = $ticket.$email; $message = $ticket.$email;
$topics = $topic->whereId($id)->first(); $topics = $topic->whereId($id)->first();
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$topics->delete(); $topics->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_deleted_successfully').$message); return redirect('helptopic')->with('success', Lang::get('lang.helptopic_deleted_successfully').$message);
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -74,6 +74,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$companys = $company->whereId('1')->first(); $companys = $company->whereId('1')->first();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.company', compact('companys')); return view('themes.default1.admin.helpdesk.settings.company', compact('companys'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -104,9 +105,11 @@ class SettingsController extends Controller
if ($request->input('use_logo') == null) { if ($request->input('use_logo') == null) {
$companys->use_logo = '0'; $companys->use_logo = '0';
} }
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$companys->fill($request->except('logo'))->save(); $companys->fill($request->except('logo'))->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getcompany')->with('success', Lang::get('lang.company_updated_successfully')); return redirect('getcompany')->with('success', Lang::get('lang.company_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -167,6 +170,7 @@ class SettingsController extends Controller
$email_mandatory = $common_settings->select('status') $email_mandatory = $common_settings->select('status')
->where('option_name', '=', 'email_mandatory') ->where('option_name', '=', 'email_mandatory')
->first(); ->first();
/* Direct to System Settings Page */ /* Direct to System Settings Page */
return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time', 'common_setting', 'send_otp', 'email_mandatory')); return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time', 'common_setting', 'send_otp', 'email_mandatory'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -215,6 +219,7 @@ class SettingsController extends Controller
$sett->status = $itil; $sett->status = $itil;
$sett->save(); $sett->save();
} }
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully')); return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -242,6 +247,7 @@ class SettingsController extends Controller
$slas = $sla->get(); $slas = $sla->get();
/* Fetch the values from Help_topic table */ /* Fetch the values from Help_topic table */
$topics = $topic->get(); $topics = $topic->get();
/* Direct to Ticket Settings Page */ /* Direct to Ticket Settings Page */
return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority')); return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -276,6 +282,7 @@ class SettingsController extends Controller
$tickets->collision_avoid = $request->input('collision_avoid'); $tickets->collision_avoid = $request->input('collision_avoid');
/* Check whether function success or not */ /* Check whether function success or not */
$tickets->save(); $tickets->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getticket')->with('success', Lang::get('lang.ticket_updated_successfully')); return redirect('getticket')->with('success', Lang::get('lang.ticket_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -302,6 +309,7 @@ class SettingsController extends Controller
$templates = $template->get(); $templates = $template->get();
/* Fetch the values from Emails table */ /* Fetch the values from Emails table */
$emails1 = $email1->get(); $emails1 = $email1->get();
/* Direct to Email Settings Page */ /* Direct to Email Settings Page */
return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1')); return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -334,6 +342,7 @@ class SettingsController extends Controller
$emails->attachment = $request->input('attachment'); $emails->attachment = $request->input('attachment');
/* Check whether function success or not */ /* Check whether function success or not */
$emails->save(); $emails->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getemail')->with('success', Lang::get('lang.email_updated_successfully')); return redirect('getemail')->with('success', Lang::get('lang.email_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -435,6 +444,7 @@ class SettingsController extends Controller
} }
$work->save(); $work->save();
$this->saveConditions(); $this->saveConditions();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success')); return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -455,6 +465,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of responder from responder table */ /* fetch the values of responder from responder table */
$responders = $responder->whereId('1')->first(); $responders = $responder->whereId('1')->first();
/* Direct to Responder Settings Page */ /* Direct to Responder Settings Page */
return view('themes.default1.admin.helpdesk.settings.responder', compact('responders')); return view('themes.default1.admin.helpdesk.settings.responder', compact('responders'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -484,6 +495,7 @@ class SettingsController extends Controller
/* fill the values to coompany table */ /* fill the values to coompany table */
/* Check whether function success or not */ /* Check whether function success or not */
$responders->save(); $responders->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getresponder')->with('success', Lang::get('lang.auto_response_updated_successfully')); return redirect('getresponder')->with('success', Lang::get('lang.auto_response_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -504,6 +516,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of alert from alert table */ /* fetch the values of alert from alert table */
$alerts = $alert->whereId('1')->first(); $alerts = $alert->whereId('1')->first();
/* Direct to Alert Settings Page */ /* Direct to Alert Settings Page */
return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts')); return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -572,6 +585,7 @@ class SettingsController extends Controller
/* fill the values to coompany table */ /* fill the values to coompany table */
/* Check whether function success or not */ /* Check whether function success or not */
$alerts->save(); $alerts->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getalert')->with('success', Lang::get('lang.alert_&_notices_updated_successfully')); return redirect('getalert')->with('success', Lang::get('lang.alert_&_notices_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -615,6 +629,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$statuss = \DB::table('ticket_status')->get(); $statuss = \DB::table('ticket_status')->get();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.status', compact('statuss')); return view('themes.default1.admin.helpdesk.settings.status', compact('statuss'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -635,6 +650,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$status = \DB::table('ticket_status')->where('id', '=', $id)->first(); $status = \DB::table('ticket_status')->where('id', '=', $id)->first();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.status-edit', compact('status')); return view('themes.default1.admin.helpdesk.settings.status-edit', compact('status'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -667,6 +683,7 @@ class SettingsController extends Controller
} }
$statuss->sort = $request->input('sort'); $statuss->sort = $request->input('sort');
$statuss->save(); $statuss->save();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', Lang::get('lang.status_has_been_updated_successfully')); return redirect()->back()->with('success', Lang::get('lang.status_has_been_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -698,6 +715,7 @@ class SettingsController extends Controller
} }
$statuss->sort = $request->input('sort'); $statuss->sort = $request->input('sort');
$statuss->save(); $statuss->save();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', Lang::get('lang.status_has_been_created_successfully')); return redirect()->back()->with('success', Lang::get('lang.status_has_been_created_successfully'));
} catch (Exception $ex) { } catch (Exception $ex) {
@@ -718,6 +736,7 @@ class SettingsController extends Controller
if ($id > 5) { if ($id > 5) {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete(); \App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', Lang::get('lang.status_has_been_deleted')); return redirect()->back()->with('success', Lang::get('lang.status_has_been_deleted'));
} else { } else {

View File

@@ -109,6 +109,7 @@ class SettingsController2 extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$statuss = \DB::table('ticket_status')->get(); $statuss = \DB::table('ticket_status')->get();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.status', compact('statuss')); return view('themes.default1.admin.helpdesk.settings.status', compact('statuss'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -141,6 +142,7 @@ class SettingsController2 extends Controller
} }
$statuss->sort = Input::get('sort'); $statuss->sort = Input::get('sort');
$statuss->save(); $statuss->save();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', 'Status has been updated!'); return redirect()->back()->with('success', 'Status has been updated!');
} catch (Exception $e) { } catch (Exception $e) {
@@ -164,6 +166,7 @@ class SettingsController2 extends Controller
} }
$statuss->sort = Input::get('sort'); $statuss->sort = Input::get('sort');
$statuss->save(); $statuss->save();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', 'Status has been created!'); return redirect()->back()->with('success', 'Status has been created!');
// } catch (Exception $ex) { // } catch (Exception $ex) {
@@ -177,6 +180,7 @@ class SettingsController2 extends Controller
if ($id > 5) { if ($id > 5) {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete(); \App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', 'Status has been deleted'); return redirect()->back()->with('success', 'Status has been deleted');
} else { } else {
@@ -200,6 +204,7 @@ class SettingsController2 extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$companys = $company->whereId('1')->first(); $companys = $company->whereId('1')->first();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.company', compact('companys')); return view('themes.default1.admin.helpdesk.settings.company', compact('companys'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -230,9 +235,11 @@ class SettingsController2 extends Controller
if ($request->input('use_logo') == null) { if ($request->input('use_logo') == null) {
$companys->use_logo = '0'; $companys->use_logo = '0';
} }
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$companys->fill($request->except('logo'))->save(); $companys->fill($request->except('logo'))->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getcompany')->with('success', 'Company Updated Successfully'); return redirect('getcompany')->with('success', 'Company Updated Successfully');
} catch (Exception $e) { } catch (Exception $e) {
@@ -283,6 +290,7 @@ class SettingsController2 extends Controller
$departments = $department->get(); $departments = $department->get();
/* Fetch the values from Timezones table */ /* Fetch the values from Timezones table */
$timezones = $timezone->get(); $timezones = $timezone->get();
/* Direct to System Settings Page */ /* Direct to System Settings Page */
return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time')); return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -308,6 +316,7 @@ class SettingsController2 extends Controller
/* fill the values to coompany table */ /* fill the values to coompany table */
/* Check whether function success or not */ /* Check whether function success or not */
$systems->fill($request->input())->save(); $systems->fill($request->input())->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getsystem')->with('success', 'System Updated Successfully'); return redirect('getsystem')->with('success', 'System Updated Successfully');
} catch (Exception $e) { } catch (Exception $e) {
@@ -335,6 +344,7 @@ class SettingsController2 extends Controller
$slas = $sla->get(); $slas = $sla->get();
/* Fetch the values from Help_topic table */ /* Fetch the values from Help_topic table */
$topics = $topic->get(); $topics = $topic->get();
/* Direct to Ticket Settings Page */ /* Direct to Ticket Settings Page */
return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority')); return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -369,6 +379,7 @@ class SettingsController2 extends Controller
$tickets->collision_avoid = $request->input('collision_avoid'); $tickets->collision_avoid = $request->input('collision_avoid');
/* Check whether function success or not */ /* Check whether function success or not */
$tickets->save(); $tickets->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getticket')->with('success', 'Ticket Updated Successfully'); return redirect('getticket')->with('success', 'Ticket Updated Successfully');
} catch (Exception $e) { } catch (Exception $e) {
@@ -395,6 +406,7 @@ class SettingsController2 extends Controller
$templates = $template->get(); $templates = $template->get();
/* Fetch the values from Emails table */ /* Fetch the values from Emails table */
$emails1 = $email1->get(); $emails1 = $email1->get();
/* Direct to Email Settings Page */ /* Direct to Email Settings Page */
return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1')); return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -427,6 +439,7 @@ class SettingsController2 extends Controller
$emails->attachment = $request->input('attachment'); $emails->attachment = $request->input('attachment');
/* Check whether function success or not */ /* Check whether function success or not */
$emails->save(); $emails->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getemail')->with('success', 'Email Updated Successfully'); return redirect('getemail')->with('success', 'Email Updated Successfully');
} catch (Exception $e) { } catch (Exception $e) {
@@ -485,6 +498,7 @@ class SettingsController2 extends Controller
$emails->notification_cron = 0; $emails->notification_cron = 0;
} }
$emails->save(); $emails->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success')); return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -556,6 +570,7 @@ class SettingsController2 extends Controller
try { try {
/* fetch the values of responder from responder table */ /* fetch the values of responder from responder table */
$responders = $responder->whereId('1')->first(); $responders = $responder->whereId('1')->first();
/* Direct to Responder Settings Page */ /* Direct to Responder Settings Page */
return view('themes.default1.admin.helpdesk.settings.responder', compact('responders')); return view('themes.default1.admin.helpdesk.settings.responder', compact('responders'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -585,6 +600,7 @@ class SettingsController2 extends Controller
/* fill the values to coompany table */ /* fill the values to coompany table */
/* Check whether function success or not */ /* Check whether function success or not */
$responders->save(); $responders->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getresponder')->with('success', 'Responder Updated Successfully'); return redirect('getresponder')->with('success', 'Responder Updated Successfully');
} catch (Exception $e) { } catch (Exception $e) {
@@ -605,6 +621,7 @@ class SettingsController2 extends Controller
try { try {
/* fetch the values of alert from alert table */ /* fetch the values of alert from alert table */
$alerts = $alert->whereId('1')->first(); $alerts = $alert->whereId('1')->first();
/* Direct to Alert Settings Page */ /* Direct to Alert Settings Page */
return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts')); return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -673,6 +690,7 @@ class SettingsController2 extends Controller
/* fill the values to coompany table */ /* fill the values to coompany table */
/* Check whether function success or not */ /* Check whether function success or not */
$alerts->save(); $alerts->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getalert')->with('success', 'Alert Updated Successfully'); return redirect('getalert')->with('success', 'Alert Updated Successfully');
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -45,6 +45,7 @@ class SlaController extends Controller
try { try {
/* Declare a Variable $slas to store all Values From Sla_plan Table */ /* Declare a Variable $slas to store all Values From Sla_plan Table */
$slas = $sla->get(); $slas = $sla->get();
/* Listing the values From Sla_plan Table */ /* Listing the values From Sla_plan Table */
return view('themes.default1.admin.helpdesk.manage.sla.index', compact('slas')); return view('themes.default1.admin.helpdesk.manage.sla.index', compact('slas'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -81,6 +82,7 @@ class SlaController extends Controller
/* Fill the request values to Sla_plan Table */ /* Fill the request values to Sla_plan Table */
/* Check whether function success or not */ /* Check whether function success or not */
$sla->fill($request->input())->save(); $sla->fill($request->input())->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('sla')->with('success', Lang::get('lang.sla_plan_created_successfully')); return redirect('sla')->with('success', Lang::get('lang.sla_plan_created_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -196,9 +198,11 @@ class SlaController extends Controller
$message = $ticket.$dept.$topic; $message = $ticket.$dept.$topic;
/* Delete a perticular field from the database by delete() using Id */ /* Delete a perticular field from the database by delete() using Id */
$slas = Sla_plan::whereId($id)->first(); $slas = Sla_plan::whereId($id)->first();
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$slas->delete(); $slas->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('sla')->with('success', Lang::get('lang.sla_plan_deleted_successfully').$message); return redirect('sla')->with('success', Lang::get('lang.sla_plan_deleted_successfully').$message);
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -150,6 +150,7 @@ class TeamController extends Controller
$users = DB::table('team_assign_agent')->select('team_assign_agent.id', 'team_assign_agent.team_id', 'users.user_name', 'users.first_name', 'users.last_name', 'users.active', 'users.assign_group', 'users.primary_dpt', 'users.role') $users = DB::table('team_assign_agent')->select('team_assign_agent.id', 'team_assign_agent.team_id', 'users.user_name', 'users.first_name', 'users.last_name', 'users.active', 'users.assign_group', 'users.primary_dpt', 'users.role')
->join('users', 'users.id', '=', 'team_assign_agent.agent_id') ->join('users', 'users.id', '=', 'team_assign_agent.agent_id')
->where('team_assign_agent.team_id', '=', $id); ->where('team_assign_agent.team_id', '=', $id);
// ->get(); // ->get();
// dd($users); // dd($users);
return \Datatable::query($users) return \Datatable::query($users)
@@ -219,6 +220,7 @@ class TeamController extends Controller
} }
// dd($a_id); // dd($a_id);
$user = $user->whereIn('id', $a_id)->where('active', '=', 1)->orderBy('first_name')->get(); $user = $user->whereIn('id', $a_id)->where('active', '=', 1)->orderBy('first_name')->get();
// dd($user); // dd($user);
return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams')); return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -250,10 +252,12 @@ class TeamController extends Controller
$alert = $request->input('assign_alert'); $alert = $request->input('assign_alert');
$teams->assign_alert = $alert; $teams->assign_alert = $alert;
$teams->save(); //saving check box $teams->save(); //saving check box
//updating whole field //updating whole field
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$teams->fill($request->except('team_lead'))->save(); $teams->fill($request->except('team_lead'))->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('teams')->with('success', Lang::get('lang.teams_updated_successfully')); return redirect('teams')->with('success', Lang::get('lang.teams_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -279,6 +283,7 @@ class TeamController extends Controller
$tickets = DB::table('tickets')->where('team_id', '=', $id)->update(['team_id' => null]); $tickets = DB::table('tickets')->where('team_id', '=', $id)->update(['team_id' => null]);
/* Check whether function success or not */ /* Check whether function success or not */
$teams->delete(); $teams->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('teams')->with('success', Lang::get('lang.teams_deleted_successfully')); return redirect('teams')->with('success', Lang::get('lang.teams_deleted_successfully'));
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -32,6 +32,7 @@ class ThreadController extends Controller
$threads = $thread->get(); $threads = $thread->get();
/* get the values of priority from Priority Table */ /* get the values of priority from Priority Table */
$priorities = $priority->get(); $priorities = $priority->get();
/* Direct to view page */ /* Direct to view page */
return view('themes.default1.admin.helpdesk.tickets.ticket', compact('threads', 'priorities')); return view('themes.default1.admin.helpdesk.tickets.ticket', compact('threads', 'priorities'));
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -18,6 +18,7 @@ class UrlSettingController extends Controller
$url = $request->url(); $url = $request->url();
$www = $this->checkWWW($url); $www = $this->checkWWW($url);
$https = $this->checkHTTP($url); $https = $this->checkHTTP($url);
//dd($www, $https); //dd($www, $https);
try { try {
return view('themes.default1.admin.helpdesk.settings.url.settings', compact('www', 'https')); return view('themes.default1.admin.helpdesk.settings.url.settings', compact('www', 'https'));

View File

@@ -155,6 +155,7 @@ class CannedController extends Controller
/* delete the selected field */ /* delete the selected field */
/* Check whether function success or not */ /* Check whether function success or not */
$canned->delete(); $canned->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect()->route('canned.list')->with('success', Lang::get('lang.canned_response_deleted')); return redirect()->route('canned.list')->with('success', Lang::get('lang.canned_response_deleted'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -180,6 +181,7 @@ class CannedController extends Controller
} else { } else {
$msg = ''; $msg = '';
} }
// returning the canned response in JSON format // returning the canned response in JSON format
return \Response::json($msg); return \Response::json($msg);
} }

View File

@@ -576,6 +576,7 @@ class FilterController extends Controller
$query->whereIn('tickets.team_id', $teams) $query->whereIn('tickets.team_id', $teams)
->orWhereIn('tickets.assigned_to', $users); ->orWhereIn('tickets.assigned_to', $users);
}); });
// dd($table->toSql()); // dd($table->toSql());
return $table; return $table;
} }
@@ -899,6 +900,7 @@ class FilterController extends Controller
} else { } else {
$table = $table->where('tickets.id', '=', null); $table = $table->where('tickets.id', '=', null);
} }
// dd($table->toSql()); // dd($table->toSql());
return $table; return $table;
} }

View File

@@ -51,6 +51,7 @@ class FilterControllerOld extends Controller
if ((is_array($tags) && count($tags) > 0) || (is_array($labels) && count($labels) > 0)) { if ((is_array($tags) && count($tags) > 0) || (is_array($labels) && count($labels) > 0)) {
$render = true; $render = true;
} }
// return \Datatables::of($table)->make(); // return \Datatables::of($table)->make();
return \Ttable::getTable($table); return \Ttable::getTable($table);
} }

View File

@@ -25,6 +25,7 @@ class ImapMail extends Mailbox
{ {
//dd($this->getImapStream()); //dd($this->getImapStream());
$mailsIds = imap_search($this->getImapStream(), $criteria, SE_UID); $mailsIds = imap_search($this->getImapStream(), $criteria, SE_UID);
//dd($mailsIds); //dd($mailsIds);
return $mailsIds ? $mailsIds : []; return $mailsIds ? $mailsIds : [];
} }

View File

@@ -178,6 +178,7 @@ class OrganizationController extends Controller
try { try {
/* select the field by id */ /* select the field by id */
$orgs = $org->whereId($id)->first(); $orgs = $org->whereId($id)->first();
/* To view page */ /* To view page */
return view('themes.default1.agent.helpdesk.organization.show', compact('orgs')); return view('themes.default1.agent.helpdesk.organization.show', compact('orgs'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -198,6 +199,7 @@ class OrganizationController extends Controller
try { try {
/* select the field by id */ /* select the field by id */
$orgs = $org->whereId($id)->first(); $orgs = $org->whereId($id)->first();
/* To view page */ /* To view page */
return view('themes.default1.agent.helpdesk.organization.edit', compact('orgs')); return view('themes.default1.agent.helpdesk.organization.edit', compact('orgs'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -254,6 +256,7 @@ class OrganizationController extends Controller
/* Delete the field selected from the table */ /* Delete the field selected from the table */
/* Check whether function success or not */ /* Check whether function success or not */
$orgs->delete(); $orgs->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('organizations')->with('success', Lang::get('lang.organization_deleted_successfully')); return redirect('organizations')->with('success', Lang::get('lang.organization_deleted_successfully'));
} catch (Exception $e) { } catch (Exception $e) {

248
app/Http/Controllers/Agent/helpdesk/TicketController.php Executable file → Normal file
View File

@@ -53,6 +53,7 @@ use Mail;
use UTC; use UTC;
use Vsmoraes\Pdf\PdfFacade; use Vsmoraes\Pdf\PdfFacade;
use Yajra\DataTables\Facades\DataTables; use Yajra\DataTables\Facades\DataTables;
use App\Model\helpdesk\Agent\Location;
/** /**
* TicketController. * TicketController.
@@ -80,6 +81,7 @@ class TicketController extends Controller
*/ */
public function newticket(CountryCode $code) public function newticket(CountryCode $code)
{ {
$locations = Location::all();
$location = GeoIP::getLocation(); $location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location->iso_code)->first(); $phonecode = $code->where('iso', '=', $location->iso_code)->first();
$pcode = ''; $pcode = '';
@@ -89,7 +91,7 @@ class TicketController extends Controller
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first(); $settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first(); $email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
return view('themes.default1.agent.helpdesk.ticket.new', compact('email_mandatory', 'settings'))->with('phonecode', $pcode); return view('themes.default1.agent.helpdesk.ticket.new', compact('locations', 'email_mandatory', 'settings'))->with('phonecode', $pcode);
} }
/** /**
@@ -107,7 +109,7 @@ class TicketController extends Controller
} else { } else {
$email = null; $email = null;
} }
$fullname = $request->input('first_name').'%$%'.$request->input('last_name'); $fullname = $request->input('first_name') . '%$%' . $request->input('last_name');
$helptopic = $request->input('helptopic'); $helptopic = $request->input('helptopic');
$sla = $request->input('sla'); $sla = $request->input('sla');
$duedate = $request->input('duedate'); $duedate = $request->input('duedate');
@@ -193,7 +195,7 @@ class TicketController extends Controller
return response()->json(['error' => $e->getMessage()], 500); return response()->json(['error' => $e->getMessage()], 500);
} }
return Redirect()->back()->with('fails', '<li>'.$e->getMessage().'</li>'); return Redirect()->back()->with('fails', '<li>' . $e->getMessage() . '</li>');
} }
} }
@@ -216,8 +218,8 @@ class TicketController extends Controller
} else { } else {
$tickets = null; $tickets = null;
} }
// $tickets = $tickets->where('dept_id', '=', $dept->id)->orWhere('assigned_to', Auth::user()->id)->first(); // $tickets = $tickets->where('dept_id', '=', $dept->id)->orWhere('assigned_to', Auth::user()->id)->first();
// dd($tickets); // dd($tickets);
} elseif (Auth::user()->role == 'admin') { } elseif (Auth::user()->role == 'admin') {
$tickets = Tickets::where('id', '=', $id)->first(); $tickets = Tickets::where('id', '=', $id)->first();
} elseif (Auth::user()->role == 'user') { } elseif (Auth::user()->role == 'user') {
@@ -337,7 +339,7 @@ class TicketController extends Controller
$thread2->ticket_id = $thread->ticket_id; $thread2->ticket_id = $thread->ticket_id;
$thread2->user_id = Auth::user()->id; $thread2->user_id = Auth::user()->id;
$thread2->is_internal = 1; $thread2->is_internal = 1;
$thread2->body = 'This Ticket have been assigned to '.Auth::user()->first_name.' '.Auth::user()->last_name; $thread2->body = 'This Ticket have been assigned to ' . Auth::user()->first_name . ' ' . Auth::user()->last_name;
$thread2->save(); $thread2->save();
$data = [ $data = [
'id' => $tickets->id, 'id' => $tickets->id,
@@ -389,9 +391,9 @@ class TicketController extends Controller
// Event // Event
event(new \App\Events\FaveoAfterReply($reply_content, $user->mobile, $user->country_code, $request, $tickets, $thread)); event(new \App\Events\FaveoAfterReply($reply_content, $user->mobile, $user->country_code, $request, $tickets, $thread));
if (Auth::user()) { if (Auth::user()) {
$u_id = Auth::user()->first_name.' '.Auth::user()->last_name; $u_id = Auth::user()->first_name . ' ' . Auth::user()->last_name;
} else { } else {
$u_id = $this->getAdmin()->first_name.' '.$this->getAdmin()->last_name; $u_id = $this->getAdmin()->first_name . ' ' . $this->getAdmin()->last_name;
} }
$data = [ $data = [
'ticket_id' => $request->input('ticket_ID'), 'ticket_id' => $request->input('ticket_ID'),
@@ -413,14 +415,14 @@ class TicketController extends Controller
if ($mail == true) { if ($mail == true) {
$encoded_ticketid = Crypt::encrypt($ticket_id); $encoded_ticketid = Crypt::encrypt($ticket_id);
$link = url('check_ticket/'.$encoded_ticketid); $link = url('check_ticket/' . $encoded_ticketid);
$this->NotificationController->create($ticket_id, Auth::user()->id, '2'); $this->NotificationController->create($ticket_id, Auth::user()->id, '2');
$this->PhpMailController->sendmail( $this->PhpMailController->sendmail(
$from = $this->PhpMailController->mailfrom('0', $tickets->dept_id), $from = $this->PhpMailController->mailfrom('0', $tickets->dept_id),
$to = ['name' => $user_name, 'email' => $email, 'cc' => $collaborators], $to = ['name' => $user_name, 'email' => $email, 'cc' => $collaborators],
$message = [ $message = [
'subject' => $ticket_subject.'[#'.$ticket_number.']', 'subject' => $ticket_subject . '[#' . $ticket_number . ']',
'body' => $line.$request->input('reply_content'), 'body' => $line . $request->input('reply_content'),
'scenario' => 'ticket-reply', 'scenario' => 'ticket-reply',
'attachments' => $attachment_files, 'attachments' => $attachment_files,
], ],
@@ -501,6 +503,7 @@ class TicketController extends Controller
$ticket = Tickets::where('tickets.id', '=', $id)->first(); $ticket = Tickets::where('tickets.id', '=', $id)->first();
$html = view('themes.default1.agent.helpdesk.ticket.pdf', compact('id', 'ticket', 'tickets'))->render(); $html = view('themes.default1.agent.helpdesk.ticket.pdf', compact('id', 'ticket', 'tickets'))->render();
$html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); $html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
/** /**
* This statement throws error with php7.1. * This statement throws error with php7.1.
* *
@@ -703,7 +706,7 @@ class TicketController extends Controller
if ($auto_response == 0) { if ($auto_response == 0) {
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user->first_name, 'email' => $emailadd], $message = ['subject' => null, 'scenario' => 'registration-notification'], $template_variables = ['user' => $user->first_name, 'email_address' => $emailadd, 'user_password' => $password]); $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user->first_name, 'email' => $emailadd], $message = ['subject' => null, 'scenario' => 'registration-notification'], $template_variables = ['user' => $user->first_name, 'email_address' => $emailadd, 'user_password' => $password]);
if ($user_status == 0) { if ($user_status == 0) {
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user->first_name, 'email' => $emailadd], $message = ['subject' => null, 'scenario' => 'registration'], $template_variables = ['user' => $user->first_name, 'email_address' => $emailadd, 'password_reset_link' => url('account/activate/'.$token)]); $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user->first_name, 'email' => $emailadd], $message = ['subject' => null, 'scenario' => 'registration'], $template_variables = ['user' => $user->first_name, 'email_address' => $emailadd, 'password_reset_link' => url('account/activate/' . $token)]);
} }
} }
} catch (\Exception $e) { } catch (\Exception $e) {
@@ -723,7 +726,7 @@ class TicketController extends Controller
$is_reply = $ticket_number[1]; $is_reply = $ticket_number[1];
//dd($source); //dd($source);
$system = $this->system(); $system = $this->system();
$updated_subject = $threaddata->title.'[#'.$ticket_number2.']'; $updated_subject = $threaddata->title . '[#' . $ticket_number2 . ']';
if ($ticket_number2) { if ($ticket_number2) {
// send ticket create details to user // send ticket create details to user
if ($is_reply == 0) { if ($is_reply == 0) {
@@ -734,12 +737,12 @@ class TicketController extends Controller
$sign = $company; $sign = $company;
} }
$encoded_ticketid = Crypt::encrypt($ticketdata->id); $encoded_ticketid = Crypt::encrypt($ticketdata->id);
$link = url('check_ticket/'.$encoded_ticketid); $link = url('check_ticket/' . $encoded_ticketid);
if ($source == 3) { if ($source == 3) {
try { try {
if ($auto_response == 0) { if ($auto_response == 0) {
$encoded_ticketid = Crypt::encrypt($ticketdata->id); $encoded_ticketid = Crypt::encrypt($ticketdata->id);
$link = url('check_ticket/'.$encoded_ticketid); $link = url('check_ticket/' . $encoded_ticketid);
$this->PhpMailController->sendmail( $this->PhpMailController->sendmail(
$from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id),
$to = ['name' => $username, 'email' => $emailadd], $to = ['name' => $username, 'email' => $emailadd],
@@ -763,7 +766,8 @@ class TicketController extends Controller
$from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id),
$to = ['name' => $username, 'email' => $emailadd], $to = ['name' => $username, 'email' => $emailadd],
$message = ['subject' => $updated_subject, 'scenario' => 'create-ticket'], $message = ['subject' => $updated_subject, 'scenario' => 'create-ticket'],
$template_variables = ['user' => $username, $template_variables = [
'user' => $username,
'ticket_number' => $ticket_number2, 'ticket_number' => $ticket_number2,
'department_sign' => '', 'department_sign' => '',
'system_link' => $link, 'system_link' => $link,
@@ -804,7 +808,7 @@ class TicketController extends Controller
} }
} }
} }
// Event fire for new ticket[''] // Event fire for new ticket['']
} }
if ($is_reply == 1) { if ($is_reply == 1) {
$client_email = $ticketdata->user->email; $client_email = $ticketdata->user->email;
@@ -832,7 +836,8 @@ class TicketController extends Controller
], ],
$message = [ $message = [
'subject' => $updated_subject, 'subject' => $updated_subject,
'body' => $body, 'scenario' => $mail, 'body' => $body,
'scenario' => $mail,
], ],
$template_variables = [ $template_variables = [
'ticket_agent_name' => $email_data['to_user_name'], 'ticket_agent_name' => $email_data['to_user_name'],
@@ -841,7 +846,8 @@ class TicketController extends Controller
'user' => $email_data['to_user_name'], 'user' => $email_data['to_user_name'],
'ticket_number' => $ticket_number2, 'ticket_number' => $ticket_number2,
'email_address' => $emailadd, 'email_address' => $emailadd,
'name' => $ticket_creator, ] 'name' => $ticket_creator,
]
); );
} catch (\Exception $e) { } catch (\Exception $e) {
} }
@@ -940,14 +946,14 @@ class TicketController extends Controller
if ($user_name->role == 'user') { if ($user_name->role == 'user') {
$username = $user_name->user_name; $username = $user_name->user_name;
} elseif ($user_name->role == 'agent' or $user_name->role == 'admin') { } elseif ($user_name->role == 'agent' or $user_name->role == 'admin') {
$username = $user_name->first_name.' '.$user_name->last_name; $username = $user_name->first_name . ' ' . $user_name->last_name;
} }
$ticket_threads = new Ticket_Thread(); $ticket_threads = new Ticket_Thread();
$ticket_threads->ticket_id = $id; $ticket_threads->ticket_id = $id;
$ticket_threads->user_id = $user_id; $ticket_threads->user_id = $user_id;
$ticket_threads->is_internal = 1; $ticket_threads->is_internal = 1;
$ticket_threads->body = $ticket_status->message.' '.$username; $ticket_threads->body = $ticket_status->message . ' ' . $username;
$ticket_threads->save(); $ticket_threads->save();
// event fire for internal notes // event fire for internal notes
//event to change status //event to change status
@@ -1161,7 +1167,7 @@ class TicketController extends Controller
$thread->ticket_id = $ticket_status->id; $thread->ticket_id = $ticket_status->id;
$thread->user_id = Auth::user()->id; $thread->user_id = Auth::user()->id;
$thread->is_internal = 1; $thread->is_internal = 1;
$thread->body = $ticket_status_message->message.' '.Auth::user()->first_name.' '.Auth::user()->last_name; $thread->body = $ticket_status_message->message . ' ' . Auth::user()->first_name . ' ' . Auth::user()->last_name;
$thread->save(); $thread->save();
$user_id = $ticket_status->user_id; $user_id = $ticket_status->user_id;
@@ -1179,7 +1185,7 @@ class TicketController extends Controller
} }
try { try {
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket_status->dept_id), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => $ticket_subject.'[#'.$ticket_number.']', 'scenario' => 'close-ticket'], $template_variables = ['ticket_number' => $ticket_number]); $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket_status->dept_id), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => $ticket_subject . '[#' . $ticket_number . ']', 'scenario' => 'close-ticket'], $template_variables = ['ticket_number' => $ticket_number]);
} catch (\Exception $e) { } catch (\Exception $e) {
return 0; return 0;
} }
@@ -1191,7 +1197,7 @@ class TicketController extends Controller
]; ];
event('change-status', [$data]); event('change-status', [$data]);
return 'your ticket'.$ticket_status->ticket_number.' has been closed'; return 'your ticket' . $ticket_status->ticket_number . ' has been closed';
} }
/** /**
@@ -1213,7 +1219,7 @@ class TicketController extends Controller
if ($ticket_status == null) { if ($ticket_status == null) {
return redirect()->route('unauth'); return redirect()->route('unauth');
} }
// $ticket_status = $ticket->where('id', '=', $id)->first(); // $ticket_status = $ticket->where('id', '=', $id)->first();
$ticket_status->status = 2; $ticket_status->status = 2;
$ticket_status->closed = 1; $ticket_status->closed = 1;
$ticket_status->closed_at = date('Y-m-d H:i:s'); $ticket_status->closed_at = date('Y-m-d H:i:s');
@@ -1224,9 +1230,9 @@ class TicketController extends Controller
$thread->user_id = Auth::user()->id; $thread->user_id = Auth::user()->id;
$thread->is_internal = 1; $thread->is_internal = 1;
if (Auth::user()->first_name != null) { if (Auth::user()->first_name != null) {
$thread->body = $ticket_status_message->message.' '.Auth::user()->first_name.' '.Auth::user()->last_name; $thread->body = $ticket_status_message->message . ' ' . Auth::user()->first_name . ' ' . Auth::user()->last_name;
} else { } else {
$thread->body = $ticket_status_message->message.' '.Auth::user()->user_name; $thread->body = $ticket_status_message->message . ' ' . Auth::user()->user_name;
} }
$thread->save(); $thread->save();
$data = [ $data = [
@@ -1237,7 +1243,7 @@ class TicketController extends Controller
]; ];
event('change-status', [$data]); event('change-status', [$data]);
return 'your ticket'.$ticket_status->ticket_number.' has been resolved'; return 'your ticket' . $ticket_status->ticket_number . ' has been resolved';
} }
/** /**
@@ -1267,7 +1273,7 @@ class TicketController extends Controller
$thread->ticket_id = $ticket_status->id; $thread->ticket_id = $ticket_status->id;
$thread->user_id = Auth::user()->id; $thread->user_id = Auth::user()->id;
$thread->is_internal = 1; $thread->is_internal = 1;
$thread->body = $ticket_status_message->message.' '.Auth::user()->first_name.' '.Auth::user()->last_name; $thread->body = $ticket_status_message->message . ' ' . Auth::user()->first_name . ' ' . Auth::user()->last_name;
$thread->save(); $thread->save();
$data = [ $data = [
'id' => $ticket_status->ticket_number, 'id' => $ticket_status->ticket_number,
@@ -1277,7 +1283,7 @@ class TicketController extends Controller
]; ];
event('change-status', [$data]); event('change-status', [$data]);
return 'your ticket'.$ticket_status->ticket_number.' has been opened'; return 'your ticket' . $ticket_status->ticket_number . ' has been opened';
} }
/** /**
@@ -1319,7 +1325,7 @@ class TicketController extends Controller
$thread->ticket_id = $ticket_delete->id; $thread->ticket_id = $ticket_delete->id;
$thread->user_id = Auth::user()->id; $thread->user_id = Auth::user()->id;
$thread->is_internal = 1; $thread->is_internal = 1;
$thread->body = $ticket_status_message->message.' '.Auth::user()->first_name.' '.Auth::user()->last_name; $thread->body = $ticket_status_message->message . ' ' . Auth::user()->first_name . ' ' . Auth::user()->last_name;
$thread->save(); $thread->save();
$data = [ $data = [
'id' => $ticket_delete->ticket_number, 'id' => $ticket_delete->ticket_number,
@@ -1329,7 +1335,7 @@ class TicketController extends Controller
]; ];
event('change-status', [$data]); event('change-status', [$data]);
return 'your ticket'.$ticket_delete->ticket_number.' has been delete'; return 'your ticket' . $ticket_delete->ticket_number . ' has been delete';
} }
} }
@@ -1385,13 +1391,13 @@ class TicketController extends Controller
$thread->ticket_id = $ticket->id; $thread->ticket_id = $ticket->id;
$thread->user_id = Auth::user()->id; $thread->user_id = Auth::user()->id;
$thread->is_internal = 1; $thread->is_internal = 1;
$thread->body = 'This Ticket has been assigned to '.$assignee; $thread->body = 'This Ticket has been assigned to ' . $assignee;
$thread->save(); $thread->save();
} elseif ($assign_to[0] == 'user') { } elseif ($assign_to[0] == 'user') {
$ticket->assigned_to = $assign_to[1]; $ticket->assigned_to = $assign_to[1];
if ($user_detail === null) { if ($user_detail === null) {
$user_detail = User::where('id', '=', $assign_to[1])->first(); $user_detail = User::where('id', '=', $assign_to[1])->first();
$assignee = $user_detail->first_name.' '.$user_detail->last_name; $assignee = $user_detail->first_name . ' ' . $user_detail->last_name;
} }
$company = $this->company(); $company = $this->company();
$system = $this->system(); $system = $this->system();
@@ -1407,16 +1413,16 @@ class TicketController extends Controller
$thread->ticket_id = $ticket->id; $thread->ticket_id = $ticket->id;
$thread->user_id = Auth::user()->id; $thread->user_id = Auth::user()->id;
$thread->is_internal = 1; $thread->is_internal = 1;
$thread->body = 'This Ticket has been assigned to '.$assignee; $thread->body = 'This Ticket has been assigned to ' . $assignee;
$thread->save(); $thread->save();
$agent = $user_detail->first_name; $agent = $user_detail->first_name;
$agent_email = $user_detail->email; $agent_email = $user_detail->email;
$ticket_link = route('ticket.thread', $id); $ticket_link = route('ticket.thread', $id);
$master = Auth::user()->first_name.' '.Auth::user()->last_name; $master = Auth::user()->first_name . ' ' . Auth::user()->last_name;
try { try {
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket->dept_id), $to = ['name' => $agent, 'email' => $agent_email], $message = ['subject' => $ticket_subject.'[#'.$ticket_number.']', 'scenario' => 'assign-ticket'], $template_variables = ['ticket_agent_name' => $agent, 'ticket_number' => $ticket_number, 'ticket_assigner' => $master, 'ticket_link' => $ticket_link]); $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket->dept_id), $to = ['name' => $agent, 'email' => $agent_email], $message = ['subject' => $ticket_subject . '[#' . $ticket_number . ']', 'scenario' => 'assign-ticket'], $template_variables = ['ticket_agent_name' => $agent, 'ticket_number' => $ticket_number, 'ticket_assigner' => $master, 'ticket_link' => $ticket_link]);
} catch (\Exception $e) { } catch (\Exception $e) {
return 0; return 0;
} }
@@ -1447,7 +1453,7 @@ class TicketController extends Controller
$NewThread->save(); $NewThread->save();
$data = [ $data = [
'ticket_id' => $id, 'ticket_id' => $id,
'u_id' => Auth::user()->first_name.' '.Auth::user()->last_name, 'u_id' => Auth::user()->first_name . ' ' . Auth::user()->last_name,
'body' => $InternalContent, 'body' => $InternalContent,
]; ];
event('Reply-Ticket', [$data]); event('Reply-Ticket', [$data]);
@@ -1465,7 +1471,7 @@ class TicketController extends Controller
public function surrender($id) public function surrender($id)
{ {
$ticket = Tickets::where('id', '=', $id)->first(); $ticket = Tickets::where('id', '=', $id)->first();
$InternalContent = Auth::user()->first_name.' '.Auth::user()->last_name.' has Surrendered the assigned Ticket'; $InternalContent = Auth::user()->first_name . ' ' . Auth::user()->last_name . ' has Surrendered the assigned Ticket';
$thread = Ticket_Thread::where('ticket_id', '=', $id)->first(); $thread = Ticket_Thread::where('ticket_id', '=', $id)->first();
$NewThread = new Ticket_Thread(); $NewThread = new Ticket_Thread();
$NewThread->ticket_id = $thread->ticket_id; $NewThread->ticket_id = $thread->ticket_id;
@@ -1630,7 +1636,7 @@ class TicketController extends Controller
public function autosearch($id) public function autosearch($id)
{ {
$term = Input::get('term'); $term = Input::get('term');
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->pluck('email'); $user = \App\User::where('email', 'LIKE', '%' . $term . '%')->pluck('email');
echo json_encode($user); echo json_encode($user);
} }
@@ -1661,11 +1667,11 @@ class TicketController extends Controller
$data = User::where('email', '=', $email)->first(); $data = User::where('email', '=', $email)->first();
if ($data == null) { if ($data == null) {
return '<div id="alert11" class="alert alert-warning alert-dismissable">' return '<div id="alert11" class="alert alert-warning alert-dismissable">'
.'<button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>' . '<button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>'
.'<i class="icon fa fa-ban"></i>' . '<i class="icon fa fa-ban"></i>'
.Lang::get('lang.email_not_exist_system') . Lang::get('lang.email_not_exist_system')
.'</div>' . '</div>'
.'</div>'; . '</div>';
} }
$ticket_collaborator = Ticket_Collaborator::where('ticket_id', '=', $ticket_id)->where('user_id', '=', $data->id)->first(); $ticket_collaborator = Ticket_Collaborator::where('ticket_id', '=', $ticket_id)->where('user_id', '=', $data->id)->first();
if (!isset($ticket_collaborator)) { if (!isset($ticket_collaborator)) {
@@ -1676,9 +1682,9 @@ class TicketController extends Controller
$ticket_collaborator->role = 'ccc'; $ticket_collaborator->role = 'ccc';
$ticket_collaborator->save(); $ticket_collaborator->save();
return '<div id="alert11" class="alert alert-dismissable" style="color:#60B23C;background-color:#F2F2F2;"><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-check"></i>Success!</h4><h4><i class="icon fa fa-user"></i>'.$data->user_name.'</h4><div id="message-success1">'.$data->email.'</div></div>'; return '<div id="alert11" class="alert alert-dismissable" style="color:#60B23C;background-color:#F2F2F2;"><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-check"></i>Success!</h4><h4><i class="icon fa fa-user"></i>' . $data->user_name . '</h4><div id="message-success1">' . $data->email . '</div></div>';
} else { } else {
return '<div id="alert11" class="alert alert-warning alert-dismissable"><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-warning"></i>'.$data->user_name.'</h4><div id="message-success1">'.$data->email.'<br/>This user already Collaborated</div></div>'; return '<div id="alert11" class="alert alert-warning alert-dismissable"><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-warning"></i>' . $data->user_name . '</h4><div id="message-success1">' . $data->email . '<br/>This user already Collaborated</div></div>';
} }
} }
@@ -1703,7 +1709,7 @@ class TicketController extends Controller
$ticket_id = Input::get('ticket_id'); $ticket_id = Input::get('ticket_id');
$user_search = User::where('email', '=', $email)->first(); $user_search = User::where('email', '=', $email)->first();
if (isset($user_search)) { if (isset($user_search)) {
return '<div id="alert11" class="alert alert-warning alert-dismissable" ><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-alert"></i>'.Lang::get('lang.alert').'!</h4><div id="message-success1">'.Lang::get('lang.user_already_exist').'</div></div>'; return '<div id="alert11" class="alert alert-warning alert-dismissable" ><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-alert"></i>' . Lang::get('lang.alert') . '!</h4><div id="message-success1">' . Lang::get('lang.user_already_exist') . '</div></div>';
} else { } else {
$company = $this->company(); $company = $this->company();
$user = new User(); $user = new User();
@@ -1726,7 +1732,7 @@ class TicketController extends Controller
$ticket_collaborator->role = 'ccc'; $ticket_collaborator->role = 'ccc';
$ticket_collaborator->save(); $ticket_collaborator->save();
return '<div id="alert11" class="alert alert-dismissable" style="color:#60B23C;background-color:#F2F2F2;"><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-user"></i>'.$user->user_name.'</h4><div id="message-success1">'.$user->email.'</div></div>'; return '<div id="alert11" class="alert alert-dismissable" style="color:#60B23C;background-color:#F2F2F2;"><button id="dismiss11" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><h4><i class="icon fa fa-user"></i>' . $user->user_name . '</h4><div id="message-success1">' . $user->email . '</div></div>';
} }
} }
@@ -1788,7 +1794,7 @@ class TicketController extends Controller
// echo "<br>"; // echo "<br>";
} }
$thread = Ticket_Thread::find($th_id->id); $thread = Ticket_Thread::find($th_id->id);
// dd($thread); // dd($thread);
$thread->delete(); $thread->delete();
} }
$collaborators = Ticket_Collaborator::where('ticket_id', '=', $ticket->id)->get(); $collaborators = Ticket_Collaborator::where('ticket_id', '=', $ticket->id)->get();
@@ -2033,12 +2039,12 @@ class TicketController extends Controller
if ($diff < $cad && Auth::user()->id != $ticket->lock_by) { if ($diff < $cad && Auth::user()->id != $ticket->lock_by) {
$user_data = User::select('user_name', 'first_name', 'last_name')->where('id', '=', $ticket->lock_by)->first(); $user_data = User::select('user_name', 'first_name', 'last_name')->where('id', '=', $ticket->lock_by)->first();
if ($user_data->first_name != '') { if ($user_data->first_name != '') {
$name = $user_data->first_name.' '.$user_data->last_name; $name = $user_data->first_name . ' ' . $user_data->last_name;
} else { } else {
$name = $user_data->username; $name = $user_data->username;
} }
return Lang::get('lang.locked-ticket')." <a href='".route('user.show', $ticket->lock_by)."'>".$name.'</a>&nbsp;'.$diff.'&nbsp'.Lang::get('lang.minutes-ago'); //ticket is locked return Lang::get('lang.locked-ticket') . " <a href='" . route('user.show', $ticket->lock_by) . "'>" . $name . '</a>&nbsp;' . $diff . '&nbsp' . Lang::get('lang.minutes-ago'); //ticket is locked
} elseif ($diff < $cad && Auth::user()->id == $ticket->lock_by) { } elseif ($diff < $cad && Auth::user()->id == $ticket->lock_by) {
$ticket = Tickets::where('id', '=', $id)->first(); $ticket = Tickets::where('id', '=', $id)->first();
$ticket->lock_at = date('Y-m-d H:i:s'); $ticket->lock_at = date('Y-m-d H:i:s');
@@ -2104,7 +2110,7 @@ class TicketController extends Controller
$thread->ticket_id = $ticket->id; $thread->ticket_id = $ticket->id;
$thread->user_id = Auth::user()->id; $thread->user_id = Auth::user()->id;
$thread->is_internal = 1; $thread->is_internal = 1;
$thread->body = 'This ticket now belongs to '.$user->user_name; $thread->body = 'This ticket now belongs to ' . $user->user_name;
$thread->save(); $thread->save();
//mail functionality //mail functionality
@@ -2114,11 +2120,11 @@ class TicketController extends Controller
$agent = $user->first_name; $agent = $user->first_name;
$agent_email = $user->email; $agent_email = $user->email;
$master = Auth::user()->first_name.' '.Auth::user()->last_name; $master = Auth::user()->first_name . ' ' . Auth::user()->last_name;
if (Alert::first()->internal_status == 1 || Alert::first()->internal_assigned_agent == 1) { if (Alert::first()->internal_status == 1 || Alert::first()->internal_assigned_agent == 1) {
// ticket assigned send mail // ticket assigned send mail
Mail::send('emails.Ticket_assign', ['agent' => $agent, 'ticket_number' => $ticket_number, 'from' => $company, 'master' => $master, 'system' => $system], function ($message) use ($agent_email, $agent, $ticket_number, $ticket_subject) { Mail::send('emails.Ticket_assign', ['agent' => $agent, 'ticket_number' => $ticket_number, 'from' => $company, 'master' => $master, 'system' => $system], function ($message) use ($agent_email, $agent, $ticket_number, $ticket_subject) {
$message->to($agent_email, $agent)->subject($ticket_subject.'[#'.$ticket_number.']'); $message->to($agent_email, $agent)->subject($ticket_subject . '[#' . $ticket_number . ']');
}); });
} }
@@ -2141,9 +2147,12 @@ class TicketController extends Controller
$email = $email; $email = $email;
$ticket_id = $ticket_id; $ticket_id = $ticket_id;
$validator = \Validator::make( $validator = \Validator::make(
['email' => $email, [
'name' => $name, ], 'email' => $email,
['email' => 'required|email', 'name' => $name,
],
[
'email' => 'required|email',
] ]
); );
$user = User::where('email', '=', $email)->first(); $user = User::where('email', '=', $email)->first();
@@ -2178,7 +2187,7 @@ class TicketController extends Controller
$t_id = Input::get('data1'); $t_id = Input::get('data1');
foreach ($t_id as $value) { foreach ($t_id as $value) {
$title = Ticket_Thread::select('title')->where('ticket_id', '=', $value)->first(); $title = Ticket_Thread::select('title')->where('ticket_id', '=', $value)->first();
echo "<option value='$value'>".$title->title.'</option>'; echo "<option value='$value'>" . $title->title . '</option>';
} }
} else { } else {
$ticket = Tickets::select('user_id')->where('id', '=', $id)->first(); $ticket = Tickets::select('user_id')->where('id', '=', $id)->first();
@@ -2186,7 +2195,7 @@ class TicketController extends Controller
->where('user_id', '=', $ticket->user_id)->where('id', '!=', $id)->where('status', '=', 1)->get(); ->where('user_id', '=', $ticket->user_id)->where('id', '!=', $id)->where('status', '=', 1)->get();
foreach ($ticket_data as $value) { foreach ($ticket_data as $value) {
$title = Ticket_Thread::select('title')->where('ticket_id', '=', $value->id)->first(); $title = Ticket_Thread::select('title')->where('ticket_id', '=', $value->id)->first();
echo "<option value='$value->id'>".$title->title.'</option>'; echo "<option value='$value->id'>" . $title->title . '</option>';
} }
} }
} }
@@ -2252,7 +2261,7 @@ class TicketController extends Controller
} }
$parent_ticket = Tickets::select('ticket_number')->where('id', '=', $p_id)->first(); $parent_ticket = Tickets::select('ticket_number')->where('id', '=', $p_id)->first();
$parent_thread = Ticket_Thread::where('ticket_id', '=', $p_id)->first(); $parent_thread = Ticket_Thread::where('ticket_id', '=', $p_id)->first();
foreach ($t_id as $value) {//to create new thread of the tickets to be merged with parent foreach ($t_id as $value) { //to create new thread of the tickets to be merged with parent
$thread = Ticket_Thread::where('ticket_id', '=', $value)->first(); $thread = Ticket_Thread::where('ticket_id', '=', $value)->first();
$ticket = Tickets::select('ticket_number')->where('id', '=', $value)->first(); $ticket = Tickets::select('ticket_number')->where('id', '=', $value)->first();
Ticket_Thread::where('ticket_id', '=', $value) Ticket_Thread::where('ticket_id', '=', $value)
@@ -2280,9 +2289,9 @@ class TicketController extends Controller
$new_thread->user_id = Auth::user()->id; $new_thread->user_id = Auth::user()->id;
$new_thread->is_internal = 0; $new_thread->is_internal = 0;
$new_thread->title = $thread->title; $new_thread->title = $thread->title;
$new_thread->body = Lang::get('lang.get_merge_message'). $new_thread->body = Lang::get('lang.get_merge_message') .
"&nbsp;&nbsp;<a href='".route('ticket.thread', [$p_id]). "&nbsp;&nbsp;<a href='" . route('ticket.thread', [$p_id]) .
"'>#".$parent_ticket->ticket_number.'</a><br><br><b>'.Lang::get('lang.merge-reason').':</b>&nbsp;&nbsp;'.$reason; "'>#" . $parent_ticket->ticket_number . '</a><br><br><b>' . Lang::get('lang.merge-reason') . ':</b>&nbsp;&nbsp;' . $reason;
$new_thread->format = $thread->format; $new_thread->format = $thread->format;
$new_thread->ip_address = $thread->ip_address; $new_thread->ip_address = $thread->ip_address;
@@ -2291,7 +2300,7 @@ class TicketController extends Controller
$new_parent_thread->user_id = Auth::user()->id; $new_parent_thread->user_id = Auth::user()->id;
$new_parent_thread->is_internal = 1; $new_parent_thread->is_internal = 1;
$new_parent_thread->title = $thread->title; $new_parent_thread->title = $thread->title;
$new_parent_thread->body = Lang::get('lang.ticket')."&nbsp;<a href='".route('ticket.thread', [$value])."'>#".$ticket->ticket_number.'</a>&nbsp'.Lang::get('lang.ticket_merged').'<br><br><b>'.Lang::get('lang.merge-reason').':</b>&nbsp;&nbsp;'.$reason; $new_parent_thread->body = Lang::get('lang.ticket') . "&nbsp;<a href='" . route('ticket.thread', [$value]) . "'>#" . $ticket->ticket_number . '</a>&nbsp' . Lang::get('lang.ticket_merged') . '<br><br><b>' . Lang::get('lang.merge-reason') . ':</b>&nbsp;&nbsp;' . $reason;
$new_parent_thread->format = $parent_thread->format; $new_parent_thread->format = $parent_thread->format;
$new_parent_thread->ip_address = $parent_thread->ip_address; $new_parent_thread->ip_address = $parent_thread->ip_address;
if ($new_thread->save() && $new_parent_thread->save()) { if ($new_thread->save() && $new_parent_thread->save()) {
@@ -2308,11 +2317,11 @@ class TicketController extends Controller
public function getParentTickets($id) public function getParentTickets($id)
{ {
$title = Ticket_Thread::select('title')->where('ticket_id', '=', $id)->first(); $title = Ticket_Thread::select('title')->where('ticket_id', '=', $id)->first();
echo "<option value='$id'>".$title->title.'</option>'; echo "<option value='$id'>" . $title->title . '</option>';
$tickets = Input::get('data1'); $tickets = Input::get('data1');
foreach ($tickets as $value) { foreach ($tickets as $value) {
$title = Ticket_Thread::select('title')->where('ticket_id', '=', $value)->first(); $title = Ticket_Thread::select('title')->where('ticket_id', '=', $value)->first();
echo "<option value='$value'>".$title->title.'</option>'; echo "<option value='$value'>" . $title->title . '</option>';
} }
} }
@@ -2327,17 +2336,17 @@ class TicketController extends Controller
{ {
return "<script> return "<script>
var timeoutId; var timeoutId;
$('#tool".$ticketid."').hover(function() { $('#tool" . $ticketid . "').hover(function() {
if (!timeoutId) { if (!timeoutId) {
timeoutId = window.setTimeout(function() { timeoutId = window.setTimeout(function() {
timeoutId = null; // EDIT: added this line timeoutId = null; // EDIT: added this line
$.ajax({ $.ajax({
url:'".url('ticket/tooltip')."', url:'" . url('ticket/tooltip') . "',
dataType:'html', dataType:'html',
type:'get', type:'get',
data:{'ticketid':".$ticketid."}, data:{'ticketid':" . $ticketid . "},
success : function(html){ success : function(html){
$('#tooltip".$ticketid."').html(html); $('#tooltip" . $ticketid . "').html(html);
}, },
}); });
}, 2000); }, 2000);
@@ -2363,11 +2372,11 @@ class TicketController extends Controller
$tooltip = ''; $tooltip = '';
foreach ($threads as $thread) { foreach ($threads as $thread) {
$tooltip .= '<b>'.$thread->user->user_name.' ('.$thread->poster.')</b></br>' $tooltip .= '<b>' . $thread->user->user_name . ' (' . $thread->poster . ')</b></br>'
.$thread->purify().'<br><hr>'; . $thread->purify() . '<br><hr>';
} }
$tooltip .= 'This ticket has '.$numThreads.' threads.'; $tooltip .= 'This ticket has ' . $numThreads . ' threads.';
return $tooltip; return $tooltip;
} }
@@ -2388,24 +2397,24 @@ class TicketController extends Controller
// $sla_plan = Sla_plan::where('id', '=', $overdue->sla)->first(); // $sla_plan = Sla_plan::where('id', '=', $overdue->sla)->first();
$ovadate = $overdue->created_at; $ovadate = $overdue->created_at;
$new_date = date_add($ovadate, date_interval_create_from_date_string($workflow->days.' days')).'<br/><br/>'; $new_date = date_add($ovadate, date_interval_create_from_date_string($workflow->days . ' days')) . '<br/><br/>';
if (date('Y-m-d H:i:s') > $new_date) { if (date('Y-m-d H:i:s') > $new_date) {
$i++; $i++;
$overdue->status = 3; $overdue->status = 3;
$overdue->closed = 1; $overdue->closed = 1;
$overdue->closed_at = date('Y-m-d H:i:s'); $overdue->closed_at = date('Y-m-d H:i:s');
$overdue->save(); $overdue->save();
// if($workflow->send_email == 1) { // if($workflow->send_email == 1) {
// $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $overdue->dept_id), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => $ticket_subject.'[#'.$ticket_number.']', 'scenario' => 'close-ticket'], $template_variables = ['ticket_number' => $ticket_number]); // $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $overdue->dept_id), $to = ['name' => $user_name, 'email' => $email], $message = ['subject' => $ticket_subject.'[#'.$ticket_number.']', 'scenario' => 'close-ticket'], $template_variables = ['ticket_number' => $ticket_number]);
// } // }
} }
} }
// dd(count($value)); // dd(count($value));
// if ($i > 0) { // if ($i > 0) {
// $tickets = new collection($value); // $tickets = new collection($value);
// } else { // } else {
// $tickets = null; // $tickets = null;
// } // }
} }
} else { } else {
} }
@@ -2457,6 +2466,7 @@ class TicketController extends Controller
$ticket = Tickets::where('id', $thread->ticket_id)->first(); $ticket = Tickets::where('id', $thread->ticket_id)->first();
$html = view('themes.default1.agent.helpdesk.ticket.thread-pdf', compact('thread', 'system', 'company', 'ticket'))->render(); $html = view('themes.default1.agent.helpdesk.ticket.thread-pdf', compact('thread', 'system', 'company', 'ticket'))->render();
$html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); $html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
/** /**
* This statement throws error with php7.1. * This statement throws error with php7.1.
* *
@@ -2661,7 +2671,7 @@ class TicketController extends Controller
if ($exist) { if ($exist) {
$content = \File::get($path); $content = \File::get($path);
$type = \File::extension($path); $type = \File::extension($path);
$base64 = 'data:image/'.$type.';base64,'.base64_encode($content); $base64 = 'data:image/' . $type . ';base64,' . base64_encode($content);
} }
return $base64; return $base64;
@@ -2743,13 +2753,13 @@ class TicketController extends Controller
$rep = ($tickets->last_replier == 'client') ? '#F39C12' $rep = ($tickets->last_replier == 'client') ? '#F39C12'
: '#000'; : '#000';
return "<center><input type='checkbox' name='select_all[]' id='".$tickets->id."' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue ".$tickets->color.' '.$rep."' value='".$tickets->id."'></input></center>"; return "<center><input type='checkbox' name='select_all[]' id='" . $tickets->id . "' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue " . $tickets->color . ' ' . $rep . "' value='" . $tickets->id . "'></input></center>";
}) })
->editColumn('title', function ($tickets) { ->editColumn('title', function ($tickets) {
if (isset($tickets->ticket_title)) { if (isset($tickets->ticket_title)) {
$string = utfEncoding($tickets->ticket_title); $string = utfEncoding($tickets->ticket_title);
if (strlen($string) > 25) { if (strlen($string) > 25) {
$string = Str::limit($string, 30).'...'; $string = Str::limit($string, 30) . '...';
} }
} else { } else {
$string = Lang::get('lang.no-subject'); $string = Lang::get('lang.no-subject');
@@ -2757,14 +2767,14 @@ class TicketController extends Controller
$collab = $tickets->countcollaborator; $collab = $tickets->countcollaborator;
if ($collab > 0) { if ($collab > 0) {
$collabString = '&nbsp;<i class="fa fa-users" title="'.Lang::get('lang.ticket_has_collaborator').'"></i>'; $collabString = '&nbsp;<i class="fa fa-users" title="' . Lang::get('lang.ticket_has_collaborator') . '"></i>';
} else { } else {
$collabString = null; $collabString = null;
} }
$attachCount = $tickets->countattachment; $attachCount = $tickets->countattachment;
if ($attachCount > 0) { if ($attachCount > 0) {
$attachString = '&nbsp;<i class="fa fa-paperclip" title="'.Lang::get('lang.ticket_has_attachments').'"></i>'; $attachString = '&nbsp;<i class="fa fa-paperclip" title="' . Lang::get('lang.ticket_has_attachments') . '"></i>';
} else { } else {
$attachString = ''; $attachString = '';
} }
@@ -2782,58 +2792,58 @@ class TicketController extends Controller
$duedate = strtotime($tickets->duedate); $duedate = strtotime($tickets->duedate);
if ($duedate - $now < 0) { if ($duedate - $now < 0) {
$due = '&nbsp;<span style="background-color: rgba(221, 75, 57, 0.67) !important" title="'.Lang::get('lang.is_overdue').'" class="label label-danger">'.Lang::get('lang.overdue').'</span>'; $due = '&nbsp;<span style="background-color: rgba(221, 75, 57, 0.67) !important" title="' . Lang::get('lang.is_overdue') . '" class="label label-danger">' . Lang::get('lang.overdue') . '</span>';
} else { } else {
if (date('Ymd', $duedate) == date('Ymd', $now)) { if (date('Ymd', $duedate) == date('Ymd', $now)) {
$due = '&nbsp;<span style="background-color: rgba(240, 173, 78, 0.67) !important" title="'.Lang::get('lang.going-overdue-today').'" class="label label-warning">'.Lang::get('lang.duetoday').'</span>'; $due = '&nbsp;<span style="background-color: rgba(240, 173, 78, 0.67) !important" title="' . Lang::get('lang.going-overdue-today') . '" class="label label-warning">' . Lang::get('lang.duetoday') . '</span>';
} }
} }
} }
$thread_count = '('.$tickets->countthread.')'; $thread_count = '(' . $tickets->countthread . ')';
if (Lang::getLocale() == 'ar') { if (Lang::getLocale() == 'ar') {
$thread_count = '&rlm;('.$tickets->countthread.')'; $thread_count = '&rlm;(' . $tickets->countthread . ')';
} }
$tooltip_script = self::tooltip($tickets->id); $tooltip_script = self::tooltip($tickets->id);
return "<div class='tooltip1' id='tool".$tickets->id."'> return "<div class='tooltip1' id='tool" . $tickets->id . "'>
<a href='".route('ticket.thread', [$tickets->id])."'>".$string."&nbsp;<span style='color:green'>".$thread_count."</span> <a href='" . route('ticket.thread', [$tickets->id]) . "'>" . $string . "&nbsp;<span style='color:green'>" . $thread_count . "</span>
</a> <span><i style='color:green' title='".Lang::get('lang.ticket_created_source', ['source' => $source])."' class='".$css."'></i></span>".$collabString.$attachString.$due.$tooltip_script. </a> <span><i style='color:green' title='" . Lang::get('lang.ticket_created_source', ['source' => $source]) . "' class='" . $css . "'></i></span>" . $collabString . $attachString . $due . $tooltip_script .
"<span class='tooltiptext' id='tooltip".$tickets->id."' style='height:auto;width:300px;height:200px;overflow:scroll;background-color:#fff;color:black;border-radius:3px;border:2px solid gainsboro;position:absolute;z-index:1;top:150%;left:50%;margin-left:-23px;word-wrap:break-word;padding:10px;'>".Lang::get('lang.loading').'</span></div>'; "<span class='tooltiptext' id='tooltip" . $tickets->id . "' style='height:auto;width:300px;height:200px;overflow:scroll;background-color:#fff;color:black;border-radius:3px;border:2px solid gainsboro;position:absolute;z-index:1;top:150%;left:50%;margin-left:-23px;word-wrap:break-word;padding:10px;'>" . Lang::get('lang.loading') . '</span></div>';
}) })
->editColumn('ticket_number', function ($tickets) { ->editColumn('ticket_number', function ($tickets) {
return "<a href='".route('ticket.thread', [$tickets->id])."' class='$".ucfirst($tickets->priority)."*' title='".Lang::get('lang.click-here-to-see-more-details')."'>#".$tickets->ticket_number.'</a>'; return "<a href='" . route('ticket.thread', [$tickets->id]) . "' class='$" . ucfirst($tickets->priority) . "*' title='" . Lang::get('lang.click-here-to-see-more-details') . "'>#" . $tickets->ticket_number . '</a>';
}) })
->editColumn('c_uname', function ($tickets) { ->editColumn('c_uname', function ($tickets) {
$from = $tickets->c_fname; $from = $tickets->c_fname;
$url = route('user.show', $tickets->c_uid); $url = route('user.show', $tickets->c_uid);
$name = $tickets->c_uname; $name = $tickets->c_uname;
if ($from) { if ($from) {
$name = utfEncoding($tickets->c_fname).' '.utfEncoding($tickets->c_lname); $name = utfEncoding($tickets->c_fname) . ' ' . utfEncoding($tickets->c_lname);
} }
$color = ''; $color = '';
if ($tickets->verified == 0 || $tickets->verified == '0') { if ($tickets->verified == 0 || $tickets->verified == '0') {
$color = "<i class='fa fa-exclamation-triangle' title='".Lang::get('lang.accoutn-not-verified')."'></i>"; $color = "<i class='fa fa-exclamation-triangle' title='" . Lang::get('lang.accoutn-not-verified') . "'></i>";
} }
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.strip_tags($name).'&apos;'.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".Str::limit(strip_tags($name), 30).' <span style="color:#f75959">'.$color.'</span></span></a>'; return "<a href='" . $url . "' title='" . Lang::get('lang.see-profile1') . ' ' . strip_tags($name) . '&apos;' . Lang::get('lang.see-profile2') . "'><span style='color:#508983'>" . Str::limit(strip_tags($name), 30) . ' <span style="color:#f75959">' . $color . '</span></span></a>';
}) })
->editColumn('a_uname', function ($tickets) { ->editColumn('a_uname', function ($tickets) {
if ($tickets->assigned_to == null && $tickets->name == null) { if ($tickets->assigned_to == null && $tickets->name == null) {
return "<span style='color:red'>".Lang::get('lang.Unassigned').'</span>'; return "<span style='color:red'>" . Lang::get('lang.Unassigned') . '</span>';
} else { } else {
$assign = $tickets->assign_user_name; $assign = $tickets->assign_user_name;
if ($tickets->assigned_to != null) { if ($tickets->assigned_to != null) {
$assign = utfEncoding($tickets->a_fname).' '.utfEncoding($tickets->a_lname); $assign = utfEncoding($tickets->a_fname) . ' ' . utfEncoding($tickets->a_lname);
$url = route('user.show', $tickets->assigned_to); $url = route('user.show', $tickets->assigned_to);
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.strip_tags($assign).'&apos;'.Lang::get('lang.see-profile2')."'><span style='color:green'>".mb_substr(strip_tags($assign), 0, 30, 'UTF-8').'</span></a>'; return "<a href='" . $url . "' title='" . Lang::get('lang.see-profile1') . ' ' . strip_tags($assign) . '&apos;' . Lang::get('lang.see-profile2') . "'><span style='color:green'>" . mb_substr(strip_tags($assign), 0, 30, 'UTF-8') . '</span></a>';
} else { } else {
$url1 = '#'; $url1 = '#';
return "<a href='".$url1."' title='".Lang::get('lang.see-profile1').' '.ucfirst(strip_tags($tickets->name)).'&apos;'.Lang::get('lang.see-profile2')."'><span style='color:green'>".mb_substr(ucfirst(strip_tags($tickets->name)), 0, 30, 'UTF-8').'</span></a>'; return "<a href='" . $url1 . "' title='" . Lang::get('lang.see-profile1') . ' ' . ucfirst(strip_tags($tickets->name)) . '&apos;' . Lang::get('lang.see-profile2') . "'><span style='color:green'>" . mb_substr(ucfirst(strip_tags($tickets->name)), 0, 30, 'UTF-8') . '</span></a>';
} }
} }
}) })
@@ -2844,7 +2854,7 @@ class TicketController extends Controller
$updated = $tickets->updated_at; $updated = $tickets->updated_at;
} }
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated); return '<span style="display:none">' . $updated . '</span>' . UTC::usertimezone($updated);
}) })
->rawColumns(['id', 'title', 'ticket_number', 'c_uname', 'a_uname', 'updated_at']) ->rawColumns(['id', 'title', 'ticket_number', 'c_uname', 'a_uname', 'updated_at'])
->make(); ->make();
@@ -3192,7 +3202,7 @@ class TicketController extends Controller
{ {
return DataTables::of($tickets) return DataTables::of($tickets)
->addColumn('id', function ($tickets) { ->addColumn('id', function ($tickets) {
return "<input type='checkbox' name='select_all[]' id='".$tickets->id."' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue' value='".$tickets->id."'></input>"; return "<input type='checkbox' name='select_all[]' id='" . $tickets->id . "' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue' value='" . $tickets->id . "'></input>";
}) })
->addColumn('title', function ($tickets) { ->addColumn('title', function ($tickets) {
if (isset($tickets->ticket_title)) { if (isset($tickets->ticket_title)) {
@@ -3219,19 +3229,19 @@ class TicketController extends Controller
} }
$tooltip_script = self::tooltip($tickets->id); $tooltip_script = self::tooltip($tickets->id);
return "<div class='tooltip1' id='tool".$tickets->id."'> return "<div class='tooltip1' id='tool" . $tickets->id . "'>
<a href='".route('ticket.thread', [$tickets->id])."'>".ucfirst($string)."&nbsp;<span style='color:green'>(".$tickets->countthread.") <i class='".$css."'></i></span> <a href='" . route('ticket.thread', [$tickets->id]) . "'>" . ucfirst($string) . "&nbsp;<span style='color:green'>(" . $tickets->countthread . ") <i class='" . $css . "'></i></span>
</a>".$collabString.$attachString.$tooltip_script. </a>" . $collabString . $attachString . $tooltip_script .
"<span class='tooltiptext' id='tooltip".$tickets->id."'>Loading...</span></div>"; "<span class='tooltiptext' id='tooltip" . $tickets->id . "'>Loading...</span></div>";
}) })
->addColumn('ticket_number', function ($tickets) { ->addColumn('ticket_number', function ($tickets) {
return "<a href='".route('ticket.thread', [$tickets->id])."' title='".$tickets->ticket_number."'>#".$tickets->ticket_number.'</a>'; return "<a href='" . route('ticket.thread', [$tickets->id]) . "' title='" . $tickets->ticket_number . "'>#" . $tickets->ticket_number . '</a>';
}) })
->addColumn('priority', function ($tickets) { ->addColumn('priority', function ($tickets) {
$rep = ($tickets->last_replier == 'client') ? '#F39C12' : '#000'; $rep = ($tickets->last_replier == 'client') ? '#F39C12' : '#000';
$priority = $tickets->priority; $priority = $tickets->priority;
if ($priority != null) { if ($priority != null) {
$prio = '<button class="btn btn-xs '.$rep.'" style="background-color: '.$tickets->priority_color.'; color:#F7FBCB">'.ucfirst($tickets->priority).'</button>'; $prio = '<button class="btn btn-xs ' . $rep . '" style="background-color: ' . $tickets->priority_color . '; color:#F7FBCB">' . ucfirst($tickets->priority) . '</button>';
} else { } else {
$prio = $tickets->last_relier_role; $prio = $tickets->last_relier_role;
} }
@@ -3243,25 +3253,25 @@ class TicketController extends Controller
$url = route('user.show', $tickets->user_id); $url = route('user.show', $tickets->user_id);
$name = ''; $name = '';
if ($from) { if ($from) {
$name = $tickets->first_name.' '.$tickets->last_name; $name = $tickets->first_name . ' ' . $tickets->last_name;
} else { } else {
$name = $tickets->user_name; $name = $tickets->user_name;
} }
$color = ''; $color = '';
if ($tickets->verified == 0 || $tickets->verified == '0') { if ($tickets->verified == 0 || $tickets->verified == '0') {
$color = "<i class='fa fa-exclamation-triangle' title='".Lang::get('lang.accoutn-not-verified')."'></i>"; $color = "<i class='fa fa-exclamation-triangle' title='" . Lang::get('lang.accoutn-not-verified') . "'></i>";
} }
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($tickets->user_name).'&apos;'.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".ucfirst(Str::limit($name, 30)).' <span style="color:#f75959">'.$color.'</span></span></a>'; return "<a href='" . $url . "' title='" . Lang::get('lang.see-profile1') . ' ' . ucfirst($tickets->user_name) . '&apos;' . Lang::get('lang.see-profile2') . "'><span style='color:#508983'>" . ucfirst(Str::limit($name, 30)) . ' <span style="color:#f75959">' . $color . '</span></span></a>';
}) })
->addColumn('assign_user_name', function ($tickets) { ->addColumn('assign_user_name', function ($tickets) {
if ($tickets->assigned_to == null) { if ($tickets->assigned_to == null) {
return "<span style='color:red'>".Lang::get('lang.Unassigned').'</span>'; return "<span style='color:red'>" . Lang::get('lang.Unassigned') . '</span>';
} else { } else {
$assign = $tickets->assign_user_name; $assign = $tickets->assign_user_name;
$url = route('user.show', $tickets->assigned_to); $url = route('user.show', $tickets->assigned_to);
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($tickets->assign_first_name).'&apos;'.Lang::get('lang.see-profile2')."'><span style='color:green'>".ucfirst($tickets->assign_first_name).' '.ucfirst($tickets->assign_last_name).'</span></a>'; return "<a href='" . $url . "' title='" . Lang::get('lang.see-profile1') . ' ' . ucfirst($tickets->assign_first_name) . '&apos;' . Lang::get('lang.see-profile2') . "'><span style='color:green'>" . ucfirst($tickets->assign_first_name) . ' ' . ucfirst($tickets->assign_last_name) . '</span></a>';
} }
}) })
->addColumn('updated_at', function ($tickets) { ->addColumn('updated_at', function ($tickets) {
@@ -3271,7 +3281,7 @@ class TicketController extends Controller
$updated = $tickets->updated_at; $updated = $tickets->updated_at;
} }
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated); return '<span style="display:none">' . $updated . '</span>' . UTC::usertimezone($updated);
}) })
->addColumn('created_at', function ($tickets) { ->addColumn('created_at', function ($tickets) {
$TicketDatarow = $tickets->created_at; $TicketDatarow = $tickets->created_at;
@@ -3280,7 +3290,7 @@ class TicketController extends Controller
$updated = $tickets->created_at; $updated = $tickets->created_at;
} }
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated); return '<span style="display:none">' . $updated . '</span>' . UTC::usertimezone($updated);
}) })
->rawColumns(['id', 'title', 'ticket_number', 'priority', 'user_name', 'assign_user_name', 'updated_at', 'created_at']) ->rawColumns(['id', 'title', 'ticket_number', 'priority', 'user_name', 'assign_user_name', 'updated_at', 'created_at'])
->make(); ->make();

View File

@@ -201,6 +201,7 @@ class TicketWorkflowController extends Controller
} elseif ($condition == 'ends') { } elseif ($condition == 'ends') {
$return = $this->checkEnds($statement, $to_check); $return = $this->checkEnds($statement, $to_check);
} }
// elseif($condition == 'match') { // elseif($condition == 'match') {
// //
// } elseif($condition == 'not_match') { // } elseif($condition == 'not_match') {

View File

@@ -29,6 +29,7 @@ use App\Model\helpdesk\Ticket\Ticket_Thread;
use App\Model\helpdesk\Ticket\Tickets; use App\Model\helpdesk\Ticket\Tickets;
use App\Model\helpdesk\Utility\CountryCode; use App\Model\helpdesk\Utility\CountryCode;
use App\Model\helpdesk\Utility\Otp; use App\Model\helpdesk\Utility\Otp;
use App\Model\helpdesk\Agent\Department;
use App\User; use App\User;
// classes // classes
use Auth; use Auth;
@@ -149,6 +150,7 @@ class UserController extends Controller
$query->orWhere('country_code', 'LIKE', '%'.$search.'%'); $query->orWhere('country_code', 'LIKE', '%'.$search.'%');
}); });
} }
// displaying list of users with chumper datatables // displaying list of users with chumper datatables
// return \Datatable::collection(User::where('role', "!=", "admin")->get()) // return \Datatable::collection(User::where('role', "!=", "admin")->get())
return \Yajra\DataTables\Facades\DataTables::of($users) return \Yajra\DataTables\Facades\DataTables::of($users)
@@ -338,6 +340,7 @@ class UserController extends Controller
return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully')); return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully'));
} }
// $user->save(); // $user->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully')); return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully'));
@@ -676,6 +679,7 @@ class UserController extends Controller
$user = new User(); $user = new User();
/* select the field where id = $id(request Id) */ /* select the field where id = $id(request Id) */
$users = $user->whereId($id)->first(); $users = $user->whereId($id)->first();
/* Update the value by selected field */ /* Update the value by selected field */
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
@@ -697,6 +701,7 @@ class UserController extends Controller
$this->storeUserOrgRelation($id, $orgid); $this->storeUserOrgRelation($id, $orgid);
} }
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('user')->with('success', Lang::get('lang.User-profile-Updated-Successfully')); return redirect('user')->with('success', Lang::get('lang.User-profile-Updated-Successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -733,11 +738,13 @@ class UserController extends Controller
$phonecode = $code->where('iso', '=', $location->iso_code)->first(); $phonecode = $code->where('iso', '=', $location->iso_code)->first();
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first(); $settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
$status = $settings->status; $status = $settings->status;
$departments = Department::all();
try { try {
return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user')) return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user', 'departments'))
->with(['phonecode' => $phonecode->phonecode, ->with([
'verify' => $status, ]); 'phonecode' => $phonecode->phonecode,
'verify' => $status,
]);
} catch (Exception $e) { } catch (Exception $e) {
return redirect()->back()->with('fails', $e->getMessage()); return redirect()->back()->with('fails', $e->getMessage());
} }
@@ -932,6 +939,7 @@ class UserController extends Controller
$user_org->org_id = $org->id; $user_org->org_id = $org->id;
$user_org->user_id = $id; $user_org->user_id = $id;
$user_org->save(); $user_org->save();
// for success return 0 // for success return 0
return 0; return 0;
} }
@@ -956,6 +964,7 @@ class UserController extends Controller
for ($i = 0; $i < $length; $i++) { for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)]; $randomString .= $characters[rand(0, $charactersLength - 1)];
} }
// return random string // return random string
return $randomString; return $randomString;
} }
@@ -1061,6 +1070,7 @@ class UserController extends Controller
if (Hash::check(Input::get('otp'), $otp->otp)) { if (Hash::check(Input::get('otp'), $otp->otp)) {
Otp::where('user_id', '=', Input::get('u_id')) Otp::where('user_id', '=', Input::get('u_id'))
->update(['otp' => '']); ->update(['otp' => '']);
// User::where('id', '=', $user->id) // User::where('id', '=', $user->id)
// ->update(['active' => 1]); // ->update(['active' => 1]);
// $this->openTicketAfterVerification($user->id); // $this->openTicketAfterVerification($user->id);

View File

@@ -68,6 +68,7 @@ class ArticleController extends Controller
->select('id', 'name', 'description', 'publish_time', 'slug') ->select('id', 'name', 'description', 'publish_time', 'slug')
->orderBy('publish_time', 'desc') ->orderBy('publish_time', 'desc')
->get(); ->get();
// returns chumper datatable // returns chumper datatable
return Datatable::Collection($articles) return Datatable::Collection($articles)
@@ -136,6 +137,7 @@ class ArticleController extends Controller
{ {
/* get the attributes of the category */ /* get the attributes of the category */
$category = $category->pluck('id', 'name'); $category = $category->pluck('id', 'name');
/* get the create page */ /* get the create page */
try { try {
return view('themes.default1.agent.kb.article.create', compact('category')); return view('themes.default1.agent.kb.article.create', compact('category'));
@@ -169,6 +171,7 @@ class ArticleController extends Controller
foreach ($requests as $req) { foreach ($requests as $req) {
DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]); DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]);
} }
/* insert the values to the article table */ /* insert the values to the article table */
try { try {
$article->fill($request->except('slug'))->save(); $article->fill($request->except('slug'))->save();
@@ -203,6 +206,7 @@ class ArticleController extends Controller
/* get the selected article and display it at edit page */ /* get the selected article and display it at edit page */
/* Get the selected article with id */ /* Get the selected article with id */
$article = $article->whereId($id)->first(); $article = $article->whereId($id)->first();
/* send to the edit page */ /* send to the edit page */
try { try {
return view('themes.default1.agent.kb.article.edit', compact('assign', 'article', 'category')); return view('themes.default1.agent.kb.article.edit', compact('assign', 'article', 'category'));
@@ -244,6 +248,7 @@ class ArticleController extends Controller
foreach ($requests as $req) { foreach ($requests as $req) {
DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]); DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]);
} }
/* update the value to the table */ /* update the value to the table */
try { try {
$article->fill($request->all())->save(); $article->fill($request->all())->save();

View File

@@ -123,6 +123,7 @@ class CategoryController extends Controller
{ {
/* Get the all attributes in the category model */ /* Get the all attributes in the category model */
$category = $category->pluck('name', 'id')->toArray(); $category = $category->pluck('name', 'id')->toArray();
/* get the view page to create new category with all attributes /* get the view page to create new category with all attributes
of category model */ of category model */
try { try {
@@ -146,6 +147,7 @@ class CategoryController extends Controller
$sl = $request->input('name'); $sl = $request->input('name');
$slug = Str::slug($sl, '-'); $slug = Str::slug($sl, '-');
$category->slug = $slug; $category->slug = $slug;
// send success message to index page // send success message to index page
try { try {
$category->fill($request->input())->save(); $category->fill($request->input())->save();
@@ -169,6 +171,7 @@ class CategoryController extends Controller
/* get the atributes of the category model whose id == $id */ /* get the atributes of the category model whose id == $id */
$category = Category::whereId($id)->first(); $category = Category::whereId($id)->first();
$categories = Category::pluck('name', 'id')->toArray(); $categories = Category::pluck('name', 'id')->toArray();
/* get the Edit page the selected category via id */ /* get the Edit page the selected category via id */
return view('themes.default1.agent.kb.category.edit', compact('category', 'categories')); return view('themes.default1.agent.kb.category.edit', compact('category', 'categories'));
} }
@@ -188,6 +191,7 @@ class CategoryController extends Controller
$category = Category::where('id', $id)->first(); $category = Category::where('id', $id)->first();
$sl = $request->input('name'); $sl = $request->input('name');
$slug = Str::slug($sl, '-'); $slug = Str::slug($sl, '-');
/* update the values at the table via model according with the request */ /* update the values at the table via model according with the request */
//redirct to index page with success message //redirct to index page with success message
try { try {
@@ -218,6 +222,7 @@ class CategoryController extends Controller
} else { } else {
/* delete the category selected, id == $id */ /* delete the category selected, id == $id */
$category = $category->whereId($id)->first(); $category = $category->whereId($id)->first();
// redirect to index with success message // redirect to index with success message
try { try {
$category->delete(); $category->delete();

View File

@@ -56,6 +56,7 @@ class SettingsController extends Controller
/* get the setting where the id == 1 */ /* get the setting where the id == 1 */
$settings = $settings->whereId('1')->first(); $settings = $settings->whereId('1')->first();
$time = $time->get(); $time = $time->get();
//$date = $date->get(); //$date = $date->get();
return view('themes.default1.agent.kb.settings.settings', compact('date', 'settings', 'time')); return view('themes.default1.agent.kb.settings.settings', compact('date', 'settings', 'time'));
} }

View File

@@ -77,6 +77,7 @@ class AuthController extends Controller
} }
//dd(\Config::get('services')); //dd(\Config::get('services'));
$s = Socialite::driver($provider)->redirect(); $s = Socialite::driver($provider)->redirect();
//dd('dscd'); //dd('dscd');
return $s; return $s;
} }
@@ -114,6 +115,7 @@ class AuthController extends Controller
} }
Auth::login($user); Auth::login($user);
} }
//after login redirecting to home page //after login redirecting to home page
return redirect('/'); return redirect('/');
} catch (\Exception $ex) { } catch (\Exception $ex) {

47
app/Http/Controllers/Client/helpdesk/FormController.php Executable file → Normal file
View File

@@ -21,6 +21,7 @@ use App\Model\helpdesk\Ticket\Ticket_Thread;
use App\Model\helpdesk\Ticket\Tickets; use App\Model\helpdesk\Ticket\Tickets;
use App\Model\helpdesk\Utility\CountryCode; use App\Model\helpdesk\Utility\CountryCode;
use App\User; use App\User;
use App\Model\helpdesk\Agent\Location;
use Exception; use Exception;
// classes // classes
use Form; use Form;
@@ -64,6 +65,7 @@ class FormController extends Controller
*/ */
public function getForm(Help_topic $topic, CountryCode $code) public function getForm(Help_topic $topic, CountryCode $code)
{ {
$locations = Location::all();
if (\Config::get('database.install') == '%0%') { if (\Config::get('database.install') == '%0%') {
return \Redirect::route('licence'); return \Redirect::route('licence');
} }
@@ -85,7 +87,7 @@ class FormController extends Controller
[$max_size_in_bytes, $max_size_in_actual] = $this->fileUploadController->file_upload_max_size(); [$max_size_in_bytes, $max_size_in_actual] = $this->fileUploadController->file_upload_max_size();
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'email_mandatory', 'max_size_in_bytes', 'max_size_in_actual'))->with('phonecode', $phonecode); return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'email_mandatory', 'max_size_in_bytes', 'max_size_in_actual', 'locations'))->with('phonecode', $phonecode);
} else { } else {
return \Redirect::route('home'); return \Redirect::route('home');
} }
@@ -113,29 +115,29 @@ class FormController extends Controller
$form_fields = explode(',', $form_data->value); $form_fields = explode(',', $form_data->value);
$var = ''; $var = '';
foreach ($form_fields as $form_field) { foreach ($form_fields as $form_field) {
$var .= '<option value="'.$form_field.'">'.$form_field.'</option>'; $var .= '<option value="' . $form_field . '">' . $form_field . '</option>';
} }
echo '<br/><label>'.ucfirst($form_data->label).'</label><select class="form-control" name="'.$form_data->name.'">'.$var.'</select>'; echo '<br/><label>' . ucfirst($form_data->label) . '</label><select class="form-control" name="' . $form_data->name . '">' . $var . '</select>';
} elseif ($form_data->type == 'radio') { } elseif ($form_data->type == 'radio') {
$type2 = $form_data->value; $type2 = $form_data->value;
$vals = explode(',', $type2); $vals = explode(',', $type2);
echo '<br/><label>'.ucfirst($form_data->label).'</label><br/>'; echo '<br/><label>' . ucfirst($form_data->label) . '</label><br/>';
foreach ($vals as $val) { foreach ($vals as $val) {
echo '<input type="'.$form_data->type.'" name="'.$form_data->name.'"> '.$form_data->value.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '"> ' . $form_data->value . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
} }
echo '<br/>'; echo '<br/>';
} elseif ($form_data->type == 'textarea') { } elseif ($form_data->type == 'textarea') {
$type3 = $form_data->value; $type3 = $form_data->value;
echo '<br/><label>'.$form_data->label.'</label></br><textarea id="unique-textarea" name="'.$form_data->name.'" class="form-control" style="height:15%;"></textarea>'; echo '<br/><label>' . $form_data->label . '</label></br><textarea id="unique-textarea" name="' . $form_data->name . '" class="form-control" style="height:15%;"></textarea>';
} elseif ($form_data->type == 'checkbox') { } elseif ($form_data->type == 'checkbox') {
$type4 = $form_data->value; $type4 = $form_data->value;
$checks = explode(',', $type4); $checks = explode(',', $type4);
echo '<br/><label>'.ucfirst($form_data->label).'</label><br/>'; echo '<br/><label>' . ucfirst($form_data->label) . '</label><br/>';
foreach ($checks as $check) { foreach ($checks as $check) {
echo '<input type="'.$form_data->type.'" name="'.$form_data->name.'">&nbsp&nbsp'.$check; echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '">&nbsp&nbsp' . $check;
} }
} else { } else {
echo '<br/><label>'.ucfirst($form_data->label).'</label><input type="'.$form_data->type.'" class="form-control" name="'.$form_data->name.'" />'; echo '<br/><label>' . ucfirst($form_data->label) . '</label><input type="' . $form_data->type . '" class="form-control" name="' . $form_data->name . '" />';
} }
} }
echo '<br/><br/>'; echo '<br/><br/>';
@@ -238,26 +240,27 @@ class FormController extends Controller
if ($attachments != null) { if ($attachments != null) {
$storage = new \App\FaveoStorage\Controllers\StorageController(); $storage = new \App\FaveoStorage\Controllers\StorageController();
$storage->saveAttachments($thread->id, $attachments); $storage->saveAttachments($thread->id, $attachments);
// foreach ($attachments as $attachment) { // foreach ($attachments as $attachment) {
// if ($attachment != null) { // if ($attachment != null) {
// $name = $attachment->getClientOriginalName(); // $name = $attachment->getClientOriginalName();
// $type = $attachment->getClientOriginalExtension(); // $type = $attachment->getClientOriginalExtension();
// $size = $attachment->getSize(); // $size = $attachment->getSize();
// $data = file_get_contents($attachment->getRealPath()); // $data = file_get_contents($attachment->getRealPath());
// $attachPath = $attachment->getRealPath(); // $attachPath = $attachment->getRealPath();
// $ta->create(['thread_id' => $thread->id, 'name' => $name, 'size' => $size, 'type' => $type, 'file' => $data, 'poster' => 'ATTACHMENT']); // $ta->create(['thread_id' => $thread->id, 'name' => $name, 'size' => $size, 'type' => $type, 'file' => $data, 'poster' => 'ATTACHMENT']);
// } // }
// } // }
} }
// dd($result); // dd($result);
return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is').' '.$result[0].'. '); return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is') . ' ' . $result[0] . '. ');
} else { } else {
return Redirect::back()->withInput($request->except('password'))->with('fails', Lang::get('lang.failed-to-create-user-tcket-as-mobile-has-been-taken')); return Redirect::back()->withInput($request->except('password'))->with('fails', Lang::get('lang.failed-to-create-user-tcket-as-mobile-has-been-taken'));
} }
} catch (\Exception $ex) { } catch (\Exception $ex) {
return redirect()->back()->with('fails', $ex->getMessage()); return redirect()->back()->with('fails', $ex->getMessage());
} }
// dd($result); // dd($result);
} }
/** /**
@@ -275,7 +278,7 @@ class FormController extends Controller
$tickets = Tickets::where('id', '=', $id)->first(); $tickets = Tickets::where('id', '=', $id)->first();
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first(); $thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
$subject = $thread->title.'[#'.$tickets->ticket_number.']'; $subject = $thread->title . '[#' . $tickets->ticket_number . ']';
$body = $comment; $body = $comment;
$user_cred = User::where('id', '=', $tickets->user_id)->first(); $user_cred = User::where('id', '=', $tickets->user_id)->first();

View File

@@ -209,6 +209,7 @@ class GuestController extends Controller
$tickets = $tickets->where('user_id', '=', $user_id)->first(); $tickets = $tickets->where('user_id', '=', $user_id)->first();
//dd($ticket); //dd($ticket);
$thread = $thread->where('ticket_id', $tickets->id)->first(); $thread = $thread->where('ticket_id', $tickets->id)->first();
//dd($thread); //dd($thread);
// $tickets = $tickets->whereId($id)->first(); // $tickets = $tickets->whereId($id)->first();
return view('themes.default1.client.guest-user.view_ticket', compact('thread', 'tickets')); return view('themes.default1.client.guest-user.view_ticket', compact('thread', 'tickets'));
@@ -424,6 +425,7 @@ class GuestController extends Controller
if (Hash::check(Input::get('otp'), $otp->otp)) { if (Hash::check(Input::get('otp'), $otp->otp)) {
Otp::where('user_id', '=', Input::get('u_id')) Otp::where('user_id', '=', Input::get('u_id'))
->update(['otp' => '']); ->update(['otp' => '']);
// User::where('id', '=', $user->id) // User::where('id', '=', $user->id)
// ->update(['active' => 1]); // ->update(['active' => 1]);
// $this->openTicketAfterVerification($user->id); // $this->openTicketAfterVerification($user->id);

View File

View File

@@ -141,6 +141,7 @@ class UserController extends Controller
/* from whole attribute pick the article_id */ /* from whole attribute pick the article_id */
$article_id = $all->pluck('article_id'); $article_id = $all->pluck('article_id');
$categorys = $category->get(); $categorys = $category->get();
/* direct to view with $article_id */ /* direct to view with $article_id */
return view('themes.default1.client.kb.article-list.category', compact('all', 'id', 'categorys', 'article_id')); return view('themes.default1.client.kb.article-list.category', compact('all', 'id', 'categorys', 'article_id'));
} }

0
app/Http/Controllers/Common/ApiSettings.php Executable file → Normal file
View File

View File

@@ -15,6 +15,7 @@ class ExcelController extends Controller
if (count($data) == 0) { if (count($data) == 0) {
throw new Exception('No data'); throw new Exception('No data');
} }
//dd(Excel::download(new UserExport($data), $filename.'.'.'xls')); //dd(Excel::download(new UserExport($data), $filename.'.'.'xls'));
return Excel::download(new UserExport($data), $filename.'.'.'xlsx'); return Excel::download(new UserExport($data), $filename.'.'.'xlsx');
} }

View File

@@ -553,6 +553,7 @@ class SettingsController extends Controller
$attributes[$key]['author'] = $field['author']; $attributes[$key]['author'] = $field['author'];
} }
} }
//dd($attributes); //dd($attributes);
return $attributes; return $attributes;
} }

View File

@@ -169,6 +169,7 @@ class UpgradeController extends Controller
} }
} }
echo '</ul>'; echo '</ul>';
//Artisan::call('migrate', ['--force' => true]); //Artisan::call('migrate', ['--force' => true]);
return true; return true;
} catch (Exception $ex) { } catch (Exception $ex) {
@@ -397,6 +398,7 @@ class UpgradeController extends Controller
try { try {
if (Utility::getFileVersion() > Utility::getDatabaseVersion()) { if (Utility::getFileVersion() > Utility::getDatabaseVersion()) {
$url = url('database-upgrade'); $url = url('database-upgrade');
//$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>"; //$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>";
return view('themes.default1.update.database', compact('url')); return view('themes.default1.update.database', compact('url'));
} else { } else {

View File

@@ -13,4 +13,9 @@ class Department extends BaseModel
'template_set', 'auto_ticket_response', 'auto_message_response', 'template_set', 'auto_ticket_response', 'auto_message_response',
'auto_response_email', 'recipient', 'group_access', 'department_sign', 'auto_response_email', 'recipient', 'group_access', 'department_sign',
]; ];
public function users()
{
return $this->hasMany(User::class, 'dept_id', 'id');
}
} }

View File

@@ -0,0 +1,16 @@
<?php
namespace App\Model\helpdesk\Agent;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Location extends Model
{
use HasFactory;
protected $primaryKey = 'locationid';
public $incrementing = true;
protected $keyType = 'int';
protected $fillable = ['locationname'];
}

View File

@@ -3,17 +3,46 @@
namespace App\Model\helpdesk\Ticket; namespace App\Model\helpdesk\Ticket;
use App\BaseModel; use App\BaseModel;
use App\Model\helpdesk\Agent\Location;
class Tickets extends BaseModel class Tickets extends BaseModel
{ {
protected $table = 'tickets'; protected $table = 'tickets';
protected $fillable = ['id', 'ticket_number', 'num_sequence', 'user_id', 'priority_id', 'sla', 'help_topic_id', 'max_open_ticket', 'captcha', 'status', 'lock_by', 'lock_at', 'source', 'isoverdue', 'reopened', 'isanswered', 'is_deleted', 'closed', 'is_transfer', 'transfer_at', 'reopened_at', 'duedate', 'closed_at', 'last_message_at', 'last_response_at', 'created_at', 'updated_at', 'assigned_to']; protected $fillable = [
'id',
'ticket_number',
'num_sequence',
'user_id',
'priority_id',
'sla',
'help_topic_id',
'max_open_ticket',
'captcha',
'status',
'lock_by',
'lock_at',
'source',
'isoverdue',
'reopened',
'isanswered',
'is_deleted',
'closed',
'is_transfer',
'transfer_at',
'reopened_at',
'duedate',
'closed_at',
'last_message_at',
'last_response_at',
'created_at',
'updated_at',
'assigned_to',
'locationid' // <-- Thêm locationid vào đây
];
// Các quan hệ cũ...
// public function attach(){
// return $this->hasMany('App\Model\helpdesk\Ticket\Ticket_attachments',);
//
// }
public function thread() public function thread()
{ {
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Thread::class, 'ticket_id'); return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Thread::class, 'ticket_id');
@@ -37,6 +66,12 @@ class Tickets extends BaseModel
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Form_Data::class, 'ticket_id'); return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Form_Data::class, 'ticket_id');
} }
// Thêm quan hệ location mới
public function location()
{
return $this->belongsTo(Location::class, 'locationid', 'locationid');
}
public function extraFields() public function extraFields()
{ {
$id = $this->attributes['id']; $id = $this->attributes['id'];

View File

@@ -8,6 +8,7 @@ use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract; use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract;
use App\Model\helpdesk\Agent\Department;
class User extends Model implements AuthenticatableContract, CanResetPasswordContract, AuthenticatableUserContract class User extends Model implements AuthenticatableContract, CanResetPasswordContract, AuthenticatableUserContract
{ {
@@ -26,10 +27,13 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
* *
* @var array * @var array
*/ */
protected $fillable = ['user_name', 'email', 'password', 'active', 'first_name', 'last_name', 'ban', 'ext', 'mobile', 'profile_pic', protected $fillable = [
'user_name', 'email', 'password', 'active', 'first_name', 'last_name', 'ban', 'ext', 'mobile', 'profile_pic',
'phone_number', 'company', 'agent_sign', 'account_type', 'account_status', 'phone_number', 'company', 'agent_sign', 'account_type', 'account_status',
'assign_group', 'primary_dpt', 'agent_tzone', 'daylight_save', 'limit_access', 'assign_group', 'primary_dpt', 'agent_tzone', 'daylight_save', 'limit_access',
'directory_listing', 'vacation_mode', 'role', 'internal_note', 'country_code', 'not_accept_ticket', 'is_delete', ]; 'directory_listing', 'vacation_mode', 'role', 'internal_note', 'country_code', 'not_accept_ticket', 'is_delete',
'dept_id', // <-- bổ sung trường dept_id vào đây
];
/** /**
* The attributes excluded from the model's JSON form. * The attributes excluded from the model's JSON form.
@@ -175,6 +179,11 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
{ {
return $this->name(); return $this->name();
} }
public function department()
{
// User.dept_id là foreign key, Department.id là primary key
return $this->belongsTo(Department::class, 'dept_id', 'id');
}
public function getFirstNameAttribute($value) public function getFirstNameAttribute($value)
{ {

View File

@@ -101,6 +101,7 @@ return [
*/ */
'key' => env('APP_KEY', 'base64:h3KjrHeVxyE+j6c8whTAs2YI+7goylGZ/e2vElgXT6I='), 'key' => env('APP_KEY', 'base64:h3KjrHeVxyE+j6c8whTAs2YI+7goylGZ/e2vElgXT6I='),
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
'key' => 'base64:MwXqXnQ6V0nvPvN6cKybA2nKFtAyYv9FItYX0ZrB67g=', // dán key thật vào đây
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Logging Configuration | Logging Configuration

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('locations', function (Blueprint $table) {
$table->id('locationid');
$table->string('locationname');
// $table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('locations');
}
};

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('tickets', function (Blueprint $table) {
$table->unsignedBigInteger('locationid')->nullable();
$table->foreign('locationid')->references('locationid')->on('locations')->onDelete('set null');
});
}
public function down()
{
Schema::table('tickets', function (Blueprint $table) {
$table->dropForeign(['locationid']);
$table->dropColumn('locationid');
});
}
};

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->unsignedInteger('dept_id')->nullable()->after('id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('dept_id');
});
}
};

View File

@@ -0,0 +1,25 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Location; // <--- Thêm dòng này
class LocationSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Location::insert([
['locationname' => 'Hà Nội'],
['locationname' => 'Đà Nẵng'],
['locationname' => 'TP. Hồ Chí Minh'],
['locationname' => 'Cần Thơ'],
['locationname' => 'Huế'],
]);
}
}

0
lang/en/datatables.php Executable file → Normal file
View File

0
lang/en/lang.php Executable file → Normal file
View File

0
lang/ru/datatables.php Executable file → Normal file
View File

0
lang/ru/lang.php Executable file → Normal file
View File

0
lang/ru/message.php Executable file → Normal file
View File

0
lang/ru/validation.php Executable file → Normal file
View File

1559
lang/vi/lang.php Normal file

File diff suppressed because it is too large Load Diff

18
lang/vi/pagination.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Trước',
'next' => 'Tiếp &raquo;',
];

22
lang/vi/passwords.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reminder Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'password' => 'Mật khẩu phải chứa ít nhất sáu ký tự để có thể xác nhận.',
'user' => "Chúng tôi không thể tìm thấy người dùng với địa chỉ email này.",
'token' => 'Mã đặt lại mật khẩu này không hợp lệ.',
'sent' => 'Chúng tôi đã gửi liên kết đặt lại mật khẩu qua email cho bạn!',
'reset' => 'Mật khẩu của bạn đã được đặt lại.',
];

102
lang/vi/validation.php Normal file
View File

@@ -0,0 +1,102 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| Các dòng ngôn ngữ sau chứa các thông báo lỗi mặc định được sử dụng bởi
| lớp validator. Một số quy tắc có nhiều phiên bản khác nhau như
| quy tắc kích thước. Bạn có thể tùy chỉnh từng thông báo tại đây.
|
*/
'accepted' => ':attribute phải được chấp nhận.',
'active_url' => ':attribute không phải là một URL hợp lệ.',
'after' => ':attribute phải là ngày sau ngày :date.',
'alpha' => ':attribute chỉ được chứa các chữ cái.',
'alpha_dash' => ':attribute chỉ được chứa các chữ cái, số và dấu gạch ngang.',
'alpha_num' => ':attribute chỉ được chứa các chữ cái và số.',
'array' => ':attribute phải là một mảng.',
'before' => ':attribute phải là ngày trước ngày :date.',
'between' => [
'numeric' => ':attribute phải nằm giữa :min và :max.',
'file' => ':attribute phải nằm giữa :min và :max kilobyte.',
'string' => ':attribute phải nằm giữa :min và :max ký tự.',
'array' => ':attribute phải có từ :min đến :max phần tử.',
],
'boolean' => 'Trường :attribute phải là true hoặc false.',
'confirmed' => 'Xác nhận :attribute không khớp.',
'date' => ':attribute không phải là ngày hợp lệ.',
'date_format' => ':attribute không khớp với định dạng :format.',
'different' => ':attribute và :other phải khác nhau.',
'digits' => ':attribute phải có :digits chữ số.',
'digits_between' => ':attribute phải có từ :min đến :max chữ số.',
'email' => ':attribute phải là một địa chỉ email hợp lệ.',
'filled' => 'Trường :attribute là bắt buộc.',
'exists' => ':attribute đã chọn không hợp lệ.',
'image' => ':attribute phải là một hình ảnh.',
'in' => ':attribute đã chọn không hợp lệ.',
'integer' => ':attribute phải là số nguyên.',
'ip' => ':attribute phải là địa chỉ IP hợp lệ.',
'max' => [
'numeric' => ':attribute không được lớn hơn :max.',
'file' => ':attribute không được lớn hơn :max kilobyte.',
'string' => ':attribute không được lớn hơn :max ký tự.',
'array' => ':attribute không được có nhiều hơn :max phần tử.',
],
'mimes' => ':attribute phải là tệp có định dạng: :values.',
'min' => [
'numeric' => ':attribute phải ít nhất là :min.',
'file' => ':attribute phải ít nhất là :min kilobyte.',
'string' => ':attribute phải ít nhất là :min ký tự.',
'array' => ':attribute phải có ít nhất :min phần tử.',
],
'not_in' => ':attribute đã chọn không hợp lệ.',
'numeric' => ':attribute phải là một số.',
'regex' => 'Định dạng của :attribute không hợp lệ.',
'required' => 'Trường :attribute là bắt buộc.',
'required_if' => 'Trường :attribute là bắt buộc khi :other là :value.',
'required_with' => 'Trường :attribute là bắt buộc khi :values có mặt.',
'required_with_all' => 'Trường :attribute là bắt buộc khi tất cả :values có mặt.',
'required_without' => 'Trường :attribute là bắt buộc khi :values không có mặt.',
'required_without_all' => 'Trường :attribute là bắt buộc khi không có :values nào có mặt.',
'same' => 'Trường :attribute và :other phải khớp nhau.',
'size' => [
'numeric' => ':attribute phải có kích thước bằng :size.',
'file' => ':attribute phải có kích thước bằng :size kilobyte.',
'string' => ':attribute phải có độ dài bằng :size ký tự.',
'array' => ':attribute phải chứa :size phần tử.',
],
'unique' => ':attribute đã được sử dụng.',
'url' => 'Định dạng của :attribute không hợp lệ.',
'timezone' => ':attribute phải là một múi giờ hợp lệ.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Bạn có thể chỉ định các thông báo tùy chỉnh cho các thuộc tính bằng cách sử dụng
| quy ước "attribute.rule" để đặt tên dòng. Việc này giúp bạn nhanh chóng
| chỉ định thông báo tùy chỉnh cho một quy tắc cụ thể.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| Các dòng ngôn ngữ sau được sử dụng để thay thế các ký hiệu thuộc tính
| bằng các tên dễ đọc hơn như Địa chỉ Email thay vì "email". Việc này giúp
| các thông báo trở nên dễ hiểu hơn.
|
*/
'attributes' => [],
];

0
phpunit.xml Executable file → Normal file
View File

0
phpunit.xml.bak Executable file → Normal file
View File

0
public/lb-faveo/css/bootstrap5.min.css vendored Executable file → Normal file
View File

0
public/lb-faveo/css/custom.css vendored Executable file → Normal file
View File

0
resources/views/auth/login.blade.php Executable file → Normal file
View File

View File

View File

@@ -1,19 +1,19 @@
@extends('themes.default1.agent.layout.agent') @extends('themes.default1.agent.layout.agent')
@section('Tickets') @section('Tickets')
class="nav-link active" class="nav-link active"
@stop @stop
@section('ticket-bar') @section('ticket-bar')
active active
@stop @stop
@section('newticket') @section('newticket')
class="nav-link active" class="nav-link active"
@stop @stop
@section('ticket') @section('ticket')
class="active" class="active"
@stop @stop
<style> <style>
.clear-input { .clear-input {
@@ -26,60 +26,60 @@ class="active"
} }
</style> </style>
@section('PageHeader') @section('PageHeader')
<h1>{{Lang::get('lang.tickets')}}</h1> <h1>{{ Lang::get('lang.tickets') }}</h1>
@stop @stop
@section('content') @section('content')
<!-- Main content --> <!-- Main content -->
{!! Form::open(['route'=>'post.newticket','method'=>'post','id'=>'form']) !!} {!! Form::open(['route' => 'post.newticket', 'method' => 'post', 'id' => 'form']) !!}
@if(Session::has('success')) @if (Session::has('success'))
<div class="alert alert-success alert-dismissable"> <div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i> <i class="fas fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}} {{ Session::get('success') }}
</div> </div>
@endif @endif
<!-- failure message --> <!-- failure message -->
@if(Session::has('fails')) @if (Session::has('fails'))
<div class="alert alert-danger alert-dismissable"> <div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i> <i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b> <b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}} {{ Session::get('fails') }}
</div> </div>
@endif @endif
@if(Session::has('errors')) @if (Session::has('errors'))
<div class="alert alert-danger alert-dismissable"> <div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i> <i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b> <b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/> <br />
@if($errors->first('email')) @if ($errors->first('email'))
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li> <li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
@endif @endif
@if($errors->first('first_name')) @if ($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li> <li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
@endif @endif
@if($errors->first('phone')) @if ($errors->first('phone'))
<li class="error-message-padding">{!! $errors->first('phone', ':message') !!}</li> <li class="error-message-padding">{!! $errors->first('phone', ':message') !!}</li>
@endif @endif
@if($errors->first('subject')) @if ($errors->first('subject'))
<li class="error-message-padding">{!! $errors->first('subject', ':message') !!}</li> <li class="error-message-padding">{!! $errors->first('subject', ':message') !!}</li>
@endif @endif
@if($errors->first('body')) @if ($errors->first('body'))
<li class="error-message-padding">{!! $errors->first('body', ':message') !!}</li> <li class="error-message-padding">{!! $errors->first('body', ':message') !!}</li>
@endif @endif
@if($errors->first('code')) @if ($errors->first('code'))
<li class="error-message-padding">{!! $errors->first('code', ':message') !!}</li> <li class="error-message-padding">{!! $errors->first('code', ':message') !!}</li>
@endif @endif
@if($errors->first('mobile')) @if ($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li> <li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif @endif
</div> </div>
@endif @endif
<div class="card card-light"> <div class="card card-light">
<div class="card-header" id='box-header1'> <div class="card-header" id='box-header1'>
<h3 class="card-title">{!! Lang::get('lang.create_ticket') !!}</h3> <h3 class="card-title">{!! Lang::get('lang.create_ticket') !!}</h3>
@@ -100,20 +100,20 @@ class="active"
<div class="col-md-4"> <div class="col-md-4">
<!-- email --> <!-- email -->
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}"> <div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!} {!! Form::label('email', Lang::get('lang.email')) !!}
@if ($email_mandatory->status == 1) @if ($email_mandatory->status == 1)
<span class="text-red"> *</span> <span class="text-red"> *</span>
@endif @endif
{!! Form::text('email',null,['class' => 'form-control', 'id' => 'email']) !!} {!! Form::text('email', null, ['class' => 'form-control', 'id' => 'email']) !!}
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<!-- email --> <!-- email -->
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}"> <div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.first_name')) !!} <span class="text-red"> *</span> {!! Form::label('email', Lang::get('lang.first_name')) !!} <span class="text-red"> *</span>
<!-- {!! Form::text('email',null,['class' => 'form-control'],['id' => 'email']) !!} --> <!-- {!! Form::text('email', null, ['class' => 'form-control'], ['id' => 'email']) !!} -->
<input type="text" name="first_name" id="first_name" class="form-control"> <input type="text" name="first_name" id="first_name" class="form-control">
</div> </div>
</div> </div>
@@ -121,7 +121,7 @@ class="active"
<div class="col-md-4"> <div class="col-md-4">
<!-- full name --> <!-- full name -->
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}"> <div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('fullname',Lang::get('lang.last_name')) !!} <span class="text-red"></span> {!! Form::label('fullname', Lang::get('lang.last_name')) !!} <span class="text-red"></span>
<input type="text" name="last_name" id="last_name" class="form-control"> <input type="text" name="last_name" id="last_name" class="form-control">
</div> </div>
</div> </div>
@@ -129,12 +129,17 @@ class="active"
<div class="row"> <div class="row">
<div class="col-md-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}"> <div class="col-md-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
<div class="form-group {{ $errors->has('code') ? 'has-error' : '' }}"> <div class="form-group {{ $errors->has('code') ? 'has-error' : '' }}">
{!! Form::label('code',Lang::get('lang.country-code')) !!} {!! Form::label('code', Lang::get('lang.country-code')) !!}
@if ($email_mandatory->status == 0 || $settings->status == 1) @if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span> <span class="text-red"> *</span>
@endif @endif
{!! Form::text('code',null,['class' => 'form-control', 'id' => 'country_code', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!} {!! Form::text('code', null, [
'class' => 'form-control',
'id' => 'country_code',
'placeholder' => $phonecode,
'title' => Lang::get('lang.enter-country-phone-code'),
]) !!}
</div> </div>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
@@ -144,14 +149,14 @@ class="active"
@if ($email_mandatory->status == 0 || $settings->status == 1) @if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span> <span class="text-red"> *</span>
@endif @endif
{!! Form::input('number','mobile',null,['class' => 'form-control', 'id' => 'mobile']) !!} {!! Form::input('number', 'mobile', null, ['class' => 'form-control', 'id' => 'mobile']) !!}
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<!-- phone --> <!-- phone -->
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}"> <div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
<label>{!! Lang::get('lang.phone') !!}:</label> <label>{!! Lang::get('lang.phone') !!}:</label>
{!! Form::input('number','phone',null,['class' => 'form-control', 'id' => 'phone_number']) !!} {!! Form::input('number', 'phone', null, ['class' => 'form-control', 'id' => 'phone_number']) !!}
{!! $errors->first('phone', '<spam class="help-block text-red">:message</spam>') !!} {!! $errors->first('phone', '<spam class="help-block text-red">:message</spam>') !!}
</div> </div>
</div> </div>
@@ -185,7 +190,10 @@ class="active"
<label>{!! Lang::get('lang.help_topic') !!}:</label> <label>{!! Lang::get('lang.help_topic') !!}:</label>
<!-- helptopic --> <!-- helptopic -->
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->select('topic', 'id')->get(); ?> <?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->select('topic', 'id')->get(); ?>
{!! Form::select('helptopic', ['Helptopic'=>$helptopic->pluck('topic','id')->toArray()],null,['class' => 'form-control select','id'=>'selectid']) !!} {!! Form::select('helptopic', ['Helptopic' => $helptopic->pluck('topic', 'id')->toArray()], null, [
'class' => 'form-control select',
'id' => 'selectid',
]) !!}
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
@@ -193,15 +201,18 @@ class="active"
<div class="form-group"> <div class="form-group">
<label>{!! Lang::get('lang.sla_plan') !!}:</label> <label>{!! Lang::get('lang.sla_plan') !!}:</label>
<?php $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('status', '=', 1)->select('grace_period', 'id')->get(); ?> <?php $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('status', '=', 1)->select('grace_period', 'id')->get(); ?>
{!! Form::select('sla', ['SLA'=>$sla_plan->pluck('grace_period','id')->toArray()],null,['class' => 'form-control select']) !!} {!! Form::select('sla', ['SLA' => $sla_plan->pluck('grace_period', 'id')->toArray()], null, [
'class' => 'form-control select',
]) !!}
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<!-- due date --> <!-- due date -->
<div class="form-group" id="duedate"> <div class="form-group" id="duedate">
<label>{!! Lang::get('lang.due_date') !!}:</label> <label>{!! Lang::get('lang.due_date') !!}:</label>
{!! Form::text('duedate',null,['class' => 'form-control','id'=>'datemask']) !!} {!! Form::text('duedate', null, ['class' => 'form-control', 'id' => 'datemask']) !!}
<button class="btn clear-input" id="duedates" style="display: none" type="button"><i class="fas fa-times"></i></button> <button class="btn clear-input" id="duedates" style="display: none" type="button"><i
class="fas fa-times"></i></button>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
@@ -209,7 +220,12 @@ class="active"
<div class="form-group"> <div class="form-group">
<label>{!! Lang::get('lang.assign_to') !!}:</label> <label>{!! Lang::get('lang.assign_to') !!}:</label>
<?php $agents = App\User::where('role', '!=', 'user')->where('active', '=', 1)->get(); ?> <?php $agents = App\User::where('role', '!=', 'user')->where('active', '=', 1)->get(); ?>
{!! Form::select('assignto', [''=>'Select an Agent','Agents'=>$agents->pluck('first_name','id')->toArray()],null,['class' => 'form-control select']) !!} {!! Form::select(
'assignto',
['' => 'Select an Agent', 'Agents' => $agents->pluck('first_name', 'id')->toArray()],
null,
['class' => 'form-control select'],
) !!}
</div> </div>
</div> </div>
<div id="response" class="col-md-6 form-group"></div> <div id="response" class="col-md-6 form-group"></div>
@@ -238,10 +254,27 @@ class="active"
<label>{!! Lang::get('lang.subject') !!}:<span class="text-red"> *</span></label> <label>{!! Lang::get('lang.subject') !!}:<span class="text-red"> *</span></label>
</div> </div>
<div class="col-md-11"> <div class="col-md-11">
{!! Form::text('subject',null,['class' => 'form-control']) !!} {!! Form::text('subject', null, ['class' => 'form-control']) !!}
</div> </div>
</div> </div>
</div> </div>
<div class="form-group row">
<div class="col-md-1">
<label for="location">Vị trí:</label>
</div>
<div class="col-md-7">
<select name="location" class="form-control">
<option value="">-- Chọn vị trí --</option>
@foreach ($locations as $loc)
<option value="{{ $loc->id }}"
{{ old('location') == $loc->id ? 'selected' : '' }}>
{{ $loc->locationname }}
</option>
@endforeach
</select>
</div>
</div>
<div class="form-group {{ $errors->has('body') ? 'has-error' : '' }}"> <div class="form-group {{ $errors->has('body') ? 'has-error' : '' }}">
<!-- details --> <!-- details -->
<div class="row"> <div class="row">
@@ -249,7 +282,11 @@ class="active"
<label>{!! Lang::get('lang.detail') !!}:<span class="text-red"> *</span></label> <label>{!! Lang::get('lang.detail') !!}:<span class="text-red"> *</span></label>
</div> </div>
<div class="col-md-11"> <div class="col-md-11">
{!! Form::textarea('body',null,['class' => 'form-control','id' => 'body', 'style'=>"width:100%; height:150px;"]) !!} {!! Form::textarea('body', null, [
'class' => 'form-control',
'id' => 'body',
'style' => 'width:100%; height:150px;',
]) !!}
</div> </div>
</div> </div>
@@ -261,12 +298,18 @@ class="active"
<label>{!! Lang::get('lang.priority') !!}:</label> <label>{!! Lang::get('lang.priority') !!}:</label>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status','=',1)->get(); ?> <?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', '=', 1)->get(); ?>
{!! Form::select('priority', [Lang::get('lang.priorities')=>$Priority->pluck('priority_desc','priority_id')->toArray()],null,['class' => 'form-control select']) !!} {!! Form::select(
'priority',
[Lang::get('lang.priorities') => $Priority->pluck('priority_desc', 'priority_id')->toArray()],
null,
['class' => 'form-control select'],
) !!}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -275,36 +318,40 @@ class="active"
<div class="card-footer"> <div class="card-footer">
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<input type="submit" value="{!! Lang::get('lang.create_ticket') !!}" class="btn btn-primary" onclick="this.disabled=true;this.value='Sending, please wait...';this.form.submit();"> <input type="submit" value="{!! Lang::get('lang.create_ticket') !!}" class="btn btn-primary"
onclick="this.disabled=true;this.value='Sending, please wait...';this.form.submit();">
</div> </div>
</div> </div>
</div> </div>
</div><!-- /. box --> </div><!-- /. box -->
{!! Form::close() !!} {!! Form::close() !!}
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function() {
var helpTopic = $("#selectid").val(); var helpTopic = $("#selectid").val();
send(helpTopic); send(helpTopic);
$("#selectid").on("change", function () { $("#selectid").on("change", function() {
helpTopic = $("#selectid").val(); helpTopic = $("#selectid").val();
send(helpTopic); send(helpTopic);
}); });
function send(helpTopic) { function send(helpTopic) {
$.ajax({ $.ajax({
url: "{{url('/get-helptopic-form')}}", url: "{{ url('/get-helptopic-form') }}",
data: {'helptopic': helpTopic}, data: {
'helptopic': helpTopic
},
type: "GET", type: "GET",
dataType: "html", dataType: "html",
success: function (response) { success: function(response) {
$("#response").html(response); $("#response").html(response);
}, },
error: function (response) { error: function(response) {
$("#response").html(response); $("#response").html(response);
} }
}); });
} }
}); });
$(function () { $(function() {
$("textarea").summernote({ $("textarea").summernote({
height: 300, height: 300,
tabsize: 2, tabsize: 2,
@@ -319,8 +366,8 @@ class="active"
}); });
}); });
$(document).ready(function () { $(document).ready(function() {
$('#form').submit(function () { $('#form').submit(function() {
var duedate = document.getElementById('datemask').value; var duedate = document.getElementById('datemask').value;
if (duedate) { if (duedate) {
var pattern = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/; var pattern = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;
@@ -330,39 +377,41 @@ class="active"
} else { } else {
$('#duedate').addClass("has-error"); $('#duedate').addClass("has-error");
$('#clear-up').remove(); $('#clear-up').remove();
$('#box-header1').append("<div id='clear-up'><br><br><div class='alert alert-danger alert-dismissable'><i class='fa fa-ban'></i><button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button> Invalid Due date</div></div>"); $('#box-header1').append(
"<div id='clear-up'><br><br><div class='alert alert-danger alert-dismissable'><i class='fa fa-ban'></i><button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button> Invalid Due date</div></div>"
);
return false; return false;
} }
} }
}); });
}); });
$(document).ready(function(){ $(document).ready(function() {
$("#email").autocomplete({ $("#email").autocomplete({
source:"{!!URL::route('post.newticket.autofill')!!}", source: "{!! URL::route('post.newticket.autofill') !!}",
minLength:1, minLength: 1,
select:function(evt, ui) { select: function(evt, ui) {
// this.form.phone_number.value = ui.item.phone_number; // this.form.phone_number.value = ui.item.phone_number;
// this.form.user_name.value = ui.item.user_name; // this.form.user_name.value = ui.item.user_name;
if(ui.item.first_name) { if (ui.item.first_name) {
this.form.first_name.value = ui.item.first_name; this.form.first_name.value = ui.item.first_name;
} }
if(ui.item.last_name) { if (ui.item.last_name) {
this.form.last_name.value = ui.item.last_name; this.form.last_name.value = ui.item.last_name;
} }
if(ui.item.country_code) { if (ui.item.country_code) {
this.form.country_code.value = ui.item.country_code; this.form.country_code.value = ui.item.country_code;
} }
if(ui.item.phone_number) { if (ui.item.phone_number) {
this.form.phone_number.value = ui.item.phone_number; this.form.phone_number.value = ui.item.phone_number;
} }
if(ui.item.mobile) { if (ui.item.mobile) {
this.form.mobile.value = ui.item.mobile; this.form.mobile.value = ui.item.mobile;
} }
} }
}); });
}); });
$(function () { $(function() {
var picker = $('#datemask').datetimepicker({ var picker = $('#datemask').datetimepicker({
format: 'DD/MM/YYYY', format: 'DD/MM/YYYY',
}); });
@@ -380,9 +429,6 @@ class="active"
}); });
}); });
</script> </script>
@stop @stop

File diff suppressed because it is too large Load Diff

View File

@@ -33,7 +33,7 @@ class="nav-link active"
{{Session::get('fails')}} {{Session::get('fails')}}
</div> </div>
@endif @endif
gfggggdgd
@if(Session::has('errors')) @if(Session::has('errors'))
<div class="alert alert-danger alert-dismissable"> <div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i> <i class="fas fa-ban"></i>

View File

@@ -101,17 +101,17 @@ class="nav-link active"
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<!-- email address --> <label for="dept_id">Phòng ban</label>
{!! Form::label('email',Lang::get('lang.email_address')) !!} <select class="form-control" name="dept_id" id="dept_id" required>
<div> <option value="">-- Chọn phòng ban --</option>
{{$user->email}} @foreach ($departments as $department)
</div> <option value="{{ $department->id }}"
</div> {{ $user->dept_id == $department->id ? 'selected' : '' }}>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}"> {{ $department->name }}
<!-- company --> </option>
{!! Form::label('company',Lang::get('lang.company')) !!} @endforeach
{!! Form::text('company',null,['class' => 'form-control']) !!} </select>
</div> </div>
<div class="row"> <div class="row">
<!-- phone extension --> <!-- phone extension -->
<div class="col-sm-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}"> <div class="col-sm-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">

View File

@@ -94,6 +94,12 @@ class="active"
<div class="form-group row"> <div class="form-group row">
<div class='col-sm-4'><label>{!! Lang::get('lang.company') !!}:</label></div> <div class='col-sm-7'> {{ $user->company }}</div> <div class='col-sm-4'><label>{!! Lang::get('lang.company') !!}:</label></div> <div class='col-sm-7'> {{ $user->company }}</div>
</div> </div>
<div class="form-group row">
<div class='col-sm-4'><label>{!! Lang::get('lang.department') !!}:</label></div>
<div class='col-sm-7'>
{{ $user->department ? $user->department->name : '-' }}
</div>
</div>
<div class="form-group row"> <div class="form-group row">
<div class='col-sm-4'><label>{!! Lang::get('lang.role') !!}:</label></div> <div class='col-sm-7'> {{ $user->role }}</div> <div class='col-sm-4'><label>{!! Lang::get('lang.role') !!}:</label></div> <div class='col-sm-7'> {{ $user->role }}</div>
</div> </div>

View File

View File

View File

@@ -3,7 +3,8 @@
<style> <style>
.words { .words {
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */ margin-right: 10px;
/* Adjust the value to increase or decrease the gap between list items */
} }
</style> </style>
@@ -11,26 +12,26 @@
<li class="breadcrumb-item "> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : &nbsp;</li> <li class="breadcrumb-item "> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : &nbsp;</li>
<li><a class="words" href="{!! URL::route('ticket') !!}">{!! Lang::get('lang.my_tickets') !!}</a></li> <li><a class="words" href="{!! URL::route('ticket') !!}">{!! Lang::get('lang.my_tickets') !!}</a></li>
<li class="words"> > </li> <li class="words"> > </li>
<li><a class="words" href="{{url('#')}}">{!! Lang::get('lang.check_ticket') !!}</a></li> <li><a class="words" href="{{ url('#') }}">{!! Lang::get('lang.check_ticket') !!}</a></li>
</ol> </ol>
@stop @stop
@section('content') @section('content')
<?php <?php
$tickets = App\Model\helpdesk\Ticket\Tickets::where('id', '=', \Crypt::decrypt($id))->first(); $tickets = App\Model\helpdesk\Ticket\Tickets::where('id', '=', \Crypt::decrypt($id))->first();
$thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Crypt::decrypt($id))->first(); $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Crypt::decrypt($id))->first();
//$user = App\User::where('id','=',$id1)->first(); //$user = App\User::where('id','=',$id1)->first();
?> ?>
<!-- Main content --> <!-- Main content -->
<div id="alert11" class="alert alert-dismissable alert-success" style="display: none;" role="aler"> <div id="alert11" class="alert alert-dismissable alert-success" style="display: none;" role="aler">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<span id="message-success1" ></span> <span id="message-success1"></span>
</div> </div>
<style type="text/css"> <style type="text/css">
.caret { .caret {
border-left: 4px solid transparent; border-left: 4px solid transparent;
border-right: 4px solid transparent; border-right: 4px solid transparent;
@@ -42,28 +43,64 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
width: 0; width: 0;
} }
.mailbox-attachments li{float:left;width:200px;border:1px solid #eee;margin-bottom:10px;margin-right:10px} .mailbox-attachments li {
float: left;
width: 200px;
border: 1px solid #eee;
margin-bottom: 10px;
margin-right: 10px
}
.mailbox-attachment-name{font-weight:bold;color:#666;word-break: break-word;} .mailbox-attachment-name {
font-weight: bold;
color: #666;
word-break: break-word;
}
.mailbox-attachment-icon,.mailbox-attachment-info,.mailbox-attachment-size{display:block} .mailbox-attachment-icon,
.mailbox-attachment-info,
.mailbox-attachment-size {
display: block
}
.mailbox-attachment-info{padding:10px;background:#f4f4f4;height: auto;} .mailbox-attachment-info {
padding: 10px;
background: #f4f4f4;
height: auto;
}
.mailbox-attachment-size{color:#999;font-size:12px} .mailbox-attachment-size {
color: #999;
font-size: 12px
}
.mailbox-attachment-icon{text-align:center;font-size:65px;color:#666;padding:20px 10px} .mailbox-attachment-icon {
text-align: center;
font-size: 65px;
color: #666;
padding: 20px 10px
}
.mailbox-attachment-icon.has-img{padding:0} .mailbox-attachment-icon.has-img {
padding: 0
}
.mailbox-attachment-icon.has-img>img{max-width:100%;height:auto} .mailbox-attachment-icon.has-img>img {
max-width: 100%;
height: auto
}
#clearfix {display: inline-block!important;list-style-type: none!important;} #clearfix {
display: inline-block !important;
list-style-type: none !important;
}
.ml40 {margin-left: -40px!important;} .ml40 {
</style> margin-left: -40px !important;
}
</style>
<div id="content" class="site-content col-sm-12"> <div id="content" class="site-content col-sm-12">
<article class="hentry"> <article class="hentry">
@@ -73,19 +110,19 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<div class="col-sm-9"> <div class="col-sm-9">
<h3 class="entry-title"><i class="fas fa-ticket-alt"> </i> {{$thread->title}} <h3 class="entry-title"><i class="fas fa-ticket-alt"> </i> {{ $thread->title }}
<small> ( {{$tickets->ticket_number}} ) </small> <small> ( {{ $tickets->ticket_number }} ) </small>
</h3> </h3>
</div> </div>
<div class="col-sm-3 text-right"> <div class="col-sm-3 text-right">
@if( $common_setting->status == '1') @if ($common_setting->status == '1')
<div> <div>
<button class="btn btn-light dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false" style="background-color: whitesmoke"> <button class="btn btn-light dropdown-toggle" type="button" id="dropdownMenuButton"
data-bs-toggle="dropdown" aria-expanded="false" style="background-color: whitesmoke">
<i class="fas fa-exchange-alt" style="color:teal;"> </i> <i class="fas fa-exchange-alt" style="color:teal;"> </i>
@@ -128,9 +165,8 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<?php $ratings = App\Model\helpdesk\Ratings\Rating::orderby('display_order')->get(); ?> <?php $ratings = App\Model\helpdesk\Ratings\Rating::orderby('display_order')->get(); ?>
<form id="foo"> <form id="foo">
{!! csrf_field() !!} {!! csrf_field() !!}
@foreach($ratings as $rating) @foreach ($ratings as $rating)
@if ($rating->rating_area == 'Helpdesk Area')
@if($rating->rating_area == 'Helpdesk Area')
<?php <?php
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('ticket_id', '=', $tickets->id)->first(); $rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('ticket_id', '=', $tickets->id)->first();
if ($rating_value == null) { if ($rating_value == null) {
@@ -142,12 +178,16 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<tr> <tr>
<th><div class="ticketratingtitle">{!! $rating->name !!} &nbsp;</div></th>&nbsp <th>
<div class="ticketratingtitle">{!! $rating->name !!} &nbsp;</div>
</th>&nbsp
<td> <td>
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?> <?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
<input type="radio" class="star" id="star5" name="{!! $rating->name !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> /> <input type="radio" class="star" id="star5"
name="{!! $rating->name !!}"
value="{!! $i !!}"<?php echo $ratingval == $i ? 'checked' : ''; ?> />
<?php } ?> <?php } ?>
</td> </td>
</tr> </tr>
@@ -165,7 +205,8 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<div class="col-md-12 offset-md-5" id="loader" style="display:none;"> <div class="col-md-12 offset-md-5" id="loader" style="display:none;">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> <img
src="{{ asset('lb-faveo/media/images/gifloader.gif') }}"><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</div> </div>
<div id="refresh"> <div id="refresh">
@@ -180,7 +221,7 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
$sla = $tickets->sla; $sla = $tickets->sla;
$SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $sla)->first(); $SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $sla)->first();
?> ?>
<b>{!! Lang::get('lang.sla_plan') !!}: {{$SlaPlan->grace_period}} </b> <b>{!! Lang::get('lang.sla_plan') !!}: {{ $SlaPlan->grace_period }} </b>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<b>{!! Lang::get('lang.created_date') !!}: </b> {{ UTC::usertimezone($tickets->created_at) }} <b>{!! Lang::get('lang.created_date') !!}: </b> {{ UTC::usertimezone($tickets->created_at) }}
@@ -196,10 +237,10 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->get(); ?> <?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->get(); ?>
@foreach($response as $last) @foreach ($response as $last)
<?php $ResponseDate = $last->created_at; ?> <?php $ResponseDate = $last->created_at; ?>
@endforeach @endforeach
<b>{!! Lang::get('lang.last_response') !!}: </b> {{ UTC::usertimezone($ResponseDate)}} <b>{!! Lang::get('lang.last_response') !!}: </b> {{ UTC::usertimezone($ResponseDate) }}
</div> </div>
</div> </div>
</div> </div>
@@ -217,18 +258,12 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?> <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
@if($status->id == 1) @if ($status->id == 1)
<td title="{{ $status->properties }}" style="color:orange">{{ $status->name }}</td>
<td title="{{$status->properties}}" style="color:orange">{{$status->name}}</td>
@elseif($status->id == 2) @elseif($status->id == 2)
<td title="{{ $status->properties }}" style="color:green">{{ $status->name }}</td>
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td>
@elseif($status->id == 3) @elseif($status->id == 3)
<td title="{{ $status->properties }}" style="color:green">{{ $status->name }}</td>
<td title="{{$status->properties}}" style="color:green">{{$status->name}}</td>
@endif @endif
</tr> </tr>
@@ -238,18 +273,15 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
@if($priority->priority_id == 1) @if ($priority->priority_id == 1)
<td title="{{ $priority->priority_desc }}" style="color:green">
<td title="{{$priority->priority_desc}}" style="color:green">{{$priority->priority_desc}}</td> {{ $priority->priority_desc }}</td>
@elseif($priority->priority_id == 2) @elseif($priority->priority_id == 2)
<td title="{{ $priority->priority_desc }}" style="color:orange">
<td title="{{$priority->priority_desc}}" style="color:orange">{{$priority->priority_desc}}</td> {{ $priority->priority_desc }}</td>
@elseif($priority->priority_id == 3) @elseif($priority->priority_id == 3)
<td title="{{ $priority->priority_desc }}" style="color:red">
<td title="{{$priority->priority_desc}}" style="color:red">{{$priority->priority_desc}}</td> {{ $priority->priority_desc }}</td>
@endif @endif
</tr> </tr>
@@ -259,8 +291,10 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<?php <?php
$help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first();
$department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first(); $department = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first();
$location = $tickets->location;
?> ?>
<td title="{{ $department->name }}">{!! $department->name !!}</td> <td title="{{ $department->name }}">{!! $department->name !!}</td>
</tr> </tr>
</table> </table>
</div> </div>
@@ -275,19 +309,24 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?>
<td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td> <td title="{{ $help_topic->topic }}">{{ $help_topic->topic }}</td>
</tr> </tr>
<tr> <tr>
<td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td><b>{!! Lang::get('lang.last_message') !!}:</b></td>
<td>{{ucwords($last->poster)}}</td> <td>{{ ucwords($last->poster) }}</td>
</tr>
<tr>
<td><b>Địa điểm:</b></td>
<td title="{{ $location->locationname }}">{!! $location->locationname !!}</td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
<div class="comments-area mb-0" id="comments"> <div class="comments-area mb-0" id="comments">
<?php <?php
@@ -299,32 +338,35 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
$body = $conversation->thread($conversation->body); $body = $conversation->thread($conversation->body);
?> ?>
<ol class="comment-list" > <ol class="comment-list">
<li class="comment"> <li class="comment">
<article class="comment-body"> <article class="comment-body">
<footer class="comment-meta" <footer class="comment-meta" <?php if ($role->role == "user") { ?>
<?php if ($role->role == "user") { ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?> style="background-color:#FFFCB3" <?php } ?> style="background-color: hsla(100, 100%, 51%, 0.15)" <?php } else { ?>
> style="background-color:#FFFCB3" <?php } ?>>
<div class="comment-author"> <div class="comment-author">
<img src="{{$role->profile_pic}}"alt="" height="50" width="50" class="avatar" <img src="{{ $role->profile_pic }}"alt="" height="50" width="50"
<?php if ($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;" <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;" <?php } ?> class="avatar" <?php if ($role->role == "user") { ?>style="box-shadow: 0 1px 3px #00FF26;"
> <?php } else { ?> style="box-shadow: 0 1px 3px #FFEC00;"
@if($role->role == "user") <?php } ?>>
<b class="fn"><a href="#" rel="external" class="url">{{$role->user_name}}</a></b> @if ($role->role == 'user')
<b class="fn"><a href="#" rel="external"
class="url">{{ $role->user_name }}</a></b>
@else @else
<b class="fn"><a href="#" rel="external" class="url">{{$role->first_name." ".$role->last_name}}</a></b> <b class="fn"><a href="#" rel="external"
class="url">{{ $role->first_name . ' ' . $role->last_name }}</a></b>
<div class="ticketratings float-right" style="margin-top: -12px;"> <div class="ticketratings float-right" style="margin-top: -12px;">
<table> <table>
<tbody> <tbody>
@foreach($ratings as $rating) @foreach ($ratings as $rating)
@if($rating->rating_area == 'Comment Area') @if ($rating->rating_area == 'Comment Area')
<?php <?php
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('thread_id', '=', $conversation->id)->first(); $rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('thread_id', '=', $conversation->id)->first();
if ($rating_value == null) { if ($rating_value == null) {
@@ -336,11 +378,17 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<form class="foo2"> <form class="foo2">
{{ csrf_field() }} {{ csrf_field() }}
<tr> <tr>
<th><div class="ticketratingtitle">{!! $rating->name !!} &nbsp;</div></th>&nbsp; <th>
<div class="ticketratingtitle">
{!! $rating->name !!} &nbsp;</div>
</th>&nbsp;
<td> <td>
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?> <?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
<input type="radio" class="star" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> /> <input type="radio" class="star"
id="star5"
name="{!! $rating->name !!},{!! $conversation->id !!}"
value="{!! $i !!}"<?php echo $ratingval == $i ? 'checked' : ''; ?> />
<?php } ?> <?php } ?>
</td> </td>
</tr> </tr>
@@ -357,30 +405,34 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<small class="date text-muted"> <small class="date text-muted">
<time datetime="2013-10-23T01:50:50+00:00"><i class="fa fa-clock-o"> </i> {{ UTC::usertimezone($conversation->created_at) }}</time> <time datetime="2013-10-23T01:50:50+00:00"><i class="fa fa-clock-o"> </i>
{{ UTC::usertimezone($conversation->created_at) }}</time>
</small> </small>
</div><!-- .comment-metadata --> </div><!-- .comment-metadata -->
</footer><!-- .comment-meta --> </footer><!-- .comment-meta -->
<div class="comment-content"> <div class="comment-content">
@if($conversation->firstContent()=='yes') @if ($conversation->firstContent() == 'yes')
<div class="embed-responsive{{$conversation->id}} embed-responsive-16by9"> <div class="embed-responsive{{ $conversation->id }} embed-responsive-16by9">
<div class="reply">{!! $conversation->purify(true) !!}</div> <div class="reply">{!! $conversation->purify(true) !!}</div>
</div> </div>
<script> <script>
setTimeout(function(){ setTimeout(function() {
var $iframe = "Id{{$conversation->id}}"; var $iframe = "Id{{ $conversation->id }}";
$('<iframe src="about:blank" id='+$iframe+' class="iframe" frameborder="0" scrolling="no" width="100%" style="height:1px"></iframe>').appendTo(".embed-responsive{{$conversation->id}}"); $('<iframe src="about:blank" id=' + $iframe +
setTimeout(function(){ ' class="iframe" frameborder="0" scrolling="no" width="100%" style="height:1px"></iframe>')
$('#'+$iframe).contents().find('body').append('<style>body{display:inline-block;}</style>'); .appendTo(".embed-responsive{{ $conversation->id }}");
setTimeout(function() {
$('#' + $iframe).contents().find('body').append(
'<style>body{display:inline-block;}</style>');
}, 100); }, 100);
setTimeout(function(){ setTimeout(function() {
var frameid = document.getElementById($iframe); var frameid = document.getElementById($iframe);
if(parseInt($("#"+$iframe).contents().find('img').css('width'))>700){ if (parseInt($("#" + $iframe).contents().find('img').css('width')) > 700) {
$("#"+$iframe).contents().find('img').css('width','96%'); $("#" + $iframe).contents().find('img').css('width', '96%');
} }
frameid.contentWindow.document.body.style.width="100%"; frameid.contentWindow.document.body.style.width = "100%";
var iframe_height = frameid.contentWindow.document.body.scrollHeight; var iframe_height = frameid.contentWindow.document.body.scrollHeight;
frameid.style.height = iframe_height + "px"; frameid.style.height = iframe_height + "px";
}, 1000); }, 1000);
@@ -391,15 +443,15 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
@endif @endif
@if($conversation->id == $ij->id) @if ($conversation->id == $ij->id)
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?> <?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?>
@if(isset($ticket_form_datas)) @if (isset($ticket_form_datas))
<br/> <br />
<table class="table"> <table class="table">
<tbody> <tbody>
@foreach($ticket_form_datas as $ticket_form_data) @foreach ($ticket_form_datas as $ticket_form_data)
<tr> <tr>
<td style="width: 30%">{!! $ticket_form_data->getFieldKeyLabel() !!}</td> <td style="width: 30%">{!! $ticket_form_data->getFieldKeyLabel() !!}</td>
<td>{!! removeUnderscore($ticket_form_data->content) !!}</td> <td>{!! removeUnderscore($ticket_form_data->content) !!}</td>
@@ -410,12 +462,12 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
@endif @endif
@endif @endif
</div><!-- .comment-content --> </div><!-- .comment-content -->
<br/><br/> <br /><br />
<div class="timeline-footer"> <div class="timeline-footer">
@if(!$conversation->is_internal) @if (!$conversation->is_internal)
@if($conversation->user_id != null) @if ($conversation->user_id != null)
<?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\Timeline($conversation, $role, $user)); ?> <?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\Timeline($conversation, $role, $user)); ?>
@endif @endif
@endif @endif
@@ -428,7 +480,7 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
} }
} }
if ($i > 0) { if ($i > 0) {
echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><br><h5 class='entry-title'><b>" . $i . " </b> Attachments</h5>"; echo "<hr style='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><br><h5 class='entry-title'><b>" . $i . ' </b> Attachments</h5>';
} }
?> ?>
@@ -468,23 +520,23 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<div class="float-right" style="margin-top:-25px;margin-bottom:-30px"> <div class="float-right" style="margin-top:-25px;margin-bottom:-30px">
<?php echo $conversations->setPath(route('check_ticket', ['id' => $id]))->render(); ?> <?php echo $conversations->setPath(route('check_ticket', ['id' => $id]))->render(); ?>
</div> </div>
<br/><br/> <br /><br />
</div> </div>
@if(Session::has('success1')) @if (Session::has('success1'))
<div class="alert alert-success alert-dismissable" id='formabc'> <div class="alert alert-success alert-dismissable" id='formabc'>
<i class="fa fa-check-circle"></i> <i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}} {{ Session::get('success1') }}
</div> </div>
@endif @endif
<!-- failure message --> <!-- failure message -->
@if(Session::has('fails1')) @if (Session::has('fails1'))
<div class="alert alert-danger alert-dismissable" id='formabc'> <div class="alert alert-danger alert-dismissable" id='formabc'>
<i class="fa fa-ban"></i> <i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b> <b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}} {{ Session::get('fails1') }}
</div> </div>
@endif @endif
@@ -492,57 +544,59 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
<div id="respond" class="comment-respond form-border"> <div id="respond" class="comment-respond form-border">
<h3 id="reply-title" class="comment-reply-title section-title"><i class="line"></i>{!! Lang::get('lang.leave_a_reply') !!}</h3> <h3 id="reply-title" class="comment-reply-title section-title"><i
@if(Auth::user()) class="line"></i>{!! Lang::get('lang.leave_a_reply') !!}</h3>
{!! Form::open(['url'=>'post/reply/'.$id2.'#formabc']) !!} @if (Auth::user())
{!! Form::open(['url' => 'post/reply/' . $id2 . '#formabc']) !!}
@else @else
{!! Form::open(['url'=>'post-ticket-reply/'.$id.'#formabc']) !!} {!! Form::open(['url' => 'post-ticket-reply/' . $id . '#formabc']) !!}
@endif @endif
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group " style="background-color: white"> <div class="form-group " style="background-color: white">
<textarea class="form-control" id="reply-input" name="comment" cols="30" rows="8" ></textarea> <textarea class="form-control" id="reply-input" name="comment" cols="30" rows="8"></textarea>
</div> </div>
</div> </div>
</div> </div>
<div class="text-right"> <div class="text-right">
<button type="submit" onClick="return checkFunction();" class="btn btn-custom btn-lg" style="background-color: #009aba; hov: #00c0ef; color: #fff">{!! Lang::get('lang.post_comment') !!}</button> <button type="submit" onClick="return checkFunction();" class="btn btn-custom btn-lg"
style="background-color: #009aba; hov: #00c0ef; color: #fff">{!! Lang::get('lang.post_comment') !!}</button>
</div> </div>
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
</div> </div>
</article> </article>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
function checkFunction() { function checkFunction() {
var x; var x;
x = document.getElementById("reply-input").value; x = document.getElementById("reply-input").value;
if (x == "") { if (x == "") {
alert("{{Lang::get('lang.reply-can-not-be-empty')}}"); alert("{{ Lang::get('lang.reply-can-not-be-empty') }}");
return false; return false;
}; };
} }
$("#cc_page").on('click', '.search_r', function () { $("#cc_page").on('click', '.search_r', function() {
var search_r = $('a', this).attr('id'); var search_r = $('a', this).attr('id');
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "../ticket/status/{{$tickets->id}}/" + search_r, url: "../ticket/status/{{ $tickets->id }}/" + search_r,
beforeSend: function () { beforeSend: function() {
$("#refresh").hide(); $("#refresh").hide();
$("#loader").show(); $("#loader").show();
}, },
success: function (response) { success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh"); $("#refresh").load("../check_ticket/{!! $id !!} #refresh");
$("#refresh").show(); $("#refresh").show();
$("#loader").hide(); $("#loader").hide();
var message = response; var message = response;
$("#alert11").show(); $("#alert11").show();
$('#message-success1').html(message); $('#message-success1').html(message);
setInterval(function () { setInterval(function() {
$("#alert11").hide(); $("#alert11").hide();
}, 4000); }, 4000);
} }
@@ -550,19 +604,19 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
return false; return false;
}); });
$(document).ready(function () { $(document).ready(function() {
var Data = $('input[name="rating"]:checked').val(); var Data = $('input[name="rating"]:checked').val();
var Data2 = $('input[name="rating2"]:checked').val(); var Data2 = $('input[name="rating2"]:checked').val();
if (Data) { if (Data) {
$('input[name=rating]').rating('readOnly'); $('input[name=rating]').rating('readOnly');
jQuery('.star').attr('disabled', true); jQuery('.star').attr('disabled', true);
} }
$('.star').change(function () { $('.star').change(function() {
$('#foo').submit(); $('#foo').submit();
$('.foo2').submit(); $('.foo2').submit();
}); });
// process the form // process the form
$('#foo').submit(function (event) { $('#foo').submit(function(event) {
// get the form data // get the form data
// there are many ways to get this data using jQuery (you can use the class or id also) // there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $(this).serialize(); var formData = $(this).serialize();
@@ -570,18 +624,17 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
// process the form // process the form
$.ajax({ $.ajax({
type: 'POST', // define the type of HTTP verb we want to use (POST for our form) type: 'POST', // define the type of HTTP verb we want to use (POST for our form)
url: '../rating/' +<?php echo $tickets->id ?>, // the url where we want to POST url: '../rating/' + <?php echo $tickets->id; ?>, // the url where we want to POST
data: formData, // our data object data: formData, // our data object
dataType: 'json', // what type of data do we expect back from the server dataType: 'json', // what type of data do we expect back from the server
success: function () { success: function() {}
}
}); });
// using the done promise callback // using the done promise callback
// stop the form from submitting the normal way and refreshing the page // stop the form from submitting the normal way and refreshing the page
event.preventDefault(); event.preventDefault();
}); });
// process the form // process the form
$('.foo2').submit(function (event) { $('.foo2').submit(function(event) {
// get the form data // get the form data
// there are many ways to get this data using jQuery (you can use the class or id also) // there are many ways to get this data using jQuery (you can use the class or id also)
var formData = $(this).serialize(); var formData = $(this).serialize();
@@ -589,11 +642,10 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
// process the form // process the form
$.ajax({ $.ajax({
type: 'POST', // define the type of HTTP verb we want to use (POST for our form) type: 'POST', // define the type of HTTP verb we want to use (POST for our form)
url: '../rating2/' +<?php echo $tickets->id ?>, // the url where we want to POST url: '../rating2/' + <?php echo $tickets->id; ?>, // the url where we want to POST
data: formData, // our data object data: formData, // our data object
dataType: 'json', // what type of data do we expect back from the server dataType: 'json', // what type of data do we expect back from the server
success: function () { success: function() {}
}
}); });
// using the done promise callback // using the done promise callback
// stop the form from submitting the normal way and refreshing the page // stop the form from submitting the normal way and refreshing the page
@@ -602,7 +654,7 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
}); });
$(function() { $(function() {
//Add text editor //Add text editor
$("textarea").summernote({ $("textarea").summernote({
height: 300, height: 300,
tabsize: 2, tabsize: 2,
@@ -615,62 +667,70 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
['height', ['height']] ['height', ['height']]
] ]
}); });
}); });
jQuery(document).ready(function () { jQuery(document).ready(function() {
// Close a ticket // Close a ticket
$('#close').on('click', function (e) { $('#close').on('click', function(e) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "../ticket/close/{{$tickets->id}}", url: "../ticket/close/{{ $tickets->id }}",
data:{"_token": "{{ csrf_token() }}"}, data: {
beforeSend: function () { "_token": "{{ csrf_token() }}"
},
beforeSend: function() {
$("#refresh").hide(); $("#refresh").hide();
$("#loader").show(); $("#loader").show();
}, },
success: function (response) { success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh"); $("#refresh").load(
"../check_ticket/{!! $id !!} #refresh");
$("#refresh").show(); $("#refresh").show();
$("#loader").hide(); $("#loader").hide();
$("#d1").trigger("click"); $("#d1").trigger("click");
var message = "Success! Your Ticket have been Closed"; var message = "Success! Your Ticket have been Closed";
$("#alert11").show(); $("#alert11").show();
$('#message-success1').html(message); $('#message-success1').html(message);
setInterval(function(){ setInterval(function() {
$("#alert11").hide(); $("#alert11").hide();
setTimeout(function() { setTimeout(function() {
var link = document.querySelector('#load-inbox'); var link = document.querySelector(
if(link) { '#load-inbox');
if (link) {
link.click(); link.click();
} }
}, 500); }, 500);
},2000); }, 2000);
} }
}) })
return false; return false;
}); });
// Resolved a ticket // Resolved a ticket
$('#resolved').on('click', function (e) { $('#resolved').on('click', function(e) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "../ticket/resolve/{{$tickets->id}}", url: "../ticket/resolve/{{ $tickets->id }}",
data:{"_token": "{{ csrf_token() }}"}, data: {
beforeSend: function () { "_token": "{{ csrf_token() }}"
},
beforeSend: function() {
$("#refresh").hide(); $("#refresh").hide();
$("#loader").show(); $("#loader").show();
}, },
success: function (response) { success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh"); $("#refresh").load(
"../check_ticket/{!! $id !!} #refresh");
$("#refresh").show(); $("#refresh").show();
$("#loader").hide(); $("#loader").hide();
var message = "Success! Your Ticket have been Resolved"; var message = "Success! Your Ticket have been Resolved";
$("#alert11").show(); $("#alert11").show();
$('#message-success1').html(message); $('#message-success1').html(message);
setInterval(function () { setInterval(function() {
$("#alert11").hide(); $("#alert11").hide();
setTimeout(function () { setTimeout(function() {
var link = document.querySelector('#load-inbox'); var link = document.querySelector(
'#load-inbox');
if (link) { if (link) {
link.click(); link.click();
} }
@@ -682,24 +742,27 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
}); });
// Open a ticket // Open a ticket
$('#open').on('click', function (e) { $('#open').on('click', function(e) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "../ticket/open/{{$tickets->id}}", url: "../ticket/open/{{ $tickets->id }}",
data:{"_token": "{{ csrf_token() }}"}, data: {
beforeSend: function () { "_token": "{{ csrf_token() }}"
},
beforeSend: function() {
$("#refresh").hide(); $("#refresh").hide();
$("#loader").show(); $("#loader").show();
}, },
success: function (response) { success: function(response) {
$("#refresh").load("../check_ticket/{!! $id !!} #refresh"); $("#refresh").load(
"../check_ticket/{!! $id !!} #refresh");
$("#refresh").show(); $("#refresh").show();
$("#loader").hide(); $("#loader").hide();
var message = "Success! Your Ticket have been Opened"; var message = "Success! Your Ticket have been Opened";
$("#alert11").show(); $("#alert11").show();
$('#message-success1').html(message); $('#message-success1').html(message);
setInterval(function () { setInterval(function() {
$("#alert11").hide(); $("#alert11").hide();
}, 4000); }, 4000);
} }
@@ -707,5 +770,5 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
return false; return false;
}); });
}); });
</script> </script>
@stop @stop

View File

@@ -1,28 +1,29 @@
@extends('themes.default1.client.layout.client') @extends('themes.default1.client.layout.client')
@section('title') @section('title')
{!! Lang::get('lang.submit_a_ticket') !!} - {!! Lang::get('lang.submit_a_ticket') !!} -
@stop @stop
@section('submit') @section('submit')
class = "nav-item active" class = "nav-item active"
@stop @stop
<!-- breadcrumbs --> <!-- breadcrumbs -->
@section('breadcrumb') @section('breadcrumb')
{{--<div class="site-hero clearfix">--}} {{-- <div class="site-hero clearfix"> --}}
<ol class="breadcrumb float-sm-right "> <ol class="breadcrumb float-sm-right ">
<style> <style>
.words { .words {
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */ margin-right: 10px;
/* Adjust the value to increase or decrease the gap between list items */
} }
</style> </style>
<li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : &nbsp;</li> <li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : &nbsp;</li>
<li><a class="words" href="{{url('/')}}">{!! Lang::get('lang.home') !!}</a></li> <li><a class="words" href="{{ url('/') }}">{!! Lang::get('lang.home') !!}</a></li>
<li class="words" style="margin-right: 10px">></li> <li class="words" style="margin-right: 10px">></li>
<li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li> <li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
</ol> </ol>
</div> </div>
@stop @stop
<!-- /breadcrumbs --> <!-- /breadcrumbs -->
@section('check') @section('check')
@@ -38,7 +39,7 @@ class = "nav-item active"
<i class="line"></i>{!! Lang::get('lang.have_a_ticket') !!}? <i class="line"></i>{!! Lang::get('lang.have_a_ticket') !!}?
</h2> </h2>
@if(Session::has('check')) @if (Session::has('check'))
@if (count($errors) > 0) @if (count($errors) > 0)
<div class="alert alert-danger alert-dismissable"> <div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i> <i class="fa fa-ban"></i>
@@ -52,12 +53,13 @@ class = "nav-item active"
@endif @endif
<div> <div>
{!! Form::open(['url' => 'checkmyticket' , 'method' => 'POST'] )!!} {!! Form::open(['url' => 'checkmyticket', 'method' => 'POST']) !!}
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span> {!! Form::label('email', Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! Form::text('email_address',null,['class' => 'form-control form-group']) !!} {!! Form::text('email_address', null, ['class' => 'form-control form-group']) !!}
{!! Form::label('ticket_number',Lang::get('lang.ticket_number')) !!}<span class="text-red"> *</span> {!! Form::label('ticket_number', Lang::get('lang.ticket_number')) !!}<span class="text-red"> *</span>
{!! Form::text('ticket_number',null,['class' => 'form-control form-group']) !!} {!! Form::text('ticket_number', null, ['class' => 'form-control form-group']) !!}
<button type="submit" class="btn btn-info" style=" border-color: rgb(0, 192, 239); background-color: rgb(0, 154, 186) !important; color: white"> <button type="submit" class="btn btn-info"
style=" border-color: rgb(0, 192, 239); background-color: rgb(0, 154, 186) !important; color: white">
<i class="fas fa-save"></i> {!! Lang::get('lang.check_ticket_status') !!} <i class="fas fa-save"></i> {!! Lang::get('lang.check_ticket_status') !!}
</button> </button>
{!! Form::close() !!} {!! Form::close() !!}
@@ -71,7 +73,7 @@ class = "nav-item active"
<div id="content" class="site-content col-md-9"> <div id="content" class="site-content col-md-9">
@if(Session::has('message')) @if (Session::has('message'))
<div class="alert alert-success alert-dismissable"> <div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i> <i class="fas fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
@@ -79,10 +81,10 @@ class = "nav-item active"
</div> </div>
@endif @endif
@if (count($errors) > 0) @if (count($errors) > 0)
@if(Session::has('check')) @if (Session::has('check'))
<?php goto a; ?> <?php goto a; ?>
@endif @endif
@if(!Session::has('error')) @if (!Session::has('error'))
<div class="alert alert-danger alert-dismissable"> <div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i> <i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b> <b>{!! Lang::get('lang.alert') !!} !</b>
@@ -101,8 +103,8 @@ class = "nav-item active"
$encrypter = app('Illuminate\Encryption\Encrypter'); $encrypter = app('Illuminate\Encryption\Encrypter');
$encrypted_token = $encrypter->encrypt(csrf_token()); $encrypted_token = $encrypter->encrypt(csrf_token());
?> ?>
<input id="token" type="hidden" value="{{$encrypted_token}}"> <input id="token" type="hidden" value="{{ $encrypted_token }}">
{!! Form::open(['route'=>'client.form.post','method'=>'post', 'enctype'=>'multipart/form-data']) !!} {!! Form::open(['route' => 'client.form.post', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!}
<article class="hentry"> <article class="hentry">
@@ -117,57 +119,57 @@ class = "nav-item active"
<div class="row mt-4"> <div class="row mt-4">
@if(Auth::user()) @if (Auth::user())
{!! Form::hidden('Name', Auth::user()->user_name, ['class' => 'form-control']) !!}
{!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!}
@else @else
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}"> <div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
{!! Form::label('Name',Lang::get('lang.name')) !!}<span class="text-red"> *</span> {!! Form::label('Name', Lang::get('lang.name')) !!}<span class="text-red"> *</span>
{!! Form::text('Name',null,['class' => 'form-control']) !!} {!! Form::text('Name', null, ['class' => 'form-control']) !!}
</div> </div>
@endif @endif
@if(Auth::user()) @if (Auth::user())
{!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!}
{!! Form::hidden('Email', Auth::user()->email, ['class' => 'form-control']) !!}
@else @else
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}"> <div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
{!! Form::label('Email',Lang::get('lang.email')) !!} {!! Form::label('Email', Lang::get('lang.email')) !!}
@if($email_mandatory->status == 1 || $email_mandatory->status == '1') @if ($email_mandatory->status == 1 || $email_mandatory->status == '1')
<span class="text-red"> *</span> <span class="text-red"> *</span>
@endif @endif
{!! Form::email('Email',null,['class' => 'form-control']) !!} {!! Form::email('Email', null, ['class' => 'form-control']) !!}
</div> </div>
@endif @endif
@if(!Auth::user()) @if (!Auth::user())
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}"> <div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('Code',Lang::get('lang.country-code')) !!} {!! Form::label('Code', Lang::get('lang.country-code')) !!}
@if($email_mandatory->status == 0 || $email_mandatory->status == '0') @if ($email_mandatory->status == 0 || $email_mandatory->status == '0')
<span class="text-red"> *</span> <span class="text-red"> *</span>
@endif @endif
{!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!} {!! Form::text('Code', null, [
'class' => 'form-control',
'placeholder' => $phonecode,
'title' => Lang::get('lang.enter-country-phone-code'),
]) !!}
</div> </div>
<div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}"> <div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!} {!! Form::label('mobile', Lang::get('lang.mobile_number')) !!}
@if($email_mandatory->status == 0 || $email_mandatory->status == '0') @if ($email_mandatory->status == 0 || $email_mandatory->status == '0')
<span class="text-red"> *</span> <span class="text-red"> *</span>
@endif @endif
{!! Form::text('mobile',null,['class' => 'form-control']) !!} {!! Form::text('mobile', null, ['class' => 'form-control']) !!}
</div> </div>
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}"> <div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
{!! Form::label('Phone',Lang::get('lang.phone')) !!} {!! Form::label('Phone', Lang::get('lang.phone')) !!}
{!! Form::text('Phone',null,['class' => 'form-control']) !!} {!! Form::text('Phone', null, ['class' => 'form-control']) !!}
</div> </div>
@else @else
{!! Form::hidden('mobile',Auth::user()->mobile,['class' => 'form-control']) !!} {!! Form::hidden('mobile', Auth::user()->mobile, ['class' => 'form-control']) !!}
{!! Form::hidden('Code',Auth::user()->country_code,['class' => 'form-control']) !!} {!! Form::hidden('Code', Auth::user()->country_code, ['class' => 'form-control']) !!}
{!! Form::hidden('Phone',Auth::user()->phone_number,['class' => 'form-control']) !!} {!! Form::hidden('Phone', Auth::user()->phone_number, ['class' => 'form-control']) !!}
@endif @endif
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}"> <div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
@@ -176,33 +178,35 @@ class = "nav-item active"
<?php <?php
$forms = App\Model\helpdesk\Form\Forms::get(); $forms = App\Model\helpdesk\Form\Forms::get();
$helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get(); $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get();
// ?><!----> //
?><!---->
<select name="helptopic" class="form-control" id="selectid"> <select name="helptopic" class="form-control" id="selectid">
@foreach($helptopic as $topic) @foreach ($helptopic as $topic)
<option value="{!! $topic->id !!}">{!! $topic->topic !!}</option> <option value="{!! $topic->id !!}">{!! $topic->topic !!}</option>
@endforeach @endforeach
</select> </select>
</div> </div>
<!-- priority --> <!-- priority -->
<?php <?php
$Priority = App\Model\helpdesk\Settings\CommonSettings::select('status')->where('option_name','=', 'user_priority')->first(); $Priority = App\Model\helpdesk\Settings\CommonSettings::select('status')->where('option_name', '=', 'user_priority')->first();
$user_Priority=$Priority->status; $user_Priority = $Priority->status;
?> ?>
@if(Auth::user()) @if (Auth::user())
@if(Auth::user()->active == 1)
@if($user_Priority == 1)
@if (Auth::user()->active == 1)
@if ($user_Priority == 1)
<div class="col-md-12 form-group"> <div class="col-md-12 form-group">
<div class="row"> <div class="row">
<div class="col-md-1"> <div class="col-md-1">
<label>{!! Lang::get('lang.priority') !!}:</label> <label>{!! Lang::get('lang.priority') !!}:</label>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status','=',1)->get(); ?> <?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', '=', 1)->get(); ?>
{!! Form::select('priority', ['Priority'=>$Priority->pluck('priority_desc','priority_id')->toArray()],null,['class' => 'form-control select']) !!} {!! Form::select('priority', ['Priority' => $Priority->pluck('priority_desc', 'priority_id')->toArray()], null, [
'class' => 'form-control select',
]) !!}
</div> </div>
</div> </div>
</div> </div>
@@ -210,15 +214,31 @@ class = "nav-item active"
@endif @endif
@endif @endif
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}"> <div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
{!! Form::label('Subject',Lang::get('lang.subject')) !!}<span class="text-red"> *</span> {!! Form::label('Subject', Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
{!! Form::text('Subject',null,['class' => 'form-control']) !!} {!! Form::text('Subject', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group row">
<div class="col-md-2">
<label for="location">Vị trí:</label>
</div>
<div class="col-md-7">
<select name="location" class="form-control">
<option value="">-- Chọn vị trí --</option>
@foreach ($locations as $loc)
<option value="{{ $loc->id }}"
{{ old('location') == $loc->id ? 'selected' : '' }}>
{{ $loc->locationname }}
</option>
@endforeach
</select>
</div>
</div> </div>
<div class="col-md-12 form-group {{ $errors->has('Details') ? 'has-error' : '' }}"> <div class="col-md-12 form-group {{ $errors->has('Details') ? 'has-error' : '' }}">
{!! Form::label('Details',Lang::get('lang.message')) !!}<span class="text-red"> *</span> {!! Form::label('Details', Lang::get('lang.message')) !!}<span class="text-red"> *</span>
{!! Form::textarea('Details',null,['class' => 'form-control']) !!} {!! Form::textarea('Details', null, ['class' => 'form-control']) !!}
</div> </div>
<div class="col-md-12 form-group"> <div class="col-md-12 form-group">
<input type="file" name="attachment[]" multiple/><br/> <input type="file" name="attachment[]" multiple /><br />
{!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!} {!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!}
</div> </div>
{{-- Event fire --}} {{-- Event fire --}}
@@ -226,7 +246,13 @@ class = "nav-item active"
<div class="col-md-12" id="response"> </div> <div class="col-md-12" id="response"> </div>
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div> <div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
<div class="col-md-12 form-group"> <div class="col-md-12 form-group">
{!! Form::button('<i class="fas fa-save"></i> ' . Lang::get('lang.submit'), ['type'=>'submit', 'class'=>'btn btn-info float-right', 'style'=>'style="border-color: rgb(0, 192, 239); background-color: rgb(0, 154, 186); color: white;', 'onclick' => 'this.disabled=true;this.innerHTML="Sending, please wait...";this.form.submit();', 'data-v-fce8d630']) !!} {!! Form::button('<i class="fas fa-save"></i> ' . Lang::get('lang.submit'), [
'type' => 'submit',
'class' => 'btn btn-info float-right',
'style' => 'style="border-color: rgb(0, 192, 239); background-color: rgb(0, 154, 186); color: white;',
'onclick' => 'this.disabled=true;this.innerHTML="Sending, please wait...";this.form.submit();',
'data-v-fce8d630',
]) !!}
</div> </div>
<div class="col-md-12" id="response"> </div> <div class="col-md-12" id="response"> </div>
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div> <div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
@@ -237,37 +263,40 @@ class = "nav-item active"
</div> </div>
</article> </article>
</div> </div>
<!-- <!--
|==================================================== |====================================================
| SELECTED FORM STORED IN SCRIPT | SELECTED FORM STORED IN SCRIPT
|==================================================== |====================================================
--> -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function() {
var helpTopic = $("#selectid").val(); var helpTopic = $("#selectid").val();
send(helpTopic); send(helpTopic);
$("#selectid").on("change",function(){ $("#selectid").on("change", function() {
helpTopic = $("#selectid").val(); helpTopic = $("#selectid").val();
send(helpTopic); send(helpTopic);
}); });
function send(helpTopic){
function send(helpTopic) {
$.ajax({ $.ajax({
url:"{{url('/get-helptopic-form')}}", url: "{{ url('/get-helptopic-form') }}",
data:{'helptopic':helpTopic}, data: {
type:"GET", 'helptopic': helpTopic
dataType:"html", },
success:function(response){ type: "GET",
dataType: "html",
success: function(response) {
$("#response").html(response); $("#response").html(response);
}, },
error:function(response){ error: function(response) {
$("#response").html(response); $("#response").html(response);
} }
}); });
} }
}); });
$(function() { $(function() {
//Add text editor //Add text editor
$("textarea").summernote({ $("textarea").summernote({
height: 300, height: 300,
tabsize: 2, tabsize: 2,
@@ -280,6 +309,6 @@ $(function() {
['height', ['height']] ['height', ['height']]
] ]
}); });
}); });
</script> </script>
@stop @stop

File diff suppressed because it is too large Load Diff

View File

0
resources/views/vendor/Chumper/tickets-javascript.blade.php vendored Executable file → Normal file
View File

View File

@@ -491,6 +491,7 @@ Route::middleware('web')->group(function () {
| Here defining Guest User's routes | Here defining Guest User's routes
| |
| |
*/ */
// seasrch // seasrch
// Route::POST('tickets/search/', function () { // Route::POST('tickets/search/', function () {

3
storage/clockwork/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.json
*.json.gz
index

5
vendor/autoload.php vendored
View File

@@ -14,10 +14,7 @@ if (PHP_VERSION_ID < 50600) {
echo $err; echo $err;
} }
} }
trigger_error( throw new RuntimeException($err);
$err,
E_USER_ERROR
);
} }
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';

0
vendor/aws/aws-crt-php/format-check.sh vendored Executable file → Normal file
View File

0
vendor/aws/aws-crt-php/gen_stub.php vendored Executable file → Normal file
View File

0
vendor/aws/aws-crt-php/prepare_package_xml.sh vendored Executable file → Normal file
View File

0
vendor/aws/aws-crt-php/prepare_release.sh vendored Executable file → Normal file
View File

0
vendor/aws/aws-crt-php/run_tests vendored Executable file → Normal file
View File

0
vendor/beyondcode/laravel-query-detector/src/QueryDetector.php vendored Executable file → Normal file
View File

0
vendor/bin/carbon vendored Executable file → Normal file
View File

0
vendor/bin/doctrine-dbal vendored Executable file → Normal file
View File

0
vendor/bin/jp.php vendored Executable file → Normal file
View File

0
vendor/bin/patch-type-declarations vendored Executable file → Normal file
View File

0
vendor/bin/php-parse vendored Executable file → Normal file
View File

0
vendor/bin/phpspec vendored Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More