Compare commits

..

12 Commits

Author SHA1 Message Date
794c839a95 up new code
up new code
2025-08-19 05:59:14 +07:00
95bb93afa6 commit
commit
2025-08-09 04:43:00 +07:00
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
446 changed files with 25009 additions and 4911 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 : #.#.#
- Product Name :
- PHP version :
- Database Driver & Version :
- Server specification :
#### Product Type
- [ ] Open Source
- [ ] Paid
#### Description:
@@ -16,3 +23,5 @@
- [ ] development-branch
- [ ] release-tag
- [ ] Billing

117
.idea/blade.xml generated Normal file
View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BladeInjectionConfiguration" default="false">
<directives>
<data directive="@append" />
<data directive="@auth" injection="true" prefix="&lt;?php&#10;if(auth()-&gt;guard(" suffix=")-&gt;check()): ?&gt;" />
<data directive="@aware" injection="true" prefix="&lt;?php $attributes = $attributes-&gt;exceptProps(" suffix="); ?&gt;" />
<data directive="@break" injection="true" prefix="&lt;?php&#10;if(" suffix=") break; ?&gt;" />
<data directive="@can" injection="true" prefix="&lt;?php&#10;if (app(\Illuminate\Contracts\Auth\Access\Gate::class)-&gt;check(" suffix=")): ?&gt;" />
<data directive="@canany" injection="true" prefix="&lt;?php&#10;if (app(\Illuminate\Contracts\Auth\Access\Gate::class)-&gt;any(" suffix=")): ?&gt;" />
<data directive="@cannot" injection="true" prefix="&lt;?php&#10;if (app(\Illuminate\Contracts\Auth\Access\Gate::class)-&gt;denies(" suffix=")): ?&gt;" />
<data directive="@case" injection="true" prefix="&lt;?php&#10;case (" suffix="): ?&gt;" />
<data directive="@checked" injection="true" prefix="&lt;?php if(" suffix=") {echo 'checked';}?&gt;" />
<data directive="@choice" injection="true" prefix="&lt;?php&#10;echo app('translator')-&gt;choice(" suffix="); ?&gt;" />
<data directive="@class" injection="true" prefix="class=&quot;&lt;?php echo \Illuminate\Support\Arr::toCssClasses(" suffix=")?&gt;&quot;" />
<data directive="@component" injection="true" prefix="&lt;?php&#10;$__env-&gt;startComponent(" suffix="); ?&gt;" />
<data directive="@componentfirst" injection="true" prefix="&lt;?php&#10;$__env-&gt;startComponentFirst(" suffix="); ?&gt;" />
<data directive="@continue" injection="true" prefix="&lt;?php&#10;if(" suffix=") continue; ?&gt;" />
<data directive="@csrf" />
<data directive="@dd" injection="true" prefix="&lt;?php&#10;dd(" suffix="); ?&gt;" />
<data directive="@default" />
<data directive="@disabled" injection="true" prefix="&lt;?php if(" suffix=") {echo 'disabled';}?&gt;" />
<data directive="@dump" injection="true" prefix="&lt;?php&#10;dump(" suffix="); ?&gt;" />
<data directive="@each" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;renderEach(" suffix="); ?&gt;" />
<data directive="@else" />
<data directive="@elseauth" injection="true" prefix="&lt;?php&#10;elseif(auth()-&gt;guard(" suffix=")-&gt;check()): ?&gt;" />
<data directive="@elsecan" injection="true" prefix="&lt;?php&#10;elseif (app(\Illuminate\Contracts\Auth\Access\Gate::class)-&gt;check(" suffix=")): ?&gt;" />
<data directive="@elsecanany" injection="true" prefix="&lt;?php&#10;elseif (app(\Illuminate\Contracts\Auth\Access\Gate::class)-&gt;any(" suffix=")): ?&gt;" />
<data directive="@elsecannot" injection="true" prefix="&lt;?php&#10;elseif (app(\Illuminate\Contracts\Auth\Access\Gate::class)-&gt;denies(" suffix=")): ?&gt;" />
<data directive="@elseguest" injection="true" prefix="&lt;?php&#10;elseif(auth()-&gt;guard(" suffix=")-&gt;guest()): ?&gt;" />
<data directive="@elseif" injection="true" prefix="&lt;?php&#10;elseif(" suffix="): ?&gt;" />
<data directive="@empty" injection="true" prefix="&lt;?php&#10;if(empty(" suffix=")): ?&gt;" />
<data directive="@endauth" />
<data directive="@endcan" />
<data directive="@endcanany" />
<data directive="@endcannot" />
<data directive="@endcomponent" />
<data directive="@endcomponentClass" />
<data directive="@endcomponentfirst" />
<data directive="@endempty" />
<data directive="@endenv" />
<data directive="@enderror" />
<data directive="@endfor" />
<data directive="@endforeach" />
<data directive="@endforelse" />
<data directive="@endfragment" />
<data directive="@endguest" />
<data directive="@endif" />
<data directive="@endisset" />
<data directive="@endlang" />
<data directive="@endonce" />
<data directive="@endphp" />
<data directive="@endprepend" />
<data directive="@endprependonce" />
<data directive="@endproduction" />
<data directive="@endpush" />
<data directive="@endpushif" />
<data directive="@endpushonce" />
<data directive="@endsection" />
<data directive="@endslot" />
<data directive="@endswitch" />
<data directive="@endunless" />
<data directive="@endverbatim" />
<data directive="@endwhile" />
<data directive="@env" injection="true" prefix="&lt;?php&#10;if(app()-&gt;environment(" suffix=")): ?&gt;" />
<data directive="@error" injection="true" prefix="&lt;?php&#10;$__errorArgs = [" suffix="];&#10;$__bag = $errors-&gt;getBag($__errorArgs[1] ?? 'default');&#10;if ($__bag-&gt;has($__errorArgs[0])) :&#10;if (isset($message)) { $__messageOriginal = $message; }&#10;$message = $__bag-&gt;first($__errorArgs[0]); ?&gt;" />
<data directive="@extends" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;make(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))-&gt;render(); ?&gt;" />
<data directive="@extendsfirst" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;first(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))-&gt;render(); ?&gt;" />
<data directive="@for" injection="true" prefix="&lt;?php&#10;for(" suffix="): ?&gt;" />
<data directive="@foreach" injection="true" prefix="&lt;?php&#10;foreach(" suffix="): ?&gt;" />
<data directive="@forelse" injection="true" prefix="&lt;?php&#10;foreach(" suffix="): ?&gt;" />
<data directive="@fragment" injection="true" prefix="&lt;?php&#10;$__env-&gt;startFragment(" suffix="); ?&gt;" />
<data directive="@guest" injection="true" prefix="&lt;?php&#10;if(auth()-&gt;guard(" suffix=")-&gt;guest()): ?&gt;" />
<data directive="@hasSection" injection="true" prefix="&lt;?php&#10;if (! empty(trim($__env-&gt;yieldContent(" suffix=")))): ?&gt;" />
<data directive="@if" injection="true" prefix="&lt;?php&#10;if(" suffix="): ?&gt;" />
<data directive="@include" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;make(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))-&gt;render(); ?&gt;" />
<data directive="@includeFirst" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;first(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))-&gt;render(); ?&gt;" />
<data directive="@includeUnless" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;renderUnless(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path'])); ?&gt;" />
<data directive="@includeWhen" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;renderWhen(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path'])); ?&gt;" />
<data directive="@isset" injection="true" prefix="&lt;?php&#10;if(isset(" suffix=")): ?&gt;" />
<data directive="@js" injection="true" prefix="&lt;?php _bladeDirective(" suffix="); ?&gt;" />
<data directive="@json" injection="true" prefix="&lt;?php&#10;echo json_encode(" suffix=") ?&gt;" />
<data directive="@lang" injection="true" prefix="&lt;?php&#10;echo app('translator')-&gt;get(" suffix="); ?&gt;" />
<data directive="@method" injection="true" prefix="&lt;?php&#10;echo method_field(" suffix="); ?&gt;" />
<data directive="@once" />
<data directive="@overwrite" />
<data directive="@parent" />
<data directive="@php" injection="true" prefix="&lt;?php&#10;(" suffix="); ?&gt;" />
<data directive="@prepend" injection="true" prefix="&lt;?php&#10;$__env-&gt;startPrepend(" suffix="); ?&gt;" />
<data directive="@prependonce" injection="true" prefix="&lt;?php&#10;$___phpstorm_prepend_once_params = [" suffix="]; if (! $__env-&gt;hasRenderedOnce($___phpstorm_prepend_once_params[1])): $__env-&gt;markAsRenderedOnce($___phpstorm_prepend_once_params); $__env-&gt;startPrepend($___phpstorm_prepend_once_params[0]); ?&gt;" />
<data directive="@production" />
<data directive="@props" injection="true" prefix="&lt;?php $attributes = $attributes-&gt;exceptProps(" suffix="); ?&gt;" />
<data directive="@push" injection="true" prefix="&lt;?php&#10;$__env-&gt;startPush(" suffix="); ?&gt;" />
<data directive="@pushif" injection="true" prefix="&lt;?php&#10;$__pushif_args = explode(','," suffix=", 2); if({$__pushif_args[0]}): $__env-&gt;startPush({$__pushif_args[1]}); ?&gt;" />
<data directive="@pushonce" injection="true" prefix="&lt;?php&#10;$__php_storm_push_once_params = [" suffix="]; if (!$__env-&gt;hasRenderedOnce($__php_storm_push_once_params[1])): $__env-&gt;markAsRenderedOnce($__php_storm_push_once_params[1]); $__env-&gt;startPush($__php_storm_push_once_params[0]); ?&gt;" />
<data directive="@readonly" injection="true" prefix="&lt;?php&#10;if(" suffix="): echo 'readonly'; endif; ?&gt;" />
<data directive="@required" injection="true" prefix="&lt;?php&#10;if(" suffix="): echo 'required'; endif; ?&gt;" />
<data directive="@section" injection="true" prefix="&lt;?php&#10;$__env-&gt;startSection(" suffix="); ?&gt;" />
<data directive="@sectionMissing" injection="true" prefix="&lt;?php&#10;if (empty(trim($__env-&gt;yieldContent(" suffix=")))): ?&gt;" />
<data directive="@selected" injection="true" prefix="&lt;?php if(" suffix=") {echo 'selected';}?&gt;" />
<data directive="@show" />
<data directive="@slot" injection="true" prefix="&lt;?php&#10;$__env-&gt;slot(" suffix="); ?&gt;" />
<data directive="@stack" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;yieldPushContent(" suffix="); ?&gt;" />
<data directive="@stop" />
<data directive="@style" injection="true" prefix="class=&quot;&lt;?php echo \Illuminate\Support\Arr::toCssStyles(" suffix=")?&gt;&quot;" />
<data directive="@switch" injection="true" prefix="&lt;?php&#10;switch(" suffix="): ?&gt;" />
<data directive="@unless" injection="true" prefix="&lt;?php&#10;if (! (" suffix=")): ?&gt;" />
<data directive="@unset" injection="true" prefix="&lt;?php&#10;unset(" suffix="); ?&gt;" />
<data directive="@verbatim" />
<data directive="@vite" injection="true" prefix="&lt;?php echo vite_func(" suffix="); ?&gt;" />
<data directive="@viteReactRefresh" />
<data directive="@vitereactrefresh" />
<data directive="@while" injection="true" prefix="&lt;?php&#10;while(" suffix="): ?&gt;" />
<data directive="@yield" injection="true" prefix="&lt;?php&#10;echo $__env-&gt;yieldContent(" suffix="); ?&gt;" />
</directives>
</component>
</project>

5
.idea/community.iml generated
View File

@@ -5,6 +5,7 @@
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="false" packagePrefix="Tests\" />
<sourceFolder url="file://$MODULE_DIR$/tests/Unit" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/graham-campbell/result-type" />
<excludeFolder url="file://$MODULE_DIR$/vendor/laravelcollective/html" />
@@ -168,6 +169,10 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
<excludeFolder url="file://$MODULE_DIR$/vendor/aws/aws-crt-php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/aws/aws-sdk-php" />
<excludeFolder url="file://$MODULE_DIR$/storage/app" />
<excludeFolder url="file://$MODULE_DIR$/storage/clockwork" />
<excludeFolder url="file://$MODULE_DIR$/storage/debugbar" />
<excludeFolder url="file://$MODULE_DIR$/storage/framework" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

25
.idea/laravel-idea.xml generated Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="InertiaPackage">
<option name="directoryPaths">
<list />
</option>
</component>
<component name="LaravelIdeaMainSettings">
<option name="codeGeneration">
<LaravelCodeGeneration>
<option name="generationStringSettings">
<map>
<entry key="createFormRequest:baseClass" value="App\Http\Requests\Request" />
</map>
</option>
</LaravelCodeGeneration>
</option>
<option name="frameworkFound" value="true" />
<option name="translation">
<LaravelTranslation>
<option name="defaultPath" value="lang" />
</LaravelTranslation>
</option>
</component>
</project>

47
.idea/php.xml generated
View File

@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/composer" />
@@ -165,12 +175,47 @@
<path value="$PROJECT_DIR$/vendor/psr/container" />
<path value="$PROJECT_DIR$/vendor/aws/aws-crt-php" />
<path value="$PROJECT_DIR$/vendor/aws/aws-sdk-php" />
<path value="$PROJECT_DIR$/vendor/chumper/zipper" />
<path value="$PROJECT_DIR$/vendor/chumper/datatable" />
<path value="$PROJECT_DIR$/vendor/sly/notification-pusher" />
<path value="$PROJECT_DIR$/vendor/brozot/laravel-fcm" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/uri-template" />
<path value="$PROJECT_DIR$/vendor/unisharp/laravel-ckeditor" />
<path value="$PROJECT_DIR$/vendor/itsgoingd/clockwork" />
<path value="$PROJECT_DIR$/vendor/sabberworm/php-css-parser" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-hydrator" />
<path value="$PROJECT_DIR$/vendor/zendframework/zendservice-apple-apns" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-validator" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-json" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-stdlib" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-uri" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-escaper" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-loader" />
<path value="$PROJECT_DIR$/vendor/zendframework/zendservice-google-gcm" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-http" />
<path value="$PROJECT_DIR$/vendor/beyondcode/laravel-query-detector" />
<path value="$PROJECT_DIR$/vendor/laravel/pint" />
<path value="$PROJECT_DIR$/vendor/phenx/php-svg-lib" />
<path value="$PROJECT_DIR$/vendor/thomaswelton/gravatarlib" />
<path value="$PROJECT_DIR$/vendor/thomaswelton/laravel-gravatar" />
<path value="$PROJECT_DIR$/vendor/davibennun/laravel-push-notification" />
<path value="$PROJECT_DIR$/vendor/symfony/http-client" />
<path value="$PROJECT_DIR$/vendor/symfony/http-client-contracts" />
<path value="$PROJECT_DIR$/vendor/symfony/mailgun-mailer" />
<path value="$PROJECT_DIR$/vendor/symfony/options-resolver" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" />
<component name="PhpProjectSharedConfiguration" php_language_level="8.0" />
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PhpUnit">
<phpunit_settings>
<PhpUnitSettings custom_loader_path="$PROJECT_DIR$/public/vendor/autoload.php" />
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" />
</phpunit_settings>
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
</project>

1
.idea/phpunit.xml generated
View File

@@ -4,6 +4,7 @@
<option name="directories">
<list>
<option value="$PROJECT_DIR$/tests" />
<option value="$PROJECT_DIR$/tests/Unit" />
</list>
</option>
</component>

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
* 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
--------------------------
<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>
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
--------------------------
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>
<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://www.linkedin.com/groups/8429668" target="_blank">LinkedIn</a>
* Join us on <a href="https://join.slack.com/t/faveocommunity/shared_invite/enQtNDU0NTcxNTA0ODIwLTAzN2VkNDhjMDFmNGJmNmUwYTkxYzE4OGI3ZDUyZGQ2ZDY5NjU2YmY4ZjU3YWNlNTA3N2JkOTk1ZmNiM2ZlY2U" target="_blank">Slack</a>
Support the community edition
--------------------------
@@ -105,9 +104,10 @@ Check mark versions are supported with security patches.
| Version | Supported |
| ------- | ------------------ |
| 2.0.1 | :white_check_mark: |
| 2.0.0 | :x: |
| < 1.0 | :x: |
| 2.0.3 | :white_check_mark: |
| 2.0.2 | :x: |
| 2.0.1 | :x: |
| < 2.0 | :x: |
## 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');
$result = $this->CallGetApi($url);
//dd($result);
return response()->json(compact('result'));
} catch (\Exception $ex) {

View File

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

View File

@@ -64,6 +64,7 @@ class TokenAuthController extends Controller
}
$user_id = \Auth::user();
// if no errors are encountered we can return a JWT
return response()->json(compact('token', 'user_id'));
}
@@ -91,6 +92,7 @@ class TokenAuthController extends Controller
return response()->json(compact('error'));
}
//dd($user);
return response()->json(compact('user'));
}
@@ -174,8 +176,8 @@ class TokenAuthController extends Controller
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
if (isset($password_reset_table)) {
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
// $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]);
// $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]);
} else {
$create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
}

