Loading packages/admin-web-angular/src/app/@shared/warehouse-product/forms/warehouse-products-table/warehouse-products-table.component.ts +24 −4 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ import { StoreProductPriceComponent } from '@app/@shared/render-component/store- import { StoreProductAmountComponent } from '@app/@shared/render-component/store-products-table/store-product-amount/store-product-amount.component'; import { ProductCategoriesComponent } from '@app/@shared/render-component/product-categories/product-categories'; import { ProductTitleRedirectComponent } from '@app/@shared/render-component/product-title-redirect/product-title-redirect.component'; import { Observable, forkJoin, Subject } from 'rxjs'; import { Observable, forkJoin, Subject, Subscription } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; import { takeUntil } from 'rxjs/operators'; import WarehouseProduct from '@modules/server.common/entities/WarehouseProduct'; Loading Loading @@ -52,6 +52,9 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { settingsSmartTable: object; sourceSmartTable = new LocalDataSource(); selectedProducts: WarehouseProductViewModel[] = []; columnTitlePrefix = 'WAREHOUSE_VIEW.PRODUCTS_TAB.'; subscription: Subscription; suffix: string; private ngDestroy$ = new Subject<void>(); private categoriesInfo: any = []; Loading @@ -75,6 +78,7 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { ngOnDestroy(): void { this.ngDestroy$.next(); this.ngDestroy$.complete(); this.subscription.unsubscribe(); } async loadDataSmartTable(products: WarehouseProduct[], storeId: string) { Loading Loading @@ -108,6 +112,9 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { }, price: product.price, qty: product.count, type: product.isTakeaway ? this._translate(`${this.columnTitlePrefix}TAKEAWAY`) : this._translate(`${this.columnTitlePrefix}DELIVERY`), storeId, product: product.product, allCategories: this.categoriesInfo, Loading @@ -130,9 +137,8 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { } private _loadSettingsSmartTable() { const columnTitlePrefix = 'WAREHOUSE_VIEW.PRODUCTS_TAB.'; const getTranslate = (name: string): Observable<any> => this._translateService.get(columnTitlePrefix + name); this._translateService.get(this.columnTitlePrefix + name); forkJoin( this._translateService.get('Id'), Loading @@ -142,7 +148,8 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { getTranslate('DETAILS'), getTranslate('CATEGORY'), getTranslate('PRICE'), getTranslate('QUANTITY') getTranslate('QUANTITY'), getTranslate('TYPE') ) .pipe(takeUntil(this.ngDestroy$)) .subscribe( Loading @@ -155,6 +162,7 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { category, price, quantity, type, ]) => { this.settingsSmartTable = { mode: 'external', Loading Loading @@ -211,6 +219,9 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { type: 'custom', renderComponent: StoreProductAmountComponent, }, type: { title: type, }, }, pager: { display: true, Loading @@ -226,4 +237,13 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { this._loadSettingsSmartTable(); }); } private _translate(key: string) { this.subscription = this._translateService .stream(key) .subscribe((res) => { this.suffix = res; }); return this.suffix; } } packages/admin-web-angular/src/assets/i18n/bg-BG.json +3 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,9 @@ "CATEGORY": "категория", "PRICE": "Цена", "QUANTITY": "количество", "TYPE": "Тип", "DELIVERY": "Доставка", "TAKEAWAY": "За вкъщи", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Кликнете върху Изображение на продукта, за да увеличите наличното количество" }, "NEW_PRODUCT_TYPE": "Нов тип продукт", Loading packages/admin-web-angular/src/assets/i18n/bg.json +14 −11 Original line number Diff line number Diff line Loading @@ -552,17 +552,20 @@ } }, "PRODUCTS_TAB": { "PRODUCTS": "Products", "ADD_PRODUCTS": "Add Products", "DELETE": "Delete", "IMAGE": "Image", "TITLE": "Title", "DESCRIPTION": "Description", "DETAILS": "Details", "CATEGORY": "Category", "PRICE": "Price", "QUANTITY": "Quantity", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Click on Product Image to increase available quantity" "PRODUCTS": "Продукти", "ADD_PRODUCTS": "Добавяне на продукти", "DELETE": "Изтрий", "IMAGE": "Изображение", "TITLE": "Заглавие", "DESCRIPTION": "описание", "DETAILS": "детайли", "CATEGORY": "категория", "PRICE": "Цена", "QUANTITY": "количество", "TYPE": "Тип", "DELIVERY": "Доставка", "TAKEAWAY": "За вкъщи", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Кликнете върху Изображение на продукта, за да увеличите наличното количество" }, "NEW_PRODUCT_TYPE": "New Type Product", "ADD_PRODUCTS": "Add Products", Loading packages/admin-web-angular/src/assets/i18n/en-US.json +3 −0 Original line number Diff line number Diff line Loading @@ -562,6 +562,9 @@ "CATEGORY": "Category", "PRICE": "Price", "QUANTITY": "Quantity", "TYPE": "Type", "DELIVERY": "Delivery", "TAKEAWAY": "Takeaway", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Click on Product Image to increase available quantity" }, "NEW_PRODUCT_TYPE": "New Type Product", Loading packages/admin-web-angular/src/assets/i18n/en.json +3 −0 Original line number Diff line number Diff line Loading @@ -562,6 +562,9 @@ "CATEGORY": "Category", "PRICE": "Price", "QUANTITY": "Quantity", "TYPE": "Type", "DELIVERY": "Delivery", "TAKEAWAY": "Takeaway", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Click on Product Image to increase available quantity" }, "NEW_PRODUCT_TYPE": "New Type Product", Loading Loading
packages/admin-web-angular/src/app/@shared/warehouse-product/forms/warehouse-products-table/warehouse-products-table.component.ts +24 −4 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ import { StoreProductPriceComponent } from '@app/@shared/render-component/store- import { StoreProductAmountComponent } from '@app/@shared/render-component/store-products-table/store-product-amount/store-product-amount.component'; import { ProductCategoriesComponent } from '@app/@shared/render-component/product-categories/product-categories'; import { ProductTitleRedirectComponent } from '@app/@shared/render-component/product-title-redirect/product-title-redirect.component'; import { Observable, forkJoin, Subject } from 'rxjs'; import { Observable, forkJoin, Subject, Subscription } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; import { takeUntil } from 'rxjs/operators'; import WarehouseProduct from '@modules/server.common/entities/WarehouseProduct'; Loading Loading @@ -52,6 +52,9 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { settingsSmartTable: object; sourceSmartTable = new LocalDataSource(); selectedProducts: WarehouseProductViewModel[] = []; columnTitlePrefix = 'WAREHOUSE_VIEW.PRODUCTS_TAB.'; subscription: Subscription; suffix: string; private ngDestroy$ = new Subject<void>(); private categoriesInfo: any = []; Loading @@ -75,6 +78,7 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { ngOnDestroy(): void { this.ngDestroy$.next(); this.ngDestroy$.complete(); this.subscription.unsubscribe(); } async loadDataSmartTable(products: WarehouseProduct[], storeId: string) { Loading Loading @@ -108,6 +112,9 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { }, price: product.price, qty: product.count, type: product.isTakeaway ? this._translate(`${this.columnTitlePrefix}TAKEAWAY`) : this._translate(`${this.columnTitlePrefix}DELIVERY`), storeId, product: product.product, allCategories: this.categoriesInfo, Loading @@ -130,9 +137,8 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { } private _loadSettingsSmartTable() { const columnTitlePrefix = 'WAREHOUSE_VIEW.PRODUCTS_TAB.'; const getTranslate = (name: string): Observable<any> => this._translateService.get(columnTitlePrefix + name); this._translateService.get(this.columnTitlePrefix + name); forkJoin( this._translateService.get('Id'), Loading @@ -142,7 +148,8 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { getTranslate('DETAILS'), getTranslate('CATEGORY'), getTranslate('PRICE'), getTranslate('QUANTITY') getTranslate('QUANTITY'), getTranslate('TYPE') ) .pipe(takeUntil(this.ngDestroy$)) .subscribe( Loading @@ -155,6 +162,7 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { category, price, quantity, type, ]) => { this.settingsSmartTable = { mode: 'external', Loading Loading @@ -211,6 +219,9 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { type: 'custom', renderComponent: StoreProductAmountComponent, }, type: { title: type, }, }, pager: { display: true, Loading @@ -226,4 +237,13 @@ export class WarehouseProductsComponent implements OnInit, OnDestroy { this._loadSettingsSmartTable(); }); } private _translate(key: string) { this.subscription = this._translateService .stream(key) .subscribe((res) => { this.suffix = res; }); return this.suffix; } }
packages/admin-web-angular/src/assets/i18n/bg-BG.json +3 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,9 @@ "CATEGORY": "категория", "PRICE": "Цена", "QUANTITY": "количество", "TYPE": "Тип", "DELIVERY": "Доставка", "TAKEAWAY": "За вкъщи", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Кликнете върху Изображение на продукта, за да увеличите наличното количество" }, "NEW_PRODUCT_TYPE": "Нов тип продукт", Loading
packages/admin-web-angular/src/assets/i18n/bg.json +14 −11 Original line number Diff line number Diff line Loading @@ -552,17 +552,20 @@ } }, "PRODUCTS_TAB": { "PRODUCTS": "Products", "ADD_PRODUCTS": "Add Products", "DELETE": "Delete", "IMAGE": "Image", "TITLE": "Title", "DESCRIPTION": "Description", "DETAILS": "Details", "CATEGORY": "Category", "PRICE": "Price", "QUANTITY": "Quantity", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Click on Product Image to increase available quantity" "PRODUCTS": "Продукти", "ADD_PRODUCTS": "Добавяне на продукти", "DELETE": "Изтрий", "IMAGE": "Изображение", "TITLE": "Заглавие", "DESCRIPTION": "описание", "DETAILS": "детайли", "CATEGORY": "категория", "PRICE": "Цена", "QUANTITY": "количество", "TYPE": "Тип", "DELIVERY": "Доставка", "TAKEAWAY": "За вкъщи", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Кликнете върху Изображение на продукта, за да увеличите наличното количество" }, "NEW_PRODUCT_TYPE": "New Type Product", "ADD_PRODUCTS": "Add Products", Loading
packages/admin-web-angular/src/assets/i18n/en-US.json +3 −0 Original line number Diff line number Diff line Loading @@ -562,6 +562,9 @@ "CATEGORY": "Category", "PRICE": "Price", "QUANTITY": "Quantity", "TYPE": "Type", "DELIVERY": "Delivery", "TAKEAWAY": "Takeaway", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Click on Product Image to increase available quantity" }, "NEW_PRODUCT_TYPE": "New Type Product", Loading
packages/admin-web-angular/src/assets/i18n/en.json +3 −0 Original line number Diff line number Diff line Loading @@ -562,6 +562,9 @@ "CATEGORY": "Category", "PRICE": "Price", "QUANTITY": "Quantity", "TYPE": "Type", "DELIVERY": "Delivery", "TAKEAWAY": "Takeaway", "CLICK_ON_PRODUCT_IMAGE_TO_INCREASE_AVAILABLE_QUANTITY": "Click on Product Image to increase available quantity" }, "NEW_PRODUCT_TYPE": "New Type Product", Loading