diff --git a/backend/controllers/ProcurementController.php b/backend/controllers/ProcurementController.php index 31019fd..d5dd603 100644 --- a/backend/controllers/ProcurementController.php +++ b/backend/controllers/ProcurementController.php @@ -9,6 +9,8 @@ use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; use common\models\Warehouse; +use common\models\Product; +use common\models\User; /** * ProcurementController implements the CRUD actions for Procurement model. @@ -33,12 +35,20 @@ class ProcurementController extends Controller */ public function actionIndex() { + + $warehouses = Warehouse::read(null); + $products = Product::read(null); + $users = User::read(null); + $searchModel = new ProcurementSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, + 'users' => $users, + 'products' => $products, + 'warehouses' => $warehouses, ]); } @@ -62,12 +72,42 @@ class ProcurementController extends Controller public function actionCreate() { $model = new Procurement(); + $model->scenario = 'create_general'; $model->id_user = Yii::$app->user->id; $warehouses = Warehouse::read(null); - if ($model->load(Yii::$app->request->post()) && $model->save()) { + if ( count($warehouses) <= 0 ){ + throw new NotFoundHttpException( Yii::t('common/procurement' ,'No active warehouse found.' )); + } + + if ($model->load(Yii::$app->request->post()) && $model->validate()) { + + $connection = \Yii::$app->db; + + $transaction = $connection->beginTransaction(); + + try { + + $product = Product::findOne( $model->id_product ); + $model->stock = $product->stock; + $result = $model->save(false); + + $product->stock = $product->stock + $model->count; + $result &= $product->save(false); + + if ($result) { + $transaction->commit(); + } else { + $transaction->rollback(); + } + } catch (\Exception $e) { + $transaction->rollback(); + throw $e; + } + + return $this->redirect(['view', 'id' => $model->id_procurement]); } else { return $this->render('create', [ @@ -76,39 +116,64 @@ class ProcurementController extends Controller ]); } } - /** - * Updates an existing Procurement model. - * If update is successful, the browser will be redirected to the 'view' page. - * @param integer $id + * Creates a new Procurement model. + * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ - public function actionUpdate($id) + public function actionCreateProduct($id) { - $model = $this->findModel($id); + + $product = $this->findProduct($id); + + $model = new Procurement(); + + $warehouses = Warehouse::read(null); + + $model->id_user = Yii::$app->user->id; + $model->id_product = $product->id_product; + $model->stock = $product->stock; - if ($model->load(Yii::$app->request->post()) && $model->save()) { + $warehouses = Warehouse::read(null); + + if ( count($warehouses) <= 0 ){ + throw new NotFoundHttpException( Yii::t('common/procurement' ,'No active warehouse found.' )); + } + + if ($model->load(Yii::$app->request->post()) && $model->validate()) { + + $connection = \Yii::$app->db; + + $transaction = $connection->beginTransaction(); + + try { + + $result = $model->save(false); + + $product->stock = $product->stock + $model->count; + $result &= $product->save(false); + + if ($result) { + $transaction->commit(); + } else { + $transaction->rollback(); + } + } catch (\Exception $e) { + $transaction->rollback(); + throw $e; + } + + return $this->redirect(['view', 'id' => $model->id_procurement]); } else { - return $this->render('update', [ + return $this->render('create_product', [ 'model' => $model, + 'warehouses' =>$warehouses, + 'product' => $product ]); } } - /** - * Deletes an existing Procurement model. - * If deletion is successful, the browser will be redirected to the 'index' page. - * @param integer $id - * @return mixed - */ - public function actionDelete($id) - { - $this->findModel($id)->delete(); - - return $this->redirect(['index']); - } - /** * Finds the Procurement model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. @@ -124,4 +189,19 @@ class ProcurementController extends Controller throw new NotFoundHttpException('The requested page does not exist.'); } } + /** + * Finds the Product model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Procurement the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findProduct($id) + { + if (($model = Product::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } } diff --git a/backend/models/ProcurementSearch.php b/backend/models/ProcurementSearch.php index 203745b..82ab42b 100644 --- a/backend/models/ProcurementSearch.php +++ b/backend/models/ProcurementSearch.php @@ -12,14 +12,22 @@ use common\models\Procurement; */ class ProcurementSearch extends Procurement { + + public $date_start; + public $date_end; + + public $timestampStart; + public $timestampEnd; + /** * @inheritdoc */ public function rules() { return [ - [['id_procurement', 'id_warehouse', 'id_user', 'id_product', 'count', 'stock', 'purchase_price'], 'integer'], - [['description', 'created_at', 'updated_at'], 'safe'], + [[ 'id_warehouse', 'id_user', 'id_product', ], 'integer'], + [[ 'date_start', ], 'date' , 'timestampAttribute' => 'timestampStart' ], + [[ 'date_end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ], ]; } @@ -56,18 +64,14 @@ class ProcurementSearch extends Procurement } $query->andFilterWhere([ - 'id_procurement' => $this->id_procurement, 'id_warehouse' => $this->id_warehouse, 'id_user' => $this->id_user, 'id_product' => $this->id_product, - 'count' => $this->count, - 'stock' => $this->stock, - 'purchase_price' => $this->purchase_price, - 'created_at' => $this->created_at, - 'updated_at' => $this->updated_at, ]); + + $query->andFilterWhere([ '>=', 'created_at', $this->date_start ] ); + $query->andFilterWhere([ '<', 'created_at', $this->timestampEnd ] ); - $query->andFilterWhere(['like', 'description', $this->description]); return $dataProvider; } diff --git a/backend/views/procurement/_form_product.php b/backend/views/procurement/_form_product.php new file mode 100644 index 0000000..725492d --- /dev/null +++ b/backend/views/procurement/_form_product.php @@ -0,0 +1,54 @@ + + + +
= Html::a(Yii::t('common/procurement', 'Create Procurement'), ['create'], ['class' => 'btn btn-success']) ?> @@ -22,26 +26,29 @@ $this->params['breadcrumbs'][] = $this->title; = GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ - ['class' => 'yii\grid\SerialColumn'], - [ 'attribute' => 'id_warehouse', 'value' => 'wareHouseName' ], - 'id_user', - 'id_product', + [ + 'attribute' => 'id_user', + 'value' => 'userName' + + ], + [ + 'attribute' => 'id_product', + 'value' => 'productName' + + ], 'count', 'stock', 'purchase_price', - // 'description', 'created_at:datetime', - 'updated_at:datetime', [ 'class' => 'yii\grid\ActionColumn', - 'template' => '{view}' - + 'template' => '{view}', ], ], ]); ?> diff --git a/backend/views/procurement/view.php b/backend/views/procurement/view.php index 2366b40..d29613a 100644 --- a/backend/views/procurement/view.php +++ b/backend/views/procurement/view.php @@ -14,30 +14,35 @@ $this->params['breadcrumbs'][] = $this->title;
- = Html::a(Yii::t('common/procurement', 'Update'), ['update', 'id' => $model->id_procurement], ['class' => 'btn btn-primary']) ?> - = Html::a(Yii::t('common/procurement', 'Delete'), ['delete', 'id' => $model->id_procurement], [ - 'class' => 'btn btn-danger', - 'data' => [ - 'confirm' => Yii::t('common/procurement', 'Are you sure you want to delete this item?'), - 'method' => 'post', - ], - ]) ?> -
- = DetailView::widget([ 'model' => $model, 'attributes' => [ 'id_procurement', - 'id_warehouse', - 'id_user', - 'id_product', + [ + 'attribute' => 'id_warehouse', + 'value' => $model->warehouseName, + + ], + [ + 'attribute' => 'id_user', + 'value' => $model->userName, + + ], + [ + 'attribute' => 'id_product', + 'value' => $model->productName, + + ], 'count', 'stock', 'purchase_price', - 'description', - 'created_at', - 'updated_at', + [ + 'attribute' => 'description', + 'value' => nl2br($model->description), + 'format' => 'raw' + ], + 'created_at:datetime', + 'updated_at:datetime', ], ]) ?> diff --git a/backend/views/product/index.php b/backend/views/product/index.php index 87893bc..fb624d8 100644 --- a/backend/views/product/index.php +++ b/backend/views/product/index.php @@ -2,6 +2,7 @@ use yii\helpers\Html; use yii\grid\GridView; +use yii\helpers\Url; /* @var $this yii\web\View */ /* @var $searchModel backend\models\ProductSearch */ @@ -41,9 +42,31 @@ $this->params['breadcrumbs'][] = $this->title; 'value' => 'statusHuman', ], - - ['class' => 'yii\grid\ActionColumn', - 'template' => '{view} {update}' + 'stock', + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{view} {update} {procurement}', + 'buttons' =>[ + 'view' => function ($url, $model, $key) { + return Html::a( Yii::t('common/product', 'Details' ), $url,[ 'class' => 'btn btn-xs btn-success' ]) ; + }, + 'update' => function ($url, $model, $key) { + return Html::a( Yii::t('common/product', 'Update' ), $url,[ 'class' => 'btn btn-xs btn-success' ]) ; + }, + 'procurement' => function ($url, $model, $key) { + return Html::a( Yii::t('common/product', 'Procurement' ), $url,[ 'class' => 'btn btn-xs btn-success' ]) ; + }, + ], + 'urlCreator' => function ( $action, $model, $key, $index ){ + $result = ''; + if ( $action == 'procurement' ){ + $result = Url::toRoute(['procurement/create-product' , 'id' => $model->id_product]); + }else{ + $result = Url::toRoute(['product/'.$action , 'id' => $model->id_product]); + } + + return $result; + } ], ], ]); ?> diff --git a/backend/views/product/view.php b/backend/views/product/view.php index ac32061..5bda8de 100644 --- a/backend/views/product/view.php +++ b/backend/views/product/view.php @@ -29,6 +29,7 @@ $this->params['breadcrumbs'][] = $this->title; 'sale_price', 'profit_margins', 'statusHuman', + 'stock', [ 'attribute' => 'description', 'value' => nl2br($model->description), diff --git a/common/models/Procurement.php b/common/models/Procurement.php index ae04358..6a2b5b7 100644 --- a/common/models/Procurement.php +++ b/common/models/Procurement.php @@ -37,10 +37,11 @@ class Procurement extends \common\models\BaseFitnessActiveRecord public function rules() { return [ - [['id_warehouse', 'id_user', 'id_product', 'count'], 'required'], + [['id_warehouse', 'count', 'purchase_price' ], 'required'], + [['id_warehouse', 'count', 'productIdentifier', 'purchase_price' ], 'required' , 'on' => 'create_general'], [['id_warehouse', 'id_user', 'id_product', 'count', 'stock', 'purchase_price'], 'integer'], - [['created_at', 'updated_at'], 'safe'], [['description'], 'string', 'max' => 255], + [['productIdentifier'], 'string', 'max' => 128], [['productIdentifier'] ,'validateProductIdentifier', 'on' => 'create_general'] ]; } @@ -68,12 +69,16 @@ class Procurement extends \common\models\BaseFitnessActiveRecord public function validateProductIdentifier($attribute,$params){ $product = null; - if ( isset($this->attribute)){ - $id = $this->$attribute; + if ( isset($this->productIdentifier)){ + $id = $this->productIdentifier; $conditionProductName = ['name' =>$id]; $conditionProductNumber = ['product_number' =>$id]; $conditionBarcode= ['barcode' =>$id]; - $product = Product::findOne(['or',[ $conditionProductName,$conditionProductNumber,$conditionBarcode ]]); + $products = Product::find()->andWhere(['or', ['name' =>$id] , ['product_number' =>$id] ,['barcode' =>$id] ] )->all(); + if ( count($products) == 1 ){ + $product = $products[0]; + $this->id_product = $product->id_product; + } } if ( $product == null ){ @@ -111,7 +116,7 @@ class Procurement extends \common\models\BaseFitnessActiveRecord //////////////////////////////// public function getUser() { return $this->hasOne ( User::className (), [ - 'id_user' => 'id_user' + 'id' => 'id_user' ] ); } diff --git a/common/models/Product.php b/common/models/Product.php index 6410e4f..0b1bbd5 100644 --- a/common/models/Product.php +++ b/common/models/Product.php @@ -110,4 +110,19 @@ class Product extends \common\models\BaseFitnessActiveRecord { return $result; } + /** + * $param int $forceIncludeAccount id warehouse, that should be included in list, even if it is inactive + * */ + public static function read($forceIncludeObjectWithId = null){ + $warehouses = null; + + if ( $forceIncludeObjectWithId == null){ + $warehouses = Product::find()->andWhere(['status' => Product::STATUS_ACTIVE])->all(); + }else{ + $warehouses = Product::find()->andWhere( ['or', ['status' => Product::STATUS_ACTIVE], ['id_product' => $forceIncludeObjectWithId ] ])->all(); + } + + return $warehouses; + } + } diff --git a/common/models/User.php b/common/models/User.php index dce1b33..d8108ef 100644 --- a/common/models/User.php +++ b/common/models/User.php @@ -209,4 +209,21 @@ class User extends ActiveRecord implements IdentityInterface ]; } + + + /** + * $param int $forceIncludeAccount id warehouse, that should be included in list, even if it is inactive + * */ + public static function read($forceIncludeObjectWithId = null){ + $warehouses = null; + + if ( $forceIncludeObjectWithId == null){ + $warehouses = User::find()->andWhere(['status' => User::STATUS_ACTIVE])->all(); + }else{ + $warehouses = User::find()->andWhere( ['or', ['status' => User::STATUS_ACTIVE], ['id' => $forceIncludeObjectWithId ] ])->all(); + } + + return $warehouses; + } + } diff --git a/composer.json b/composer.json index 22993b0..b9decd9 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "php": ">=5.4.0", "yiisoft/yii2": ">=2.0.6", "yiisoft/yii2-bootstrap": "*", - "yiisoft/yii2-swiftmailer": "*" + "yiisoft/yii2-swiftmailer": "*", + "kartik-v/yii2-widgets": "^3.4" }, "require-dev": { "yiisoft/yii2-codeception": "*", diff --git a/composer.lock b/composer.lock index 6a29fb3..3c5cad6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8580bd82955b1fbb80d47024e184056e", + "hash": "123abf1f9516a179624bd311ea413a81", "packages": [ { "name": "bower-asset/bootstrap", @@ -316,6 +316,1128 @@ ], "time": "2013-11-30 08:25:19" }, + { + "name": "kartik-v/bootstrap-fileinput", + "version": "v4.2.7", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/bootstrap-fileinput.git", + "reference": "0468bbba9c28c1250aca83eba9b33e32ec135f78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/bootstrap-fileinput/zipball/0468bbba9c28c1250aca83eba9b33e32ec135f78", + "reference": "0468bbba9c28c1250aca83eba9b33e32ec135f78", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "kartik\\plugins\\fileinput\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "An enhanced HTML 5 file input for Bootstrap 3.x with features for file preview for many file types, multiple selection, ajax uploads, and more.", + "homepage": "https://github.com/kartik-v/bootstrap-fileinput", + "keywords": [ + "ajax", + "bootstrap", + "delete", + "file", + "image", + "input", + "jquery", + "multiple", + "preview", + "progress", + "upload" + ], + "time": "2015-09-13 17:39:44" + }, + { + "name": "kartik-v/bootstrap-star-rating", + "version": "v3.5.4", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/bootstrap-star-rating.git", + "reference": "987777ee21a599bebbc545c743063fcee9833842" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/bootstrap-star-rating/zipball/987777ee21a599bebbc545c743063fcee9833842", + "reference": "987777ee21a599bebbc545c743063fcee9833842", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "kartik\\plugins\\rating\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A simple yet powerful JQuery star rating plugin for Bootstrap.", + "homepage": "https://github.com/kartik-v/bootstrap-star-rating", + "keywords": [ + "Rating", + "bootstrap", + "jquery", + "star" + ], + "time": "2015-09-21 09:06:33" + }, + { + "name": "kartik-v/dependent-dropdown", + "version": "v1.4.3", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/dependent-dropdown.git", + "reference": "03b086d7ec51fc773aab064d7204adbbaa807ec4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/dependent-dropdown/zipball/03b086d7ec51fc773aab064d7204adbbaa807ec4", + "reference": "03b086d7ec51fc773aab064d7204adbbaa807ec4", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "kartik\\plugins\\depdrop\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A multi level dependent dropdown JQuery plugin that allows nested dependencies.", + "homepage": "https://github.com/kartik-v/dependent-dropdown", + "keywords": [ + "dependent", + "dropdown", + "jquery", + "option", + "select" + ], + "time": "2015-07-14 09:54:25" + }, + { + "name": "kartik-v/yii2-krajee-base", + "version": "v1.7.7", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-krajee-base.git", + "reference": "c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19", + "reference": "c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19", + "shasum": "" + }, + "require": { + "yiisoft/yii2-bootstrap": "@dev" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\base\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Base library and foundation components for all Yii2 Krajee extensions.", + "homepage": "https://github.com/kartik-v/yii2-krajee-base", + "keywords": [ + "base", + "extension", + "foundation", + "krajee", + "widget", + "yii2" + ], + "time": "2015-06-16 05:19:57" + }, + { + "name": "kartik-v/yii2-widget-activeform", + "version": "v1.4.4", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-activeform.git", + "reference": "c62c8b92e8ee38892cc4e2b29851864a7a20ee01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-activeform/zipball/c62c8b92e8ee38892cc4e2b29851864a7a20ee01", + "reference": "c62c8b92e8ee38892cc4e2b29851864a7a20ee01", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "~1.7" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\form\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Enhanced Yii2 active-form and active-field with full bootstrap styling support (sub repo split from yii2-widgets).", + "homepage": "https://github.com/kartik-v/yii2-widget-activeform", + "keywords": [ + "activefield", + "activeform", + "extension", + "field", + "form", + "widget", + "yii2" + ], + "time": "2015-07-08 11:36:38" + }, + { + "name": "kartik-v/yii2-widget-affix", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-affix.git", + "reference": "2184119bfa518c285406156f744769b13b861712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-affix/zipball/2184119bfa518c285406156f744769b13b861712", + "reference": "2184119bfa518c285406156f744769b13b861712", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\affix\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A scrollspy and affixed enhanced navigation to highlight page sections (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-affix", + "keywords": [ + "affix", + "bootstrap", + "extension", + "jquery", + "navigation", + "plugin", + "scrollspy", + "widget", + "yii2" + ], + "time": "2014-11-09 04:56:27" + }, + { + "name": "kartik-v/yii2-widget-alert", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-alert.git", + "reference": "5b312eeaf429c2affe6a96217d79f0c761159643" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-alert/zipball/5b312eeaf429c2affe6a96217d79f0c761159643", + "reference": "5b312eeaf429c2affe6a96217d79f0c761159643", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\alert\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-alert", + "keywords": [ + "alert", + "block", + "bootstrap", + "extension", + "flash", + "jquery", + "notification", + "plugin", + "widget", + "yii2" + ], + "time": "2014-11-19 06:44:12" + }, + { + "name": "kartik-v/yii2-widget-colorinput", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-colorinput.git", + "reference": "1f3e3dc32a7dae0c83623fbda8e0dd77b84771b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-colorinput/zipball/1f3e3dc32a7dae0c83623fbda8e0dd77b84771b1", + "reference": "1f3e3dc32a7dae0c83623fbda8e0dd77b84771b1", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\color\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-colorinput", + "keywords": [ + "HTML5", + "color", + "extension", + "form", + "input", + "jquery", + "plugin", + "widget", + "yii2" + ], + "time": "2014-11-08 21:10:18" + }, + { + "name": "kartik-v/yii2-widget-datepicker", + "version": "v1.3.3", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-datepicker.git", + "reference": "368b181ef658c05707fe41dd16eee4d9ffd9da38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-datepicker/zipball/368b181ef658c05707fe41dd16eee4d9ffd9da38", + "reference": "368b181ef658c05707fe41dd16eee4d9ffd9da38", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "~1.7" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\date\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).", + "homepage": "https://github.com/kartik-v/yii2-widget-datepicker", + "keywords": [ + "date", + "extension", + "form", + "jquery", + "picker", + "plugin", + "select2", + "widget", + "yii2" + ], + "time": "2015-07-19 04:49:03" + }, + { + "name": "kartik-v/yii2-widget-datetimepicker", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-datetimepicker.git", + "reference": "3e59cc0f074df3b883c045395c6814506e4db7c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-datetimepicker/zipball/3e59cc0f074df3b883c045395c6814506e4db7c6", + "reference": "3e59cc0f074df3b883c045395c6814506e4db7c6", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\datetime\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-datetimepicker", + "keywords": [ + "datetime", + "extension", + "form", + "jquery", + "picker", + "plugin", + "select2", + "widget", + "yii2" + ], + "time": "2015-01-25 16:36:55" + }, + { + "name": "kartik-v/yii2-widget-depdrop", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-depdrop.git", + "reference": "40bbe95d8d5afe4eef5eecc4c2f1a5a21f9edf43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-depdrop/zipball/40bbe95d8d5afe4eef5eecc4c2f1a5a21f9edf43", + "reference": "40bbe95d8d5afe4eef5eecc4c2f1a5a21f9edf43", + "shasum": "" + }, + "require": { + "kartik-v/dependent-dropdown": "~1.4", + "kartik-v/yii2-krajee-base": "~1.7" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\depdrop\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Widget that enables setting up dependent dropdowns with nested dependencies (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-depdrop", + "keywords": [ + "dependent", + "dropdown", + "extension", + "form", + "jquery", + "plugin", + "widget", + "yii2" + ], + "time": "2015-06-26 20:20:32" + }, + { + "name": "kartik-v/yii2-widget-fileinput", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-fileinput.git", + "reference": "bfed1b4201cc5fb3ac11563e1269f0ca64071e0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-fileinput/zipball/bfed1b4201cc5fb3ac11563e1269f0ca64071e0b", + "reference": "bfed1b4201cc5fb3ac11563e1269f0ca64071e0b", + "shasum": "" + }, + "require": { + "kartik-v/bootstrap-fileinput": "~4.2", + "kartik-v/yii2-krajee-base": "~1.7" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\file\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "An enhanced FileInput widget for Bootstrap 3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-fileinput", + "keywords": [ + "extension", + "file", + "form", + "input", + "jquery", + "plugin", + "upload", + "widget", + "yii2" + ], + "time": "2015-06-26 20:23:24" + }, + { + "name": "kartik-v/yii2-widget-growl", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-growl.git", + "reference": "c79abaa47e9103e93345cd1eca7bc75e17e9a92e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-growl/zipball/c79abaa47e9103e93345cd1eca7bc75e17e9a92e", + "reference": "c79abaa47e9103e93345cd1eca7bc75e17e9a92e", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\growl\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A widget to generate growl based notifications using bootstrap-growl plugin (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-growl", + "keywords": [ + "alert", + "bootstrap", + "extension", + "growl", + "jquery", + "notification", + "plugin", + "widget", + "yii2" + ], + "time": "2015-05-03 08:23:04" + }, + { + "name": "kartik-v/yii2-widget-rangeinput", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-rangeinput.git", + "reference": "b7a0b1eb627a3d6d99bad3d8ff31b28259f9e987" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-rangeinput/zipball/b7a0b1eb627a3d6d99bad3d8ff31b28259f9e987", + "reference": "b7a0b1eb627a3d6d99bad3d8ff31b28259f9e987", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\range\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-rangeinput", + "keywords": [ + "HTML5", + "extension", + "form", + "input", + "jquery", + "plugin", + "range", + "widget", + "yii2" + ], + "time": "2014-11-08 21:15:27" + }, + { + "name": "kartik-v/yii2-widget-rating", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-rating.git", + "reference": "902f73385e6ed42d65576b8fd6e97889c3c18e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-rating/zipball/902f73385e6ed42d65576b8fd6e97889c3c18e65", + "reference": "902f73385e6ed42d65576b8fd6e97889c3c18e65", + "shasum": "" + }, + "require": { + "kartik-v/bootstrap-star-rating": "*", + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\rating\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-rating", + "keywords": [ + "Rating", + "bootstrap", + "extension", + "form", + "input", + "jquery", + "plugin", + "star", + "widget", + "yii2" + ], + "time": "2014-11-08 19:30:37" + }, + { + "name": "kartik-v/yii2-widget-select2", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-select2.git", + "reference": "e72880e7e8dfc845c112ed7df275bf1c929be6db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-select2/zipball/e72880e7e8dfc845c112ed7df275bf1c929be6db", + "reference": "e72880e7e8dfc845c112ed7df275bf1c929be6db", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "~1.7" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\select2\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Enhanced Yii2 wrapper for the Select2 jQuery plugin (sub repo split from yii2-widgets).", + "homepage": "https://github.com/kartik-v/yii2-widget-select2", + "keywords": [ + "dropdown", + "extension", + "form", + "jquery", + "plugin", + "select2", + "widget", + "yii2" + ], + "time": "2015-09-12 19:56:48" + }, + { + "name": "kartik-v/yii2-widget-sidenav", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-sidenav.git", + "reference": "02ee4f142d7dfbb316f878e538cc7b946f4502d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-sidenav/zipball/02ee4f142d7dfbb316f878e538cc7b946f4502d2", + "reference": "02ee4f142d7dfbb316f878e538cc7b946f4502d2", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\sidenav\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "An enhanced side navigation menu styled for bootstrap (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-sidenav", + "keywords": [ + "bootstrap", + "extension", + "jquery", + "menu", + "navigation", + "plugin", + "sidenav", + "widget", + "yii2" + ], + "time": "2014-11-09 08:07:23" + }, + { + "name": "kartik-v/yii2-widget-spinner", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-spinner.git", + "reference": "3132ba14d58e0564d17f3b846b04c42aa72bdde3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-spinner/zipball/3132ba14d58e0564d17f3b846b04c42aa72bdde3", + "reference": "3132ba14d58e0564d17f3b846b04c42aa72bdde3", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\spinner\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A widget to render animated CSS3 loading spinners with VML fallback for IE (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-spinner", + "keywords": [ + "CSS3", + "extension", + "jquery", + "loading", + "plugin", + "spinner", + "widget", + "yii2" + ], + "time": "2014-11-09 05:02:05" + }, + { + "name": "kartik-v/yii2-widget-switchinput", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-switchinput.git", + "reference": "f6fd88e978b526323538b62ffd9d8845a9799758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-switchinput/zipball/f6fd88e978b526323538b62ffd9d8845a9799758", + "reference": "f6fd88e978b526323538b62ffd9d8845a9799758", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\switchinput\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes & radios as toggle switchinputes (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-switchinput", + "keywords": [ + "bootstrap", + "extension", + "form", + "input", + "jquery", + "plugin", + "switchinput", + "toggle", + "widget", + "yii2" + ], + "time": "2015-01-14 16:27:26" + }, + { + "name": "kartik-v/yii2-widget-timepicker", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-timepicker.git", + "reference": "432a8e166f89c2172fd5b86f6badcd943dbd3bc2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-timepicker/zipball/432a8e166f89c2172fd5b86f6badcd943dbd3bc2", + "reference": "432a8e166f89c2172fd5b86f6badcd943dbd3bc2", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\time\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-timepicker", + "keywords": [ + "bootstrap", + "extension", + "form", + "jquery", + "picker", + "plugin", + "time", + "widget", + "yii2" + ], + "time": "2014-11-08 20:01:29" + }, + { + "name": "kartik-v/yii2-widget-touchspin", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-touchspin.git", + "reference": "fd117e07c5dab1e5308cb8d75431269effb66212" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-touchspin/zipball/fd117e07c5dab1e5308cb8d75431269effb66212", + "reference": "fd117e07c5dab1e5308cb8d75431269effb66212", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\touchspin\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes & radios as toggle touchspines (sub repo split from yii2-widgets)", + "homepage": "https://github.com/kartik-v/yii2-widget-touchspin", + "keywords": [ + "bootstrap", + "extension", + "form", + "input", + "jquery", + "plugin", + "spinner", + "touch", + "widget", + "yii2" + ], + "time": "2014-12-04 12:53:04" + }, + { + "name": "kartik-v/yii2-widget-typeahead", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-typeahead.git", + "reference": "e369cd55cb2fb9d3a82b57ea6c9a62d69f14fb94" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-typeahead/zipball/e369cd55cb2fb9d3a82b57ea6c9a62d69f14fb94", + "reference": "e369cd55cb2fb9d3a82b57ea6c9a62d69f14fb94", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "~1.7" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\typeahead\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Enhanced Yii2 wrapper for the Twitter Typeahead plugin (sub repo split from yii2-widgets).", + "homepage": "https://github.com/kartik-v/yii2-widget-typeahead", + "keywords": [ + "dropdown", + "extension", + "form", + "jquery", + "plugin", + "typeahead", + "widget", + "yii2" + ], + "time": "2015-06-28 18:05:41" + }, + { + "name": "kartik-v/yii2-widgets", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widgets.git", + "reference": "f435d5e96c4848844bdfa9cee58249ccfb3e2dd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widgets/zipball/f435d5e96c4848844bdfa9cee58249ccfb3e2dd2", + "reference": "f435d5e96c4848844bdfa9cee58249ccfb3e2dd2", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "*", + "kartik-v/yii2-widget-activeform": "*", + "kartik-v/yii2-widget-affix": "*", + "kartik-v/yii2-widget-alert": "*", + "kartik-v/yii2-widget-colorinput": "*", + "kartik-v/yii2-widget-datepicker": "*", + "kartik-v/yii2-widget-datetimepicker": "*", + "kartik-v/yii2-widget-depdrop": "*", + "kartik-v/yii2-widget-fileinput": "*", + "kartik-v/yii2-widget-growl": "*", + "kartik-v/yii2-widget-rangeinput": "*", + "kartik-v/yii2-widget-rating": "*", + "kartik-v/yii2-widget-select2": "*", + "kartik-v/yii2-widget-sidenav": "*", + "kartik-v/yii2-widget-spinner": "*", + "kartik-v/yii2-widget-switchinput": "*", + "kartik-v/yii2-widget-timepicker": "*", + "kartik-v/yii2-widget-touchspin": "*", + "kartik-v/yii2-widget-typeahead": "*" + }, + "type": "yii2-extension", + "autoload": { + "psr-4": { + "kartik\\widgets\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD 3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Collection of useful widgets for Yii Framework 2.0 extending functionalities for Bootstrap", + "homepage": "https://github.com/kartik-v/yii2-widgets", + "keywords": [ + "extension", + "form", + "widget", + "yii2" + ], + "time": "2014-11-09 19:54:17" + }, { "name": "swiftmailer/swiftmailer", "version": "v5.4.1",