amintado/yii2-ticket

Yii2网站的票务系统

安装: 43

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 16

类型:yii2-extension

1.0.7 2016-08-13 15:44 UTC

This package is not auto-updated.

Last update: 2024-09-29 03:25:57 UTC


README

yii2的票务系统

已发布稳定版本1.0.8
1.0.8
     Minor changes
已发布稳定版本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"

添加到项目

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

请确保在js的AppAssets部分添加bootstrap.js的链接

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

GET路由

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

重写类

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

重写视图

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

票务状态

TicketHead::OPEN = 0 - 打开

TicketHead::WAIT = 1 - 等待

TicketHead::ANSWER = 2 - 已回答

TicketHead::CLOSED = 3 - 已关闭

可用方法

TicketHead::getNewTicketCount()

返回所有状态为"0"或"1"的票务数量

TicketHead::getNewTicketCountUser($status)

返回当前用户的票务数量,默认所有状态都等于"0"

迁移

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

模块配置

$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

公开部分

创建票务

问答

管理员

管理员回答

管理员创建票务