View File

@@ -235,6 +235,7 @@ class AgentController extends Controller
foreach ($requests as $req) {
DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]);
}
//Todo For success and failure conditions
try {
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++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
// return random string
return $randomString;
}

View File

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

View File

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

View File

@@ -196,6 +196,7 @@ class FormController extends Controller
//dd($form);
if ($form) {
$fields = $form->fields();
//dd($fields);
return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms'));
}
@@ -215,6 +216,7 @@ class FormController extends Controller
//dd($form);
if ($form) {
$fields = $form->fields();
//dd($fields);
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
$adminNotes = $request->input('admin_notes');
$var->admin_notes = $adminNotes;
/* Check whether function success or not */
try {
$var->save();
/* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully'));
} catch (Exception $e) {
@@ -198,9 +200,11 @@ class GroupController extends Controller
}
$group_assign_department->where('group_id', $id)->delete();
$groups = $group->whereId($id)->first();
/* Check whether function success or not */
try {
$groups->delete();
/* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully'));
} catch (Exception $e) {

View File

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

View File

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

View File

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

View File

@@ -45,6 +45,7 @@ class SlaController extends Controller
try {
/* Declare a Variable $slas to store all Values From Sla_plan Table */
$slas = $sla->get();
/* Listing the values From Sla_plan Table */
return view('themes.default1.admin.helpdesk.manage.sla.index', compact('slas'));
} catch (Exception $e) {
@@ -81,6 +82,7 @@ class SlaController extends Controller
/* Fill the request values to Sla_plan Table */
/* Check whether function success or not */
$sla->fill($request->input())->save();
/* redirect to Index page with Success Message */
return redirect('sla')->with('success', Lang::get('lang.sla_plan_created_successfully'));
} catch (Exception $e) {
@@ -196,9 +198,11 @@ class SlaController extends Controller
$message = $ticket.$dept.$topic;
/* Delete a perticular field from the database by delete() using Id */
$slas = Sla_plan::whereId($id)->first();
/* Check whether function success or not */
try {
$slas->delete();
/* redirect to Index page with Success Message */
return redirect('sla')->with('success', Lang::get('lang.sla_plan_deleted_successfully').$message);
} 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')
->join('users', 'users.id', '=', 'team_assign_agent.agent_id')
->where('team_assign_agent.team_id', '=', $id);
// ->get();
// dd($users);
return \Datatable::query($users)
@@ -219,6 +220,7 @@ class TeamController extends Controller
}
// dd($a_id);
$user = $user->whereIn('id', $a_id)->where('active', '=', 1)->orderBy('first_name')->get();
// dd($user);
return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams'));
} catch (Exception $e) {
@@ -250,10 +252,12 @@ class TeamController extends Controller
$alert = $request->input('assign_alert');
$teams->assign_alert = $alert;
$teams->save(); //saving check box
//updating whole field
/* Check whether function success or not */
try {
$teams->fill($request->except('team_lead'))->save();
/* redirect to Index page with Success Message */
return redirect('teams')->with('success', Lang::get('lang.teams_updated_successfully'));
} catch (Exception $e) {
@@ -279,6 +283,7 @@ class TeamController extends Controller
$tickets = DB::table('tickets')->where('team_id', '=', $id)->update(['team_id' => null]);
/* Check whether function success or not */
$teams->delete();
/* redirect to Index page with Success Message */
return redirect('teams')->with('success', Lang::get('lang.teams_deleted_successfully'));
} catch (Exception $e) {

View File

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

View File

@@ -18,6 +18,7 @@ class UrlSettingController extends Controller
$url = $request->url();
$www = $this->checkWWW($url);
$https = $this->checkHTTP($url);
//dd($www, $https);
try {
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 */
/* Check whether function success or not */
$canned->delete();
/* redirect to Index page with Success Message */
return redirect()->route('canned.list')->with('success', Lang::get('lang.canned_response_deleted'));
} catch (Exception $e) {
@@ -180,6 +181,7 @@ class CannedController extends Controller
} else {
$msg = '';
}
// returning the canned response in JSON format
return \Response::json($msg);
}

View File

@@ -576,6 +576,7 @@ class FilterController extends Controller
$query->whereIn('tickets.team_id', $teams)
->orWhereIn('tickets.assigned_to', $users);
});
// dd($table->toSql());
return $table;
}
@@ -899,6 +900,7 @@ class FilterController extends Controller
} else {
$table = $table->where('tickets.id', '=', null);
}
// dd($table->toSql());
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)) {
$render = true;
}
// return \Datatables::of($table)->make();
return \Ttable::getTable($table);
}

View File

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

View File

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

