Loading README.md +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ All other brand and product names are trademarks, registered trademarks or servi #### Copyright © 2016-present, Ever Co. LTD. All rights reserved.  [](https://circleci.com/gh/ever-co/ever) [](https://codecov.io/gh/ever-co/ever) [](https://www.codacy.com/app/Ever/ever?utm_source=github.com&utm_medium=referral&utm_content=ever-co/ever&utm_campaign=Badge_Grade) Loading packages/admin-web-angular/package.json +1 −1 Original line number Diff line number Diff line { "name": "@ever-platform/admin-web-angular", "version": "0.3.9", "version": "0.3.10", "description": "Ever Admin", "license": "AGPL-3.0", "homepage": "https://ever.co", Loading packages/admin-web-angular/src/app/@core/data/geo-location.service.ts +6 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ export class GeoLocationService { isManufacturing isCarrierRequired isDeliveryRequired isProductAvailable deliveryTimeMin deliveryTimeMax product { Loading Loading @@ -71,7 +72,11 @@ export class GeoLocationService { pollInterval: 2000, }) .valueChanges.pipe( map((res) => res.data.geoLocationProducts), map((res) => res.data.geoLocationProducts.filter( (p) => p.warehouseProduct.isProductAvailable === true ) ), share() ); } Loading packages/admin-web-angular/src/app/@shared/render-component/product-takeaway-delivery/product-takeaway-delivery.component.ts +62 −57 Original line number Diff line number Diff line import { Component, Input } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core'; import { WarehouseProductsRouter } from '@modules/client.common.angular2/routers/warehouse-products-router.service'; import WarehouseProduct from '@modules/server.common/entities/WarehouseProduct'; @Component({ styles: [ Loading @@ -7,73 +9,76 @@ import { Component, Input } from '@angular/core'; white-space: nowrap; padding-bottom: 4px; } div img { width: 40px; height: 40px; } .icon-closed { color: red; margin-right: 3px; } .icon-checked { color: green; margin-right: 3px; } `, ], template: ` <div *ngIf=" rowData.type.isDeliveryRequired && !rowData.type.isTakeaway; else takeaway " > <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }} </div> <div> <i class="ion-md-close icon-closed"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }} </div> </div> <ng-template #takeaway> <div *ngIf=" !rowData.type.isDeliveryRequired && rowData.type.isTakeaway; else both " <nb-checkbox [(ngModel)]="isDelivery" (checkedChange)="isDeliveryChange($event)" >{{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }}</nb-checkbox > <div> <i class="ion-md-close icon-closed"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }} </div> <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }} </div> </div> <ng-template #both> <div> <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }} </div> <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }} <nb-checkbox [(ngModel)]="isTakeaway" (checkedChange)="isTakeawayChange($event)" >{{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }}</nb-checkbox > </div> </div> </ng-template> </ng-template> `, }) export class ProductTakeawayDeliveryComponent { export class ProductTakeawayDeliveryComponent implements OnInit { @Input() rowData: any; isDelivery: boolean; isTakeaway: boolean; wareHouseId: string; productId: string; constructor(private warehouseProductRouter: WarehouseProductsRouter) {} ngOnInit() { this.isDelivery = this.rowData.isDeliveryRequired; this.isTakeaway = this.rowData.isTakeaway; this.wareHouseId = this.rowData.storeId; this.productId = this.rowData.product.id; } constructor() {} async isDeliveryChange() { this.isDelivery = !this.isDelivery; if (!this.isDelivery && !this.isTakeaway) { this.isDelivery = true; alert('Atleast one type should be selected!'); return; } this.rowData.isDeliveryRequired = this.isDelivery; await this.warehouseProductRouter.changeProductDelivery( this.wareHouseId, this.productId, this.rowData.isDeliveryRequired ); } async isTakeawayChange() { this.isTakeaway = !this.isTakeaway; if (!this.isDelivery && !this.isTakeaway) { this.isTakeaway = true; alert('Atleast one type should be selected!'); return; } this.rowData.isTakeaway = this.isTakeaway; await this.warehouseProductRouter.changeProductTakeaway( this.wareHouseId, this.productId, this.rowData.isTakeaway ); } } packages/admin-web-angular/src/app/@shared/warehouse-product/forms/warehouse-products-table/warehouse-products-table.component.ts +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,8 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { product: product.product, allCategories: this.categoriesInfo, isProductAvailable: product.isProductAvailable, isTakeaway: product.isTakeaway, isDeliveryRequired: product.isDeliveryRequired, }; }); Loading Loading
README.md +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ All other brand and product names are trademarks, registered trademarks or servi #### Copyright © 2016-present, Ever Co. LTD. All rights reserved.  [](https://circleci.com/gh/ever-co/ever) [](https://codecov.io/gh/ever-co/ever) [](https://www.codacy.com/app/Ever/ever?utm_source=github.com&utm_medium=referral&utm_content=ever-co/ever&utm_campaign=Badge_Grade) Loading
packages/admin-web-angular/package.json +1 −1 Original line number Diff line number Diff line { "name": "@ever-platform/admin-web-angular", "version": "0.3.9", "version": "0.3.10", "description": "Ever Admin", "license": "AGPL-3.0", "homepage": "https://ever.co", Loading
packages/admin-web-angular/src/app/@core/data/geo-location.service.ts +6 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ export class GeoLocationService { isManufacturing isCarrierRequired isDeliveryRequired isProductAvailable deliveryTimeMin deliveryTimeMax product { Loading Loading @@ -71,7 +72,11 @@ export class GeoLocationService { pollInterval: 2000, }) .valueChanges.pipe( map((res) => res.data.geoLocationProducts), map((res) => res.data.geoLocationProducts.filter( (p) => p.warehouseProduct.isProductAvailable === true ) ), share() ); } Loading
packages/admin-web-angular/src/app/@shared/render-component/product-takeaway-delivery/product-takeaway-delivery.component.ts +62 −57 Original line number Diff line number Diff line import { Component, Input } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core'; import { WarehouseProductsRouter } from '@modules/client.common.angular2/routers/warehouse-products-router.service'; import WarehouseProduct from '@modules/server.common/entities/WarehouseProduct'; @Component({ styles: [ Loading @@ -7,73 +9,76 @@ import { Component, Input } from '@angular/core'; white-space: nowrap; padding-bottom: 4px; } div img { width: 40px; height: 40px; } .icon-closed { color: red; margin-right: 3px; } .icon-checked { color: green; margin-right: 3px; } `, ], template: ` <div *ngIf=" rowData.type.isDeliveryRequired && !rowData.type.isTakeaway; else takeaway " > <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }} </div> <div> <i class="ion-md-close icon-closed"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }} </div> </div> <ng-template #takeaway> <div *ngIf=" !rowData.type.isDeliveryRequired && rowData.type.isTakeaway; else both " <nb-checkbox [(ngModel)]="isDelivery" (checkedChange)="isDeliveryChange($event)" >{{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }}</nb-checkbox > <div> <i class="ion-md-close icon-closed"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }} </div> <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }} </div> </div> <ng-template #both> <div> <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.DELIVERY' | translate }} </div> <div> <i class="ion-md-checkmark icon-checked"></i> {{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }} <nb-checkbox [(ngModel)]="isTakeaway" (checkedChange)="isTakeawayChange($event)" >{{ 'WAREHOUSE_VIEW.PRODUCTS_TAB.TAKEAWAY' | translate }}</nb-checkbox > </div> </div> </ng-template> </ng-template> `, }) export class ProductTakeawayDeliveryComponent { export class ProductTakeawayDeliveryComponent implements OnInit { @Input() rowData: any; isDelivery: boolean; isTakeaway: boolean; wareHouseId: string; productId: string; constructor(private warehouseProductRouter: WarehouseProductsRouter) {} ngOnInit() { this.isDelivery = this.rowData.isDeliveryRequired; this.isTakeaway = this.rowData.isTakeaway; this.wareHouseId = this.rowData.storeId; this.productId = this.rowData.product.id; } constructor() {} async isDeliveryChange() { this.isDelivery = !this.isDelivery; if (!this.isDelivery && !this.isTakeaway) { this.isDelivery = true; alert('Atleast one type should be selected!'); return; } this.rowData.isDeliveryRequired = this.isDelivery; await this.warehouseProductRouter.changeProductDelivery( this.wareHouseId, this.productId, this.rowData.isDeliveryRequired ); } async isTakeawayChange() { this.isTakeaway = !this.isTakeaway; if (!this.isDelivery && !this.isTakeaway) { this.isTakeaway = true; alert('Atleast one type should be selected!'); return; } this.rowData.isTakeaway = this.isTakeaway; await this.warehouseProductRouter.changeProductTakeaway( this.wareHouseId, this.productId, this.rowData.isTakeaway ); } }
packages/admin-web-angular/src/app/@shared/warehouse-product/forms/warehouse-products-table/warehouse-products-table.component.ts +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,8 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { product: product.product, allCategories: this.categoriesInfo, isProductAvailable: product.isProductAvailable, isTakeaway: product.isTakeaway, isDeliveryRequired: product.isDeliveryRequired, }; }); Loading