Merge branch 'helpdesk' into bilettm
This commit is contained in:
commit
b16ad2faf1
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Models\HelpTopic;
|
||||
|
||||
if (!function_exists('money')) {
|
||||
/**
|
||||
* Format a given amount to the given currency
|
||||
|
|
@ -91,3 +93,14 @@ if(!function_exists('zanitlananlar')){
|
|||
return $booked->merge($reserved)->toJson();
|
||||
}
|
||||
}
|
||||
if(!function_exists('help_topics')){
|
||||
function help_topics(){
|
||||
|
||||
$topics = HelpTopic::where('active',1)
|
||||
->select(['id','title_'.config('app.locale').' as title'])
|
||||
->orderBy('position','asc')
|
||||
->pluck('title','id');
|
||||
|
||||
return $topics->union( [0 => trans('ClientSide.other')]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||
|
||||
// VALIDATION: change the requests to match your own file names if you need form validation
|
||||
use App\Http\Requests\HelpTicketCommentRequest as StoreRequest;
|
||||
use App\Http\Requests\HelpTicketCommentRequest as UpdateRequest;
|
||||
use Backpack\CRUD\CrudPanel;
|
||||
|
||||
/**
|
||||
* Class HelpTicketCommentCrudController
|
||||
* @package App\Http\Controllers\Admin
|
||||
* @property-read CrudPanel $crud
|
||||
*/
|
||||
class HelpTicketCommentCrudController extends CrudController
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Basic Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setModel('App\Models\HelpTicketComment');
|
||||
$this->crud->setRoute(config('backpack.base.route_prefix') . '/helpticketcomment');
|
||||
$this->crud->setEntityNameStrings('helpticketcomment', 'help_ticket_comments');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// TODO: remove setFromDb() and manually define Fields and Columns
|
||||
$this->crud->setFromDb();
|
||||
|
||||
// add asterisk for fields that are required in HelpTicketCommentRequest
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
||||
public function store(StoreRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::storeCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::updateCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||
|
||||
// VALIDATION: change the requests to match your own file names if you need form validation
|
||||
use App\Http\Requests\HelpTicketRequest as StoreRequest;
|
||||
use App\Http\Requests\HelpTicketRequest as UpdateRequest;
|
||||
use Backpack\CRUD\CrudPanel;
|
||||
|
||||
/**
|
||||
* Class HelpTicletCrudController
|
||||
* @package App\Http\Controllers\Admin
|
||||
* @property-read CrudPanel $crud
|
||||
*/
|
||||
class HelpTicketCrudController extends CrudController
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Basic Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setModel('App\Models\HelpTicket');
|
||||
$this->crud->setRoute(config('backpack.base.route_prefix') . '/helpTicket');
|
||||
$this->crud->setEntityNameStrings('help ticket', 'help tickets');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// TODO: remove setFromDb() and manually define Fields and Columns
|
||||
$this->crud->setFromDb();
|
||||
|
||||
// add asterisk for fields that are required in HelpTicletRequest
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
||||
public function store(StoreRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::storeCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::updateCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||
|
||||
// VALIDATION: change the requests to match your own file names if you need form validation
|
||||
use App\Http\Requests\HelpTopicRequest as StoreRequest;
|
||||
use App\Http\Requests\HelpTopicRequest as UpdateRequest;
|
||||
use Backpack\CRUD\CrudPanel;
|
||||
|
||||
/**
|
||||
* Class HelpTicletCategoryCrudController
|
||||
* @package App\Http\Controllers\Admin
|
||||
* @property-read CrudPanel $crud
|
||||
*/
|
||||
class HelpTopicCrudController extends CrudController
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Basic Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setModel('App\Models\HelpTopic');
|
||||
$this->crud->setRoute(config('backpack.base.route_prefix') . '/helpTopic');
|
||||
$this->crud->setEntityNameStrings('help topic', 'help topics');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// $this->crud->setFromDb();
|
||||
$this->crud->setColumns([
|
||||
['name' => 'position','label'=>'Order Position','type'=>'number'],
|
||||
['name' => 'title_tk','label'=>'Title Turkmen','type'=>'text'],
|
||||
['name' => 'title_ru','label'=>'Title Russioan','type'=>'text'],
|
||||
['name' => 'active', 'label' => 'Active', 'type' => 'check']
|
||||
]);
|
||||
|
||||
$this->crud->addFields([
|
||||
['name' => 'title_tk','label'=>'Title Turkmen','type'=>'text'],
|
||||
['name' => 'title_ru','label'=>'Title Russian','type'=>'text'],
|
||||
['name' => 'position','label'=>'Order Position','type'=>'number'],
|
||||
['name' => 'active', 'label' => 'Active', 'type' => 'checkbox']
|
||||
]);
|
||||
// add asterisk for fields that are required in HelpTicletCategoryRequest
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
||||
public function store(StoreRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::storeCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::updateCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
}
|
||||
|
|
@ -305,14 +305,15 @@ class EventCheckoutController extends Controller
|
|||
}
|
||||
|
||||
$event = Event::findOrFail($event_id);
|
||||
$order = new Order();
|
||||
$ticket_order = session()->get('ticket_order_' . $event_id);
|
||||
|
||||
$validation_rules = $ticket_order['validation_rules'];
|
||||
$validation_messages = $ticket_order['validation_messages'];
|
||||
|
||||
$order = new Order();
|
||||
$order->rules = $order->rules + $validation_rules;
|
||||
$order->messages = $order->messages + $validation_messages;
|
||||
$order->order_reference = strtoupper(str_random(5)) . date('jn');
|
||||
|
||||
if (!$order->validate($request->all())) {
|
||||
return response()->json([
|
||||
|
|
@ -328,12 +329,13 @@ class EventCheckoutController extends Controller
|
|||
$orderService = new OrderService($ticket_order['order_total'], $ticket_order['total_booking_fee'], $event);
|
||||
$orderService->calculateFinalCosts();
|
||||
$secondsToExpire = Carbon::now()->diffInSeconds($order_session['expires']);
|
||||
|
||||
$transaction_data =[
|
||||
'amount' => $orderService->getGrandTotal()*100,//multiply by 100 to obtain tenge
|
||||
'currency' => 934,
|
||||
'sessionTimeoutSecs' => $secondsToExpire,
|
||||
'description' => 'bilettm sargyt: ' . $request->get('order_email'),
|
||||
'orderNumber' => uniqid(),
|
||||
'orderNumber' => $order->order_reference,
|
||||
|
||||
'failUrl' => route('showEventCheckoutPaymentReturn', [
|
||||
'event_id' => $event_id,
|
||||
|
|
@ -439,6 +441,16 @@ class EventCheckoutController extends Controller
|
|||
|
||||
$response = $this->gateway->getPaymentStatus($order->transaction_id);
|
||||
|
||||
$resp_data = $response->getResponseData();
|
||||
|
||||
$order->payment_card_pan = $resp_data['Pan'];
|
||||
$order->payment_card_expiration = $resp_data['expiration'];
|
||||
$order->payment_card_holder_name = $resp_data['cardholderName'];
|
||||
$order->payment_order_status = $resp_data['OrderStatus'];
|
||||
$order->payment_error_code = $resp_data['ErrorCode'];
|
||||
$order->payment_error_message = $resp_data['ErrorMessage'];
|
||||
|
||||
|
||||
//todo try catch for connection errors
|
||||
if ($response->isSuccessfull()) {
|
||||
|
||||
|
|
@ -494,6 +506,16 @@ class EventCheckoutController extends Controller
|
|||
|
||||
$response = $this->gateway->getPaymentStatus($request->get('orderId'));
|
||||
|
||||
$resp_data = $response->getResponseData();
|
||||
|
||||
$order->payment_card_pan = $resp_data['Pan'];
|
||||
$order->payment_card_expiration = $resp_data['expiration'];
|
||||
$order->payment_card_holder_name = $resp_data['cardholderName'];
|
||||
$order->payment_order_status = $resp_data['OrderStatus'];
|
||||
$order->payment_error_code = $resp_data['ErrorCode'];
|
||||
$order->payment_error_message = $resp_data['ErrorMessage'];
|
||||
|
||||
|
||||
if ($response->isSuccessfull()) {
|
||||
$data = OrderService::mobileCompleteOrder($order);
|
||||
return view('mobile.Pages.ViewOrderPageApp', $data);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
|
||||
use App\Http\Requests\HelpTicketCommentRequest;
|
||||
use App\Http\Requests\HelpTicketRequest;
|
||||
use App\Models\HelpTicket;
|
||||
use App\Models\HelpTicketComment;
|
||||
use App\Models\HelpTopic;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class HelpDeskController extends Controller
|
||||
{
|
||||
|
||||
public function show($code){
|
||||
|
||||
$ticket = HelpTicket::with('comments')
|
||||
->where('code',$code)
|
||||
->first();
|
||||
if(!$ticket)
|
||||
abort(404);
|
||||
|
||||
return $this->render('Pages.HelpDeskTicket',['ticket' => $ticket]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating the help desk ticket
|
||||
*/
|
||||
public function create(){
|
||||
|
||||
return $this->render('Pages.HelpDeskCreateForm');
|
||||
}
|
||||
|
||||
public function store(HelpTicketRequest $request){
|
||||
//
|
||||
// try{
|
||||
|
||||
$ticekt = HelpTicket::create([
|
||||
'name' => $request->get('name'),
|
||||
'email' => $request->get('email'),
|
||||
'text' => $request->get('text'),
|
||||
'phone' => $request->get('phone'),
|
||||
'subject' => $request->get('subject'),
|
||||
'ticket_category_id' => $request->get('topic'),
|
||||
'attachment' => $request->get('attachment')
|
||||
]);
|
||||
// }
|
||||
// catch (\Exception $exception){
|
||||
// Log::error($exception);
|
||||
// }
|
||||
//todo fire event notify admin by mail, attachment
|
||||
|
||||
return redirect()->route('help.show',['code' => $ticekt->code]);
|
||||
}
|
||||
|
||||
public function comment(HelpTicketCommentRequest $request,$code){
|
||||
|
||||
$ticket = HelpTicket::select('id')
|
||||
->where('code',$code)
|
||||
->first();
|
||||
|
||||
if(!$ticket)
|
||||
abort(404);
|
||||
|
||||
$comment = HelpTicketComment::create([
|
||||
'text' => $request->text,
|
||||
'help_ticket_id' => $ticket->id
|
||||
]);
|
||||
|
||||
$ticket->update(['status' => 'pending']) ;
|
||||
|
||||
if($request->has('attachment')){
|
||||
|
||||
}
|
||||
|
||||
//todo notify, attachment
|
||||
|
||||
return redirect()->route('help.show',['code' => $code]);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class HelpTicketCommentRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// only allow updates if the user is logged in
|
||||
return true;//backpack_auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'text' => 'required',
|
||||
'attachment' => 'max:1024|mimes:pdf,jpg,png,jpeg,txt'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation attributes that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function attributes()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation messages that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class HelpTicketRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// only allow updates if the user is logged in
|
||||
return true;//backpack_auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email',
|
||||
'topic' => 'required',
|
||||
'text' => 'required',
|
||||
'attachment' => 'image|max:1024'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation attributes that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function attributes()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation messages that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class HelpTopicRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// only allow updates if the user is logged in
|
||||
return backpack_auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'title_tk' => 'required|min:5|max:255',
|
||||
'title_ru' => 'required|min:5|max:255'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation attributes that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function attributes()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation messages that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
Route::group(
|
||||
[
|
||||
'prefix' => LaravelLocalization::setLocale(),
|
||||
|
|
@ -739,6 +737,25 @@ Route::group(
|
|||
'uses' => 'PublicController@venues'
|
||||
]);
|
||||
|
||||
Route::get('/help/',[
|
||||
'as' =>'help',
|
||||
'uses' => 'HelpDeskController@create'
|
||||
]);
|
||||
|
||||
Route::post('/help/',[
|
||||
'as' =>'help.create',
|
||||
'uses' => 'HelpDeskController@store'
|
||||
]);
|
||||
|
||||
Route::get('/help/{code}',[
|
||||
'as' =>'help.show',
|
||||
'uses' => 'HelpDeskController@show'
|
||||
]);
|
||||
|
||||
Route::post('/help/{code}',[
|
||||
'as' =>'help.comment',
|
||||
'uses' => 'HelpDeskController@comment'
|
||||
]);
|
||||
// Route::get('/terms_and_conditions', [
|
||||
// 'as' => 'termsAndConditions',
|
||||
// function () {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Backpack\CRUD\CrudTrait;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class HelpTicket extends Model
|
||||
{
|
||||
use CrudTrait;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GLOBAL VARIABLES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
protected $table = 'help_tickets';
|
||||
// protected $primaryKey = 'id';
|
||||
// public $timestamps = false;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = ['code','email','name','phone','text','subject', 'attachment','status','ticket_category_id'];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FUNCTIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| RELATIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public function category(){
|
||||
return $this->belongsTo(HelpTopic::class,'ticket_category_id');
|
||||
}
|
||||
|
||||
public function comments(){
|
||||
return $this->hasMany(HelpTicketComment::class);
|
||||
}
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SCOPES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ACCESORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
public function setAttachmentAttribute($value){
|
||||
$attribute_name = "attachment";
|
||||
$disk = config('filesystems.default'); // or use your own disk, defined in config/filesystems.php
|
||||
$destination_path = "help"; // path relative to the disk above
|
||||
|
||||
// if the image was erased
|
||||
if ($value==null) {
|
||||
// delete the image from disk
|
||||
\Storage::disk($disk)->delete($this->{$attribute_name});
|
||||
|
||||
// set null in the database column
|
||||
$this->attributes[$attribute_name] = null;
|
||||
}
|
||||
|
||||
// if a base64 was sent, store it in the db
|
||||
if (starts_with($value, 'data:image'))
|
||||
{
|
||||
// 0. Make the image
|
||||
$image = \Image::make($value)->encode('jpg', 90);
|
||||
// 1. Generate a filename.
|
||||
$filename = md5($value.time()).'.jpg';
|
||||
// 2. Store the image on disk.
|
||||
\Storage::disk($disk)->put($destination_path.'/'.$filename, $image->stream());
|
||||
// 3. Save the public path to the database
|
||||
// but first, remove "public/" from the path, since we're pointing to it from the root folder
|
||||
// that way, what gets saved in the database is the user-accesible URL
|
||||
$public_destination_path = Str::replaceFirst('public/', '', $destination_path);
|
||||
$this->attributes[$attribute_name] = $public_destination_path.'/'.$filename;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Boot all of the bootable traits on the model.
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($ticket) {
|
||||
$ticket->code = strtoupper(str_random(5)) . date('jn');
|
||||
});
|
||||
|
||||
static::deleting(function($obj) {
|
||||
$disk = config('filesystems.default');
|
||||
\Storage::disk($disk)->delete($obj->seats_image);
|
||||
|
||||
if (count((array)$obj->images)) {
|
||||
foreach ($obj->images as $file_path) {
|
||||
\Storage::disk('uploads')->delete($file_path);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Backpack\CRUD\CrudTrait;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class HelpTicketComment extends Model
|
||||
{
|
||||
use CrudTrait;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GLOBAL VARIABLES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
protected $table = 'help_ticket_comments';
|
||||
// protected $primaryKey = 'id';
|
||||
public $timestamps = true;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = ['text','attachment','parent_id','user_id','name','help_ticket_id'];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FUNCTIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| RELATIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public function ticket(){
|
||||
return $this->belongsTo(HelpTicket::class);
|
||||
}
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SCOPES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ACCESORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
//todo use trait for image upload
|
||||
public function setAttachmentAttribute($value){
|
||||
$attribute_name = "attachment";
|
||||
$disk = config('filesystems.default'); // or use your own disk, defined in config/filesystems.php
|
||||
$destination_path = "help"; // path relative to the disk above
|
||||
|
||||
// if the image was erased
|
||||
if ($value==null) {
|
||||
// delete the image from disk
|
||||
\Storage::disk($disk)->delete($this->{$attribute_name});
|
||||
|
||||
// set null in the database column
|
||||
$this->attributes[$attribute_name] = null;
|
||||
}
|
||||
|
||||
// if a base64 was sent, store it in the db
|
||||
if (starts_with($value, 'data:image'))
|
||||
{
|
||||
// 0. Make the image
|
||||
$image = \Image::make($value)->encode('jpg', 90);
|
||||
// 1. Generate a filename.
|
||||
$filename = md5($value.time()).'.jpg';
|
||||
// 2. Store the image on disk.
|
||||
\Storage::disk($disk)->put($destination_path.'/'.$filename, $image->stream());
|
||||
// 3. Save the public path to the database
|
||||
// but first, remove "public/" from the path, since we're pointing to it from the root folder
|
||||
// that way, what gets saved in the database is the user-accesible URL
|
||||
$public_destination_path = Str::replaceFirst('public/', '', $destination_path);
|
||||
$this->attributes[$attribute_name] = $public_destination_path.'/'.$filename;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Boot all of the bootable traits on the model.
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::deleting(function($obj) {
|
||||
$disk = config('filesystems.default');
|
||||
\Storage::disk($disk)->delete($obj->seats_image);
|
||||
|
||||
if (count((array)$obj->images)) {
|
||||
foreach ($obj->images as $file_path) {
|
||||
\Storage::disk('uploads')->delete($file_path);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Backpack\CRUD\CrudTrait;
|
||||
|
||||
class HelpTopic extends Model
|
||||
{
|
||||
use CrudTrait;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GLOBAL VARIABLES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
protected $table = 'help_ticket_categories';
|
||||
// protected $primaryKey = 'id';
|
||||
public $timestamps = false;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = ['title_tk','title_ru','active'];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FUNCTIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| RELATIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public function tickets(){
|
||||
return $this->hasMany(HelpTicket::class,'ticket_category_id');
|
||||
}
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SCOPES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ACCESORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
}
|
||||
|
|
@ -179,15 +179,15 @@ class Order extends MyBaseModel
|
|||
return file_exists($pdf_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Boot all of the bootable traits on the model.
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($order) {
|
||||
$order->order_reference = strtoupper(str_random(5)) . date('jn');
|
||||
});
|
||||
}
|
||||
// /**
|
||||
// * Boot all of the bootable traits on the model.
|
||||
// */
|
||||
// public static function boot()
|
||||
// {
|
||||
// parent::boot();
|
||||
//
|
||||
// static::creating(function ($order) {
|
||||
// $order->order_reference = strtoupper(str_random(5)) . date('jn');
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AlterAddPaymentInfoToOrdersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->string('payment_card_pan')->nullable();
|
||||
$table->string('payment_card_expiration')->nullable();
|
||||
$table->string('payment_card_holder_name')->nullable();
|
||||
$table->unsignedTinyInteger('payment_order_status')->nullable();
|
||||
$table->unsignedTinyInteger('payment_error_code')->nullable();
|
||||
$table->string('payment_error_message')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->dropColumn('payment_card_pan');
|
||||
$table->dropColumn('payment_card_expiration');
|
||||
$table->dropColumn('payment_card_holder_name');
|
||||
$table->dropColumn('payment_order_status');
|
||||
$table->dropColumn('payment_error_code');
|
||||
$table->dropColumn('payment_error_message');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateHelpTicketCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('help_ticket_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('title_tk');
|
||||
$table->string('title_ru');
|
||||
$table->boolean('active')->default(1);
|
||||
$table->integer('position')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('help_ticket_categories');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateHelpTicketsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('help_tickets', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('code')->unique();
|
||||
$table->string('email');
|
||||
$table->string('name')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->text('text');
|
||||
$table->string('subject');
|
||||
$table->string('attachment')->nullable();
|
||||
$table->unsignedInteger('ticket_category_id')->nullable();
|
||||
$table->foreign('ticket_category_id')->references('id')->on('help_ticket_categories')->onDelete('cascade');
|
||||
$table->enum('status',['pending','waiting_replay','solved']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('help_tickets');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateHelpTicketCommentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('help_ticket_comments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('text');
|
||||
$table->string('attachment')->nullable();
|
||||
$table->unsignedInteger('parent_id')->nullable();
|
||||
$table->unsignedInteger('user_id')->nullable();
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
$table->string('name')->nullable();
|
||||
$table->unsignedInteger('help_ticket_id');
|
||||
$table->foreign('help_ticket_id')->references('id')->on('help_tickets')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('help_ticket_comments');
|
||||
}
|
||||
}
|
||||
|
|
@ -51,4 +51,8 @@ return array (
|
|||
'order_last_name_required' => 'Please enter a valid last name',
|
||||
'order_email_email' => 'Please enter a valid email',
|
||||
'order_terms_required' => 'Please accept terms',
|
||||
'cardholder_name' => 'Card holder name',
|
||||
'cardholder_pan' => 'Card holder pan',
|
||||
'cardholder_expiration' => 'Card expiration date',
|
||||
'payment_status_message' => 'Payment message',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -52,4 +52,8 @@ return array (
|
|||
'order_last_name_required' => 'Введите, пожалуйста, фамилию',
|
||||
'order_email_email' => 'Введите, пожалуйста, email',
|
||||
'order_terms_required' => 'Примите, пожалуйста, условия оферты',
|
||||
'cardholder_name' => 'Card holder name',
|
||||
'cardholder_pan' => 'Card holder pan',
|
||||
'cardholder_expiration' => 'Card expiration date',
|
||||
'payment_status_message' => 'Payment message',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -52,4 +52,8 @@ return array (
|
|||
'order_last_name_required' => 'Familiýaňyzy giriziň',
|
||||
'order_email_email' => 'E-mail giriziň',
|
||||
'order_terms_required' => 'Ofertanyň şertlerini kabul ediň',
|
||||
'cardholder_name' => 'Card holder name',
|
||||
'cardholder_pan' => 'Card holder pan',
|
||||
'cardholder_expiration' => 'Card expiration date',
|
||||
'payment_status_message' => 'Payment message',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,19 @@
|
|||
<div class="col-sm-6 col-xs-6">
|
||||
<b>@lang("Order.transaction_id")</b><br> {{$order->transaction_id}}
|
||||
</div>
|
||||
<div class="col-sm-6 col-xs-6">
|
||||
<b>@lang("Order.cardholder_name")</b><br> {{$order->payment_card_holder_name}}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-xs-6">
|
||||
<b>@lang("Order.cardholder_pan")</b><br> {{$order->payment_card_pan}}
|
||||
</div>
|
||||
<div class="col-sm-6 col-xs-6">
|
||||
<b>@lang("Order.cardholder_expiration")</b><br> {{$order->payment_card_expiration}}
|
||||
</div>
|
||||
<div class="col-sm-6 col-xs-6">
|
||||
<b>@lang("Order.payment_status_message")</b><br> {{$order->payment_error_message}}
|
||||
</div>
|
||||
<div class="col-sm-6 col-xs-6">
|
||||
{{--<b>@lang("Order.payment_gateway")</b><br> <a href="{{ $order->payment_gateway->provider_url }}" target="_blank">{{$order->payment_gateway->provider_name}}</a>--}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,124 @@
|
|||
@extends('backpack::layout')
|
||||
|
||||
@section('header')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<span class="text-capitalize">{!! $crud->getHeading() ?? $crud->entity_name_plural !!}</span>
|
||||
<small id="datatable_info_stack">{!! $crud->getSubheading() ?? trans('backpack::crud.all').'<span>'.$crud->entity_name_plural.'</span> '.trans('backpack::crud.in_the_database') !!}.</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url(config('backpack.base.route_prefix'), 'dashboard') }}">{{ trans('backpack::crud.admin') }}</a></li>
|
||||
<li><a href="{{ url($crud->route) }}" class="text-capitalize">{{ $crud->entity_name_plural }}</a></li>
|
||||
<li class="active">{{ trans('backpack::crud.list') }}</li>
|
||||
</ol>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="row">
|
||||
|
||||
<!-- THE ACTUAL CONTENT -->
|
||||
<div class="{{ $crud->getListContentClass() }}">
|
||||
<div class="">
|
||||
|
||||
<div class="row m-b-10">
|
||||
<div class="col-xs-6">
|
||||
@if ( $crud->buttons->where('stack', 'top')->count() || $crud->exportButtons())
|
||||
<div class="hidden-print {{ $crud->hasAccess('create')?'with-border':'' }}">
|
||||
|
||||
@include('crud::inc.button_stack', ['stack' => 'top'])
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div id="datatable_search_stack" class="pull-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Backpack List Filters --}}
|
||||
@if ($crud->filtersEnabled())
|
||||
@include('crud::inc.filters_navbar')
|
||||
@endif
|
||||
|
||||
<div class="overflow-hidden">
|
||||
|
||||
<table id="crudTable" class="box table table-striped table-hover display responsive nowrap m-t-0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
{{-- Table columns --}}
|
||||
@foreach ($crud->columns as $column)
|
||||
<th
|
||||
data-orderable="{{ var_export($column['orderable'], true) }}"
|
||||
data-priority="{{ $column['priority'] }}"
|
||||
data-visible-in-modal="{{ (isset($column['visibleInModal']) && $column['visibleInModal'] == false) ? 'false' : 'true' }}"
|
||||
data-visible="{{ !isset($column['visibleInTable']) ? 'true' : (($column['visibleInTable'] == false) ? 'false' : 'true') }}"
|
||||
data-visible-in-export="{{ (isset($column['visibleInExport']) && $column['visibleInExport'] == false) ? 'false' : 'true' }}"
|
||||
>
|
||||
{!! $column['label'] !!}
|
||||
</th>
|
||||
@endforeach
|
||||
|
||||
@if ( $crud->buttons->where('stack', 'line')->count() )
|
||||
<th data-orderable="false" data-priority="{{ $crud->getActionsColumnPriority() }}" data-visible-in-export="false">{{ trans('backpack::crud.actions') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
{{-- Table columns --}}
|
||||
@foreach ($crud->columns as $column)
|
||||
<th>{!! $column['label'] !!}</th>
|
||||
@endforeach
|
||||
|
||||
@if ( $crud->buttons->where('stack', 'line')->count() )
|
||||
<th>{{ trans('backpack::crud.actions') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@if ( $crud->buttons->where('stack', 'bottom')->count() )
|
||||
<div id="bottom_buttons" class="hidden-print">
|
||||
@include('crud::inc.button_stack', ['stack' => 'bottom'])
|
||||
|
||||
<div id="datatable_button_stack" class="pull-right text-right hidden-xs"></div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('after_styles')
|
||||
<!-- DATA TABLES -->
|
||||
<link href="https://cdn.datatables.net/1.10.16/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/fixedheader/3.1.5/css/fixedHeader.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.2.1/css/responsive.bootstrap.min.css">
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('vendor/backpack/crud/css/crud.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/backpack/crud/css/form.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/backpack/crud/css/list.css') }}">
|
||||
|
||||
<!-- CRUD LIST CONTENT - crud_list_styles stack -->
|
||||
@stack('crud_list_styles')
|
||||
@endsection
|
||||
|
||||
@section('after_scripts')
|
||||
@include('crud::inc.datatables_logic')
|
||||
|
||||
<script src="{{ asset('vendor/backpack/crud/js/crud.js') }}"></script>
|
||||
<script src="{{ asset('vendor/backpack/crud/js/form.js') }}"></script>
|
||||
<script src="{{ asset('vendor/backpack/crud/js/list.js') }}"></script>
|
||||
|
||||
<!-- CRUD LIST CONTENT - crud_list_scripts stack -->
|
||||
@stack('crud_list_scripts')
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
@extends('Shared.Layouts.BilettmLayout',['folder' => 'desktop'])
|
||||
@section('content')
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('help')}}
|
||||
|
||||
<section class="movie-items-group firts-child my-5">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-6">
|
||||
<form action="{{route('help.create')}}" method="POST">
|
||||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::label('name', trans("ClientSide.name"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('name', old('name'),array('class'=>'form-control' )) !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('email', trans("ClientSide.email"), array('class'=>'control-label required')) !!}
|
||||
{!! Form::text('email', old('email'),array('class'=>'form-control' )) !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('phone', trans("ClientSide.phone"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('phone', old('phone'),array('class'=>'form-control' )) !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::label('topic', trans("ClientSide.topic"), array('class'=>'control-label')) !!}
|
||||
{!! Form::select('topic',help_topics(), old('topic'), ['placeholder'=>trans('ClientSide.please_select'),'class' => 'form-control','id'=>'topic']) !!}
|
||||
</div>
|
||||
<div class="form-group d-none">
|
||||
{!! Form::label('subject', trans("ClientSide.subject"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('subject', old('subject',trans('ClientSide.other')),array('class'=>'form-control' )) !!}
|
||||
</div>
|
||||
<div class="form-group custom-theme">
|
||||
{!! Form::label('text', trans("ClientSide.text"), array('class'=>'control-label required')) !!}
|
||||
{!! Form::textarea('text', old('text'),
|
||||
array(
|
||||
'class'=>'form-control editable',
|
||||
'rows' => 5
|
||||
)) !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('attachment', trans("ClientSide.attachment"), array('class'=>'control-label')) !!}
|
||||
{!! Form::file('attachment') !!}
|
||||
</div>
|
||||
{!! Form::submit(trans("ClientSide.create_ticket"), ['class'=>"btn btn-success"]) !!}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@section('after_scripts')
|
||||
<script>
|
||||
$('select[name="topic"]').on('change', function() {
|
||||
if(this.value == 0)
|
||||
{
|
||||
|
||||
$('input[name="subject"]').parent().removeClass('d-none');
|
||||
|
||||
$('input[name="subject"]').val('');
|
||||
|
||||
}else{
|
||||
|
||||
$('input[name="subject"]').parent().addClass('d-none');
|
||||
|
||||
$('input[name="subject"]').val(this.options[this.selectedIndex].text);
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
@extends('Shared.Layouts.BilettmLayout',['folder' => 'desktop'])
|
||||
@section('content')
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('help')}}
|
||||
<section class="movie-items-group firts-child my-5">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@section('after_scripts')
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<h5 >{{$event->title}}</h5>
|
||||
<h6 class="text-left"><b>@lang('ClientSide.category')</b>: {{$event->category_title}}</h6>
|
||||
<h6 class="text-left"><b>@lang('ClientSide.venue')</b>: {{$event->venue_name}}</h6>
|
||||
<h6 class="text-left"><b>@lang('ClientSide.date')</b>: {{$event->start_date->format('d.m.Y')}} - {{$event->end_date->format('d.m.Y')}}</h6>
|
||||
<h6 class="text-left"><b>@lang('ClientSide.organiser')</b>: {{$event->organiser}}</h6>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -20,13 +20,14 @@
|
|||
{{-- </ul>--}}
|
||||
{{--</li>--}}
|
||||
{{--<li><a href="{{ backpack_url('elfinder') }}"><i class="fa fa-files-o"></i> <span>{{ trans('backpack::crud.file_manager') }}</span></a></li>--}}
|
||||
<li><a href='{{ backpack_url('slider') }}'><i class='fa fa-image'></i> <span>Sliders</span></a></li>
|
||||
<li><a href='{{ backpack_url('category') }}'><i class='fa fa-tag'></i> <span>Categories</span></a></li>
|
||||
<li><a href='{{ backpack_url('venue') }}'><i class='fa fa-tag'></i> <span>Venues</span></a></li>
|
||||
<li><a href='{{ backpack_url('section') }}'><i class='fa fa-align-center'></i> <span>Sections</span></a></li>
|
||||
<li><a href='{{ backpack_url('page') }}'><i class='fa fa-file-o'></i> <span>Pages</span></a></li>
|
||||
<li><a href='{{ backpack_url('subscriber') }}'><i class='fa fa-tag'></i> <span>Subscribers</span></a></li>
|
||||
<li><a href='{{ backpack_url('helpTicketCategory') }}'><i class='fa fa-tag'></i> <span>Help Topics</span></a></li>
|
||||
<li><a href='{{ backpack_url('setting') }}'><i class='fa fa-cog'></i> <span>Settings</span></a></li>
|
||||
<li><a href='{{ backpack_url('backup') }}'><i class='fa fa-hdd-o'></i> <span>Backups</span></a></li>
|
||||
|
||||
<li><a href='{{ backpack_url('subscriber') }}'><i class='fa fa-tag'></i> <span>Subscribers</span></a></li>
|
||||
<li><a href='{{ backpack_url('event_request') }}'><i class='fa fa-tag'></i> <span>Event Requests</span></a></li>
|
||||
<li><a href='{{ backpack_url('venue') }}'><i class='fa fa-tag'></i> <span>Venues</span></a></li>
|
||||
<li><a href='{{ backpack_url('section') }}'><i class='fa fa-tag'></i> <span>Sections</span></a></li>
|
||||
<li><a href='{{ backpack_url('slider') }}'><i class='fa fa-image'></i> <span>Sliders</span></a></li>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<!-- This file is used to store topbar (right) items -->
|
||||
<li><a href='{{ backpack_url('event_request') }}'><i class='fa fa-tag'></i> <span>Event Requests</span></a></li>
|
||||
|
||||
<li><a href='{{ backpack_url('helpTicket') }}'><i class='fa fa-tag'></i> <span>Help Desk</span></a></li>
|
||||
{{--<li class="">
|
||||
<a href="{{ url(config('backpack.base.route_prefix', 'admin')) }}">
|
||||
<i class="fa fa-cog"></i> Direct Link
|
||||
|
|
|
|||
|
|
@ -22,4 +22,6 @@ Route::group([
|
|||
CRUD::resource('section', 'SectionCrudController');
|
||||
CRUD::resource('organiser', 'OrganiserCrudController');
|
||||
CRUD::resource('account', 'AccountCrudController');
|
||||
CRUD::resource('helpTopic','HelpTopicCrudController');
|
||||
CRUD::resource('helpTicket','HelpTicketCrudController');
|
||||
}); // this should be the absolute last line of this file
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ Breadcrumbs::for('search',function($trail){
|
|||
$trail->push(trans('ClientSide.results'));//'Результат поиска'
|
||||
});
|
||||
|
||||
Breadcrumbs::for('help',function($trail){
|
||||
$trail->parent('home');
|
||||
$trail->push(trans('ClientSide.help'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('add_event',function($trail){
|
||||
$trail->parent('home');
|
||||
$trail->push('+ ДОБАВИТЬ СОБЫТИЕ');
|
||||
|
|
|
|||
Loading…
Reference in New Issue