ziaadini / yii2-bi-dashboard
Yii2 Business Intelligence Dashboard
Installs: 48
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 3
Open Issues: 0
Type:yii2-extension
Requires
- kartik-v/yii2-bootstrap4-dropdown: @dev
- kartik-v/yii2-grid: ^3.5
- kartik-v/yii2-widget-depdrop: @dev
- kartik-v/yii2-widget-select2: ^2.1.4
- miloschuman/yii2-highcharts-widget: ^10.0
- sadi01/yii2-daterangepicker: *
- wbraganca/yii2-dynamicform: *
- yii2tech/ar-softdelete: *
- yiisoft/yii2: ~2.0.14
- yiisoft/yii2-bootstrap4: *
This package is auto-updated.
Last update: 2024-11-09 07:08:07 UTC
README
Business intelligence dashboard for Yii 2
Bidashboard
Bidashboard is a data visualization dashboard designed to provide insights into key metrics and data for business intelligence purposes. It allows users to monitor and analyze various aspects of their business in real-time through interactive charts and graphs.
This extension provides the Business Intelligence Dashboard for the Yii framework 2.0.
For license information check the LICENSE-file.
Installation
Using Composer (Preferred Method):
The preferred way to install this extension is through composer:
composer require --prefer-dist ziaadini/yii2-bi-dashboard:"*"
Alternative Method:
If you prefer adding the bidashboard extension to your composer.json
file manually, you can do so by adding the
following entry to the require
section:
{ "require": { "ziaadini/yii2-bi-dashboard": "*" } }
After adding the entry, save the composer.json
file and run the following command in the terminal or command prompt
within your project directory:
composer update
This command will fetch and install the bidashboard extension and its required dependencies into your Yii 2 project.
Configuration
To use this extension, you have to configure the bidashboard module in your application configuration:
return [ //.... 'modules' => [ 'bidashboard' => [ 'class' => 'ziaadini\bidashboard\Module', ], ] ];
And for access Alerts to User for show who see the fired alerts:
implement fullName() function into your User model class
Env
You have to add the database configuration to env, its example is in - Env.example
DB Migrations
Run module migrations:
php yii migrate --migrationPath=@ziaadini/bidashboard/migrations
Or, Add migrations path in console application config:
'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationNamespaces' => [], 'migrationPath' => [ '@vendor/ziaadini/yii2-bi-dashboard/src/migrations', '@app/migrations' ] ], ],
How To Use
add to view model:
use ziaadini\bidashboard\widgets\ReportModalWidget; <?= ReportModalWidget::widget([ 'queryParams' => $queryParams, 'searchModel' => $searchModel, 'searchModelMethod' => $searchWidget, 'searchModelRunResultView' => $searchModelRunResultView, 'searchRoute' => Yii::$app->request->pathInfo, 'searchModelFormName' => $searchModelFormName, 'outputColumn' => $outputColumn, ]) ?>
add to search model:
public function searchWidget(array $params,int $rangeType,int $startRange,int $endRange) { $query = Invoice::find(); $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $this->load($params, ''); $query->andFilterWhere(['between', 'created_at', $startRange, $endRange]); if ($rangeType == ReportWidget::RANGE_TYPE_MONTHLY) { ... } elseif ($rangeType == ReportWidget::RANGE_TYPE_DAILY) { ... } return $dataProvider; }