Skip to content

Commit

Permalink
- Version 2.1.56
Browse files Browse the repository at this point in the history
- Add MIT license
  • Loading branch information
yaroslavOshyyko committed Aug 23, 2017
1 parent 977fd9c commit 99ff164
Show file tree
Hide file tree
Showing 29 changed files with 93 additions and 56 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.1.56

### Features

* **product-component, product-list-component:** Check if products exist

# 2.1.55

### Features
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2012-2017 Impress Application Server contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions modules/add-product-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/add-product-component",
"version": "2.1.55",
"version": "2.1.56",
"description": "Form to add new product",
"main": "index.ts",
"scripts": {
Expand All @@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/productservice": "2.1.55"
"@nodeart/productservice": "2.1.56"
}
}
4 changes: 2 additions & 2 deletions modules/add-props-component/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@nodeart/add-props-component",
"description": "Form to add new categories, attributes, tags",
"version": "2.1.55",
"version": "2.1.56",
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/productservice": "2.1.55"
"@nodeart/productservice": "2.1.56"
}
}
4 changes: 2 additions & 2 deletions modules/attributes-search-component/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nodeart/attributes-search-component",
"description": "Generate attrribute filter component that integrates into Product List Component",
"version": "2.1.55",
"version": "2.1.56",
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand All @@ -13,6 +13,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/productservice": "2.1.55"
"@nodeart/productservice": "2.1.56"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class AttributesSearchComponent implements OnInit {
getAttributes(){
this.productService.getCategory(this.categoryId).subscribe( data => {
if(data.val()){
let ids = data.val()['_source']['attrs'];
let ids = data.val()[0]['_source']['attrs'];
if(ids) {
let queryObject = {
query: {
Expand Down
6 changes: 3 additions & 3 deletions modules/auth-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/auth-service",
"version": "2.1.55",
"version": "2.1.56",
"description": "",
"main": "index.ts",
"scripts": {
Expand All @@ -9,7 +9,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/dal": "2.1.55",
"@nodeart/session-flow": "2.1.55"
"@nodeart/dal": "2.1.56",
"@nodeart/session-flow": "2.1.56"
}
}
4 changes: 2 additions & 2 deletions modules/basket-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/basket-component",
"version": "2.1.55",
"version": "2.1.56",
"description": "Display user basket",
"main": "index.ts",
"scripts": {
Expand All @@ -13,6 +13,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/basketservice": "2.1.55"
"@nodeart/basketservice": "2.1.56"
}
}
6 changes: 3 additions & 3 deletions modules/basketservice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/basketservice",
"version": "2.1.55",
"version": "2.1.56",
"description": "Save and remove products in basket, track user basket history",
"main": "index.ts",
"scripts": {
Expand All @@ -13,7 +13,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/dal": "2.1.55",
"@nodeart/session-flow": "2.1.55"
"@nodeart/dal": "2.1.56",
"@nodeart/session-flow": "2.1.56"
}
}
4 changes: 2 additions & 2 deletions modules/categories-component/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nodeart/categories-component",
"description": "Component that display available Categories",
"version": "2.1.55",
"version": "2.1.56",
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand All @@ -13,6 +13,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/productservice": "2.1.55"
"@nodeart/productservice": "2.1.56"
}
}
2 changes: 1 addition & 1 deletion modules/category-filter-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
},
"author": "",
"license": "ISC",
"version": "2.1.55"
"version": "2.1.56"
}
4 changes: 2 additions & 2 deletions modules/dal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/dal",
"version": "2.1.55",
"version": "2.1.56",
"description": "Bridge for database connector(for now only Firebase).",
"main": "index.ts",
"scripts": {
Expand All @@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/firebase-connector": "2.1.55"
"@nodeart/firebase-connector": "2.1.56"
}
}
2 changes: 1 addition & 1 deletion modules/firebase-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"@types/jasmine": "2.2.30",
"@types/node": "6.0.54"
},
"version": "2.1.55"
"version": "2.1.56"
}
6 changes: 3 additions & 3 deletions modules/general-categories-all/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/general-categories-all",
"version": "2.1.55",
"version": "2.1.56",
"description": "",
"main": "index.ts",
"scripts": {
Expand All @@ -9,7 +9,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/productservice": "2.1.55",
"@nodeart/loading-indicator": "2.1.55"
"@nodeart/productservice": "2.1.56",
"@nodeart/loading-indicator": "2.1.56"
}
}
2 changes: 1 addition & 1 deletion modules/loading-indicator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
},
"author": "",
"license": "ISC",
"version": "2.1.55"
"version": "2.1.56"
}
2 changes: 1 addition & 1 deletion modules/nodeart-components-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"dependencies": {
"loader-utils": "0.2.16"
},
"version": "2.1.55"
"version": "2.1.56"
}
4 changes: 2 additions & 2 deletions modules/payments-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/payments-component",
"version": "2.1.55",
"version": "2.1.56",
"description": "",
"main": "index.ts",
"scripts": {
Expand All @@ -10,6 +10,6 @@
"license": "ISC",
"dependencies": {
"@types/stripe": "0.0.34",
"@nodeart/basketservice": "2.1.55"
"@nodeart/basketservice": "2.1.56"
}
}
6 changes: 3 additions & 3 deletions modules/product-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/basketservice": "2.1.55",
"@nodeart/productservice": "2.1.55"
"@nodeart/basketservice": "2.1.56",
"@nodeart/productservice": "2.1.56"
},
"version": "2.1.55"
"version": "2.1.56"
}
9 changes: 5 additions & 4 deletions modules/product-component/src/product.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ export class ProductComponent implements OnInit {
this.route.params.forEach((params: Params) => {
this.id = params['id'];
this.productService.getOneProduct(this.id).subscribe( product => {
if(product.val()){
console.log(product.val());
if(product.val() === 0) {
this.product = {};
} else if(product.val()){
this.zone.run(() => {
this.product = product.val()['_source'];
this.product['id'] = product.val()['_id'];
this.product = product.val()[0]['_source'];
this.product['id'] = product.val()[0]['_id'];
});
this.getAttributes();
this.getTags();
Expand Down
8 changes: 4 additions & 4 deletions modules/products-general-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/products-general-component",
"version": "2.1.55",
"version": "2.1.56",
"description": "",
"main": "index.ts",
"scripts": {
Expand All @@ -9,8 +9,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/productservice": "2.1.55",
"@nodeart/category-filter-component": "2.1.55",
"@nodeart/general-categories-all": "2.1.55"
"@nodeart/productservice": "2.1.56",
"@nodeart/category-filter-component": "2.1.56",
"@nodeart/general-categories-all": "2.1.56"
}
}
8 changes: 4 additions & 4 deletions modules/products-list-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/products-list-component",
"version": "2.1.55",
"version": "2.1.56",
"description": "Displays product from specific category",
"main": "index.ts",
"scripts": {
Expand All @@ -13,8 +13,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/productservice": "2.1.55",
"@nodeart/attributes-search-component": "2.1.55",
"@nodeart/tags-search-component": "2.1.55"
"@nodeart/productservice": "2.1.56",
"@nodeart/attributes-search-component": "2.1.56",
"@nodeart/tags-search-component": "2.1.56"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class ProductsListComponent implements OnInit {
console.log(params);
if(params['id']){
this.categoryId = params['id'];
this.checkExistance(this.categoryId);
}
});
this.getTotalPages();
Expand All @@ -88,6 +89,14 @@ export class ProductsListComponent implements OnInit {

}

checkExistance(categoryId) {
this.productService.getCategory(categoryId).subscribe( data => {
if(data.val() === 0) {
this.products = [];
}
});
}

/**
* Increment page
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/productservice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodeart/productservice",
"version": "2.1.55",
"version": "2.1.56",
"description": "Service that send work to DAL related to products (search, filted, get categories, attributes, tags etc.)",
"main": "index.ts",
"scripts": {
Expand All @@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@nodeart/dal": "2.1.55"
"@nodeart/dal": "2.1.56"
}
}
6 changes: 3 additions & 3 deletions modules/productservice/src/product-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class ProductService{
*/
public esIndex = 'firebase';

constructor(protected dal: DbAbstractionLayer){
constructor(private dal: DbAbstractionLayer){
}

/**
Expand All @@ -27,7 +27,7 @@ export class ProductService{
}
}
};
return this.dal.requestData(this.esIndex, 'product', queryObject);
return this.dal.requestFullData(this.esIndex, 'product', queryObject);
}

/**
Expand Down Expand Up @@ -207,7 +207,7 @@ export class ProductService{
}
}
};
return this.dal.requestData(this.esIndex, 'category', queryObj);
return this.dal.requestFullData(this.esIndex, 'category', queryObj);
}

/**
Expand Down
Loading

0 comments on commit 99ff164

Please sign in to comment.