758
app/Http/Controllers/Agent/helpdesk/TicketController.php Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -201,6 +201,7 @@ class TicketWorkflowController extends Controller
} elseif ($condition == 'ends') {
$return = $this->checkEnds($statement, $to_check);
}
// elseif($condition == '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\Utility\CountryCode;
use App\Model\helpdesk\Utility\Otp;
use App\Model\helpdesk\Agent\Department;
use App\User;
// classes
use Auth;
@@ -82,15 +83,15 @@ class UserController extends Controller
/* get all values in Sys_user */
$table = \Datatable::table()
->addColumn(
Lang::get('lang.name'),
Lang::get('lang.email'),
Lang::get('lang.phone'),
Lang::get('lang.status'),
Lang::get('lang.last_login'),
Lang::get('lang.role'),
Lang::get('lang.action')
) // these are the column headings to be shown
->addColumn(
Lang::get('lang.name'),
Lang::get('lang.email'),
Lang::get('lang.phone'),
Lang::get('lang.status'),
Lang::get('lang.last_login'),
Lang::get('lang.role'),
Lang::get('lang.action')
) // these are the column headings to be shown
->noScript();
return view('themes.default1.agent.helpdesk.user.index', compact('table'));
@@ -140,99 +141,100 @@ class UserController extends Controller
if ($search !== '') {
$users = $users->where(function ($query) use ($search) {
$query->where('user_name', 'LIKE', '%'.$search.'%');
$query->orWhere('email', 'LIKE', '%'.$search.'%');
$query->orWhere('first_name', 'LIKE', '%'.$search.'%');
$query->orWhere('last_name', 'LIKE', '%'.$search.'%');
$query->orWhere('mobile', 'LIKE', '%'.$search.'%');
$query->orWhere('updated_at', 'LIKE', '%'.$search.'%');
$query->orWhere('country_code', 'LIKE', '%'.$search.'%');
$query->where('user_name', 'LIKE', '%' . $search . '%');
$query->orWhere('email', 'LIKE', '%' . $search . '%');
$query->orWhere('first_name', 'LIKE', '%' . $search . '%');
$query->orWhere('last_name', 'LIKE', '%' . $search . '%');
$query->orWhere('mobile', 'LIKE', '%' . $search . '%');
$query->orWhere('updated_at', 'LIKE', '%' . $search . '%');
$query->orWhere('country_code', 'LIKE', '%' . $search . '%');
});
}
// displaying list of users with chumper datatables
// return \Datatable::collection(User::where('role', "!=", "admin")->get())
return \Yajra\DataTables\Facades\DataTables::of($users)
/* column username */
->removeColumn('id', 'last_name', 'country_code', 'phone_number')
->addColumn('user_name', function ($model) {
if ($model->first_name) {
$string = strip_tags($model->first_name.' '.$model->last_name);
} else {
$string = strip_tags($model->user_name);
}
if (strlen($string) > 30) {
// truncate string
$stringCut = mb_substr($string, 0, 30, 'UTF-8').'...';
} else {
$stringCut = $string;
}
/* column username */
->removeColumn('id', 'last_name', 'country_code', 'phone_number')
->addColumn('user_name', function ($model) {
if ($model->first_name) {
$string = strip_tags($model->first_name . ' ' . $model->last_name);
} else {
$string = strip_tags($model->user_name);
}
if (strlen($string) > 30) {
// truncate string
$stringCut = mb_substr($string, 0, 30, 'UTF-8') . '...';
} else {
$stringCut = $string;
}
return "<a href='".route('user.show', $model->id)."' title='".$string."''>".$stringCut.'</a>';
})
/* column email */
->addColumn('email', function ($model) {
$email = "<a href='".route('user.show', $model->id)."'>".e($model->email).'</a>';
return "<a href='" . route('user.show', $model->id) . "' title='" . $string . "''>" . $stringCut . '</a>';
})
/* column email */
->addColumn('email', function ($model) {
$email = "<a href='" . route('user.show', $model->id) . "'>" . e($model->email) . '</a>';
return $email;
})
/* column phone */
->addColumn('mobile', function ($model) {
$phone = '';
if ($model->phone_number) {
$phone = htmlspecialchars($model->ext.' '.$model->phone_number, ENT_QUOTES, 'UTF-8');
}
$mobile = '';
if ($model->mobile) {
$mobile = htmlspecialchars($model->mobile, ENT_QUOTES, 'UTF-8');
}
$phone = $phone.'&nbsp;&nbsp;&nbsp;'.$mobile;
return $email;
})
/* column phone */
->addColumn('mobile', function ($model) {
$phone = '';
if ($model->phone_number) {
$phone = htmlspecialchars($model->ext . ' ' . $model->phone_number, ENT_QUOTES, 'UTF-8');
}
$mobile = '';
if ($model->mobile) {
$mobile = htmlspecialchars($model->mobile, ENT_QUOTES, 'UTF-8');
}
$phone = $phone . '&nbsp;&nbsp;&nbsp;' . $mobile;
return $phone;
})
/* column account status */
->addColumn('active', function ($model) {
$status = $model->active;
if ($status == 1) {
$stat = '<button class="btn btn-success btn-xs">Active</button>';
} else {
$stat = '<button class="btn btn-danger btn-xs">Inactive</button>';
}
return $phone;
})
/* column account status */
->addColumn('active', function ($model) {
$status = $model->active;
if ($status == 1) {
$stat = '<button class="btn btn-success btn-xs">Active</button>';
} else {
$stat = '<button class="btn btn-danger btn-xs">Inactive</button>';
}
return $stat;
})
/* column last login date */
->addColumn('updated_at', function ($model) {
$t = $model->updated_at;
return $stat;
})
/* column last login date */
->addColumn('updated_at', function ($model) {
$t = $model->updated_at;
return TicketController::usertimezone($t);
})
/* column Role */
->addColumn('role', function ($model) {
$role = $model->role;
return TicketController::usertimezone($t);
})
/* column Role */
->addColumn('role', function ($model) {
$role = $model->role;
return $role;
})
/* column actions */
->addColumn('Actions', function ($model) {
if ($model->is_delete == 0) {
return '<a href="'.route('user.edit', $model->id).'" class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a>&nbsp; <a href="'.route('user.show', $model->id).'" class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>';
} else {
if (Auth::user()->role == 'admin') {
// @if(Auth::user()->role == 'admin')
return $role;
})
/* column actions */
->addColumn('Actions', function ($model) {
if ($model->is_delete == 0) {
return '<a href="' . route('user.edit', $model->id) . '" class="btn btn-warning btn-xs">' . \Lang::get('lang.edit') . '</a>&nbsp; <a href="' . route('user.show', $model->id) . '" class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>';
} else {
if (Auth::user()->role == 'admin') {
// @if(Auth::user()->role == 'admin')
return '<a href="'.route('user.show', $model->id).'" class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>';
}
return '<a href="' . route('user.show', $model->id) . '" class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>';
}
if (Auth::user()->role == 'agent') {
// @if(Auth::user()->role == 'admin')
if ($model->role == 'user') {
return '<a href="'.route('user.show', $model->id).'" class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>';
}
}
}
})
->rawColumns(['user_name', 'email', 'mobile', 'active', 'updated_at', 'role', 'Actions'])
->make();
if (Auth::user()->role == 'agent') {
// @if(Auth::user()->role == 'admin')
if ($model->role == 'user') {
return '<a href="' . route('user.show', $model->id) . '" class="btn btn-primary btn-xs">' . \Lang::get('lang.view') . '</a>';
}
}
}
})
->rawColumns(['user_name', 'email', 'mobile', 'active', 'updated_at', 'role', 'Actions'])
->make();
}
public function restoreUser($id)
@@ -338,7 +340,8 @@ class UserController extends Controller
return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully'));
}
// $user->save();
// $user->save();
/* redirect to Index page with Success Message */
return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully'));
} catch (Exception $e) {
@@ -393,7 +396,7 @@ class UserController extends Controller
$email = $user->email;
$this->PhpMailController->sendmail($from = $this->PhpMailController
->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $email], $message = ['subject' => null, 'scenario' => 'reset_new_password'], $template_variables = ['user' => $name, 'user_password' => $password]);
->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $email], $message = ['subject' => null, 'scenario' => 'reset_new_password'], $template_variables = ['user' => $name, 'user_password' => $password]);
return redirect('user')->with('success', Lang::get('lang.password_change_successfully'));
} catch (Exception $e) {
@@ -532,7 +535,7 @@ class UserController extends Controller
$ticket->assigned_to = $assign_to[1];
$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;
$ticket_number = $ticket->ticket_number;
$ticket->save();
@@ -540,7 +543,7 @@ class UserController extends Controller
$thread->ticket_id = $ticket->id;
$thread->user_id = Auth::user()->id;
$thread->is_internal = 1;
$thread->body = 'This Ticket has been assigned to '.$assignee;
$thread->body = 'This Ticket has been assigned to ' . $assignee;
$thread->save();
}
$user = User::find($id);
@@ -643,6 +646,7 @@ class UserController extends Controller
// dd('here');
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
$departments = Department::all();
$user = new User();
/* select the field where id = $id(request Id) */
@@ -656,7 +660,7 @@ class UserController extends Controller
// $org_name=Organization::where('id','=',$org_id)->pluck('name')->first();
// dd($org_name);
return view('themes.default1.agent.helpdesk.user.edit', compact('users', 'orgs', 'settings', 'email_mandatory', 'organization_id'))->with('phonecode', $phonecode->phonecode);
return view('themes.default1.agent.helpdesk.user.edit', compact('users', 'orgs', 'settings', 'email_mandatory', 'organization_id', 'departments'))->with('phonecode', $phonecode->phonecode);
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->getMessage());
}
@@ -676,6 +680,7 @@ class UserController extends Controller
$user = new User();
/* select the field where id = $id(request Id) */
$users = $user->whereId($id)->first();
/* Update the value by selected field */
/* Check whether function success or not */
try {
@@ -697,6 +702,7 @@ class UserController extends Controller
$this->storeUserOrgRelation($id, $orgid);
}
/* redirect to Index page with Success Message */
return redirect('user')->with('success', Lang::get('lang.User-profile-Updated-Successfully'));
} catch (Exception $e) {
@@ -733,11 +739,13 @@ class UserController extends Controller
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
$status = $settings->status;
$departments = Department::all();
try {
return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user'))
->with(['phonecode' => $phonecode->phonecode,
'verify' => $status, ]);
return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user', 'departments'))
->with([
'phonecode' => $phonecode->phonecode,
'verify' => $status,
]);
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->getMessage());
}
@@ -776,7 +784,7 @@ class UserController extends Controller
// fetching upload destination path
$destinationPath = 'uploads/profilepic';
// adding a random value to profile picture filename
$fileName = rand(0000, 9999).'.'.str_replace(' ', '_', $name);
$fileName = rand(0000, 9999) . '.' . str_replace(' ', '_', $name);
// moving the picture to a destination folder
Input::file('profile_pic')->move($destinationPath, $fileName);
// saving filename to database
@@ -932,6 +940,7 @@ class UserController extends Controller
$user_org->org_id = $org->id;
$user_org->user_id = $id;
$user_org->save();
// for success return 0
return 0;
}
@@ -956,6 +965,7 @@ class UserController extends Controller
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
// return random string
return $randomString;
}
@@ -988,13 +998,13 @@ class UserController extends Controller
$date = $request->input('date');
$date = str_replace(' ', '', $date);
$date_array = explode(':', $date);
$first = $date_array[0].' 00:00:00';
$second = $date_array[1].' 23:59:59';
$first = $date_array[0] . ' 00:00:00';
$second = $date_array[1] . ' 23:59:59';
$first_date = $this->convertDate($first);
$second_date = $this->convertDate($second);
$users = $this->getUsers($first_date, $second_date);
$excel_controller = new \App\Http\Controllers\Common\ExcelController();
$filename = 'users'.$date;
$filename = 'users' . $date;
return $excel_controller->export($filename, $users);
} catch (Exception $ex) {
@@ -1013,13 +1023,13 @@ class UserController extends Controller
{
$user = new User();
$users = $user->leftJoin('user_assign_organization', 'users.id', '=', 'user_assign_organization.user_id')
->leftJoin('organization', 'user_assign_organization.org_id', '=', 'organization.id')
->whereBetween('users.created_at', [$first, $last])
->where('role', 'user')
->where('active', 1)
->select('users.user_name as Username', 'users.email as Email', 'users.first_name as Fisrtname', 'users.last_name as Lastname', 'organization.name as Organization')
->get()
->toArray();
->leftJoin('organization', 'user_assign_organization.org_id', '=', 'organization.id')
->whereBetween('users.created_at', [$first, $last])
->where('role', 'user')
->where('active', 1)
->select('users.user_name as Username', 'users.email as Email', 'users.first_name as Fisrtname', 'users.last_name as Lastname', 'organization.name as Organization')
->get()
->toArray();
return $users;
}
@@ -1043,7 +1053,7 @@ class UserController extends Controller
// dd(Input::all());
// $user = User::select('id', 'mobile', 'user_name')->where('email', '=', $request->input('email'))->first();
$otp = Otp::select('otp', 'updated_at')->where('user_id', '=', Input::get('u_id'))
->first();
->first();
if ($otp != null) {
$otp_length = strlen(Input::get('otp'));
if ($otp_length == 6 && !preg_match('/[a-z]/i', Input::get('otp'))) {
@@ -1060,7 +1070,8 @@ class UserController extends Controller
} else {
if (Hash::check(Input::get('otp'), $otp->otp)) {
Otp::where('user_id', '=', Input::get('u_id'))
->update(['otp' => '']);
->update(['otp' => '']);
// User::where('id', '=', $user->id)
// ->update(['active' => 1]);
// $this->openTicketAfterVerification($user->id);
@@ -1087,7 +1098,7 @@ class UserController extends Controller
{
$users = User::where('role', '<>', 'user')->where('active', '=', 1)->orderBy('first_name')->get();
foreach ($users as $user) {
echo "<option value='user_$user->id'>".$user->name().'</option>';
echo "<option value='user_$user->id'>" . $user->name() . '</option>';
}
}
}

View File

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

View File

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

View File

@@ -56,6 +56,7 @@ class SettingsController extends Controller
/* get the setting where the id == 1 */
$settings = $settings->whereId('1')->first();
$time = $time->get();
//$date = $date->get();
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'));
$s = Socialite::driver($provider)->redirect();
//dd('dscd');
return $s;
}
@@ -114,6 +115,7 @@ class AuthController extends Controller
}
Auth::login($user);
}
//after login redirecting to home page
return redirect('/');
} catch (\Exception $ex) {

View File

@@ -58,8 +58,8 @@ class ForgotPasswordController extends Controller
$password_reset_table = DB::table('password_resets')->where('email', '=', $user->email)->first();
if (isset($password_reset_table)) {
$password_reset_table = DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
// $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]);
// $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]);
} else {
$create_password_reset = DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
}

View File

@@ -63,8 +63,8 @@ class PasswordController extends Controller
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
if (isset($password_reset_table)) {
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
// $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]);
// $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]);
} else {
$create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
}

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

@@ -21,7 +21,9 @@ use App\Model\helpdesk\Ticket\Ticket_Thread;
use App\Model\helpdesk\Ticket\Tickets;
use App\Model\helpdesk\Utility\CountryCode;
use App\User;
use App\Model\helpdesk\Agent\Location;
use Exception;
use App\Model\helpdesk\Agent\Department;
// classes
use Form;
use GeoIP;
@@ -64,6 +66,8 @@ class FormController extends Controller
*/
public function getForm(Help_topic $topic, CountryCode $code)
{
$locations = Location::all();
$departments = Department::all();
if (\Config::get('database.install') == '%0%') {
return \Redirect::route('licence');
}
@@ -85,7 +89,7 @@ class FormController extends Controller
[$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', 'departments'))->with('phonecode', $phonecode);
} else {
return \Redirect::route('home');
}
@@ -113,29 +117,29 @@ class FormController extends Controller
$form_fields = explode(',', $form_data->value);
$var = '';
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') {
$type2 = $form_data->value;
$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) {
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/>';
} elseif ($form_data->type == 'textarea') {
$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') {
$type4 = $form_data->value;
$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) {
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 {
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/>';
@@ -238,26 +242,27 @@ class FormController extends Controller
if ($attachments != null) {
$storage = new \App\FaveoStorage\Controllers\StorageController();
$storage->saveAttachments($thread->id, $attachments);
// foreach ($attachments as $attachment) {
// if ($attachment != null) {
// $name = $attachment->getClientOriginalName();
// $type = $attachment->getClientOriginalExtension();
// $size = $attachment->getSize();
// $data = file_get_contents($attachment->getRealPath());
// $attachPath = $attachment->getRealPath();
// $ta->create(['thread_id' => $thread->id, 'name' => $name, 'size' => $size, 'type' => $type, 'file' => $data, 'poster' => 'ATTACHMENT']);
// }
// }
// foreach ($attachments as $attachment) {
// if ($attachment != null) {
// $name = $attachment->getClientOriginalName();
// $type = $attachment->getClientOriginalExtension();
// $size = $attachment->getSize();
// $data = file_get_contents($attachment->getRealPath());
// $attachPath = $attachment->getRealPath();
// $ta->create(['thread_id' => $thread->id, 'name' => $name, 'size' => $size, 'type' => $type, 'file' => $data, 'poster' => 'ATTACHMENT']);
// }
// }
}
// 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 {
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) {
return redirect()->back()->with('fails', $ex->getMessage());
}
// dd($result);
// dd($result);
}
/**
@@ -275,7 +280,7 @@ class FormController extends Controller
$tickets = Tickets::where('id', '=', $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;
$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();
//dd($ticket);
$thread = $thread->where('ticket_id', $tickets->id)->first();
//dd($thread);
// $tickets = $tickets->whereId($id)->first();
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)) {
Otp::where('user_id', '=', Input::get('u_id'))
->update(['otp' => '']);
// User::where('id', '=', $user->id)
// ->update(['active' => 1]);
// $this->openTicketAfterVerification($user->id);

View File

@@ -338,33 +338,33 @@ class UnAuthController extends Controller
// return Cache::get('language');
// } else return 'false';
// Cache::put('language',$);
$path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
// dd(array_key_exists($lang, Config::get('languages')));
// app()->setLocale($lang);
$path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
// dd(array_key_exists($lang, Config::get('languages')));
// app()->setLocale($lang);
\Cache::forever('language', $lang);
// dd(Cache::get('language'));
// dd()
// dd(Cache::get('language'));
// dd()
} else {
return false;
}
return true;
/* $path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
if (Auth::check()) {
$id = Auth::user()->id;
$user = User::find($id);
$user->user_language = $lang;
$user->save();
} else {
Session::put('language', $lang);
}
}
/* $path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
if (Auth::check()) {
$id = Auth::user()->id;
$user = User::find($id);
$user->user_language = $lang;
$user->save();
} else {
Session::put('language', $lang);
}
}
return redirect()->back();*/
return redirect()->back();*/
}
// Follow up tickets

