<?php
namespace backend\modules\ib\controllers;

use Yii;
use backend\models\MemberApi;

/**
 * 挂单报表
 */
class PendingController extends BaseController
{
    public function actionIndex()
    {
        $request = Yii::$app->request;
        $ibId = (int) $request->get('ibId');
        $name = trim($request->get('name', ''));
        $sTime = $request->get('sTime', ''); // 开始时间
        $eTime = $request->get('eTime', ''); // 结束时间

        $api = new MemberApi();
        $ibs = $api->getIbs()['data'];

        /** @var \backend\models\MemberIdentity Yii::$app->user->identity */
        return $this->render('index', [
            'type' => 'pending',
            'ibId' => $ibId,
            'name' => $name,
            'sTime' => $sTime,
            'eTime' => $eTime,
            'ibs' => $ibs,
            'isHaveAdmin' => Yii::$app->user->identity->isHaveAdmin(),
        ]);
    }

}