Skip to content

yiiman-dev/yii2-ticket

 
 

Repository files navigation

yii2-ticket

The ticket system for yii2

The stable version 1.0.8 has been released
1.0.8
     Minor changes
Released stable version 1.0.7
1.0.7
    Changed design

1.0.6
    Added attachment images.
    Added ticket creation from the admin panel.
    Add prefixo table.
    Fixed routing.

1.0.5
    Removed notifications about closed tickets.
    Removed unnecessary code.
    Sending mail is transferred to the model.

1.0.4
    Added download of images.

Install composer require "amintado/yii2-ticket:1.0.8"

Add to project

'ticket' => [
            'class'         => amintado\ticket\Module::className(),
        ],

Be sure to add in AppAssets section in js the link on bootstrap.js

 public $js = [
        /** Other scripts */
        '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js',
    ];

GET routes

index.php?r=ticket/
index.php?r=ticket/admin/index

Override class

'ticket' => [
            'class'         => amintado\ticket\Module::className(),
            'controllerMap' => [
                'admin' => [
                    'class' => \app\controllers\TicketAdminController::class,
                ],
            ],
        ],

Override views

'view'         => [
            'theme' => [
                'pathMap' => [
                    '@amintado/ticket/views' => '@app/views/ticket',
                ],
            ],
        ],

The status of the ticket

TicketHead::OPEN = 0 - Open

TicketHead::WAIT = 1 - Waiting

TicketHead::ANSWER = 2 - Answered

TicketHead::CLOSED = 3 - Closed

Available methods

TicketHead::getNewTicketCount()

Returns a count of all tickets with the status "0" или "1"

TicketHead::getNewTicketCountUser($status)

Returns the number teketo for the current user, by default all statuses are equal to "0"

Migration

yii migrate --migrationPath=@vendor/amintado/yii2-ticket/migrations

Configuration of the module

$mailSendAnswer = true, email will be sent notifications about the answer

$subjectAnswer = string Subject line of email response

$userModel = model Object user

$qq = array of Array of departments to which the issue

$admin = array of Array administrators

Public part

Creating a ticket

Question-Answer

Admin

Admin-Answer

Admin Creating a ticket

About

Тикет система для yii2

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%