View File

@@ -141,6 +141,7 @@ class UserController extends Controller
/* from whole attribute pick the article_id */
$article_id = $all->pluck('article_id');
$categorys = $category->get();
/* direct to view with $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) {
throw new Exception('No data');
}
//dd(Excel::download(new UserExport($data), $filename.'.'.'xls'));
return Excel::download(new UserExport($data), $filename.'.'.'xlsx');
}

View File

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

View File

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

View File

@@ -13,4 +13,9 @@ class Department extends BaseModel
'template_set', 'auto_ticket_response', 'auto_message_response',
'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,48 @@
namespace App\Model\helpdesk\Ticket;
use App\BaseModel;
use App\Model\helpdesk\Agent\Location;
use App\Model\helpdesk\Agent\Department;
class Tickets extends BaseModel
{
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
'submitdep_id'
];
// Các quan hệ cũ...
// public function attach(){
// return $this->hasMany('App\Model\helpdesk\Ticket\Ticket_attachments',);
//
// }
public function thread()
{
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Thread::class, 'ticket_id');
@@ -37,6 +68,15 @@ class Tickets extends BaseModel
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 submitDepartment()
{
return $this->belongsTo(Department::class, 'submitdept_id');
}
public function extraFields()
{
$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\Database\Eloquent\Model;
use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract;
use App\Model\helpdesk\Agent\Department;
class User extends Model implements AuthenticatableContract, CanResetPasswordContract, AuthenticatableUserContract
{
@@ -26,10 +27,13 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
*
* @var array
*/
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',
'assign_group', 'primary_dpt', 'agent_tzone', 'daylight_save', 'limit_access',
'directory_listing', 'vacation_mode', 'role', 'internal_note', 'country_code', 'not_accept_ticket', 'is_delete', ];
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',
'assign_group', 'primary_dpt', 'agent_tzone', 'daylight_save', 'limit_access',
'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.
@@ -175,6 +179,11 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
{
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)
{

View File

@@ -101,6 +101,7 @@ return [
*/
'key' => env('APP_KEY', 'base64:h3KjrHeVxyE+j6c8whTAs2YI+7goylGZ/e2vElgXT6I='),
'cipher' => 'AES-256-CBC',
'key' => 'base64:MwXqXnQ6V0nvPvN6cKybA2nKFtAyYv9FItYX0ZrB67g=', // dán key thật vào đây
/*
|--------------------------------------------------------------------------
| 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,29 @@
<?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->unsignedInteger('submitdept_id')->nullable()->after('id');
$table->foreign('submitdept_id')->references('id')->on('department')->onDelete('cascade');
});
}
public function down()
{
Schema::table('tickets', function (Blueprint $table) {
$table->dropForeign(['submitdept_id']);
$table->dropColumn('submitdept_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' => [],
];

16202
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

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')
@section('Tickets')
class="nav-link active"
class="nav-link active"
@stop
@section('ticket-bar')
active
active
@stop
@section('newticket')
class="nav-link active"
class="nav-link active"
@stop
@section('ticket')
class="active"
class="active"
@stop
<style>
.clear-input {
@@ -26,363 +26,409 @@ class="active"
}
</style>
@section('PageHeader')
<h1>{{Lang::get('lang.tickets')}}</h1>
<h1>{{ Lang::get('lang.tickets') }}</h1>
@stop
@section('content')
<!-- Main content -->
{!! Form::open(['route'=>'post.newticket','method'=>'post','id'=>'form']) !!}
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
@if(Session::has('errors'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/>
@if($errors->first('email'))
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
@endif
@if($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
@endif
@if($errors->first('phone'))
<li class="error-message-padding">{!! $errors->first('phone', ':message') !!}</li>
@endif
@if($errors->first('subject'))
<li class="error-message-padding">{!! $errors->first('subject', ':message') !!}</li>
@endif
@if($errors->first('body'))
<li class="error-message-padding">{!! $errors->first('body', ':message') !!}</li>
@endif
@if($errors->first('code'))
<li class="error-message-padding">{!! $errors->first('code', ':message') !!}</li>
@endif
@if($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif
</div>
@endif
<div class="card card-light">
<div class="card-header" id='box-header1'>
<h3 class="card-title">{!! Lang::get('lang.create_ticket') !!}</h3>
</div><!-- /.box-header -->
<div class="card-body">
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.user_details') !!}:</h3>
</div>
<div class="card-body">
<div class="form-group">
<div class="row">
<div class="col-md-4">
<!-- email -->
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}
@if ($email_mandatory->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::text('email',null,['class' => 'form-control', 'id' => 'email']) !!}
</div>
</div>
<div class="col-md-4">
<!-- email -->
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.first_name')) !!} <span class="text-red"> *</span>
<!-- {!! Form::text('email',null,['class' => 'form-control'],['id' => 'email']) !!} -->
<input type="text" name="first_name" id="first_name" class="form-control">
</div>
</div>
<div class="col-md-4">
<!-- full name -->
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! 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">
</div>
</div>
</div>
<div class="row">
<div class="col-md-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
<div class="form-group {{ $errors->has('code') ? 'has-error' : '' }}">
{!! Form::label('code',Lang::get('lang.country-code')) !!}
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::text('code',null,['class' => 'form-control', 'id' => 'country_code', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
</div>
</div>
<div class="col-md-5">
<!-- phone -->
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
<label>{!! Lang::get('lang.mobile_number') !!}:</label>
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::input('number','mobile',null,['class' => 'form-control', 'id' => 'mobile']) !!}
</div>
</div>
<div class="col-md-6">
<!-- phone -->
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
<label>{!! Lang::get('lang.phone') !!}:</label>
{!! Form::input('number','phone',null,['class' => 'form-control', 'id' => 'phone_number']) !!}
{!! $errors->first('phone', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<!-- <div class="form-group">
<div class="col-md-2">
<label>Ticket Notice:</label>
</div>
<div class="col-md-6">
<input type="checkbox" name="notice" id=""> Send alert to User
</div>
</div> -->
</div>
</div>
</div>
<!-- Main content -->
{!! Form::open(['route' => 'post.newticket', 'method' => 'post', 'id' => 'form']) !!}
@if (Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ Session::get('success') }}
</div>
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.ticket_option') !!}:</h3>
</div>
<div class="card-body">
<!-- ticket options -->
<div class="form-group">
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label>{!! Lang::get('lang.help_topic') !!}:</label>
<!-- helptopic -->
<?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']) !!}
</div>
</div>
<div class="col-md-3">
<!-- sla plan -->
<div class="form-group">
<label>{!! Lang::get('lang.sla_plan') !!}:</label>
<?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']) !!}
</div>
</div>
<div class="col-md-3">
<!-- due date -->
<div class="form-group" id="duedate">
<label>{!! Lang::get('lang.due_date') !!}:</label>
{!! 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>
</div>
</div>
<div class="col-md-3">
<!-- assign to -->
<div class="form-group">
<label>{!! Lang::get('lang.assign_to') !!}:</label>
<?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']) !!}
</div>
</div>
<div id="response" class="col-md-6 form-group"></div>
</div>
<div class="row">
{{-- Event fire --}}
<?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\ClientTicketForm()); ?>
</div>
</div>
</div>
@endif
<!-- failure message -->
@if (Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ Session::get('fails') }}
</div>
@endif
@if (Session::has('errors'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br />
@if ($errors->first('email'))
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
@endif
@if ($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
@endif
@if ($errors->first('phone'))
<li class="error-message-padding">{!! $errors->first('phone', ':message') !!}</li>
@endif
@if ($errors->first('subject'))
<li class="error-message-padding">{!! $errors->first('subject', ':message') !!}</li>
@endif
@if ($errors->first('body'))
<li class="error-message-padding">{!! $errors->first('body', ':message') !!}</li>
@endif
@if ($errors->first('code'))
<li class="error-message-padding">{!! $errors->first('code', ':message') !!}</li>
@endif
@if ($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif
</div>
@endif
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.ticket_detail') !!}:</h3>
</div>
<div class="card card-light">
<div class="card-body">
<!-- ticket details -->
<div class="form-group">
<!-- subject -->
<div class="form-group {{ $errors->has('subject') ? 'has-error' : '' }}">
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.subject') !!}:<span class="text-red"> *</span></label>
</div>
<div class="col-md-11">
{!! Form::text('subject',null,['class' => 'form-control']) !!}
</div>
</div>
</div>
<div class="form-group {{ $errors->has('body') ? 'has-error' : '' }}">
<!-- details -->
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.detail') !!}:<span class="text-red"> *</span></label>
</div>
<div class="col-md-11">
{!! Form::textarea('body',null,['class' => 'form-control','id' => 'body', 'style'=>"width:100%; height:150px;"]) !!}
<div class="card-header" id='box-header1'>
<h3 class="card-title">{!! Lang::get('lang.create_ticket') !!}</h3>
</div><!-- /.box-header -->
<div class="card-body">
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.user_details') !!}:</h3>
</div>
<div class="card-body">
</div>
</div>
</div>
<div class="form-group">
<!-- priority -->
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.priority') !!}:</label>
<div class="col-md-4">
<!-- email -->
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email', Lang::get('lang.email')) !!}
@if ($email_mandatory->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::text('email', null, ['class' => 'form-control', 'id' => 'email']) !!}
</div>
</div>
<div class="col-md-4">
<!-- email -->
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('email', Lang::get('lang.first_name')) !!} <span class="text-red"> *</span>
<!-- {!! Form::text('email', null, ['class' => 'form-control'], ['id' => 'email']) !!} -->
<input type="text" name="first_name" id="first_name" class="form-control">
</div>
</div>
<div class="col-md-4">
<!-- full name -->
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! 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">
</div>
</div>
</div>
<div class="row">
<div class="col-md-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
<div class="form-group {{ $errors->has('code') ? 'has-error' : '' }}">
{!! Form::label('code', Lang::get('lang.country-code')) !!}
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::text('code', null, [
'class' => 'form-control',
'id' => 'country_code',
'placeholder' => $phonecode,
'title' => Lang::get('lang.enter-country-phone-code'),
]) !!}
</div>
</div>
<div class="col-md-5">
<?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']) !!}
<!-- phone -->
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
<label>{!! Lang::get('lang.mobile_number') !!}:</label>
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::input('number', 'mobile', null, ['class' => 'form-control', 'id' => 'mobile']) !!}
</div>
</div>
<div class="col-md-6">
<!-- phone -->
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
<label>{!! Lang::get('lang.phone') !!}:</label>
{!! Form::input('number', 'phone', null, ['class' => 'form-control', 'id' => 'phone_number']) !!}
{!! $errors->first('phone', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<!-- <div class="form-group">
<div class="col-md-2">
<label>Ticket Notice:</label>
</div>
<div class="col-md-6">
<input type="checkbox" name="notice" id=""> Send alert to User
</div>
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<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();">
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.ticket_option') !!}:</h3>
</div>
<div class="card-body">
<!-- ticket options -->
<div class="form-group">
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label>{!! Lang::get('lang.help_topic') !!}:</label>
<!-- helptopic -->
<?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',
]) !!}
</div>
</div>
<div class="col-md-3">
<!-- sla plan -->
<div class="form-group">
<label>{!! Lang::get('lang.sla_plan') !!}:</label>
<?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',
]) !!}
</div>
</div>
<div class="col-md-3">
<!-- due date -->
<div class="form-group" id="duedate">
<label>{!! Lang::get('lang.due_date') !!}:</label>
{!! 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>
</div>
</div>
<div class="col-md-3">
<!-- assign to -->
<div class="form-group">
<label>{!! Lang::get('lang.assign_to') !!}:</label>
<?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'],
) !!}
</div>
</div>
<div id="response" class="col-md-6 form-group"></div>
</div>
<div class="row">
{{-- Event fire --}}
<?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\ClientTicketForm()); ?>
</div>
</div>
</div>
</div>
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.ticket_detail') !!}:</h3>
</div>
<div class="card-body">
<!-- ticket details -->
<div class="form-group">
<!-- subject -->
<div class="form-group {{ $errors->has('subject') ? 'has-error' : '' }}">
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.subject') !!}:<span class="text-red"> *</span></label>
</div>
<div class="col-md-11">
{!! Form::text('subject', null, ['class' => 'form-control']) !!}
</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' : '' }}">
<!-- details -->
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.detail') !!}:<span class="text-red"> *</span></label>
</div>
<div class="col-md-11">
{!! Form::textarea('body', null, [
'class' => 'form-control',
'id' => 'body',
'style' => 'width:100%; height:150px;',
]) !!}
</div>
</div>
</div>
<div class="form-group">
<!-- priority -->
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.priority') !!}:</label>
</div>
<div class="col-md-5">
<?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'],
) !!}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- /. box -->
{!! Form::close() !!}
<script type="text/javascript">
$(document).ready(function () {
var helpTopic = $("#selectid").val();
send(helpTopic);
$("#selectid").on("change", function () {
helpTopic = $("#selectid").val();
<div class="card-footer">
<div class="row">
<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();">
</div>
</div>
</div>
</div><!-- /. box -->
{!! Form::close() !!}
<script type="text/javascript">
$(document).ready(function() {
var helpTopic = $("#selectid").val();
send(helpTopic);
$("#selectid").on("change", function() {
helpTopic = $("#selectid").val();
send(helpTopic);
});
function send(helpTopic) {
$.ajax({
url: "{{ url('/get-helptopic-form') }}",
data: {
'helptopic': helpTopic
},
type: "GET",
dataType: "html",
success: function(response) {
$("#response").html(response);
},
error: function(response) {
$("#response").html(response);
}
});
}
});
function send(helpTopic) {
$.ajax({
url: "{{url('/get-helptopic-form')}}",
data: {'helptopic': helpTopic},
type: "GET",
dataType: "html",
success: function (response) {
$("#response").html(response);
},
error: function (response) {
$("#response").html(response);
$(function() {
$("textarea").summernote({
height: 300,
tabsize: 2,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
});
$(document).ready(function() {
$('#form').submit(function() {
var duedate = document.getElementById('datemask').value;
if (duedate) {
var pattern = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;
if (pattern.test(duedate) === true) {
$('#duedate').removeClass("has-error");
$('#clear-up').remove();
} else {
$('#duedate').addClass("has-error");
$('#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>"
);
return false;
}
}
});
}
});
$(function () {
$("textarea").summernote({
height: 300,
tabsize: 2,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
});
$(document).ready(function () {
$('#form').submit(function () {
var duedate = document.getElementById('datemask').value;
if (duedate) {
var pattern = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;
if (pattern.test(duedate) === true) {
$('#duedate').removeClass("has-error");
$('#clear-up').remove();
} else {
$('#duedate').addClass("has-error");
$('#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>");
return false;
});
$(document).ready(function() {
$("#email").autocomplete({
source: "{!! URL::route('post.newticket.autofill') !!}",
minLength: 1,
select: function(evt, ui) {
// this.form.phone_number.value = ui.item.phone_number;
// this.form.user_name.value = ui.item.user_name;
if (ui.item.first_name) {
this.form.first_name.value = ui.item.first_name;
}
if (ui.item.last_name) {
this.form.last_name.value = ui.item.last_name;
}
if (ui.item.country_code) {
this.form.country_code.value = ui.item.country_code;
}
if (ui.item.phone_number) {
this.form.phone_number.value = ui.item.phone_number;
}
if (ui.item.mobile) {
this.form.mobile.value = ui.item.mobile;
}
}
}
});
});
});
$(document).ready(function(){
$("#email").autocomplete({
source:"{!!URL::route('post.newticket.autofill')!!}",
minLength:1,
select:function(evt, ui) {
// this.form.phone_number.value = ui.item.phone_number;
// this.form.user_name.value = ui.item.user_name;
if(ui.item.first_name) {
this.form.first_name.value = ui.item.first_name;
}
if(ui.item.last_name) {
this.form.last_name.value = ui.item.last_name;
}
if(ui.item.country_code) {
this.form.country_code.value = ui.item.country_code;
}
if(ui.item.phone_number) {
this.form.phone_number.value = ui.item.phone_number;
}
if(ui.item.mobile) {
this.form.mobile.value = ui.item.mobile;
}
}
});
});
$(function () {
var picker = $('#datemask').datetimepicker({
format: 'DD/MM/YYYY',
});
picker.on('dp.change', function(e) {
if (e.date) {
$('.clear-input').show();
} else {
$(function() {
var picker = $('#datemask').datetimepicker({
format: 'DD/MM/YYYY',
});
picker.on('dp.change', function(e) {
if (e.date) {
$('.clear-input').show();
} else {
$('.clear-input').hide();
}
});
$('.clear-input').click(function() {
$('#datemask').val('');
$('.clear-input').hide();
}
});
$('.clear-input').click(function() {
$('#datemask').val('');
$('.clear-input').hide();
});
});
});
</script>
</script>
@stop

File diff suppressed because it is too large Load Diff

View File

@@ -2,211 +2,234 @@
@section('Users')
class="nav-link active"
class="nav-link active"
@stop
@section('user-bar')
class="nav-link active"
class="nav-link active"
@stop
@section('user')
class="active"
class="active"
@stop
@section('user-directory')
class="nav-link active"
class="nav-link active"
@stop
<!-- header -->
@section('PageHeader')
<h1>{!! Lang::get('lang.edit_user') !!}</h1>
<h1>{!! Lang::get('lang.edit_user') !!}</h1>
@stop
<!-- /header -->
<!-- content -->
@section('content')
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
@if(Session::has('errors'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/>
@if($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
@endif
@if($errors->first('last_name'))
<li class="error-message-padding">{!! $errors->first('last_name', ':message') !!}</li>
@endif
@if($errors->first('user_name'))
<li class="error-message-padding">{!! $errors->first('user_name', ':message') !!}</li>
@endif
@if($errors->first('email'))
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
@endif
@if($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif
@if($errors->first('ext'))
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
@endif
@if($errors->first('phone_number'))
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
@endif
@if($errors->first('active'))
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
@endif
</div>
@if (Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ Session::get('fails') }}
</div>
@endif
<!-- open a form -->
{!! Form::model($users,['url'=>'user/'.$users->id,'method'=>'PATCH']) !!}
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">
{!! Lang::get('lang.user_credentials') !!}
</h3>
</div>
<div class="card-body">
<div class="row">
<!-- First name : first name : Required -->
<div class="col-sm-4 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}<span class="text-red"> *</span>
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
</div>
<!-- Last name : last name : Required -->
<div class="col-sm-4 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
</div>
<!-- User Name : Text : Required-->
<div class="col-sm-4 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
{!! Form::label('user_name',Lang::get('lang.user_name')) !!}<span class="text-red"> *</span>
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="row">
<!-- Email Address : Email : Required -->
<div class="col-sm-6 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! Form::email('email',null,['class' => 'form-control']) !!}
</div>
<div class="col-sm-6 form-group {{ $errors->has('organization') ? 'has-error' : '' }}">
{!! Form::label('organization',Lang::get('lang.organization')) !!}
<select class="form-control" name="org_id">
@foreach($orgs as $org)
<option value="{!! $org->id !!}" <?php
if ($org->id==$organization_id) {
echo 'selected';
}
?> >{!! $org->name !!}</option>
@endforeach
</select>
</div>
@if (Session::has('errors'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br />
@if ($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
@endif
@if ($errors->first('last_name'))
<li class="error-message-padding">{!! $errors->first('last_name', ':message') !!}</li>
@endif
@if ($errors->first('user_name'))
<li class="error-message-padding">{!! $errors->first('user_name', ':message') !!}</li>
@endif
@if ($errors->first('email'))
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
@endif
@if ($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif
@if ($errors->first('ext'))
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
@endif
@if ($errors->first('phone_number'))
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
@endif
@if ($errors->first('active'))
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
@endif
</div>
<div class="row">
<div class="col-sm-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
{!! $errors->first('country_code', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
@endif
<!-- open a form -->
{!! Form::model($users, ['url' => 'user/' . $users->id, 'method' => 'PATCH']) !!}
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">
{!! Lang::get('lang.user_credentials') !!}
</h3>
</div>
<div class="card-body">
<div class="row">
<!-- First name : first name : Required -->
<div class="col-sm-4 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('first_name', Lang::get('lang.first_name')) !!}<span class="text-red"> *</span>
{!! Form::text('first_name', null, ['class' => 'form-control']) !!}
</div>
<!-- Last name : last name : Required -->
<div class="col-sm-4 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('last_name', Lang::get('lang.last_name')) !!}
{!! Form::text('last_name', null, ['class' => 'form-control']) !!}
</div>
<!-- User Name : Text : Required-->
<div class="col-sm-4 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
{!! Form::label('user_name', Lang::get('lang.user_name')) !!}<span class="text-red"> *</span>
{!! Form::text('user_name', null, ['class' => 'form-control']) !!}
</div>
</div>
<!-- mobile Number : Text : -->
<div class="col-md-3 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
{!! Form::input('number', 'mobile',null,['class' => 'form-control']) !!}
</div>
<div class="col-sm-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<label for="ext">{!! Lang::get('lang.ext') !!}</label>
{!! Form::text('ext',null,['class' => 'form-control']) !!}
<div class="row">
<!-- Email Address : Email : Required -->
<div class="col-sm-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email', Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! Form::email('email', null, ['class' => 'form-control']) !!}
</div>
<div class="col-sm-4 form-group {{ $errors->has('organization') ? 'has-error' : '' }}">
{!! Form::label('organization', Lang::get('lang.organization')) !!}
<select class="form-control" name="org_id">
@foreach ($orgs as $org)
<option value="{!! $org->id !!}" <?php
if ($org->id == $organization_id) {
echo 'selected';
}
?>>{!! $org->name !!}</option>
@endforeach
</select>
</div>
<div class="col-sm-4 form-group {{ $errors->has('dept_id') ? 'has-error' : '' }}">
{!! Form::label('dept_id', 'Phòng ban') !!}
<select class="form-control" name="dept_id" id="dept_id" required>
<option value="">-- Chọn phòng ban --</option>
@foreach ($departments as $department)
<option value="{{ $department->id }}"
{{ isset($users) && $users->department && $users->department->id == $department->id ? 'selected' : '' }}>
{{ $department->name }}
</option>
@endforeach
</select>
</div>
</div>
<div class="col-sm-3 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
<label for="phone_number">{!! Lang::get('lang.phone') !!}</label>
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
<div class="col-sm-2 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
{!! Form::label('active',Lang::get('lang.status')) !!}
<div class="row">
<div class="col-sm-12">
{!! Form::radio('active','1',true) !!} {{Lang::get('lang.active')}}
<div class="row">
<div class="col-sm-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('country_code', Lang::get('lang.country-code')) !!}
{!! $errors->first('country_code', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('country_code', null, [
'class' => 'form-control',
'placeholder' => $phonecode,
'title' => Lang::get('lang.enter-country-phone-code'),
]) !!}
</div>
<!-- mobile Number : Text : -->
<div class="col-md-3 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile', Lang::get('lang.mobile')) !!}
{!! Form::input('number', 'mobile', null, ['class' => 'form-control']) !!}
</div>
<div class="col-sm-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<label for="ext">{!! Lang::get('lang.ext') !!}</label>
{!! Form::text('ext', null, ['class' => 'form-control']) !!}
</div>
<div class="col-sm-3 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
<label for="phone_number">{!! Lang::get('lang.phone') !!}</label>
{!! Form::text('phone_number', null, ['class' => 'form-control']) !!}
</div>
<div class="col-sm-2 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
{!! Form::label('active', Lang::get('lang.status')) !!}
<div class="row">
<div class="col-sm-12">
{!! Form::radio('active', '1', true) !!} {{ Lang::get('lang.active') }}
</div>
<div class="col-sm-12">
{!! Form::radio('active', '0') !!} {{ Lang::get('lang.inactive') }}
</div>
</div>
<div class="col-sm-12">
{!! Form::radio('active','0') !!} {{Lang::get('lang.inactive')}}
</div>
<div class="col-sm-2 form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
{!! Form::label('ban', Lang::get('lang.ban')) !!}
<div class="row">
<div class="col-sm-12">
{!! Form::radio('ban', '1', true) !!} {{ Lang::get('lang.enable') }}
</div>
<div class="col-sm-12">
{!! Form::radio('ban', '0') !!} {{ Lang::get('lang.disable') }}
</div>
</div>
</div>
</div>
<div class="col-sm-2 form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
{!! Form::label('ban',Lang::get('lang.ban')) !!}
<div class="row">
<div class="col-sm-12">
{!! Form::radio('ban','1',true) !!} {{Lang::get('lang.enable')}}
</div>
<div class="col-sm-12">
{!! Form::radio('ban','0') !!} {{Lang::get('lang.disable')}}
</div>
</div>
<!-- Internal Notes : Textarea -->
<div class="form-group">
{!! Form::label('internal_note', Lang::get('lang.internal_notes')) !!}
{!! Form::textarea('internal_note', null, ['class' => 'form-control', 'size' => '30x5']) !!}
</div>
</div>
<!-- Internal Notes : Textarea -->
<div class="form-group">
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
{!! Form::textarea('internal_note',null,['class' => 'form-control', 'size' => '30x5']) !!}
<div class="card-footer">
{!! Form::submit(Lang::get('lang.update'), ['class' => 'btn btn-primary']) !!}
</div>
</div>
<div class="card-footer">
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
</div>
</div>
<script>
$(function() {
$("textarea").summernote({
height: 300,
tabsize: 2,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
});
</script>
<script>
$(function() {
$("textarea").summernote({
height: 300,
tabsize: 2,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
});
</script>
@stop
@section('FooterInclude')
<!--<script>
$('#org').autocomplete({
minLength: 1,
source: function (request, response) {
$.getJSON("{{url('get-organization')}}", {
term: request.term
}, function (data) {
var array = data.error ? [] : $.map(data, function (m) {
return {
label: m.label,
value: m.value
};
<!--<script>
$('#org').autocomplete({
minLength: 1,
source: function(request, response) {
$.getJSON("{{ url('get-organization') }}", {
term: request.term
}, function(data) {
var array = data.error ? [] : $.map(data, function(m) {
return {
label: m.label,
value: m.value
};
});
response(array);
});
response(array);
});
},
select: function (event, ui) {
$("#org").val(ui.item.label); // display the selected text
$("#field_id").val(ui.item.value); // save selected id to hidden input
return false;
}
});
},
select: function(event, ui) {
$("#org").val(ui.item.label); // display the selected text
$("#field_id").val(ui.item.value); // save selected id to hidden input
return false;
}
});
</script>-->
</script>-->
@stop
@stop

View File

@@ -1,334 +1,365 @@
@extends('themes.default1.agent.layout.agent')
@section('Dashboard')
class="nav-link active"
class="nav-link active"
@stop
@section('dashboard-bar')
active
active
@stop
@section('profile')
class="nav-link active"
class="nav-link active"
@stop
@section('PageHeader')
<h1>{{Lang::get('lang.edit-profile')}}</h1>
<h1>{{ Lang::get('lang.edit-profile') }}</h1>
@stop
@section('content')
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
@if(Session::has('errors'))
<?php //dd($errors); ?>
@if (Session::has('success1'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ Session::get('success1') }}
</div>
@endif
<!-- fail message -->
@if (Session::has('fails1'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ Session::get('fails1') }}
</div>
@endif
@if (Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<b>Success</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ Session::get('success') }}
</div>
@endif
<!-- fail message -->
@if (Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>Fail!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ Session::get('fails') }}
</div>
@endif
@if (Session::has('errors'))
<?php //dd($errors);
?>
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/>
@if($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br />
@if ($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
@endif
@if ($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif
</div>
@endif
@if($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif
</div>
@endif
<div class="row">
<div class="col-md-6">
{!! Form::model($user,['url'=>'agent-profile', 'id' => 'agent-profile', 'method' => 'PATCH','files'=>true]) !!}
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">
{!! Lang::get('lang.profile') !!}
</h3>
</div>
<div class="card-body">
<!-- first name -->
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('first_name',Lang::get('lang.first_name')) !!} <span class="text-red"> *</span>
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
<div class="row">
<div class="col-md-6">
{!! Form::model($user, [
'url' => 'agent-profile',
'id' => 'agent-profile',
'method' => 'PATCH',
'files' => true,
]) !!}
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">
{!! Lang::get('lang.profile') !!}
</h3>
</div>
<!-- last name -->
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
</div>
<!-- gender -->
<div class="form-group">
{!! Form::label('gender',Lang::get('lang.gender')) !!}
<div class="card-body">
<!-- first name -->
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('first_name', Lang::get('lang.first_name')) !!} <span class="text-red"> *</span>
{!! Form::text('first_name', null, ['class' => 'form-control']) !!}
</div>
<!-- last name -->
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('last_name', Lang::get('lang.last_name')) !!}
{!! Form::text('last_name', null, ['class' => 'form-control']) !!}
</div>
<!-- gender -->
<div class="form-group">
{!! Form::label('gender', Lang::get('lang.gender')) !!}
<div class="row">
<div class="col-sm-3">
{!! Form::radio('gender', '1', true) !!} {{ Lang::get('lang.male') }}
</div>
<div class="col-sm-3">
{!! Form::radio('gender', '0') !!} {{ Lang::get('lang.female') }}
</div>
</div>
</div>
<div class="form-group">
<label for="dept_id">Phòng ban</label>
<select class="form-control" name="dept_id" id="dept_id" required>
<option value="">-- Chọn phòng ban --</option>
@foreach ($departments as $department)
<option value="{{ $department->id }}"
{{ $user->dept_id == $department->id ? 'selected' : '' }}>
{{ $department->name }}
</option>
@endforeach
</select>
</div>
<div class="row">
<div class="col-sm-3">
{!! Form::radio('gender','1',true) !!} {{Lang::get('lang.male')}}
<!-- phone extension -->
<div class="col-sm-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('country_code', Lang::get('lang.country-code')) !!}
{!! Form::text('country_code', null, [
'class' => 'form-control',
'placeholder' => $phonecode,
'title' => Lang::get('lang.enter-country-phone-code'),
'id' => 'code',
]) !!}
</div>
<div class="col-sm-3">
{!! Form::radio('gender','0') !!} {{Lang::get('lang.female')}}
<!-- phone number -->
<div class="col-sm-8 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
{!! Form::label('phone_number', Lang::get('lang.phone')) !!}
{!! Form::text('phone_number', null, ['class' => 'form-control']) !!}
</div>
<div class="col-sm-2 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
{!! Form::label('ext', Lang::get('lang.ext')) !!}
{!! Form::text('ext', null, ['class' => 'form-control']) !!}
</div>
</div>
</div>
<div class="form-group">
<!-- email address -->
{!! Form::label('email',Lang::get('lang.email_address')) !!}
<div>
{{$user->email}}
<!-- mobile -->
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile', Lang::get('lang.mobile_number')) !!}
{!! Form::input('number', 'mobile', null, ['class' => 'form-control', 'id' => 'mobile']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
<!-- company -->
{!! Form::label('company',Lang::get('lang.company')) !!}
{!! Form::text('company',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<!-- phone extension -->
<div class="col-sm-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code'), 'id' => 'code']) !!}
<div class="form-group {{ $errors->has('agent_sign') ? 'has-error' : '' }}">
{!! Form::label('agent_sign', Lang::get('lang.agent_sign')) !!}
{!! Form::textarea('agent_sign', null, ['class' => 'form-control']) !!}
</div>
<!-- phone number -->
<div class="col-sm-8 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
<div class="col-sm-2 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
{!! Form::label('ext',Lang::get('lang.ext')) !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
<!-- profile pic -->
<div type="file" class="btn btn-default btn-file" style="color:orange">
<i class="fa fa-user"> </i>
{!! Form::label('profile_pic', Lang::get('lang.profile_pic'), ['style' => 'font-weight:400;margin-bottom:0px;']) !!}
{!! Form::file('profile_pic', ['class' => 'form-file']) !!}
</div>
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
<!-- mobile -->
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
{!! Form::input('number', 'mobile',null,['class' => 'form-control', 'id' => 'mobile']) !!}
<div class="card-footer">
{!! Form::submit(Lang::get('lang.update'), ['class' => 'btn btn-primary']) !!}
</div>
<div class="form-group {{ $errors->has('agent_sign') ? 'has-error' : '' }}">
{!! Form::label('agent_sign',Lang::get('lang.agent_sign')) !!}
{!! Form::textarea('agent_sign',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
<!-- profile pic -->
<div type="file" class="btn btn-default btn-file" style="color:orange">
<i class="fa fa-user"> </i>
{!! Form::label('profile_pic',Lang::get('lang.profile_pic'),['style'=>'font-weight:400;margin-bottom:0px;']) !!}
{!! Form::file('profile_pic',['class' => 'form-file']) !!}
</div>
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
<div class="card-footer">
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
</div>
<div class="col-md-6">
{!! Form::model($user, ['url' => 'agent-profile-password/' . $user->id, 'method' => 'PATCH']) !!}
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.change_password') !!}</h3>
</div>
<div class="card-body pb-0">
<!-- old password -->
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password', Lang::get('lang.old_password')) !!} <span class="text-red"> *</span>
{!! Form::password('old_password', ['class' => 'form-control']) !!}
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"
style="float: right;top: -46px;left: -10px;"></span>
</div>
<!-- new password -->
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
{!! Form::label('new_password', Lang::get('lang.new_password')) !!} <span class="text-red"> *</span>
{!! Form::password('new_password', ['class' => 'form-control']) !!}
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"
style="float: right;top: -46px;left: -10px;"></span>
</div>
<!-- confirm password -->
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
{!! Form::label('confirm_password', Lang::get('lang.confirm_password')) !!} <span class="text-red"> *</span>
{!! Form::password('confirm_password', ['class' => 'form-control']) !!}
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"
style="float: right;top: -46px;left: -10px;"></span>
</div>
</div>
<div class="card-footer">
{!! Form::submit(Lang::get('lang.update'), ['class' => 'btn btn-primary']) !!}
</div>
</div>
</div>
</div>
<div class="col-md-6">
{!! Form::model($user,['url'=>'agent-profile-password/'.$user->id , 'method' => 'PATCH']) !!}
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{!! Lang::get('lang.change_password') !!}</h3>
</div>
<div class="card-body pb-0">
<!-- old password -->
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password',Lang::get('lang.old_password')) !!} <span class="text-red"> *</span>
{!! Form::password('old_password',['class' => 'form-control']) !!}
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback" style="float: right;top: -46px;left: -10px;"></span>
</div>
<!-- new password -->
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
{!! Form::label('new_password',Lang::get('lang.new_password')) !!} <span class="text-red"> *</span>
{!! Form::password('new_password',['class' => 'form-control']) !!}
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback" style="float: right;top: -46px;left: -10px;"></span>
</div>
<!-- confirm password -->
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!} <span class="text-red"> *</span>
{!! Form::password('confirm_password',['class' => 'form-control']) !!}
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback" style="float: right;top: -46px;left: -10px;"></span>
</div>
</div>
<div class="card-footer">
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</div>
{!! Form::close() !!}
<!-- Modal for last step of setting -->
<div class="modal fade" id="last-modal">
<div class="modal-dialog" role="document">
<div class="col-md-2"></div>
<div class="col-md-12" style="height:40%">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{Lang::get('lang.verify-number')}}</h4>
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<div id="custom-alert-body2">
<div class="row">
<div class="col-md-12">
<div id="loader2" style="display:none">
<center><img src="{{asset('lb-faveo/media/images/gifloader.gif')}}"></center>
</div>
<div id="verify-success" style="display:none" class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"> </i>
<span id = "success_message"></span>
</div>
<div id="verify-fail" style="display:none" class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"> </i> <b> {!! Lang::get('lang.alert') !!}! </b>
<span id = "error_message"></span>
{!! Form::close() !!}
<!-- Modal for last step of setting -->
<div class="modal fade" id="last-modal">
<div class="modal-dialog" role="document">
<div class="col-md-2"></div>
<div class="col-md-12" style="height:40%">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ Lang::get('lang.verify-number') }}</h4>
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<div id="custom-alert-body2">
<div class="row">
<div class="col-md-12">
<div id="loader2" style="display:none">
<center><img src="{{ asset('lb-faveo/media/images/gifloader.gif') }}"></center>
</div>
<div id="verify-success" style="display:none"
class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"> </i>
<span id = "success_message"></span>
</div>
<div id="verify-fail" style="display:none"
class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"> </i> <b> {!! Lang::get('lang.alert') !!}! </b>
<span id = "error_message"></span>
</div>
</div>
</div>
</div>
<div id="verify-number-form">
{!! Form::open(['id' => 'verify-otp', 'method' => 'POST']) !!}
<div class="row">
<div class="col-md-8">
{{ Lang::get('lang.get-verify-message') }}
</div>
<div class="col-md-4">
{!! Form::text('token', '', [
'class' => 'form-control',
'required' => true,
'placeholder' => Lang::get('lang.enter-otp'),
'id' => 'otp',
]) !!}
</div>
</div>
</div>
</div>
<div id="verify-number-form">
{!! Form::open(['id'=>'verify-otp','method' => 'POST'] )!!}
<div class="row">
<div class="col-md-8">
{{ Lang::get('lang.get-verify-message') }}
</div>
<div class="col-md-4">
{!! Form::text('token','',['class' => 'form-control', 'required' => true, 'placeholder' => Lang::get('lang.enter-otp'), 'id' => 'otp']) !!}
</div>
</div>
<div class="modal-footer justify-content-between">
<button type="button" id="close-last"
class="btn btn-default closemodal">{{ Lang::get('lang.close') }}</button>
<div id="last-submit"><input type="submit" id="merge-btn" class="btn btn-primary"
value="{!! Lang::get('lang.verify') !!}"></input></div>
</div>
{!! Form::close() !!}
</div>
<div class="modal-footer justify-content-between">
<button type="button" id="close-last" class="btn btn-default closemodal">{{Lang::get('lang.close')}}</button>
<div id="last-submit"><input type="submit" id="merge-btn" class="btn btn-primary" value="{!! Lang::get('lang.verify') !!}"></input></div>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
</div>
<!-- modal end -->
<script>
$(function() {
$("textarea").wysihtml5();
});
</script>
@if($verify == 1 || $verify == '1')
<script type="text/javascript">
$('#agent-profile').on('submit', function(e){
var old_mobile = "<?php echo $user->mobile;?>";
var email = "<?php echo $user->email;?>";
var full_name = "<?php echo $user->first_name; ?>";
var mobile = document.getElementById('mobile').value;
var code = document.getElementById('code').value;
if (code == '' || code == null) {
//do nothingalert
} else {
var id = "<?php echo $user->id; ?>";
if (mobile !== old_mobile) {
e.preventDefault();
$('#last-modal').css('display', 'block');
$.ajax({
url: '{{URL::route("agent-verify-number")}}',
type: 'post', // performing a POST request
data : {
mobile : mobile,
full_name: full_name,
email: email,
code: code // will be accessible in $_POST['data1']
},
dataType: 'json',
beforeSend: function() {
$('#loader2').css('display', 'block');
$('#verify-number-form').css('display', 'none');
$('#verify-fail').css('display', 'none');
$('verify-success').css('display', 'none');
},
success: function(response) {
$('#loader2').css('display', 'none');
$('#verify-number-form').css('display', 'block');
$('#verify-otp').on('submit', function(e){
<!-- modal end -->
<script>
$(function() {
$("textarea").wysihtml5();
});
</script>
@if ($verify == 1 || $verify == '1')
<script type="text/javascript">
$('#agent-profile').on('submit', function(e) {
var old_mobile = "<?php echo $user->mobile; ?>";
var email = "<?php echo $user->email; ?>";
var full_name = "<?php echo $user->first_name; ?>";
var mobile = document.getElementById('mobile').value;
var code = document.getElementById('code').value;
if (code == '' || code == null) {
//do nothingalert
} else {
var id = "<?php echo $user->id; ?>";
if (mobile !== old_mobile) {
e.preventDefault();
var otp = document.getElementById('otp').value;
$('#last-modal').css('display', 'block');
$.ajax({
url: '{{URL::route("post-agent-verify-number")}}',
type: 'POST',
url: '{{ URL::route('agent-verify-number') }}',
type: 'post', // performing a POST request
data: {
otp: otp,
u_id: id,
mobile: mobile,
full_name: full_name,
email: email,
code: code // will be accessible in $_POST['data1']
},
dataType: 'html',
beforeSend: function(){
dataType: 'json',
beforeSend: function() {
$('#loader2').css('display', 'block');
$('#verify-number-form').css('display', 'none');
$('#verify-fail').css('display', 'none');
$('verify-success').css('display', 'none');
},
success: function(response){
if( response == 1) {
success: function(response) {
$('#loader2').css('display', 'none');
$('#verify-number-form').css('display', 'block');
$('#verify-otp').on('submit', function(e) {
e.preventDefault();
var otp = document.getElementById('otp').value;
$.ajax({
url: '{{ URL::route('post-agent-verify-number') }}',
type: 'POST',
data: {
otp: otp,
u_id: id,
},
dataType: 'html',
beforeSend: function() {
$('#loader2').css('display', 'block');
$('#verify-number-form').css('display',
'none');
$('#verify-fail').css('display', 'none');
$('verify-success').css('display', 'none');
},
success: function(response) {
if (response == 1) {
$('#loader2').css('display', 'none');
var message =
"{{ Lang::get('lang.number-verification-sussessfull') }}";
$('#success_message').html(message);
$('#verify-success').css('display',
'block');
$('#agent-profile').unbind('submit')
.submit();
} else {
$('#loader2').css('display', 'none');
$("#error_message").html(response);
$('#verify-fail').css('display',
'block');
$('#verify-number-form').css('display',
'block');
}
}
});
});
},
complete: function(jqXHR, textStatus) {
if (textStatus === "parsererror" || textStatus === "timeout" ||
textStatus === "abort" || textStatus === "error") {
var message = "{{ Lang::get('lang.otp-not-sent') }}";
$('#loader2').css('display', 'none');
var message = "{{Lang::get('lang.number-verification-sussessfull')}}";
$('#success_message').html(message);
$('#verify-success').css('display', 'block');
$('#agent-profile').unbind('submit').submit();
} else {
$('#loader2').css('display', 'none');
$("#error_message").html(response);
$("#error_message").html(message);
$("#merge-btn").css('display', 'none');
$('#verify-fail').css('display', 'block');
$('#verify-number-form').css('display', 'block');
}
}
});
});
},
complete: function( jqXHR, textStatus) {
if (textStatus === "parsererror" || textStatus === "timeout" || textStatus === "abort" || textStatus === "error") {
var message = "{{Lang::get('lang.otp-not-sent')}}";
$('#loader2').css('display', 'none');
$("#error_message").html(message);
$("#merge-btn").css('display', 'none');
$('#verify-fail').css('display', 'block');
}
}
});
}
}
});
$('.closemodal').on('click', function(){
$('#last-modal').css('display', 'none');
});
</script>
@endif
@stop
$('.closemodal').on('click', function() {
$('#last-modal').css('display', 'none');
});
</script>
@endif
@stop

View File

@@ -94,6 +94,12 @@ class="active"
<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>
<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='col-sm-4'><label>{!! Lang::get('lang.role') !!}:</label></div> <div class='col-sm-7'> {{ $user->role }}</div>
</div>

View File

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,285 +1,233 @@
@extends('themes.default1.client.layout.client')
@section('title')
{!! Lang::get('lang.submit_a_ticket') !!} -
{!! Lang::get('lang.submit_a_ticket') !!} -
@stop
@section('submit')
class = "nav-item active"
class = "nav-item active"
@stop
<!-- breadcrumbs -->
@section('breadcrumb')
{{--<div class="site-hero clearfix">--}}
<ol class="breadcrumb float-sm-right ">
<ol class="breadcrumb float-sm-right">
<style>
.words {
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */
margin-right: 10px;
}
</style>
<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 class="words" style="margin-right: 10px">></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 class="words">></li>
<li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
</ol>
</div>
@stop
<!-- /breadcrumbs -->
@section('check')
<div id="sidebar" class="site-sidebar col-md-3">
<div id="form-border" class="comment-respond form-border" style="background : #fff">
<div id="form-border" class="comment-respond form-border" style="background:#fff">
<section id="section-categories" class="section">
<h2 class="section-title h4 clearfix">
<i class="line"></i>{!! Lang::get('lang.have_a_ticket') !!}?
</h2>
@if(Session::has('check'))
@if (count($errors) > 0)
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</div>
@endif
@if (Session::has('check'))
@if (count($errors) > 0)
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</div>
@endif
@endif
<div>
{!! Form::open(['url' => 'checkmyticket' , 'method' => 'POST'] )!!}
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! 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::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">
{!! Form::open(['url' => 'checkmyticket', 'method' => 'POST']) !!}
{!! Form::label('email', Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! 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::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">
<i class="fas fa-save"></i> {!! Lang::get('lang.check_ticket_status') !!}
</button>
{!! Form::close() !!}
</div>
</section>
</div>
</div><!-- #sidebar -->
</div>
@stop
<!-- content -->
@section('content')
@section('content')
<div id="content" class="site-content col-md-9">
@if(Session::has('message'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!! Session::get('message') !!}
</div>
@if (Session::has('message'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!! Session::get('message') !!}
</div>
@endif
@if (count($errors) > 0)
@if(Session::has('check'))
<?php goto a; ?>
@endif
@if(!Session::has('error'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<?php a: ?>
@if (Session::has('check'))
<?php goto a; ?>
@endif
@if (!Session::has('error'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!} !</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<?php a: ?>
@endif
<?php
$encrypter = app('Illuminate\Encryption\Encrypter');
$encrypted_token = $encrypter->encrypt(csrf_token());
?>
<input id="token" type="hidden" value="{{$encrypted_token}}">
{!! Form::open(['route'=>'client.form.post','method'=>'post', 'enctype'=>'multipart/form-data']) !!}
<input id="token" type="hidden" value="{{ $encrypted_token }}">
{!! Form::open(['route' => 'client.form.post', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!}
<article class="hentry">
<div id="form-border" class="comment-respond form-border" style="background : #fff">
<div id="form-border" class="comment-respond form-border" style="background:#fff">
<section id="section-categories">
<h2 class="section-title h4 clearfix mb-0">
<i class="line" style="border-color: rgb(0, 154, 186);"></i>{!! Lang::get('lang.submit_a_ticket') !!}
<i class="line" style="border-color: rgb(0,154,186);"></i>{!! Lang::get('lang.submit_a_ticket') !!}
</h2>
<div class="row mt-4">
@if(Auth::user())
{!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!}
@if (Auth::user())
{!! Form::hidden('Name', Auth::user()->user_name) !!}
{!! Form::hidden('Email', Auth::user()->email) !!}
{!! Form::hidden('mobile', Auth::user()->mobile) !!}
{!! Form::hidden('Code', Auth::user()->country_code) !!}
{!! Form::hidden('Phone', Auth::user()->phone_number) !!}
@else
<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::text('Name', null, ['class' => 'form-control']) !!}
</div>
<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::text('Name',null,['class' => 'form-control']) !!}
</div>
@endif
@if(Auth::user())
{!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!}
@else
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
{!! Form::label('Email',Lang::get('lang.email')) !!}
@if($email_mandatory->status == 1 || $email_mandatory->status == '1')
<span class="text-red"> *</span>
@endif
{!! Form::email('Email',null,['class' => 'form-control']) !!}
</div>
@endif
@if(!Auth::user())
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('Code',Lang::get('lang.country-code')) !!}
@if($email_mandatory->status == 0 || $email_mandatory->status == '0')
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
{!! Form::label('Email', Lang::get('lang.email')) !!}
@if ($email_mandatory->status == 1)
<span class="text-red"> *</span>
@endif
@endif
{!! Form::email('Email', null, ['class' => 'form-control']) !!}
</div>
{!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
</div>
<div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
@if($email_mandatory->status == 0 || $email_mandatory->status == '0')
<span class="text-red"> *</span>
@endif
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
{!! Form::label('Phone',Lang::get('lang.phone')) !!}
{!! Form::text('Phone',null,['class' => 'form-control']) !!}
</div>
@else
{!! Form::hidden('mobile',Auth::user()->mobile,['class' => 'form-control']) !!}
{!! Form::hidden('Code',Auth::user()->country_code,['class' => 'form-control']) !!}
{!! Form::hidden('Phone',Auth::user()->phone_number,['class' => 'form-control']) !!}
@endif
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
{!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!}
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
<?php
$forms = App\Model\helpdesk\Form\Forms::get();
$helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get();
// ?><!---->
<select name="helptopic" class="form-control" id="selectid">
@foreach($helptopic as $topic)
<option value="{!! $topic->id !!}">{!! $topic->topic !!}</option>
@endforeach
</select>
</div>
<!-- priority -->
<?php
$Priority = App\Model\helpdesk\Settings\CommonSettings::select('status')->where('option_name','=', 'user_priority')->first();
$user_Priority=$Priority->status;
?>
@if(Auth::user())
@if(Auth::user()->active == 1)
@if($user_Priority == 1)
<div class="col-md-12 form-group">
<div class="row">
<div class="col-md-1">
<label>{!! Lang::get('lang.priority') !!}:</label>
</div>
<div class="col-md-12">
<?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']) !!}
</div>
</div>
</div>
@endif
@endif
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('Code', Lang::get('lang.country-code')) !!}
{!! Form::text('Code', null, [
'class' => 'form-control',
'placeholder' => $phonecode,
'title' => Lang::get('lang.enter-country-phone-code'),
]) !!}
</div>
<div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile', Lang::get('lang.mobile_number')) !!}
{!! Form::text('mobile', null, ['class' => 'form-control']) !!}
</div>
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
{!! Form::label('Phone', Lang::get('lang.phone')) !!}
{!! Form::text('Phone', null, ['class' => 'form-control']) !!}
</div>
@endif
<!-- Help Topic + Priority cùng row -->
<div class="col-md-12 form-group row">
<label class="col-md-2 col-form-label">{{ Lang::get('lang.choose_a_help_topic') }}</label>
<div class="col-md-4">
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', 1)->get(); ?>
<select name="helptopic" class="form-control">
@foreach ($helptopic as $topic)
<option value="{{ $topic->id }}">{{ $topic->topic }}</option>
@endforeach
</select>
</div>
<label class="col-md-2 col-form-label">{{ Lang::get('lang.priority') }}</label>
<div class="col-md-4">
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', 1)->get(); ?>
{!! Form::select('priority', $Priority->pluck('priority_desc', 'priority_id')->toArray(), null, [
'class' => 'form-control',
]) !!}
</div>
</div>
<!-- Location + Department -->
<div class="col-md-12 form-group row">
<label for="location" class="col-md-2 col-form-label">Location</label>
<div class="col-md-4">
<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>
<label for="submitdept_id" class="col-md-2 col-form-label">Department</label>
<div class="col-md-4">
<select name="submitdept_id" class="form-control" id="submitdept_id">
@foreach ($departments as $dept)
<option value="{{ $dept->id }}"
{{ Auth::user()->dept_id == $dept->id ? 'selected' : '' }}>
{{ $dept->name }}
</option>
@endforeach
</select>
</div>
</div>
<!-- Subject -->
<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::text('Subject',null,['class' => 'form-control']) !!}
{!! Form::label('Subject', Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
{!! Form::text('Subject', null, ['class' => 'form-control']) !!}
</div>
<!-- Message -->
<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::textarea('Details',null,['class' => 'form-control']) !!}
{!! Form::label('Details', Lang::get('lang.message')) !!}<span class="text-red"> *</span>
{!! Form::textarea('Details', null, ['class' => 'form-control']) !!}
</div>
<!-- Attachment -->
<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 !!}
</div>
{{-- Event fire --}}
<?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\ClientTicketForm()); ?>
<div class="col-md-12" id="response"> </div>
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
<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']) !!}
</div>
<div class="col-md-12" id="response"> </div>
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
{!! Form::close() !!}
<!-- Submit Button -->
<div class="col-md-12 form-group">
{!! Form::button('<i class="fas fa-save"></i> ' . Lang::get('lang.submit'), [
'type' => 'submit',
'class' => 'btn btn-primary',
]) !!}
</div>
</div>
</section>
</section>
</div>
</article>
{!! Form::close() !!}
</div>
<!--
|====================================================
| SELECTED FORM STORED IN SCRIPT
|====================================================
-->
<script type="text/javascript">
$(document).ready(function(){
var helpTopic = $("#selectid").val();
send(helpTopic);
$("#selectid").on("change",function(){
helpTopic = $("#selectid").val();
send(helpTopic);
});
function send(helpTopic){
$.ajax({
url:"{{url('/get-helptopic-form')}}",
data:{'helptopic':helpTopic},
type:"GET",
dataType:"html",
success:function(response){
$("#response").html(response);
},
error:function(response){
$("#response").html(response);
}
});
}
});
$(function() {
//Add text editor
$("textarea").summernote({
height: 300,
tabsize: 2,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
});
</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
|
|
*/
// seasrch
// 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;
}
}
trigger_error(
$err,
E_USER_ERROR
);
throw new RuntimeException($err);
}
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

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