user auto disable word listening
improve card creation mobileapi - add ticket usage count
This commit is contained in:
parent
d3e4009f3e
commit
9809731933
@ -20,6 +20,7 @@ use common\components\RoleDefinition;
|
||||
* @property integer $status
|
||||
* @property integer $created_at
|
||||
* @property integer $updated_at
|
||||
* @property integer $key_listener_enabled
|
||||
* @property string $password write-only password
|
||||
*/
|
||||
class User extends ActiveRecord implements IdentityInterface
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m230626_205132_alter_table_user_add_column_key_listener_enabled
|
||||
*/
|
||||
class m230626_205132_alter_table_user_add_column_key_listener_enabled extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->addColumn(
|
||||
"user",
|
||||
"key_listener_enabled",
|
||||
$this->integer()->null()->defaultValue(1)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
echo "m230626_205132_alter_table_user_add_column_key_listener_enabled cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m230626_205132_alter_table_user_add_column_key_listener_enabled cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
@ -1,27 +1,36 @@
|
||||
<?php
|
||||
namespace frontend\components;
|
||||
|
||||
use common\models\User;
|
||||
use yii\base\Widget;
|
||||
|
||||
class ReceptionWidget extends Widget{
|
||||
|
||||
|
||||
public $form;
|
||||
|
||||
|
||||
public $number;
|
||||
public $route;
|
||||
|
||||
|
||||
|
||||
|
||||
public $viewFile = '//common/_reception';
|
||||
|
||||
|
||||
/**
|
||||
* @var User
|
||||
*/
|
||||
public $user ;
|
||||
|
||||
public function init(){
|
||||
parent::init();
|
||||
|
||||
$this->user = User::findOne(\Yii::$app->user->id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function run(){
|
||||
echo $this->render($this->viewFile,[ 'model' => $this->form ]);
|
||||
|
||||
echo $this->render($this->viewFile,[ 'model' => $this->form,
|
||||
"user_key_listener_enabled" => $this->user->key_listener_enabled ]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -3,6 +3,7 @@
|
||||
namespace frontend\controllers;
|
||||
|
||||
use backend\models\CustomerActivateForm;
|
||||
use common\models\User;
|
||||
use frontend\models\SingleCustomerActivateForm;
|
||||
use common\components\Helper;
|
||||
use frontend\components\HtmlHelper;
|
||||
@ -83,6 +84,10 @@ class CustomerController extends Controller
|
||||
$model->mkDoorLog();
|
||||
}
|
||||
|
||||
if ( \Yii::$app->request->isPost){
|
||||
User::updateAll(['key_listener_enabled' =>1 ],['id' => \Yii::$app->user->id]);
|
||||
// return $this->redirect([ 'customer/reception']);
|
||||
}
|
||||
|
||||
if ( $model->isFreeCard() ){
|
||||
return $this->redirect([ 'create', 'number' => $model->card->number ]);
|
||||
|
||||
@ -66,12 +66,12 @@ class TicketController extends FrontendController
|
||||
public function actionIndex($number = null)
|
||||
{
|
||||
$receptionForm = $this->mkReceptionForm($number);
|
||||
|
||||
|
||||
|
||||
|
||||
if ( !isset($receptionForm->card ) ){
|
||||
throw new NotFoundHttpException( Yii::t('frontend/ticket', 'The requested card does not exist.'));
|
||||
}
|
||||
|
||||
|
||||
$searchModel = new TicketSearch();
|
||||
$dataProvider = $searchModel->search( $receptionForm->card, Yii::$app->request->queryParams);
|
||||
|
||||
@ -91,47 +91,52 @@ class TicketController extends FrontendController
|
||||
*/
|
||||
public function actionCreate($number = null)
|
||||
{
|
||||
|
||||
|
||||
$receptionForm =$this->mkReceptionForm($number);
|
||||
|
||||
|
||||
if ( !isset($receptionForm->card ) ){
|
||||
throw new NotFoundHttpException( Yii::t('frontend/ticket', 'The requested card does not exist.'));
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_POST['payout_customer_cart']) && $this->payoutCustomerCart($receptionForm) ){
|
||||
return $this->redirect(['customer/reception' ]);
|
||||
}else if ( isset($_POST['payout_user_cart']) && $this->payoutUserCart($receptionForm)){
|
||||
return $this->redirect(['customer/reception' ]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$model = new TicketCreate();
|
||||
|
||||
$discounts = Discount::readTicketDiscounts();
|
||||
|
||||
|
||||
$ticketTypes = TicketType::read(null, null);
|
||||
|
||||
|
||||
$accounts = Account::read();
|
||||
|
||||
|
||||
$user = User::findOne( [ 'id' => Yii::$app->user->id ] );
|
||||
|
||||
|
||||
$user->key_listener_enabled = 0;
|
||||
$user->save();
|
||||
|
||||
$model->customer = $receptionForm->customer;
|
||||
$model->id_user = \Yii::$app->user->id;
|
||||
|
||||
|
||||
|
||||
|
||||
$model->usage_count = 0;
|
||||
$model->id_card = $receptionForm->card->id_card;
|
||||
$model->id_card = $receptionForm->card->id_card;
|
||||
$model->id_account = Account::readDefault();
|
||||
|
||||
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
Yii::$app->session->setFlash('success', Yii::t('frontend/ticket', 'Ticket added to customer') );
|
||||
return $this->redirect(['product/sale', 'number' => $receptionForm->card->number]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$model->userCart = Transfer::modelsToArray( Transfer::readUserSoldTransfers($user) );
|
||||
$model->customerCart = Transfer::modelsToArray( Transfer::readCustomerCart( $receptionForm->customer ) );
|
||||
|
||||
|
||||
|
||||
|
||||
return $this->render('create', [
|
||||
'model' => $model,
|
||||
'discounts' => $discounts,
|
||||
@ -150,17 +155,17 @@ class TicketController extends FrontendController
|
||||
|
||||
/** @var \frontend\models\TicketUpdate $model */
|
||||
$model = TicketUpdate::findOne($id);
|
||||
|
||||
|
||||
if ( !isset($model)){
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
}
|
||||
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['index', 'number' => $model->card->number]);
|
||||
}
|
||||
|
||||
|
||||
return $this->render('update',['model' => $model]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -191,7 +196,7 @@ class TicketController extends FrontendController
|
||||
$transfer->storno();
|
||||
$transaction->commit();
|
||||
\Yii::$app->session->setFlash( 'success','Bérlet törölve' );
|
||||
|
||||
|
||||
// $transaction->commit();
|
||||
// if ( $transfer->delete() ){
|
||||
// \Yii::$app->session->setFlash( 'success','Bérlet törölve' );
|
||||
@ -199,16 +204,16 @@ class TicketController extends FrontendController
|
||||
// }else{
|
||||
// throw new \Exception("Failed to save");
|
||||
// }
|
||||
|
||||
|
||||
} catch(Exception $e) {
|
||||
$transaction->rollback();
|
||||
\Yii::$app->session->setFlash( 'danger','Bérlet törlése nem sikerült' );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return $this->redirect(Yii::$app->request->referrer);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds the Ticket model based on its primary key value.
|
||||
* If the model is not found, a 404 HTTP exception will be thrown.
|
||||
@ -224,5 +229,5 @@ class TicketController extends FrontendController
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -28,17 +28,17 @@ class TicketCreate extends Ticket{
|
||||
public $_discount;
|
||||
public $_transfer;
|
||||
public $_ticketType;
|
||||
|
||||
|
||||
|
||||
|
||||
public $customer;
|
||||
public $userCart;
|
||||
public $customerCart;
|
||||
|
||||
|
||||
|
||||
|
||||
public $cart;
|
||||
|
||||
|
||||
public $payment_method;
|
||||
|
||||
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
@ -75,7 +75,7 @@ class TicketCreate extends Ticket{
|
||||
[[ 'max_usage_count'], 'required'],
|
||||
[[ 'max_usage_count'], 'integer'],
|
||||
/////////////////////
|
||||
//price
|
||||
//price
|
||||
/////////////////////
|
||||
[[ 'price_brutto'], 'required'],
|
||||
[[ 'price_brutto'], 'integer'],
|
||||
@ -87,11 +87,11 @@ class TicketCreate extends Ticket{
|
||||
//cart
|
||||
/////////////////////
|
||||
[['cart'], 'string', 'max' => 10]
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function validateTicketType($attribute){
|
||||
$type = TicketType::findOne($this->id_ticket_type);
|
||||
$this->_ticketType = $type;
|
||||
@ -114,40 +114,40 @@ class TicketCreate extends Ticket{
|
||||
$query->andWhere( [ '>', 'expired_at' , Helper::getDateTimeString() ]);
|
||||
$query->andWhere( [ 'not in', 'flag', [Contract::$FLAG_DELETED ] ]);
|
||||
$contracts = $query->all();
|
||||
|
||||
|
||||
if ( count($contracts) > 0 ){
|
||||
$this->addError($attribute,"A vendégnek már van érvényes vagy felbontott szerződése!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function validateAccount($attribute){
|
||||
$this->_account = Account::findOne($this->id_account);
|
||||
if ( !isset($this->_account )) {
|
||||
$this->addError($attribute,\Yii::t('frontend/ticket' , 'Invalid transfer' ));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function validateDiscount($attribute){
|
||||
$this->_discount = Discount::findOne($this->id_discount);
|
||||
if ( !isset($this->_discount)) {
|
||||
$this->addError($attribute,\Yii::t('frontend/ticket' , 'Invalid discount' ));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function beforeSave($insert){
|
||||
$result = parent::beforeSave($insert);
|
||||
if ( $result ){
|
||||
if ($insert){
|
||||
|
||||
|
||||
if ( $this->isAppendToCustomerCart() || $this->isAppendToUserCart()){
|
||||
$this->status = Ticket::STATUS_INACTIVE;
|
||||
}else{
|
||||
$this->status = Ticket::STATUS_ACTIVE;
|
||||
}
|
||||
|
||||
|
||||
$ticketType = TicketType::findOne($this->id_ticket_type);
|
||||
if ( isset($ticketType) && $ticketType->isInstallment() ){
|
||||
$this->part = 0;
|
||||
@ -157,12 +157,17 @@ class TicketCreate extends Ticket{
|
||||
$this->part_count = 0;
|
||||
}
|
||||
|
||||
if ( isset($ticketType )){
|
||||
$this->original_price = $ticketType->price_brutto;
|
||||
if (isset($ticketType)) {
|
||||
$this->original_price = $ticketType->price_brutto;
|
||||
$start = DateUtil::parseDate($this->start);
|
||||
$original_end = Helper::getTicketExpirationDate($start,$ticketType);
|
||||
$this->original_end = DateUtil::formatDateUtc($original_end);
|
||||
$this->max_reservation_count = $ticketType->max_reservation_count;
|
||||
$original_end = Helper::getTicketExpirationDate($start, $ticketType);
|
||||
$this->original_end = DateUtil::formatDateUtc($original_end);
|
||||
$this->max_reservation_count = $ticketType->max_reservation_count;
|
||||
|
||||
if (!Helper::isTicketCreatePriceEditable()) {
|
||||
$this->price_brutto = $ticketType->price_brutto;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -180,18 +185,18 @@ class TicketCreate extends Ticket{
|
||||
$this->appendToCustomerCart();
|
||||
$this->addContract($insert);
|
||||
$this->updateCardFlag();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected function updateCardFlag(){
|
||||
Card::updateCardFlagTicket($this->id_card);
|
||||
}
|
||||
|
||||
|
||||
public function addContract($insert){
|
||||
if ($insert){
|
||||
$ticketType = TicketType::findOne($this->id_ticket_type);
|
||||
if ( isset($ticketType) && $ticketType->isInstallment() ){
|
||||
|
||||
|
||||
$contract = new Contract();
|
||||
$contract->id_customer = $this->customer->id_customer;
|
||||
$contract->id_user = \Yii::$app->user->id;
|
||||
@ -204,7 +209,7 @@ class TicketCreate extends Ticket{
|
||||
$contract->id_ticket_type = $this->id_ticket_type;
|
||||
$contract->id_discount = $this->id_discount;
|
||||
$contract->save();
|
||||
|
||||
|
||||
$requests = TicketInstallmentRequest::createInstallments($this, $ticketType, $this->customer,$contract);
|
||||
foreach ($requests as $request){
|
||||
$request->save(false);
|
||||
@ -219,24 +224,27 @@ class TicketCreate extends Ticket{
|
||||
protected function addTransfer(){
|
||||
//$transfer = Transfer::createTicketTransfer($this->_account, $this->_discount, null, 1, $this);
|
||||
|
||||
|
||||
|
||||
$transfer = new Transfer();
|
||||
|
||||
|
||||
$transfer->type = Transfer::TYPE_TICKET;
|
||||
$transfer->direction = Transfer::DIRECTION_IN;
|
||||
|
||||
|
||||
$transfer->id_object = $this->id_ticket;
|
||||
|
||||
|
||||
$transfer->item_price = $this->_ticketType->price_brutto;
|
||||
$transfer->count = 1;
|
||||
|
||||
|
||||
if (isset ( $this->_discount )) {
|
||||
$transfer->id_discount = $this->_discount->id_discount;
|
||||
}
|
||||
|
||||
|
||||
$transfer->money = $this->price_brutto;
|
||||
|
||||
|
||||
if ( Helper::isTicketCreatePriceEditable() ){
|
||||
$transfer->money = $this->price_brutto;
|
||||
} else {
|
||||
$transfer->money = $transfer->item_price;
|
||||
}
|
||||
|
||||
$transfer->id_account = $this->_account->id_account;
|
||||
|
||||
if ( !Transfer::canMarkPaidByReception( $this->payment_method ) ){
|
||||
@ -252,7 +260,7 @@ class TicketCreate extends Ticket{
|
||||
}
|
||||
$transfer->status = $status;
|
||||
$transfer->payment_method = $this->payment_method;
|
||||
|
||||
|
||||
if ( isset($this->comment)){
|
||||
$transfer->comment = $this->comment;
|
||||
}
|
||||
@ -264,7 +272,7 @@ class TicketCreate extends Ticket{
|
||||
}
|
||||
$this->_transfer = $transfer;
|
||||
}
|
||||
|
||||
|
||||
public function isAppendToUserCart(){
|
||||
$result = false;
|
||||
if ( isset( $this->cart ) && $this->cart == 'user' ){
|
||||
@ -272,7 +280,7 @@ class TicketCreate extends Ticket{
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
public function isAppendToCustomerCart(){
|
||||
$result = false;
|
||||
if ( isset( $this->cart ) && $this->cart == 'customer' ){
|
||||
@ -310,11 +318,11 @@ class TicketCreate extends Ticket{
|
||||
\Yii::error("Nem sikerült menteni a bérletet! Vendég kosár hozzárendelés sikertelen!");
|
||||
throw new \Exception("Nem sikerült menteni a bérletet! Vendég kosár hozzárendelés sikertelen!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
use frontend\components\ReceptionCardNumberWidget;
|
||||
use frontend\components\ReceptionMenuWidget;
|
||||
use frontend\models\ReceptionForm;
|
||||
@ -10,8 +10,9 @@ use yii\widgets\ActiveForm;
|
||||
use yii\helpers\Html;
|
||||
|
||||
/** @var $model frontend\models\ReceptionForm */
|
||||
/** @var $user_key_listener_enabled number */
|
||||
?>
|
||||
<?php
|
||||
<?php
|
||||
$alertClass = "info";
|
||||
$cassaMessage = "Nyitva";
|
||||
if ( $model->isCassaClose() ){
|
||||
@ -22,10 +23,13 @@ use yii\helpers\Html;
|
||||
$cassaMessage = "Nincs kassza kiválasztva";
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var userKeyListenerEnabled = <?= $user_key_listener_enabled ?>;
|
||||
</script>
|
||||
<div class='row'>
|
||||
<div class='col-md-4'>
|
||||
<div class="alert alert-<?php echo $alertClass;?>">
|
||||
Aktuális kassza: <?php echo $model->getDefaultAccountName();?> -
|
||||
Aktuális kassza: <?php echo $model->getDefaultAccountName();?> -
|
||||
<?php echo $cassaMessage;?>
|
||||
</div>
|
||||
</div>
|
||||
@ -35,17 +39,17 @@ use yii\helpers\Html;
|
||||
]); ?>
|
||||
<div class='col-md-3'>
|
||||
<?php echo Html::textInput('CardSearch[customerName]','',['class'=>"form-control", 'placeholder' =>'Vendég neve']) ?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class='col-md-2'>
|
||||
<?= Html::submitButton(Yii::t('frontend/collection', 'Search'), ['class' => 'btn btn-primary btn-block']) ?>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
<?php /* ?>
|
||||
<div class="row" style="margin-bottom: 6px;">
|
||||
<div class='col-md-4'>
|
||||
</div>
|
||||
</div>
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['key/toggle', 'number' => $model->getCardNumber()],
|
||||
'method' => 'post',
|
||||
@ -53,13 +57,13 @@ use yii\helpers\Html;
|
||||
<div class='col-md-3'>
|
||||
<?php echo Html::hiddenInput('number', $model->getCardNumber())?>
|
||||
<?php echo Html::textInput('KeyToggleForm[key]','',['class'=>"form-control", 'placeholder' =>'Kulcs']) ?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class='col-md-2'>
|
||||
<?= Html::submitButton(Yii::t('frontend/collection', 'Ki/Be'), ['class' => 'btn btn-primary btn-block']) ?>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
<?php */ ?>
|
||||
<div class='row'>
|
||||
|
||||
@ -19,7 +19,7 @@ use yii\widgets\ActiveForm;
|
||||
|
||||
</style>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$number = "";
|
||||
if ( isset($model->card)){
|
||||
$number = $model->card->number;
|
||||
@ -43,6 +43,21 @@ if ( isset($model->card)){
|
||||
</div>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
<?php
|
||||
$user = \common\models\User::findOne(\Yii::$app->user->id);
|
||||
if ( $user->key_listener_enabled == 0){
|
||||
?>
|
||||
<?php $form = ActiveForm::begin([
|
||||
'enableAjaxValidation' => false,
|
||||
'method' => 'post',
|
||||
'action' => ['customer/reception']
|
||||
]); ?>
|
||||
<?php echo Html::hiddenInput("key_listener_enabled", "1" ,['class' => 'form-control', ])?>
|
||||
<?php echo Html::submitButton( "Kártyafigyelés be ",[ 'class' => 'btn btn-success btn-block']); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ var seq = '';
|
||||
var socket;
|
||||
$(document).ready(
|
||||
function(){
|
||||
|
||||
$("input[name='number']").on('focus', function (e) {
|
||||
$(this)
|
||||
.one('mouseup', function () {
|
||||
@ -43,16 +42,8 @@ function addDocumentKeypressedListener(){
|
||||
console.info("word typed",word);
|
||||
console.info("isWordTypedListenerAllowedOnlyForEmptyCustomer",isWordTypedListenerAllowedOnlyForEmptyCustomer);
|
||||
if ( word && word.length > 0){
|
||||
var redirectAllowed = true;
|
||||
if ( isWordTypedListenerAllowedOnlyForEmptyCustomer ){
|
||||
let params = new URLSearchParams(location.search)
|
||||
let cardNumber = params.get("number");
|
||||
var redirectAllowed = userKeyListenerEnabled == 1;
|
||||
|
||||
if ( cardNumber && cardNumber.length > 0){
|
||||
redirectAllowed = false;
|
||||
console.info("redirect disabled! number param exists", word, cardNumber );
|
||||
}
|
||||
}
|
||||
if ( redirectAllowed){
|
||||
location.href= reception_card_url +'&number=' + word;
|
||||
}
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
function Customer(o){
|
||||
|
||||
|
||||
var defaults = {
|
||||
'image_data' : 'customerupdate-photo_data'
|
||||
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
function init(){
|
||||
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
function init(){
|
||||
defaults = $.extend(defaults,o);
|
||||
var url = location.href;
|
||||
// var initCamera;
|
||||
@ -38,7 +37,7 @@ function Customer(o){
|
||||
preventSubmit( '#customerupdate-replacementcardnumber' );
|
||||
preventSubmit( '#customercreate-cardnumber' );
|
||||
}
|
||||
|
||||
|
||||
function preventSubmit($selector){
|
||||
$($selector).keydown(function(e) {
|
||||
if(e.keyCode == 13) { // enter key was pressed
|
||||
@ -68,7 +67,7 @@ function Customer(o){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// function snap(){
|
||||
// Webcam.snap( function(data_uri) {
|
||||
// document.getElementById('my_result').innerHTML = '<img width="160" height="120" src="'+data_uri+'"/>';
|
||||
|
||||
@ -73,6 +73,7 @@ class ApiManager
|
||||
'name' => $ticket->ticketType->name,
|
||||
],
|
||||
'usageCount' => $ticket->usage_count,
|
||||
'maxUsageCount' => $ticket->max_usage_count,
|
||||
'start' => DateUtil::parseDateTime($ticket->start)->getTimestamp(),
|
||||
'end' => DateUtil::parseDateTime($ticket->end)->getTimestamp()
|
||||
];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user