webpackJsonp([2,0,6,12,13,14],{

/***/ 1494:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScanReportPageModule", function() { return ScanReportPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scan_report_page__ = __webpack_require__(1590);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var ScanReportPageModule = /** @class */ (function () {
    function ScanReportPageModule() {
    }
    ScanReportPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_2__scan_report_page__["a" /* ScanReportPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_0_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__scan_report_page__["a" /* ScanReportPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_2__scan_report_page__["a" /* ScanReportPage */]]
        })
    ], ScanReportPageModule);
    return ScanReportPageModule;
}());

//# sourceMappingURL=scan-report-page.module.js.map

/***/ }),

/***/ 1495:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationPageModule", function() { return LocationPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__location_page__ = __webpack_require__(1592);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var LocationPageModule = /** @class */ (function () {
    function LocationPageModule() {
    }
    LocationPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_2__location_page__["a" /* StoreLocationPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_0_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__location_page__["a" /* StoreLocationPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_2__location_page__["a" /* StoreLocationPage */]]
        })
    ], LocationPageModule);
    return LocationPageModule;
}());

//# sourceMappingURL=location-page.module.js.map

/***/ }),

/***/ 1496:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoreMainPageModule", function() { return StoreMainPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__store_main_page__ = __webpack_require__(1594);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var StoreMainPageModule = /** @class */ (function () {
    function StoreMainPageModule() {
    }
    StoreMainPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_2__store_main_page__["a" /* StoreMainPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__store_main_page__["a" /* StoreMainPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_2__store_main_page__["a" /* StoreMainPage */]]
        })
    ], StoreMainPageModule);
    return StoreMainPageModule;
}());

//# sourceMappingURL=store-main-page.module.js.map

/***/ }),

/***/ 1497:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkuGroupPageModule", function() { return SkuGroupPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sku_group_page__ = __webpack_require__(1597);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var SkuGroupPageModule = /** @class */ (function () {
    function SkuGroupPageModule() {
    }
    SkuGroupPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_1__sku_group_page__["a" /* SkuGroupPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_1__sku_group_page__["a" /* SkuGroupPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_1__sku_group_page__["a" /* SkuGroupPage */]]
        })
    ], SkuGroupPageModule);
    return SkuGroupPageModule;
}());

//# sourceMappingURL=sku-group-page.module.js.map

/***/ }),

/***/ 1498:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppSwitchingPageModule", function() { return AppSwitchingPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app_switching_page__ = __webpack_require__(1598);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var AppSwitchingPageModule = /** @class */ (function () {
    function AppSwitchingPageModule() {
    }
    AppSwitchingPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_2__app_switching_page__["a" /* AppSwitchingPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__app_switching_page__["a" /* AppSwitchingPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_2__app_switching_page__["a" /* AppSwitchingPage */]]
        })
    ], AppSwitchingPageModule);
    return AppSwitchingPageModule;
}());

//# sourceMappingURL=app-switching-page.module.js.map

/***/ }),

/***/ 1499:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivityLogNewPageModule", function() { return ActivityLogNewPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__activity_log_new__ = __webpack_require__(1621);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_angular2_multiselect_dropdown_angular2_multiselect_dropdown__ = __webpack_require__(367);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};






var ActivityLogNewPageModule = /** @class */ (function () {
    function ActivityLogNewPageModule() {
    }
    ActivityLogNewPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__activity_log_new__["a" /* ActivityLogNewPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__activity_log_new__["a" /* ActivityLogNewPage */]), __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */], __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_5_angular2_multiselect_dropdown_angular2_multiselect_dropdown__["a" /* AngularMultiSelectModule */]
            ],
            exports: [__WEBPACK_IMPORTED_MODULE_2__activity_log_new__["a" /* ActivityLogNewPage */]]
        })
    ], ActivityLogNewPageModule);
    return ActivityLogNewPageModule;
}());

//# sourceMappingURL=activity-log-new.module.js.map

/***/ }),

/***/ 1500:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NewScanPageModule", function() { return NewScanPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__partially_control_page__ = __webpack_require__(1624);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var NewScanPageModule = /** @class */ (function () {
    function NewScanPageModule() {
    }
    NewScanPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_3__partially_control_page__["a" /* PartiallyControlPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_3__partially_control_page__["a" /* PartiallyControlPage */]),
                __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */], __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */]
            ],
        })
    ], NewScanPageModule);
    return NewScanPageModule;
}());

//# sourceMappingURL=partially-control-page.module.js.map

/***/ }),

/***/ 1501:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewTagPageModule", function() { return ViewTagPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__view_tag_page__ = __webpack_require__(1625);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var ViewTagPageModule = /** @class */ (function () {
    function ViewTagPageModule() {
    }
    ViewTagPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_1__view_tag_page__["a" /* ViewTagPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_1__view_tag_page__["a" /* ViewTagPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_1__view_tag_page__["a" /* ViewTagPage */]]
        })
    ], ViewTagPageModule);
    return ViewTagPageModule;
}());

//# sourceMappingURL=view-tag-page.module.js.map

/***/ }),

/***/ 1502:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrentStatusPageModule", function() { return CurrentStatusPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__current_status_page__ = __webpack_require__(1627);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};




var CurrentStatusPageModule = /** @class */ (function () {
    function CurrentStatusPageModule() {
    }
    CurrentStatusPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_1__current_status_page__["a" /* CurrentStatusPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_1__current_status_page__["a" /* CurrentStatusPage */]), __WEBPACK_IMPORTED_MODULE_3__component_common_module__["a" /* StoreComponentsModule */]],
            providers: [],
            exports: [__WEBPACK_IMPORTED_MODULE_1__current_status_page__["a" /* CurrentStatusPage */]]
        })
    ], CurrentStatusPageModule);
    return CurrentStatusPageModule;
}());

//# sourceMappingURL=current-status-page.module.js.map

/***/ }),

/***/ 1503:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivityLogPageModule", function() { return ActivityLogPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__store_activity_log_page__ = __webpack_require__(1629);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__component_common_module__ = __webpack_require__(997);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_angular2_multiselect_dropdown__ = __webpack_require__(1699);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_primeng_components_paginator_paginator__ = __webpack_require__(370);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_primeng_components_paginator_paginator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_primeng_components_paginator_paginator__);
/**
 * Created by nisitha on 4/27/18.
 */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};







var ActivityLogPageModule = /** @class */ (function () {
    function ActivityLogPageModule() {
    }
    ActivityLogPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_1__store_activity_log_page__["a" /* StoreActivityLogPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_1__store_activity_log_page__["a" /* StoreActivityLogPage */]), __WEBPACK_IMPORTED_MODULE_3__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */], __WEBPACK_IMPORTED_MODULE_5_angular2_multiselect_dropdown__["a" /* AngularMultiSelectModule */], __WEBPACK_IMPORTED_MODULE_6_primeng_components_paginator_paginator__["PaginatorModule"]],
            exports: [__WEBPACK_IMPORTED_MODULE_1__store_activity_log_page__["a" /* StoreActivityLogPage */]]
        })
    ], ActivityLogPageModule);
    return ActivityLogPageModule;
}());

//# sourceMappingURL=store-activity-log-page.module.js.map

/***/ }),

/***/ 1504:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SummaryPageModule", function() { return SummaryPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_common__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_primeng_components_treetable_treetable__ = __webpack_require__(1016);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_primeng_components_treetable_treetable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_primeng_components_treetable_treetable__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__summary_page__ = __webpack_require__(1632);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};






var SummaryPageModule = /** @class */ (function () {
    function SummaryPageModule() {
    }
    SummaryPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_4__summary_page__["a" /* SummaryPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_4__summary_page__["a" /* SummaryPage */]), __WEBPACK_IMPORTED_MODULE_2__angular_common__["CommonModule"], __WEBPACK_IMPORTED_MODULE_3_primeng_components_treetable_treetable__["TreeTableModule"], __WEBPACK_IMPORTED_MODULE_5__component_common_module__["a" /* StoreComponentsModule */]],
            providers: [],
            exports: [__WEBPACK_IMPORTED_MODULE_4__summary_page__["a" /* SummaryPage */]]
        })
    ], SummaryPageModule);
    return SummaryPageModule;
}());

//# sourceMappingURL=summary-page.module.js.map

/***/ }),

/***/ 1505:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NewGroupPageModule", function() { return NewGroupPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__new_group_page__ = __webpack_require__(1633);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var NewGroupPageModule = /** @class */ (function () {
    function NewGroupPageModule() {
    }
    NewGroupPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_3__new_group_page__["a" /* NewGroupPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_3__new_group_page__["a" /* NewGroupPage */]),
                __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]
            ],
        })
    ], NewGroupPageModule);
    return NewGroupPageModule;
}());

//# sourceMappingURL=new-group-page.module.js.map

/***/ }),

/***/ 1506:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransactionLogPageModule", function() { return TransactionLogPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__transaction_log__ = __webpack_require__(1635);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_primeng_components_paginator_paginator__ = __webpack_require__(370);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_primeng_components_paginator_paginator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_primeng_components_paginator_paginator__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_angular2_multiselect_dropdown_angular2_multiselect_dropdown__ = __webpack_require__(367);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};







var TransactionLogPageModule = /** @class */ (function () {
    function TransactionLogPageModule() {
    }
    TransactionLogPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__transaction_log__["a" /* TransactionLogPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__transaction_log__["a" /* TransactionLogPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */], __WEBPACK_IMPORTED_MODULE_5_primeng_components_paginator_paginator__["PaginatorModule"],
                __WEBPACK_IMPORTED_MODULE_6_angular2_multiselect_dropdown_angular2_multiselect_dropdown__["a" /* AngularMultiSelectModule */]
            ],
        })
    ], TransactionLogPageModule);
    return TransactionLogPageModule;
}());

//# sourceMappingURL=transaction-log.module.js.map

/***/ }),

/***/ 1507:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoreGradingPageModule", function() { return StoreGradingPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ngx_translate_core__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store_grading__ = __webpack_require__(1637);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};






var StoreGradingPageModule = /** @class */ (function () {
    function StoreGradingPageModule() {
    }
    StoreGradingPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_2__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_4__store_grading__["a" /* StoreGradingPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */],
                __WEBPACK_IMPORTED_MODULE_5__component_common_module__["a" /* StoreComponentsModule */],
                __WEBPACK_IMPORTED_MODULE_0_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_4__store_grading__["a" /* StoreGradingPage */]),
                __WEBPACK_IMPORTED_MODULE_1__ngx_translate_core__["b" /* TranslateModule */].forChild()
            ],
            exports: [
                __WEBPACK_IMPORTED_MODULE_4__store_grading__["a" /* StoreGradingPage */]
            ],
            providers: []
        })
    ], StoreGradingPageModule);
    return StoreGradingPageModule;
}());

//# sourceMappingURL=store-grading.module.js.map

/***/ }),

/***/ 1508:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StockInhandPageModule", function() { return StockInhandPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stock_inhand__ = __webpack_require__(1640);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(997);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var StockInhandPageModule = /** @class */ (function () {
    function StockInhandPageModule() {
    }
    StockInhandPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__stock_inhand__["a" /* StockInhandPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__stock_inhand__["a" /* StockInhandPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]
            ],
        })
    ], StockInhandPageModule);
    return StockInhandPageModule;
}());

//# sourceMappingURL=stock-inhand.module.js.map

/***/ }),

/***/ 1543:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoreSettingsPageModule", function() { return StoreSettingsPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__store_settings_page__ = __webpack_require__(2243);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
/**
 * Created by nisitha on 5/10/18.
 */




var StoreSettingsPageModule = /** @class */ (function () {
    function StoreSettingsPageModule() {
    }
    StoreSettingsPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_3__store_settings_page__["a" /* StoreSettingsPage */]
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */],
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_3__store_settings_page__["a" /* StoreSettingsPage */])
            ]
        })
    ], StoreSettingsPageModule);
    return StoreSettingsPageModule;
}());

//# sourceMappingURL=store-settings-page.module.js.map

/***/ }),

/***/ 1556:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ministore_module__ = __webpack_require__(1008);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__component_sku_component_sku_component__ = __webpack_require__(1003);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__component_sku_group_component_sku_group_component__ = __webpack_require__(1010);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_ministore_data_provider__ = __webpack_require__(71);
/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__providers_ministore_data_provider__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__providers_store_env_provider__ = __webpack_require__(215);
/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__providers_store_env_provider__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__providers_store_event_service__ = __webpack_require__(88);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__providers_store_data_service__ = __webpack_require__(998);
/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_6__providers_store_data_service__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__providers_store_event_handler__ = __webpack_require__(376);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__models_location_data_model__ = __webpack_require__(1589);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__models_scanned_report_model__ = __webpack_require__(1622);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__component_common_header_common_header_component__ = __webpack_require__(1011);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__component_sku_component_sku_new_component__ = __webpack_require__(1012);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__component_tree_table_comp_tree_table_comp__ = __webpack_require__(1013);
/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_12__component_tree_table_comp_tree_table_comp__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__ministore_utils__ = __webpack_require__(39);
/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_13__ministore_utils__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__models_btnmodel__ = __webpack_require__(369);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__models_storeSettingModel__ = __webpack_require__(1009);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__providers_shared_data_service__ = __webpack_require__(1002);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__providers_transaction_manager__ = __webpack_require__(375);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__providers_transaction_service__ = __webpack_require__(113);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__component_nc_smart_table_nc_smart_table__ = __webpack_require__(1004);
/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_19__component_nc_smart_table_nc_smart_table__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__component_nc_page_navigator_nc_page_navigator__ = __webpack_require__(1015);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__pages_partially_control_page_partially_control_page_template__ = __webpack_require__(1623);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__pages_partially_control_page_partially_control_page_module__ = __webpack_require__(1500);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__pages_partially_control_page_partially_control_page__ = __webpack_require__(1624);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__pages_view_tag_page_view_tag_page_module__ = __webpack_require__(1501);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__pages_view_tag_page_view_tag_page__ = __webpack_require__(1625);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__pages_view_tag_page_view_tag_page_template__ = __webpack_require__(1626);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__pages_scanned_report_page_scan_report_page__ = __webpack_require__(1590);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__pages_scanned_report_page_scan_report_page_template__ = __webpack_require__(1591);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__pages_scanned_report_page_scan_report_page_module__ = __webpack_require__(1494);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__pages_location_page_location_page__ = __webpack_require__(1592);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__pages_location_page_location_page_template__ = __webpack_require__(1593);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__pages_location_page_location_page_module__ = __webpack_require__(1495);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__pages_store_main_page_store_main_page__ = __webpack_require__(1594);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__pages_store_main_page_store_main_page_module__ = __webpack_require__(1496);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__pages_store_main_page_store_main_page_template__ = __webpack_require__(1595);
/* unused harmony namespace reexport */
/* unused harmony namespace reexport */
/* unused harmony namespace reexport */
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__pages_group_view_page_sku_group_page_template__ = __webpack_require__(1596);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__pages_group_view_page_sku_group_page_module__ = __webpack_require__(1497);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__pages_group_view_page_sku_group_page__ = __webpack_require__(1597);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__pages_app_switching_page_app_switching_page__ = __webpack_require__(1598);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__pages_app_switching_page_app_switching_page_template__ = __webpack_require__(1599);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__pages_app_switching_page_app_switching_page_module__ = __webpack_require__(1498);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__pages_current_status_page_current_status_page__ = __webpack_require__(1627);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__pages_current_status_page_current_status_page_module__ = __webpack_require__(1502);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__pages_current_status_page_current_status_page_template__ = __webpack_require__(1628);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__pages_activity_log_page_store_activity_log_page_module__ = __webpack_require__(1503);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__pages_activity_log_page_store_activity_log_page__ = __webpack_require__(1629);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__pages_activity_log_page_store_activity_log_page_template__ = __webpack_require__(1630);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__pages_summary_page_summary_page_template__ = __webpack_require__(1631);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__pages_summary_page_summary_page__ = __webpack_require__(1632);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__pages_summary_page_summary_page_module__ = __webpack_require__(1504);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__pages_new_group_page_new_group_page__ = __webpack_require__(1633);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__pages_new_group_page_new_group_page_template__ = __webpack_require__(1634);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__pages_new_group_page_new_group_page_module__ = __webpack_require__(1505);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__pages_transaction_log_transaction_log__ = __webpack_require__(1635);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__pages_transaction_log_transaction_log_template__ = __webpack_require__(1636);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__pages_transaction_log_transaction_log_module__ = __webpack_require__(1506);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__pages_store_grading_store_grading__ = __webpack_require__(1637);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__pages_store_grading_store_grading_module__ = __webpack_require__(1507);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__pages_store_grading_store_grading_template__ = __webpack_require__(1638);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__pages_activity_log_new_activity_log_new__ = __webpack_require__(1621);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__pages_activity_log_new_activity_log_new_module__ = __webpack_require__(1499);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__pages_activity_log_new_activity_log_new_template__ = __webpack_require__(1639);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__pages_stock_inhand_stock_inhand__ = __webpack_require__(1640);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__pages_stock_inhand_stock_in_hand_template__ = __webpack_require__(1641);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__pages_stock_inhand_stock_inhand_module__ = __webpack_require__(1508);
/* unused harmony namespace reexport */





































































//# sourceMappingURL=index.js.map

/***/ }),

/***/ 1589:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LocationDataModel; });
/* unused harmony export Label */
var LocationDataModel = /** @class */ (function () {
    function LocationDataModel(obj) {
        this.title = obj && obj.title;
        if (obj && obj.labels) {
            this.setLabels(obj.labels);
        }
    }
    LocationDataModel.prototype.setLabels = function (labels) {
        var converted = [];
        labels.forEach(function (label) {
            converted.push(new Label(label));
        });
        this.labels = converted;
    };
    return LocationDataModel;
}());

var Label = /** @class */ (function () {
    function Label(obj) {
        this.type = obj && obj.type;
        this.display_name = obj && obj.display_name;
        this.editable = obj && obj.editable;
        this.remove_available = obj && obj.remove_available;
        this.label_name = obj && obj.label_name;
    }
    return Label;
}());

//# sourceMappingURL=location-data-model.js.map

/***/ }),

/***/ 1590:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ScanReportPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__models_sku_group_config__ = __webpack_require__(1001);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__scan_report_page_template__ = __webpack_require__(1591);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__models_sku_config__ = __webpack_require__(364);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__ = __webpack_require__(365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8____ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__providers_store_data_service__ = __webpack_require__(998);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};












var ScanReportPage = /** @class */ (function () {
    function ScanReportPage(navCtrl, navParams, logger, alertCtrl, appState, navManager, dataProvider, dataService, renderer, elementRef) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.logger = logger;
        this.alertCtrl = alertCtrl;
        this.appState = appState;
        this.navManager = navManager;
        this.dataProvider = dataProvider;
        this.dataService = dataService;
        this.renderer = renderer;
        this.elementRef = elementRef;
        this.current_sku_group = [];
        this.confirmed_skus = [];
        this.adding_manually = false;
        this.is_duplicated = false;
        this.item_not_valid = false;
        this.validation = false;
    }
    ScanReportPage.prototype.initMessages = function () {
        var alert = this.alertCtrl.create({
            title: 'Duplicate !',
            subTitle: 'This item has already added to the system!',
            buttons: ['Ok'],
            cssClass: 'errorMsg'
        });
        var empty_alert = this.alertCtrl.create({
            title: 'Error !',
            subTitle: 'Current group is empty!',
            buttons: ['Ok'],
            cssClass: 'errorMsg'
        });
        var not_found_alert = this.alertCtrl.create({
            title: 'Error !',
            subTitle: 'Item does  not available in the stock.',
            buttons: ['Ok'],
            cssClass: 'errorMsg'
        });
        this.duplicate_msg = alert;
        this.empty_wrng = empty_alert;
        this.not_found_msg = not_found_alert;
    };
    ScanReportPage.prototype.setCurrentSku = function (data) {
        if (data) {
            this.current_sku = data;
        }
        else if (this.sku_type === 'group' && this.current_sku_group.length > 0) {
            this.current_sku = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["a" /* SKU */](this.current_sku_group[0]);
        }
    };
    ScanReportPage.prototype.showAlert = function (msg_type) {
        this.disable_ok = true;
        this.item_not_valid = true;
        this.disable_done = true;
        var message;
        if (msg_type === 'duplicate') {
            message = this.duplicate_msg;
        }
        else if (msg_type === 'empty') {
            message = this.empty_wrng;
        }
        else if (msg_type === 'not_found') {
            message = this.not_found_msg;
        }
        else if (msg_type === 'not_found') {
            message = this.not_found_msg;
        }
        message.present();
        setTimeout(function () {
            message.dismiss();
        }, 2000);
    };
    ScanReportPage.prototype.rejectScanItem = function () {
        this.navCtrl.pop();
        this.validation = false;
    };
    ScanReportPage.prototype.goBack = function () {
        this.validation = false;
        this.navCtrl.pop();
    };
    ScanReportPage.prototype.setDefaultData = function () {
        this._data = [];
        if (this.current_sku) {
            this._data.push(this.current_sku);
        }
    };
    ScanReportPage.prototype.configurePage = function (value) {
        if (value) {
            this.page_view_descriptor = value;
            // set store keeping unit type
            this.sku_type = this.dataService.skuType;
            this.app_type = this.dataService.appType;
            this.child_comp_confs = value.components_descriptor;
            this.view_controllers = value.view_controllers;
            this.title = value.title ? value.title : '';
            this.done_btn_config = __WEBPACK_IMPORTED_MODULE_11__ministore_utils__["a" /* MUtils */].getButtonConfig('adding_confirmation', this.view_controllers);
            this.add_btn_config = __WEBPACK_IMPORTED_MODULE_11__ministore_utils__["a" /* MUtils */].getButtonConfig('accept_scanned', this.view_controllers);
            this.cancel_btn_config = __WEBPACK_IMPORTED_MODULE_11__ministore_utils__["a" /* MUtils */].getButtonConfig('reject_scanned', this.view_controllers);
            this.check_boxes = __WEBPACK_IMPORTED_MODULE_11__ministore_utils__["a" /* MUtils */].getButtonConfig('check_boxes', this.view_controllers);
            this.configureControllers();
            var sku_detail_conf = __WEBPACK_IMPORTED_MODULE_11__ministore_utils__["a" /* MUtils */].getComponentConfig('sku_details', this.child_comp_confs);
            var sku_group_conf = __WEBPACK_IMPORTED_MODULE_11__ministore_utils__["a" /* MUtils */].getComponentConfig('sku_group_details', this.child_comp_confs);
            this.sku_config = new __WEBPACK_IMPORTED_MODULE_5__models_sku_config__["a" /* SKUConfig */](sku_detail_conf);
            this.sku_group_config = new __WEBPACK_IMPORTED_MODULE_3__models_sku_group_config__["a" /* SKUGroupConfig */](sku_group_conf);
        }
    };
    ScanReportPage.prototype.configureControllers = function () {
        this.show_ok_btn = (this.add_btn_config && this.add_btn_config.visibility) ||
            (this.add_btn_config && this.add_btn_config.visibility && (this.sku_type === 'group')) ||
            this.adding_manually;
        this.show_cancel_btn = (this.cancel_btn_config && this.cancel_btn_config.visibility) || this.adding_manually;
        this.show_check_boxes = (this.check_boxes && this.check_boxes.visibility) && !this.adding_manually;
    };
    ScanReportPage.prototype.doAdd = function (value) {
        this.confirmTag = this.currentTag;
        if (this.sku_type === 'group') {
            var tag = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["c" /* Tag */](this.current_sku);
            this.addToGroup(tag);
        }
        else {
            this.done();
        }
    };
    ScanReportPage.prototype.doStoreOutTransaction = function (sku) {
        var code = sku.tag_id.code;
        var existing = this.dataService.getTag(code);
        if (!existing) {
            this.disable_ok = true;
            this.showAlert('not_found');
        }
        else {
            this.done();
        }
    };
    ScanReportPage.prototype.doStoreInTransaction = function (sku) {
        this.done();
    };
    ScanReportPage.prototype.addToConfirmed = function (data) {
        this.confirmed_skus.push(data);
    };
    ScanReportPage.prototype.addToGroup = function (data) {
        var tag = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["c" /* Tag */](data);
        if (this.current_sku_group && this.current_sku_group.length > 0) {
            var index = this.current_sku_group.findIndex(function (sku) { return (sku.tag_id.code === tag.tag_id.code); });
            if (index === -1) {
                this.current_sku_group.splice(0, -1, tag);
            }
        }
        else {
            this.current_sku_group = [];
            this.current_sku_group.splice(0, -1, tag);
        }
        this.updateGroup();
    };
    ScanReportPage.prototype.isValidate = function () {
        var errorReport = this.confirmTag.isValid(this.sku_config);
        if (!errorReport.status) {
            this.validation = false;
            var errors = errorReport.errors;
            var errorList_1 = '<ul>\n';
            errors.forEach(function (error) {
                errorList_1 = errorList_1 + '<li>' + error.display_name + '</li>\n';
            });
            errorList_1 = errorList_1 + '</ul>';
            if (!errorReport.status) {
                var alert_1 = this.alertCtrl.create({
                    title: 'Invalid Fields Detected!',
                    subTitle: 'Please fill all the mandatory fields properly.',
                    message: errorList_1,
                    buttons: ['Ok'],
                    cssClass: 'errorMsg'
                });
                alert_1.present();
            }
        }
        else {
            this.validation = true;
        }
    };
    ScanReportPage.prototype.done = function () {
        this.confirmTag = this.currentTag;
        this.isValidate();
        if (this.confirmTag && !isNaN(this.confirmTag.tag_details['qty'])) {
            this.confirmTag.actual_qty = __WEBPACK_IMPORTED_MODULE_11__ministore_utils__["a" /* MUtils */].getDeepCopy(Number(this.confirmTag.tag_details['qty']));
        }
        if (this.sku_type === 'group') {
            if (this.current_sku_group && this.current_sku_group.length > 0) {
                this.goToNextView(this.confirmTag);
            }
            else {
                this.showAlert('empty');
            }
        }
        else {
            this.confirmTag.tag_details['added_datetime'] = this.getDate();
            this.goToNextView(this.confirmTag);
        }
    };
    ScanReportPage.prototype.clearData = function () {
        this.current_sku_group = [];
        this.current_sku = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["a" /* SKU */]({});
    };
    ScanReportPage.prototype.clearTag = function () {
        this.current_sku = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["a" /* SKU */]({});
    };
    ScanReportPage.prototype.goToNextView = function (tag) {
        if (this.validation) {
            this.navCtrl.pop();
            if (this.done_btn_config.next_view_ref) {
                this.navManager.nextView(this.done_btn_config.next_view_ref, tag);
            }
            else {
                this.dataService.addTag(tag);
                this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_9__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_' + this.sku_type, JSON.stringify(tag));
                this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_9__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, JSON.stringify(tag));
            }
        }
    };
    ScanReportPage.prototype.startAutomatedProcess = function () {
        var _this = this;
        if (this.add_btn_config.action_type === 'auto' && !this.adding_manually) {
            setTimeout(function () {
                if (!_this.item_not_valid) {
                    _this.doAdd(_this.currentTag);
                }
            }, (this.add_btn_config.waiting_time) * 1000);
        }
        if (this.done_btn_config.action_type === 'auto' && !this.adding_manually) {
            setTimeout(function () {
                if (!_this.item_not_valid) {
                    _this.done();
                }
            }, (this.done_btn_config.waiting_time) * 1000);
        }
    };
    ScanReportPage.prototype.updateGroup = function () {
        this.appState.notifyDataChanged('group:updated', this.current_sku_group);
    };
    ScanReportPage.prototype.deleteGroup = function () {
        this.appState.notifyDataChanged('group:update', null);
    };
    ScanReportPage.prototype.setSelectedSKU = function (data) {
        this.current_sku = data;
    };
    ScanReportPage.prototype.onSearch = function (query) {
        var _this = this;
        this.show_loading = true;
        this.dataProvider.onSearchSKUDetails(query).subscribe(function (data) {
            if (data) {
                _this.currentTag = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["c" /* Tag */](data.data);
                _this.show_loading = false;
            }
        });
    };
    ScanReportPage.prototype.createNewGroup = function () {
        var sku = this.createNewSKU({}, 'group');
        sku.tag_group = this.current_sku_group;
        sku.group_details = this.getGroupDetails();
        return sku;
    };
    ScanReportPage.prototype.createNewSKU = function (data, sku_type) {
        var sku = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["a" /* SKU */](data);
        sku.sku_id = {
            id: this.generateId(),
            type: sku_type,
            process_type: 'manual'
        };
        sku.current_status = 'stock_in_hand';
        return sku;
    };
    ScanReportPage.prototype.getGroupDetails = function () {
        var details = {};
        if (this.common_columns && this.current_sku_group.length > 0) {
            var tag_1 = this.current_sku_group[0];
            this.common_columns.forEach(function (col) {
                var value;
                if (tag_1.tag_details && tag_1.tag_details.hasOwnProperty(col)) {
                    value = tag_1.tag_details[col];
                }
                details[col] = value;
            });
        }
        details['added_datetime'] = this.getDate();
        return details;
    };
    ScanReportPage.prototype.getDate = function () {
        var date = {
            ts: new Date().getTime(),
            offset: new Date().getTimezoneOffset()
        };
        this.logger.debug(date);
        return date;
    };
    ScanReportPage.prototype.generateId = function () {
        var id;
        var data_time = new Date().getMilliseconds();
        var random = Math.random();
        id = 'manual' + data_time + random;
        return id;
    };
    ScanReportPage.prototype.ionViewDidLoad = function () {
        var element = this.elementRef.nativeElement.querySelector('input');
        if (element) {
            // this.renderer.invokeElementMethod(element, 'focus', []);
        }
        this.validation = true;
        this.initMessages();
        this.configurePage(this.navParams.data.conf);
        this.setupDefaults(this.navParams.data.data);
        this.startAutomatedProcess();
    };
    ScanReportPage.prototype.setupDefaults = function (data) {
        this.adding_manually = false;
        var args = data && data.args;
        var tag = data && data.tag;
        if (args && args.action === 'manual_add') {
            this.adding_manually = true;
            this.show_ok_btn = true;
        }
        if (this.app_type === 'IN' && this.dataService.checkExisting(tag.tag_id.code, this.app_type)) {
            this.validation = false;
            this.showAlert('duplicate');
        }
        this.currentTag = tag;
    };
    ScanReportPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'scan-report-page',
            template: __WEBPACK_IMPORTED_MODULE_4__scan_report_page_template__["a" /* SCAN_REPORT_PAGE_TEMPLATE */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */], __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */], __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__["m" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_8____["b" /* MiniStoreDataProvider */],
            __WEBPACK_IMPORTED_MODULE_10__providers_store_data_service__["a" /* StoreDataService */], __WEBPACK_IMPORTED_MODULE_0__angular_core__["Renderer"], __WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"]])
    ], ScanReportPage);
    return ScanReportPage;
}());

//# sourceMappingURL=scan-report-page.js.map

/***/ }),

/***/ 1591:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SCAN_REPORT_PAGE_TEMPLATE; });
/**
 * Created by nisitha athukoarala on 5/3/18.
 */
var SCAN_REPORT_PAGE_TEMPLATE = "\n<ion-header class=\"store-menubar-header\">\n<common-main-header [title]=\"title\"></common-main-header>\n</ion-header>\n<ion-content class=\"main-content\">\n<div class=\"grid-wrapper\">\n    <ion-grid class=\"main-grid\">\n        <ion-row *ngIf=\"(sku_type === 'group')\" class=\"report-row\">\n            <ion-col class=\"hgt-100\" col-12 col-md-8 col-lg-8 *ngIf=\"sku_config\">\n                <sku-details-comp [show_loading]=\"show_loading\"\n                 [disable_ok]=\"!validation\" [config]=\"sku_config\" [data]=\"currentTag\" [show_ok]=\"show_ok_btn\"\n                 [show_cancel]=\"show_cancel_btn\" [adding_manually]=\"adding_manually\" (onSearch)=\"onSearch($event)\"\n                  (onCancel)=\"rejectScanItem()\"\n                 (onOk)=\"doAdd($event)\"></sku-details-comp>\n            </ion-col>\n            <ion-col col-12 col-md-4 col-lg-4 class=\"hgt-100\" *ngIf=\"((sku_type === 'group' ) && current_sku_group)\">\n                <sku-group-details  [config]=\"sku_group_config\" [data]=\"current_sku_group\" [group_view]=\"true\"\n                 (OnItemClick)=\"setSelectedSKU($event)\" [show_check_boxes]=\"show_check_boxes\"></sku-group-details>\n            </ion-col>\n        </ion-row>\n        <ion-row *ngIf=\"(sku_type === 'single')\" class=\"report-row\">\n\n            <ion-col class=\"hgt-100 med-scan-col\" *ngIf=\"sku_config\">\n                <sku-details-comp [show_loading]=\"show_loading\"\n                 [disable_ok]=\"disable_ok\" [config]=\"sku_config\" [data]=\"currentTag\" [show_ok]=\"show_ok_btn\"\n                 [show_cancel]=\"show_cancel_btn\" [adding_manually]=\"adding_manually\" (onSearch)=\"onSearch($event)\"\n                 (onCancel)=\"rejectScanItem()\"\n                 (onOk)=\"doAdd($event)\"></sku-details-comp>\n            </ion-col>\n\n        </ion-row>\n        <ion-row>\n            <ion-col col-lg-8 col-md-8></ion-col>\n            <ion-col col-lg-4 col-md-4 class=\"action-btn\">\n                <button ion-button small class=\"done-btn\" *ngIf=\"done_btn_config && done_btn_config.visibility\"\n                 (click)=\"done()\" [disabled]=\"!validation\">\n                {{done_btn_config.display_name}}</button>\n            </ion-col>\n        </ion-row>\n    </ion-grid>\n    </div>\n</ion-content>";
//# sourceMappingURL=scan-report-page-template.js.map

/***/ }),

/***/ 1592:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StoreLocationPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__models_location_data_model__ = __webpack_require__(1589);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__location_page_template__ = __webpack_require__(1593);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__providers_store_data_service__ = __webpack_require__(998);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};








var StoreLocationPage = /** @class */ (function () {
    function StoreLocationPage(navControl, navParams, logger, appState, dataService) {
        this.navControl = navControl;
        this.navParams = navParams;
        this.logger = logger;
        this.appState = appState;
        this.dataService = dataService;
    }
    StoreLocationPage.prototype.ionViewDidLoad = function () {
        this.config = new __WEBPACK_IMPORTED_MODULE_2__models_location_data_model__["a" /* LocationDataModel */](this.navParams.data.conf);
        this.data = this.navParams.data.data;
        var conf = this.navParams.data.conf;
        this.configurePage(conf);
    };
    StoreLocationPage.prototype.saveLocation = function () {
        this.dataService.addTag(this.data);
        this.navControl.pop();
        this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_5__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_' + this.sku_type, this.data);
    };
    StoreLocationPage.prototype.cancel = function () {
        // this.navProvider.exitToRoot(null);
        this.navControl.pop();
        // this.appState.notifyDataChanged('save:data', this.data);
    };
    StoreLocationPage.prototype.configurePage = function (value) {
        if (value) {
            this.title = value.title;
            this.sub_title = value.sub_title;
            this.sku_type = this.dataService.skuType;
            this.labels = value.labels;
            this.addFields();
        }
    };
    StoreLocationPage.prototype.addFields = function () {
        var _this = this;
        this.labels.forEach(function (label) {
            if (!_this.data.hasOwnProperty(label['label_name'])) {
                _this.data[label['label_name']] = '';
            }
        });
    };
    StoreLocationPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'location-page',
            template: __WEBPACK_IMPORTED_MODULE_4__location_page_template__["a" /* LOCATION_PAGE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */],
            __WEBPACK_IMPORTED_MODULE_7__providers_store_data_service__["a" /* StoreDataService */]])
    ], StoreLocationPage);
    return StoreLocationPage;
}());

//# sourceMappingURL=location-page.js.map

/***/ }),

/***/ 1593:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LOCATION_PAGE_HTML; });
/**
 * Created by nisitha athukoarala on 5/3/18.
 */
var LOCATION_PAGE_HTML = "\n<ion-header class=\"store-menubar-header\">\n<common-main-header [title]=\"title\"></common-main-header>\n</ion-header>\n<ion-content class=\"main-content\">\n    <div class=\"grid-wrapper\">\n        <ion-grid *ngIf=\"config\" class=\"main-grid\">\n            <ion-row class=\"height-100\">\n                <ion-col class=\"img-box height-100\" col-4>\n                    <ion-row class=\"img-box-row\"></ion-row>\n                    <ion-row class=\"img-box-row\">\n                        <ion-col></ion-col>\n                        <ion-img class=\"location-img\" src=\"assets/img/location.png\"></ion-img>\n                        <ion-col></ion-col>\n                        <ion-col></ion-col>\n                    </ion-row>\n                    <ion-row class=\"img-box-row\">\n                    <ion-label class=\"img-box-text\" *ngIf=\"sub_title\">{{sub_title}}</ion-label></ion-row>\n                    <ion-row class=\"img-box-row\"></ion-row>\n                </ion-col>\n                <ion-col col-8 class=\"from-container\">\n                <ion-row class=\"form-loc-row content-hide\"></ion-row>\n                    <ion-row class=\"form-loc-row\">\n                        <ion-col col-11 col-md-11 col-lg-8>\n                            <ion-row class=\"sku-row\" *ngFor=\"let d of labels\">\n                                <ion-col col-6 col-md-5 col-lg-4 class=\"sku-col\">\n                                    <ion-label class=\"form-label-ctm\">{{d.display_name}}</ion-label>\n                                </ion-col>\n                                <ion-col col-6 col-md-7 col-lg-8>\n                                    <ion-input class=\"form-filed\"\n                                     value=\"{{data.tag_details[d.label_name]}}\" [(ngModel)]=\"data.tag_details[d.label_name]\"\n                                               [readonly]=\"(!d.editable)\" placeholder=\"{{d.display_name}}\"></ion-input>\n                                </ion-col>\n                            </ion-row>\n                            <ion-row>\n                                <ion-col col-2 col-md-3 col-lg-6></ion-col>\n                                <ion-col class=\"btn-container\">\n                                    <button ion-button class=\"cancel-btn\" (click)=\"cancel()\">Cancel</button>\n                                    <button ion-button class=\"done-btn\" (click)=\"saveLocation()\">Done</button>\n                                </ion-col>\n                            </ion-row>\n                        </ion-col>\n                        <ion-col col-1 col-md-1 col-lg-4></ion-col>\n                    </ion-row>\n                    <ion-row class=\"form-loc-row\"></ion-row>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>";
//# sourceMappingURL=location-page-template.js.map

/***/ }),

/***/ 1594:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StoreMainPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__store_main_page_template__ = __webpack_require__(1595);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__providers_ministore_data_provider__ = __webpack_require__(71);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__providers_store_data_service__ = __webpack_require__(998);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ncinga_sp_nsp_app_core_dist_providers_app_events__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};










var StoreMainPage = /** @class */ (function () {
    function StoreMainPage(navParams, navManager, events, dataProvider, toastCtrl, logger, dataService, appContext, appState) {
        this.navParams = navParams;
        this.navManager = navManager;
        this.events = events;
        this.dataProvider = dataProvider;
        this.toastCtrl = toastCtrl;
        this.logger = logger;
        this.dataService = dataService;
        this.appContext = appContext;
        this.appState = appState;
        this.viewConf = {};
        this.view_conf = {};
        this.tab_next_view_refs = [];
        this.title = 'Store';
        this.args = {};
        this.tabParams = {};
        this.tabRefs = {};
        this.test = {};
        var conf = this.navParams.data.conf;
        this.configurePage(conf);
        if (this.subject) {
            this.appContext.setCurrentStation(this.subject);
        }
        this.setNextViewConfs();
    }
    StoreMainPage.prototype.setNextViewConfs = function () {
        var _this = this;
        this.tab_next_view_refs.forEach(function (viewRef) {
            var view_conf = __WEBPACK_IMPORTED_MODULE_9__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.navManager.selectViewConf(_this.tabRefs[viewRef]));
            view_conf['sku_type'] = _this.sku_type;
            view_conf['subject'] = _this.tabParams[viewRef];
            var conf = {
                conf: view_conf,
                data: {
                    app_type: _this.app_type
                },
            };
            _this.view_conf[viewRef] = conf;
        });
    };
    StoreMainPage.prototype.configurePage = function (value) {
        if (value) {
            this.app_type = value.app_type;
            this.sku_type = value.sku_type;
            this.subject = value.subject;
            this.dataService.setSkuType(this.sku_type);
            this.view_descriptor = value;
            this.dataService.setPartially(value.partially);
            this.title = this.view_descriptor.title;
            var component_descriptors = this.view_descriptor.components_descriptor;
            var tabs_conf = __WEBPACK_IMPORTED_MODULE_9__ministore_utils__["a" /* MUtils */].getComponentConfig('navigation_tab', component_descriptors);
            this.default_tab_config = tabs_conf['default_tab'];
            this.second_tab_config = tabs_conf['second_tab'];
            this.tab_next_view_refs = [];
            this.tab_next_view_refs.push(this.default_tab_config.id);
            this.tab_next_view_refs.push(this.second_tab_config.id);
            this.tab1Root = this.default_tab_config.view_type;
            this.tab2Root = this.second_tab_config.view_type;
            this.tab1Subject = this.default_tab_config.subject;
            this.tab2Subject = this.second_tab_config.subject;
            this.tab1Ref = this.default_tab_config.next_view_ref;
            this.tab2Ref = this.second_tab_config.next_view_ref;
            this.third_tab_config = tabs_conf['third_tab'];
            this.fourth_tab_config = tabs_conf['fourth_tab'];
            this.tabParams[this.default_tab_config.id] = this.tab1Subject;
            this.tabParams[this.second_tab_config.id] = this.tab2Subject;
            this.tabRefs[this.default_tab_config.id] = this.tab1Ref;
            this.tabRefs[this.second_tab_config.id] = this.tab2Ref;
            if (this.third_tab_config) {
                this.tab_next_view_refs.push(this.third_tab_config.id);
                this.tab3Root = this.third_tab_config.view_type;
                this.tab3Subject = this.third_tab_config.subject;
                this.tabParams[this.third_tab_config.id] = this.tab3Subject;
                this.tab3Ref = this.third_tab_config.next_view_ref;
                this.tabRefs[this.third_tab_config.id] = this.tab3Ref;
            }
            if (this.fourth_tab_config) {
                this.tab_next_view_refs.push(this.fourth_tab_config.id);
                this.tab4Root = this.fourth_tab_config.view_type;
                this.tab4Subject = this.fourth_tab_config.subject;
                this.tabParams[this.fourth_tab_config.id] = this.tab4Subject;
                this.tab4Ref = this.fourth_tab_config.next_view_ref;
                this.tabRefs[this.fourth_tab_config.id] = this.tab4Ref;
            }
        }
    };
    StoreMainPage.prototype.ionViewDidLoad = function () {
        if (this.tabRef) {
            this.tabRef.select(0);
        }
        if (this.subject) {
            this.appContext.setCurrentStation(this.subject);
        }
        this.initEventListeners();
        var stationId = this.appContext.getCurrentSubject().id;
        var args = {
            station_id: stationId,
            range: {
                startTime: {
                    ts: 0,
                    offset: new Date().getTimezoneOffset()
                },
                endTime: {
                    ts: Date.now(),
                    offset: new Date().getTimezoneOffset()
                }
            }
        };
        this.dataService.startUp(stationId, this.app_type, args);
        /// this.tabRef.initTabs();
    };
    StoreMainPage.prototype.ionViewWillEnter = function () {
    };
    StoreMainPage.prototype.initEventListeners = function () {
        var _this = this;
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_8__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_SUBJECT_CHANGE, function (res) {
            var args = {
                station_id: res,
                range: {
                    startTime: {
                        ts: 0,
                        offset: new Date().getTimezoneOffset()
                    },
                    endTime: {
                        ts: Date.now(),
                        offset: new Date().getTimezoneOffset()
                    }
                }
            };
            _this.logger.debug(res);
            _this.dataService.startUp(res, _this.app_type, args);
        });
    };
    StoreMainPage.prototype.openPage = function (pageName, conf) {
        if (this.tabRef) {
            this.tabRef.viewCtrl._nav.setRoot(pageName, conf);
        }
    };
    StoreMainPage.prototype.ionViewDidEnter = function () {
        this.displayTabs = true;
    };
    StoreMainPage.prototype.ionViewDidLeave = function () {
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('navTab'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["v" /* Tabs */])
    ], StoreMainPage.prototype, "tabRef", void 0);
    StoreMainPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'store-main-page',
            template: __WEBPACK_IMPORTED_MODULE_2__store_main_page_template__["a" /* STORES_MAIN_PAGE_TEMPLATE */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__["a" /* NavigationManager */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* Events */],
            __WEBPACK_IMPORTED_MODULE_4__providers_ministore_data_provider__["a" /* MiniStoreDataProvider */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["x" /* ToastController */],
            __WEBPACK_IMPORTED_MODULE_6_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_5__providers_store_data_service__["a" /* StoreDataService */],
            __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */], __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */]])
    ], StoreMainPage);
    return StoreMainPage;
}());

//# sourceMappingURL=store-main-page.js.map

/***/ }),

/***/ 1595:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return STORES_MAIN_PAGE_TEMPLATE; });
var STORES_MAIN_PAGE_TEMPLATE = "\n<ion-header>\n<common-main-header [title]=\"title\"></common-main-header>\n\n</ion-header>\n<ion-content>\n<ion-tabs class=\"tabs-navigator\" #navTab *ngIf=\"displayTabs && default_tab_config && second_tab_config\">\n      <ion-tab class=\"nav-tab\" *ngIf=\"default_tab_config\" [root]=\"tab1Root\" [tabTitle]=\"default_tab_config.title\"\n      [rootParams]=\"view_conf[default_tab_config.id]\" tabIcon=\"paper\"></ion-tab>\n      <ion-tab class=\"nav-tab\" *ngIf=\"second_tab_config\" [root]=\"tab2Root\" [tabTitle]=\"second_tab_config.title\"\n        [rootParams]=\"view_conf[second_tab_config.id]\" tabIcon=\"folder-open\"></ion-tab>\n        <ion-tab class=\"nav-tab\" *ngIf=\"third_tab_config\" [root]=\"tab3Root\" [tabTitle]=\"third_tab_config.title\"\n        [rootParams]=\"view_conf[third_tab_config.id]\" tabIcon=\"folder-open\"></ion-tab>\n                <ion-tab class=\"nav-tab\" *ngIf=\"fourth_tab_config\" [rootParams]=\"view_conf[fourth_tab_config.id]\"\n                 [root]=\"tab4Root\" [tabTitle]=\"fourth_tab_config.title\"\n                 tabIcon=\"folder-open\"></ion-tab>\n    </ion-tabs>\n</ion-content>\n<!--<ion-footer class=\"store-menubar-header\">\n<ion-navbar>\n<common-header-comp header_title=\"samples\"></common-header-comp>\n</ion-navbar>\n</ion-footer>-->\n";
//# sourceMappingURL=store-main-page-template.js.map

/***/ }),

/***/ 1596:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SKU_GROUP_PAGE_HTML; });
var SKU_GROUP_PAGE_HTML = "\n<ion-header class=\"store-menubar-header\">\n<common-main-header [title]=\"title\"></common-main-header>\n</ion-header>\n<ion-content class=\"main-content\">\n    <div class=\"grid-wrapper\">\n        <ion-grid class=\"main-grid\">\n            <ion-row></ion-row>\n            <ion-row class=\"sr-row\">\n                <ion-col>\n                    <sku-group-details *ngIf=\"data\" [config]=\"sku_group_config\" [data]=\"data\" (OnItemClick)=\"onItemClick($event)\"\n                                       [group_view]=\"false\"></sku-group-details>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>\n";
//# sourceMappingURL=sku-group-page-template.js.map

/***/ }),

/***/ 1597:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SkuGroupPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sku_group_page_template__ = __webpack_require__(1596);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__models_sku_group_config__ = __webpack_require__(1001);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};






var SkuGroupPage = /** @class */ (function () {
    function SkuGroupPage(navParams, navProvider, events) {
        this.navParams = navParams;
        this.navProvider = navProvider;
        this.events = events;
    }
    SkuGroupPage.prototype.ionViewDidLoad = function () {
        var data = this.navParams.data;
        this.data = data.data.tag_group;
        this.configurePage(data.conf);
        this.subscribeEvents();
    };
    SkuGroupPage.prototype.subscribeEvents = function () {
        var _this = this;
        this.events.subscribe('sku:saved', function (sku, time) {
            _this.saveSku(sku);
        });
    };
    SkuGroupPage.prototype.configurePage = function (value) {
        if (value) {
            this.childCompsConfs = value.components_descriptor;
            this.title = value.title;
            this.view_controllers = value.view_controllers ? value.view_controllers : [];
            var sku_group_conf = __WEBPACK_IMPORTED_MODULE_5__ministore_utils__["a" /* MUtils */].getComponentConfig('sku-group-details', this.childCompsConfs);
            this.sku_group_config = new __WEBPACK_IMPORTED_MODULE_2__models_sku_group_config__["a" /* SKUGroupConfig */](sku_group_conf);
        }
    };
    SkuGroupPage.prototype.goToNextView = function (rowData, action) {
        var viewConf = this.getControllerConfig(action, this.view_controllers);
        var nextViewRef = viewConf.next_view_ref;
        if (nextViewRef) {
            var data = rowData ? rowData : {};
            this.navProvider.nextView(nextViewRef, data);
        }
    };
    SkuGroupPage.prototype.onItemClick = function (event) {
        this.goToNextView(event, 'group_item_click');
    };
    SkuGroupPage.prototype.getControllerConfig = function (action_name, configs) {
        var config = {};
        if (action_name && configs) {
            config = configs.find(function (c) { return c.action_name === action_name; });
        }
        return config;
    };
    SkuGroupPage.prototype.saveSku = function (new_sku) {
        var id = new_sku.id;
        var index = this.data.findIndex(function (sku) { return sku.tag_id.code === id; });
        if (index !== -1) {
            this.data.splice(index, 1, new_sku);
        }
    };
    SkuGroupPage.prototype.onDoneClick = function () {
    };
    SkuGroupPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_3_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'sku-group-page',
            template: __WEBPACK_IMPORTED_MODULE_1__sku_group_page_template__["a" /* SKU_GROUP_PAGE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_3_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__["a" /* NavigationManager */], __WEBPACK_IMPORTED_MODULE_3_ionic_angular__["d" /* Events */]])
    ], SkuGroupPage);
    return SkuGroupPage;
}());

//# sourceMappingURL=sku-group-page.js.map

/***/ }),

/***/ 1598:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppSwitchingPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_switching_page_template__ = __webpack_require__(1599);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};






var AppSwitchingPage = /** @class */ (function () {
    function AppSwitchingPage(logger, navManager, navParams, appPro) {
        this.logger = logger;
        this.navManager = navManager;
        this.navParams = navParams;
        this.appPro = appPro;
    }
    AppSwitchingPage.prototype.configurePage = function (value) {
        if (value) {
            this.title = value.title;
            this.app_configs = value.app_configs;
        }
    };
    AppSwitchingPage.prototype.goToApp = function (app_type) {
        try {
            var conf = void 0;
            if (app_type === 'IN') {
                conf = this.conf_in;
            }
            else if (app_type === 'OUT') {
                conf = this.conf_out;
            }
            if (conf) {
                var views = conf['views'];
                this.appPro.setData(views);
                var veiw_name = __WEBPACK_IMPORTED_MODULE_5__ministore_utils__["a" /* MUtils */].getLandingPageName(views);
                this.navManager.nextView(veiw_name, '');
            }
        }
        catch (e) {
            this.logger.debug(e);
        }
    };
    AppSwitchingPage.prototype.ionViewDidLoad = function () {
        this.configurePage(this.navParams.data.conf);
        this.conf_in = this.app_configs.find(function (c) { return c.app_type === 'IN'; });
        this.conf_out = this.app_configs.find(function (c) { return c.app_type === 'OUT'; });
    };
    AppSwitchingPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'app-switching-page',
            template: __WEBPACK_IMPORTED_MODULE_1__app_switching_page_template__["a" /* APP_SWITCHING_PAGE */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_4_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["m" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["c" /* AppMasterProvider */]])
    ], AppSwitchingPage);
    return AppSwitchingPage;
}());

//# sourceMappingURL=app-switching-page.js.map

/***/ }),

/***/ 1599:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return APP_SWITCHING_PAGE; });
var APP_SWITCHING_PAGE = "\n<ion-header>\n    <common-main-header [title]=\"title\"></common-main-header>\n</ion-header>\n<ion-content class=\"main-content\">\n        <ion-grid class=\"main-grid\">\n            <ion-row class=\"app-select-row \">\n                <ion-col col-sm-12 col-md-12 col-lg-6 text-sm-center text-md-center text-lg-right padding class=\"app-select-col\">\n                    <button ion-button class=\"select-btn btn-in\" (click)=\"goToApp('IN')\">\n                        <ion-icon class=\"direct-btn icon-in\" name=\"ios-log-in-outline\"></ion-icon>\n                        <span class=\"app-name\" *ngIf=\"conf_in\">{{conf_in.app_name}}</span>\n                    </button>\n                </ion-col>\n                <ion-col col-sm-12 col-md-12 col-lg-6 text-sm-center text-md-center text-lg-left padding class=\"app-select-col\">\n                    <button ion-button class=\"select-btn btn-out\" (click)=\"goToApp('OUT')\">\n                        <ion-icon class=\"direct-btn icon-out\" name=\"ios-log-out-outline\"></ion-icon>\n                        <span class=\"app-name\" *ngIf=\"conf_out\">{{conf_out.app_name}}</span>\n                    </button>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n</ion-content>\n";
//# sourceMappingURL=app-switching-page-template.js.map

/***/ }),

/***/ 1621:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActivityLogNewPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__providers_transaction_service__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ministore_utils__ = __webpack_require__(39);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__models_nc_smart_table_models__ = __webpack_require__(1000);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__index__ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__activity_log_new_template__ = __webpack_require__(1639);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__providers_master_data_service__ = __webpack_require__(55);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__models_filterModel__ = __webpack_require__(366);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};












var ActivityLogNewPage = /** @class */ (function () {
    function ActivityLogNewPage(navCtrl, navParams, txService, logger, navManager, appState, masterDataService, appCtx, loadingCtrl) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.txService = txService;
        this.logger = logger;
        this.navManager = navManager;
        this.appState = appState;
        this.masterDataService = masterDataService;
        this.appCtx = appCtx;
        this.loadingCtrl = loadingCtrl;
        this.filters = [];
        this.tables = [];
        this.columns = [];
        this.rows = [];
        this.total = 0;
        this.distinctMap = {};
        this.selectedFilterValuesMap = {};
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
        this.paging = {
            page_num: 1,
            page_size: 8
        };
        this.tagsGroup = {};
        this.dropdownList = new __WEBPACK_IMPORTED_MODULE_11__models_filterModel__["a" /* FilterListModel */]({});
        this.dropdownSettings = {};
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
    }
    ActivityLogNewPage.prototype.setDropDownSettings = function () {
        var _this = this;
        this.filters.forEach(function (filter) {
            _this.dropdownSettings[filter.name] = {
                text: filter.display_name,
                enableSearchFilter: true,
                classes: 'myclass custom-class',
                badgeShowLimit: 1
            };
        });
    };
    ActivityLogNewPage.prototype.ionViewDidLoad = function () {
        var _this = this;
        this.presentLoading();
        var data = this.navParams.get('conf');
        this.configurePage(data);
        var start = new Date();
        start.setHours(0, 0, 0, 0);
        var end = new Date();
        end.setHours(23, 59, 59, 999);
        var dateRange = {
            start: start.getTime(),
            end: end.getTime()
        };
        var filter = [];
        this.filters.forEach(function (f) {
            filter.push(f.name);
        });
        var selectedMap = {};
        this.txService.getActivityLog(this.dataSource, dateRange, this.paging, selectedMap, filter).then(function (value) {
            var temp = value.logs;
            var tables = [];
            temp.forEach(function (t) {
                var conf = new __WEBPACK_IMPORTED_MODULE_7__models_nc_smart_table_models__["b" /* TableConfig */](__WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.tableConfig));
                conf.rows = t.items;
                t['config'] = conf;
                tables.push(t);
            });
            tables.sort(function (a, b) {
                return b.datetime - a.datetime;
            });
            _this.tables = tables;
            _this.temporyTables = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.tables);
            _this.distinctMap = value.distinctMap;
            // this.distinctMap['event_type'] = ['deleted', 'edited' , 'added'];
            _this.tagsGroup = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
            //   this.filters = Object.keys(this.distinctMap);
            _this.tableConfig.rows = _this.rows;
            //     this.filters = this.tableConfig.filters;
            _this.tableConfig.distinctItemsMap = _this.distinctMap;
            var dTemp = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
            _this.dropdownList.setAllLists(dTemp, _this.selectedFilterValuesMap, 'init', {});
            _this.showLog = true;
            _this.dismissLoading();
        }).catch(function (reason) {
        });
    };
    ActivityLogNewPage.prototype.presentLoading = function () {
        /*this.loader = this.loadingCtrl.create({
            content: 'Please wait...'
        });
        this.loader.present();*/
    };
    ActivityLogNewPage.prototype.dismissLoading = function () {
        /* if (this.loader) {
             this.loader.dismissAll();
         }*/
    };
    ActivityLogNewPage.prototype.configurePage = function (data) {
        if (!data) {
            return;
        }
        var tools = data.tools;
        if (tools) {
            this.tools = Object.assign(this.tools, tools);
        }
        this.title = data.title;
        this.dataSource = data.data_source;
        this.subTitle = data.sub_title;
        if (this.masterDataService.getSwitchStatus()) {
            var floor = this.masterDataService.getCurrentFloor();
            this.dataSource = data.data_source + '_' + floor;
            this.subTitle = this.subTitle + ' - ' + floor.toUpperCase();
        }
        this.filters = data.filters;
        this.setDropDownSettings();
        this.tableConfig = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getComponentConfig('nc-smart-table', data.component_descriptors);
        this.subTableHeaders = this.tableConfig.sub_table_headers;
        this.datePickerConfig = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getComponentConfig('nc-date-picker', data.component_descriptors);
    };
    ActivityLogNewPage.prototype.setFilterers = function () {
        // this.presentLoading();
        this.showLog = false;
        this.removeInActiveFilters();
        var currentSelected = Object.keys(this.selectedFilterValuesMap);
        var temp = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(this.temporyTables);
        this.getFiltered(temp);
        var filteredTables = [];
        if (currentSelected.length === 0) {
            filteredTables = temp;
        }
        else {
            this.doFilter(temp, currentSelected, this.selectedFilterValuesMap, filteredTables);
        }
        this.tables = filteredTables;
        this.tableConfig.rows = this.rows;
        this.tableConfig.distinctItemsMap = this.distinctMap;
        var dTemp = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(this.distinctMap);
        this.dropdownList.setAllLists(dTemp, this.selectedFilterValuesMap, 'init', {});
        //  this.dismissLoading();
        this.showLog = true;
    };
    ActivityLogNewPage.prototype.doFilter = function (rows, filters, filteredMap, filteredRows) {
        var _this = this;
        var currentFilteredRows = [];
        filters.forEach(function (filter) {
            rows.forEach(function (row) {
                if (_this.filters.findIndex(function (f) { return f.name === filter; }) !== -1 &&
                    (filteredMap[filter].findIndex(function (s) { return s.itemName === row[filter]; }) !== -1 || (filteredMap[filter]).length === 0)) {
                    if (filters.length === 1) {
                        filteredRows.push(row);
                    }
                    currentFilteredRows.push(row);
                }
            });
            filters.splice(filters.indexOf(filter), 1);
            _this.doFilter(currentFilteredRows, filters, filteredMap, filteredRows);
        });
    };
    ActivityLogNewPage.prototype.removeInActiveFilters = function () {
        var _this = this;
        Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
            if (_this.selectedFilterValuesMap[key].length === 0) {
                delete _this.selectedFilterValuesMap[key];
            }
        });
    };
    ActivityLogNewPage.prototype.getFiltered = function (data) {
        var _this = this;
        var filteredData = [];
        var filtered = Object.keys(this.selectedFilterValuesMap);
        var distinctMap = {};
        data.forEach(function (el) {
            var flag = false;
            if (filtered.length > 0) {
                var matchedCount_1 = 0;
                filtered.forEach(function (filter) {
                    var selectedTags = _this.selectedFilterValuesMap[filter];
                    var index = selectedTags.findIndex(function (s) { return s.itemName === el[filter]; });
                    if (index > -1) {
                        matchedCount_1++;
                    }
                });
                if (matchedCount_1 === filtered.length) {
                    filteredData.push(el);
                    flag = true;
                }
            }
            else {
                filteredData.push(el);
                flag = true;
            }
            if (flag) {
                _this.filters.forEach(function (filter) {
                    var name = filter.name;
                    if (el[name] && el[name] !== '' && distinctMap[name] && distinctMap[name].indexOf(el[name]) === -1) {
                        distinctMap[name].push(el[name]);
                    }
                    else if (el[name] && el[name] !== '' && !distinctMap[name]) {
                        var distinct = [];
                        distinct.push(el[name]);
                        distinctMap[name] = distinct;
                    }
                });
            }
        });
        this.distinctMap = distinctMap;
        return filteredData;
    };
    ActivityLogNewPage.prototype.onRangeSelect = function (dateRange) {
        var _this = this;
        this.showLog = false;
        this.presentLoading();
        var selectedMap = {};
        if (this.selectedFilterValuesMap) {
            Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
                var array = _this.selectedFilterValuesMap[key];
                if (array && array.length > 0) {
                    var mappedArray = array.map(function (item) { return item.itemName; });
                    selectedMap[key] = mappedArray;
                }
            });
        }
        var filter = [];
        this.filters.forEach(function (f) {
            filter.push(f.name);
        });
        this.txService.getActivityLog(this.dataSource, dateRange, this.paging, selectedMap, filter).then(function (value) {
            var temp = value.logs;
            var tables = [];
            temp.forEach(function (t) {
                var conf = new __WEBPACK_IMPORTED_MODULE_7__models_nc_smart_table_models__["b" /* TableConfig */](__WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.tableConfig));
                conf.rows = t.items;
                t['config'] = conf;
                tables.push(t);
            });
            _this.tables = tables;
            _this.temporyTables = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.tables);
            _this.distinctMap = value.distinctMap;
            // this.distinctMap['event_type'] = ['deleted', 'edited' , 'added'];
            _this.tagsGroup = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
            var dTemp = __WEBPACK_IMPORTED_MODULE_3__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
            _this.dropdownList.setAllLists(dTemp, _this.selectedFilterValuesMap, 'init', {});
            //  this.filters = Object.keys(this.distinctMap);
            _this.tableConfig.rows = _this.rows;
            // this.filters = this.tableConfig.filters;
            _this.tableConfig.distinctItemsMap = _this.distinctMap;
            _this.showLog = true;
            _this.dismissLoading();
        }).catch(function (reason) {
        });
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('smartTable'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_8__index__["c" /* NcSmartTable */])
    ], ActivityLogNewPage.prototype, "smartTable", void 0);
    ActivityLogNewPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'page-activity-log-new',
            template: __WEBPACK_IMPORTED_MODULE_9__activity_log_new_template__["a" /* ACTIVITY_LOG_NEW_PAGE_HTML */],
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_2__providers_transaction_service__["a" /* TransactionService */],
            __WEBPACK_IMPORTED_MODULE_4_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__["m" /* NavigationManager */], __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__["a" /* AppMasterProvider */],
            __WEBPACK_IMPORTED_MODULE_10__providers_master_data_service__["a" /* MasterDataService */], __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["k" /* LoadingController */]])
    ], ActivityLogNewPage);
    return ActivityLogNewPage;
}());

//# sourceMappingURL=activity-log-new.js.map

/***/ }),

/***/ 1622:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* unused harmony export TableSettingsModel */
/* unused harmony export Column */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ButtonConfig; });
var TableSettingsModel = /** @class */ (function () {
    function TableSettingsModel(obj) {
        if (obj && obj.columns) {
            this.columns = this.getColumns(obj.columns);
        }
        this.actions = obj && obj.actions;
        this.pager = obj && obj.pager;
    }
    TableSettingsModel.prototype.getColumns = function (columns) {
        var converted = {};
        var timeColumn = {
            'data_type': 'time',
            'display_name': 'Time',
            'editable': false,
            'key': 'added_datetime'
        };
        converted['added_datetime'] = new Column(timeColumn);
        columns.forEach(function (column) {
            // todo: change field name to formal names
            var key = column.key;
            converted[key] = new Column(column);
        });
        return converted;
    };
    return TableSettingsModel;
}());

var Column = /** @class */ (function () {
    function Column(obj) {
        this.type = 'text';
        this.title = obj && obj.display_name;
        this.filter = false;
        this.editable = obj && obj.editable;
        if (obj && obj.editor) {
            this.editor = obj.editor;
        }
        if (obj && (obj.data_type === 'date')) {
            this.type = 'custom';
            this.editable = false;
        }
        else if (obj && (obj.data_type === 'time')) {
            this.type = 'custom';
            this.editable = false;
        }
    }
    return Column;
}());

var ButtonConfig = /** @class */ (function () {
    function ButtonConfig(obj) {
        this.visibility = obj && obj.visibility;
        this.waiting_time = obj && obj.waiting_time;
        this.action_type = obj && obj.action_type;
        this.button_name = obj && obj.button_name;
        this.display_name = obj && obj.display_name;
        this.next_view_ref = obj && obj.next_view_ref;
    }
    return ButtonConfig;
}());

//# sourceMappingURL=scanned-report-model.js.map

/***/ }),

/***/ 1623:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NEW_SCAN_TEMPLATE; });
/**
 * Created by shadeeka on 6/8/18.
 */
var NEW_SCAN_TEMPLATE = "\n<ion-header class=\"store-menubar-header\">\n    <common-main-header [title]=\"title\"></common-main-header>\n</ion-header>\n<ion-content class=\"main-content\" no-padding>\n    <div class=\"grid-wrapper\">\n        <ion-grid class=\"main-grid\">\n            <ion-row class=\"custom-data-row\">\n                <ion-col col-12 col-md-5 col-lg-5>\n                    <ion-row *ngIf=\"currentParentTag\">\n                        <sku-tag-comp [data]=\"currentParentTag\" [config]=\"sku_config\" (onSearch)=\"gedDataById($event)\"\n                         [actual_qty]=\"actualQty\"></sku-tag-comp>\n                    </ion-row>\n                    <ion-row *ngIf=\"parentTagConf && currentParentTag\" class=\"parent-editor\">\n                        <ion-col *ngFor=\"let label of parentTagConf.labels\">\n                            <ion-label fixed class=\"form-label-ctm\">{{label.display_name}}</ion-label>\n                        </ion-col>\n                        <ion-col *ngFor=\"let label of parentTagConf.labels\">\n                            <ion-input *ngIf=\"label.container_type === 'tag_details'\"\n                                     type=\"label.type\" class=\"form-filed\" [(ngModel)]=\"currentParentTag.tag_details[label.label_name]\"\n                                               [disabled]=\"disableControllers\" placeholder=\"{{label.display_name}}\"></ion-input>\n                                    <ion-input *ngIf=\"label.container_type === 'tag_key'\"\n                                     type=\"label.type\" class=\"form-filed\" [(ngModel)]=\"currentParentTag[label.label_name]\"\n                                               [disabled]=\"disableControllers\" placeholder=\"{{label.display_name}}\"></ion-input>\n                                    <ion-input *ngIf=\"label.container_type === 'store_location'\"\n                                    type=\"label.type\" class=\"form-filed\" [(ngModel)]=\"currentParentTag.store_location[label.label_name]\"\n                                               [disabled]=\"disableControllers\" placeholder=\"{{label.display_name}}\"></ion-input>\n                        </ion-col>\n                        <ion-col>\n                            <button ion-button class=\"scanner-btn\" (click)=\"openScanner('ScanParentLocation')\">\n                                <ion-icon name=\"ios-barcode-outline\"></ion-icon>\n                            </button>\n                        </ion-col>\n                    </ion-row>\n                </ion-col>\n                <ion-col col-12 col-md-7 col-lg-7>\n                    <div class=\"info-section\" *ngIf=\"editorConf\">\n                        <ion-row class=\"header-row\">\n                            <ion-col><h4 class=\"header-text\">{{editorConf.title}}</h4></ion-col>\n                            <ion-col>\n                                <button ion-button class=\"scanner-btn\" [disabled]=\"!enableChildScanners\"\n                                 (click)=\"openScanner('NewChildReceived')\">\n                                    <ion-icon name=\"ios-barcode-outline\"></ion-icon>\n                                </button>\n                            </ion-col>\n                        </ion-row>\n                        <div class=\"cal-height pad-top-1\" *ngIf=\"currentChildTag\">\n                            <ion-row *ngFor=\"let label of editorConf.labels\">\n                                <ion-col>\n                                    <ion-label fixed class=\"form-label-ctm\">{{label.display_name}}</ion-label>\n                                </ion-col>\n                                <ion-col>\n                                    <ion-input *ngIf=\"label.container_type === 'tag_details'\"\n                                     type=\"label.type\" class=\"form-filed\" [(ngModel)]=\"currentChildTag.tag_details[label.label_name]\"\n                                               [disabled]=\"disableControllers\" placeholder=\"{{label.display_name}}\"></ion-input>\n                                    <ion-input *ngIf=\"label.container_type === 'tag_key'\"\n                                     type=\"label.type\" class=\"form-filed\" [(ngModel)]=\"currentChildTag[label.label_name]\"\n                                               [disabled]=\"disableControllers\" placeholder=\"{{label.display_name}}\"></ion-input>\n                                    <ion-input *ngIf=\"label.container_type === 'store_location'\"\n                                    type=\"label.type\" class=\"form-filed\" [(ngModel)]=\"currentChildTag.store_location[label.label_name]\"\n                                               [disabled]=\"disableControllers\" placeholder=\"{{label.display_name}}\"></ion-input>\n                                </ion-col>\n                                <ion-col *ngIf=\"label.type === 'number'\">\n                                    <button ion-button class=\"calc-btn\"\n                                            (click)=\"addQty(currentChildTag.actual_qty)\" [disabled]=\"disableControllers\">\n                                        <ion-icon name=\"add\"></ion-icon>\n                                    </button>\n                                    <button ion-button class=\"calc-btn\"\n                                            (click)=\"reduceQty(currentChildTag.actual_qty)\" [disabled]=\"disableControllers\">\n                                        <ion-icon name=\"remove\"></ion-icon>\n                                    </button>\n                                </ion-col>\n                                <ion-col *ngIf=\"label.type !== 'number'\">\n                                </ion-col>\n                            </ion-row>\n                        </div>\n                        <ion-row class=\"border-top\">\n                            <ion-col></ion-col>\n                            <ion-col class=\"footer-col\">\n                                <button ion-button *ngIf=\"add_btn_config && add_btn_config.visibility\" class=\"custom-btn\"\n                                 (click)=\"addChildTag()\" [disabled]=\"!enableChildAdd\">\n                                {{add_btn_config.display_name}}\n                                </button>\n                            </ion-col>\n                        </ion-row>\n                    </div>\n                </ion-col>\n            </ion-row>\n            <ion-row class=\"custom-data-row\">\n                <ion-col>\n                    <div class=\"info-section border-bottom-row\" *ngIf=\"tableConf\">\n                        <ion-row class=\"header-row\">\n                            <ion-col><h4 class=\"header-text\">{{tableConf.title}}</h4></ion-col>\n                            <ion-col></ion-col>\n                        </ion-row>\n                        <div *ngIf=\"tableConf\"class=\"custom-scroll-content\">\n                            <ion-row class=\"child-tag-header\">\n                            <ion-col col-1 *ngIf=\"displaySelectColumn\"></ion-col>\n                                <ion-col *ngFor=\"let column of tableConf.columns\">\n                                    <h5 class=\"header-data\">{{column.display_name}}</h5></ion-col>\n                                <ion-col class=\"action-col\"></ion-col>\n                            </ion-row>\n                            <ion-row class=\"bdr-bottom data-row\" *ngFor=\"let tag of newChildrenTags;let i = index\">\n                                <ion-col col-1 *ngIf=\"displaySelectColumn\"><ion-checkbox item-end></ion-checkbox></ion-col>\n                                <ion-col class=\"table-data\" *ngFor=\"let column of tableConf.columns\">\n                                    <span *ngIf=\"column.type === 'text' && column.container_type === 'tag_details'\"\n                                     class=\"table-text\">{{tag.tag_details[column.label_name]}}</span>\n                                      <span *ngIf=\"column.type === 'text' && column.container_type === 'tag_key'\"\n                                     class=\"table-text\">{{tag[column.label_name]}}</span>\n                                     <span *ngIf=\"column.type === 'text' && column.container_type === 'tag_id'\"\n                                     class=\"table-text\">{{tag[column.label_name]}}</span>\n                                     <span *ngIf=\"column.type === 'text' && column.container_type === 'store_location'\"\n                                     class=\"table-text\">{{tag.store_location[column.label_name]}}</span>\n                                     <span *ngIf=\"column.type === 'date' && column.container_type === 'tag_details'\" class=\"table-text\">\n                                        {{tag.tag_details[column.label_name].ts | date:\"hh:mm a\"}}</span></ion-col>\n                                <ion-col class=\"action-col\">\n                                    <ion-icon ion-button name=\"md-create\" (click)=\"goToNextView(tag ,'row_click')\"\n                                     class=\"action-icon\"></ion-icon>\n                                </ion-col>\n                            </ion-row>\n                        </div>\n                        <ion-row class=\"border-top footer-row\">\n                            <div class=\"btn-right\"></div>\n                                <button ion-button class=\"custom-btn\" (click)=\"issueTag()\"\n                                 [disabled]=\"!enableAddButton\">Issue</button>\n                        </ion-row>\n                    </div>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>\n<!--<ion-footer class=\"store-menubar-header\">\n<ion-navbar>\n<common-header-comp header_title=\"samples\"></common-header-comp>\n</ion-navbar>\n</ion-footer>-->\n";
//# sourceMappingURL=partially-control-page-template.js.map

/***/ }),

/***/ 1624:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PartiallyControlPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__providers_store_data_service__ = __webpack_require__(998);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__ = __webpack_require__(365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_reader_dist_providers_scanner_listener__ = __webpack_require__(89);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__models_sku_config__ = __webpack_require__(364);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10____ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__partially_control_page_template__ = __webpack_require__(1623);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};













var PartiallyControlPage = /** @class */ (function () {
    function PartiallyControlPage(navCtrl, navParams, logger, dataPro, scannerSvc, appState, navProvider, alertCtrl, toastCtrl, storeDataPro, renderer, elementRef) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.logger = logger;
        this.dataPro = dataPro;
        this.scannerSvc = scannerSvc;
        this.appState = appState;
        this.navProvider = navProvider;
        this.alertCtrl = alertCtrl;
        this.toastCtrl = toastCtrl;
        this.storeDataPro = storeDataPro;
        this.renderer = renderer;
        this.elementRef = elementRef;
        this.childrenTags = [];
        this.newChildrenTags = [];
        this.controlType = 'scanner';
        this.actualQty = 0;
        this.parentStoreLocation = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["b" /* StoreLocation */]({});
        this.viewConfig = {
            hasChildren: true,
            hasLocation: true,
            hasPartialEntry: true,
            userInputs: [
                {
                    type: 'text',
                    inputFor: 'actual_qty'
                },
                {
                    type: 'text',
                    inputFor: 'rack_no'
                }
            ]
        };
    }
    PartiallyControlPage.prototype.ionViewDidLoad = function () {
        var element = this.elementRef.nativeElement.querySelector('input');
        if (element) {
            // this.renderer.invokeElementMethod(element, 'focus', []);
        }
        var data = this.navParams.data.data;
        var config = this.navParams.data.conf;
        this.setDefaults();
        this.configurePage(config);
        this.setModel(data);
        if (this.currentParentTag) {
            this.enableChildScanners = true;
            this.enableChildAdd = true;
        }
    };
    PartiallyControlPage.prototype.iniEventListeners = function () {
        var _this = this;
        this.scannerSubscription = this.scannerSvc.scannerEventPublisher().subscribe(function (res) {
            _this.handleScanEvent(res);
        });
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].ReceivedScanItem, function (res, time) {
            res = JSON.parse(res);
            _this.handleScanEvent(res);
        });
    };
    PartiallyControlPage.prototype.setModel = function (data) {
        var newTag = data.tag;
        this.setParentAndChildTags(newTag);
        this.dataPro.setCurrentPartiallyTag(this.currentParentTag);
        this.dataPro.setPartiallyOpen();
    };
    PartiallyControlPage.prototype.setDefaults = function () {
        var parent = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({});
        parent.tag_id.code = 'default_parent';
        parent.tag_id.type = 'manual';
        parent.tag_id.process_type = 'manual';
        var child = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({});
        child.tag_id.code = 'default_child';
        child.tag_id.type = 'manual';
        child.tag_id.process_type = 'manual';
        this.currentParentTag = parent;
        this.currentChildTag = child;
    };
    PartiallyControlPage.prototype.setParentAndChildTags = function (newTag) {
        var newTemp = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTag));
        newTemp.tag_details['added_datetime'] = this.getDate();
        var code = newTemp.tag_id.code;
        if (this.dataPro.appType === 'OUT' && newTemp.tag_id.type !== 'manual') {
            var eOut = this.dataPro.getTagsByCodeAndSource(code, 'OUT');
            var eIn = this.dataPro.getTagsByCodeAndSource(code, 'IN');
            if (eOut.length > 0 && eIn.length > 0) {
                this.currentParentTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(eIn[0]));
                var children_1 = [];
                var outTotal_1 = 0;
                eOut.forEach(function (o) {
                    outTotal_1 = outTotal_1 + Number(o.actual_qty);
                    o.children.forEach(function (c) {
                        children_1.push(c);
                    });
                });
                var inTotal_1 = 0;
                eIn.forEach(function (o) {
                    inTotal_1 = inTotal_1 + Number(o.actual_qty);
                });
                this.currentOut = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(eOut[0]));
                this.currentOut.actual_qty = outTotal_1;
                this.currentParentTag.actual_qty = inTotal_1;
                this.childrenTags = children_1;
                this.currentChildTag = newTemp;
                if (newTemp.tag_details['qty'] && !isNaN(newTemp.tag_details['qty'])) {
                    this.currentChildTag.actual_qty = Number(newTemp.tag_details['qty']);
                }
            }
            else if (eIn.length > 0) {
                this.currentParentTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(eIn[0]));
                var inTotal_2 = 0;
                eIn.forEach(function (o) {
                    inTotal_2 = inTotal_2 + Number(o.actual_qty);
                });
                this.currentParentTag.actual_qty = inTotal_2;
                this.currentChildTag = newTemp;
                this.currentOut = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
                if (newTemp.tag_details['qty'] && !isNaN(newTemp.tag_details['qty'])) {
                    this.currentChildTag.actual_qty = Number(newTemp.tag_details['qty']);
                }
            }
            this.startAutomatedProcess();
        }
        else if (this.dataPro.appType === 'OUT' && newTemp.tag_id.type === 'manual') {
            this.currentParentTag = newTemp;
            this.currentParentTag.source = 'IN';
            this.currentChildTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
            this.currentOut = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
            this.currentOut.source = 'OUT';
        }
        if (this.dataPro.appType === 'IN' && newTemp.tag_id.type !== 'manual') {
            var eOut = this.dataPro.getTagsByCodeAndSource(code, 'OUT');
            var eIn = this.dataPro.getTagsByCodeAndSource(code, 'IN');
            if (eOut.length > 0 && eIn.length > 0) {
                this.currentParentTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(eIn[0]));
                var children_2 = [];
                var outTotal_2 = 0;
                eOut.forEach(function (o) {
                    outTotal_2 = outTotal_2 + Number(o.actual_qty);
                });
                var inTotal_3 = 0;
                eIn.forEach(function (o) {
                    inTotal_3 = inTotal_3 + Number(o.actual_qty);
                    o.children.forEach(function (c) {
                        children_2.push(c);
                    });
                });
                this.currentOut = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(eOut[0]));
                this.currentParentTag.actual_qty = inTotal_3;
                this.currentOut.actual_qty = outTotal_2;
                this.childrenTags = children_2;
                this.currentChildTag = newTemp;
                if (newTemp.tag_details['qty'] && !isNaN(newTemp.tag_details['qty'])) {
                    this.currentChildTag.actual_qty = Number(newTemp.tag_details['qty']);
                }
            }
            else if (eIn.length > 0) {
                this.currentParentTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(eIn[0]));
                var inTotal_4 = 0;
                eIn.forEach(function (o) {
                    inTotal_4 = inTotal_4 + Number(o.actual_qty);
                });
                this.currentParentTag.actual_qty = inTotal_4;
                this.currentChildTag = newTemp;
                this.currentOut = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
                if (newTemp.tag_details['qty'] && !isNaN(newTemp.tag_details['qty'])) {
                    this.currentChildTag.actual_qty = Number(newTemp.tag_details['qty']);
                }
            }
            else {
                this.currentParentTag = newTemp;
                this.currentParentTag.source = 'IN';
                if (newTemp.tag_details['qty'] && !isNaN(newTemp.tag_details['qty'])) {
                    this.currentParentTag.actual_qty = Number(newTemp.tag_details['qty']);
                }
                this.currentChildTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
                this.currentOut = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
                this.currentOut.source = 'OUT';
            }
            this.startAutomatedProcess();
        }
        else if (this.dataPro.appType === 'IN' && newTemp.tag_id.type === 'manual') {
            this.currentParentTag = newTemp;
            this.currentParentTag.source = 'IN';
            this.currentChildTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
            this.currentOut = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(newTemp));
            this.currentOut.source = 'OUT';
        }
        this.currentChildTag.setStoreLocation(new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["b" /* StoreLocation */]({ id: this.currentChildTag.tag_id.code, rack_no: '', label: '' }));
        this.currentParentTag.setStoreLocation(new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["b" /* StoreLocation */]({ id: this.currentChildTag.tag_id.code, rack_no: '', label: '' }));
        this.actualQty = this.currentParentTag.actual_qty - this.currentOut.actual_qty;
    };
    PartiallyControlPage.prototype.setActualQty = function () {
        if (this.dataPro.appType === 'OUT') {
            this.actualQty = this.currentParentTag.actual_qty - this.getChildTotal();
        }
        else {
            this.actualQty = this.currentParentTag.actual_qty + this.getChildTotal() - this.currentOut.actual_qty;
        }
    };
    PartiallyControlPage.prototype.handleScanEvent = function (res) {
        var message;
        if (res) {
            message = res.topic;
        }
        if (res && res.data && res.topic) {
            var topic = res.topic;
            if (__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].ScanParentLocation === topic) {
                Object.assign(this.currentParentTag.store_location, res.data.tag_details);
            }
            else if (__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].NewChildReceived === topic) {
                this.newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](res.data);
                this.newTag.tag_id.type = 'qrcode';
                this.currentChildTag = this.newTag;
                this.startAutomatedProcess();
            }
            else if (__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].ManuallySearchByCode === topic) {
                this.newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](res.data);
                this.setParentAndChildTags(this.newTag);
            }
        }
        this.presentToast(message);
    };
    PartiallyControlPage.prototype.presentToast = function (message) {
        /*const toast = this.toastCtrl.create({
            message: message + ' Detected',
            duration: 3000
        });
        toast.present();*/
    };
    PartiallyControlPage.prototype.addChildTag = function () {
        if (this.isValidQty()) {
            var tempChild = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](__WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getDeepCopy(this.currentChildTag));
            this.childrenTags.push(tempChild);
            this.newChildrenTags.push(tempChild);
            this.setActualQty();
            this.enableAddButton = true;
        }
        else {
            this.showAlert('not_valid_qty', {});
        }
    };
    PartiallyControlPage.prototype.getChildTotal = function () {
        var total = 0;
        this.childrenTags.forEach(function (c) {
            if (c.actual_qty) {
                total = total + Number(c.actual_qty);
            }
        });
        return total;
    };
    PartiallyControlPage.prototype.getNewChildTotal = function () {
        var total = 0;
        this.newChildrenTags.forEach(function (c) {
            if (c.actual_qty) {
                total = total + Number(c.actual_qty);
            }
        });
        return total;
    };
    PartiallyControlPage.prototype.ionViewWillUnload = function () {
        if (this.scannerSubscription) {
            this.scannerSubscription.unsubscribe();
        }
        this.dataPro.setPartiallyClose();
    };
    PartiallyControlPage.prototype.openScanner = function (topic) {
        this.scannerSvc.startScan(topic);
    };
    PartiallyControlPage.prototype.configurePage = function (config) {
        if (config) {
            var childConfigs = config.components_descriptor;
            var viewControllers = config.view_controllers;
            this.viewControllers = viewControllers;
            this.skuType = this.dataPro.skuType;
            this.displaySelectColumn = (this.skuType === 'group' && this.dataPro.appType === 'OUT');
            this.common_columns = config.common_columns;
            var sku_detail_conf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('sku_details', childConfigs);
            this.tableConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('table_conf', childConfigs);
            this.editorConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('editor_conf', childConfigs);
            this.parentTagConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('parent_tag_editor_conf', childConfigs);
            this.sku_config = new __WEBPACK_IMPORTED_MODULE_8__models_sku_config__["a" /* SKUConfig */](sku_detail_conf);
            this.title = config.title ? config.title : '';
            this.add_btn_config = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getButtonConfig('accept_scanned', viewControllers);
            this.cancel_btn_config = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getButtonConfig('reject_scanned', viewControllers);
        }
    };
    PartiallyControlPage.prototype.addNewParentTag = function () {
        var tagId = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["d" /* TagId */]({ code: '11', type: '', process_type: 'manual' });
        this.newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({ tag_id: tagId, actual_qty: 200 });
    };
    PartiallyControlPage.prototype.addNewChildTag = function () {
        this.disable_ok = false;
        var newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({});
        newTag.tag_id.type = 'manual';
        newTag.tag_id.code = 'm_' + __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getTimeId();
        newTag.tag_id.process_type = 'manual';
        newTag.source = this.dataPro.appType;
        newTag.subject_id = this.dataPro.currentStationId;
        newTag.tag_details = {};
        this.newTag = newTag;
        this.disableControllers = false;
    };
    PartiallyControlPage.prototype.createGroupTag = function () {
        var newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({});
        newTag.tag_id.type = 'manual';
        newTag.tag_id.code = 'm_g_' + __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getTimeId();
        newTag.tag_id.process_type = 'manual';
        newTag.source = this.dataPro.appType;
        newTag.subject_id = this.dataPro.currentStationId;
        newTag.tag_details = {};
        return newTag;
    };
    PartiallyControlPage.prototype.addNewStoreLocationToParent = function () {
        this.currentParentTag.tag_details['line'] = this.parentStoreLocation.rack_no;
    };
    PartiallyControlPage.prototype.issueTag = function () {
        if (this.dataPro.appType === 'OUT') {
            this.currentOut.tag_details['added_datetime'] = this.getDate();
            this.currentOut.children = this.newChildrenTags;
            this.currentOut.actual_qty = this.getNewChildTotal();
            this.dataPro.addTag(this.currentOut);
            this.navCtrl.pop();
            this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_' + this.skuType, this.currentOut);
            this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, this.currentOut);
        }
        else {
            this.currentParentTag.tag_details['added_datetime'] = this.getDate();
            this.currentParentTag.children = this.newChildrenTags;
            this.currentParentTag.actual_qty = this.getNewChildTotal();
            this.dataPro.addTag(this.currentParentTag);
            this.navCtrl.pop();
            this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_' + this.skuType, this.currentParentTag);
            this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, this.currentParentTag);
        }
    };
    PartiallyControlPage.prototype.getDate = function () {
        var date = {
            ts: new Date().getTime(),
            offset: new Date().getTimezoneOffset()
        };
        this.logger.debug(date);
        return date;
    };
    PartiallyControlPage.prototype.acceptScanned = function () {
        if (this.isValidQty()) {
            this.childrenTags.push(this.currentChildTag);
        }
        else {
            this.showAlert('not_valid_qty', {});
        }
    };
    PartiallyControlPage.prototype.isValidQty = function () {
        var total = 0;
        this.childrenTags.forEach(function (c) {
            if (c.actual_qty) {
                total = total + Number(c.actual_qty);
            }
        });
        if (this.dataPro.appType === 'OUT'
            && (this.currentParentTag.actual_qty >= (total + Number(this.currentChildTag.actual_qty)))) {
            return true;
        }
        else if (this.dataPro.appType === 'IN') {
            return true;
        }
        return false;
    };
    PartiallyControlPage.prototype.addQty = function (numValue) {
        this.newTag.actual_qty = numValue + 1;
    };
    PartiallyControlPage.prototype.reduceQty = function (numValue) {
        this.newTag.actual_qty = numValue - 1;
    };
    PartiallyControlPage.prototype.goToNextView = function (tag, action) {
        var viewConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getControllerConfig(action, this.viewControllers);
        if (viewConf.next_view_ref && tag) {
            var next_view_ref = viewConf.next_view_ref;
            tag['action'] = action;
            tag['app_type'] = this.dataPro.appType;
            this.navProvider.nextView(next_view_ref, tag);
        }
    };
    PartiallyControlPage.prototype.startAutomatedProcess = function () {
        var _this = this;
        if (this.add_btn_config.action_type === 'auto') {
            setTimeout(function () {
                _this.addChildTag();
            }, (this.add_btn_config.waiting_time) * 1000);
        }
    };
    PartiallyControlPage.prototype.showAlert = function (msg_type, event) {
        if (msg_type === 'not_valid_qty') {
            var message = this.alertCtrl.create({
                title: 'Error !',
                subTitle: 'Quantity Not Compatible With Actual Quantity',
                buttons: ['Ok'],
                cssClass: 'errorMsg'
            });
            message.present();
        }
    };
    PartiallyControlPage.prototype.gedDataById = function (query) {
        var _this = this;
        this.storeDataPro.onSearchSKUDetails(query).subscribe(function (data) {
            if (data) {
                data['topic'] = __WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].ManuallySearchByCode;
                /*      this.currentChildTag = new Tag({});
                      this.currentChildTag.tag_details = {};
                      this.currentOut = new Tag({});
                      this.currentOut.tag_details = {};
                      this.currentParentTag = new Tag({});
                      this.currentParentTag.tag_details = {};
      */
                _this.handleScanEvent(data);
            }
        });
    };
    PartiallyControlPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'partially-control-page',
            template: __WEBPACK_IMPORTED_MODULE_11__partially_control_page_template__["a" /* NEW_SCAN_TEMPLATE */],
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_5_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_2__providers_store_data_service__["a" /* StoreDataService */],
            __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_reader_dist_providers_scanner_listener__["a" /* ScannerListenerProvider */],
            __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */],
            __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__["a" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["x" /* ToastController */],
            __WEBPACK_IMPORTED_MODULE_10____["b" /* MiniStoreDataProvider */], __WEBPACK_IMPORTED_MODULE_0__angular_core__["Renderer"], __WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"]])
    ], PartiallyControlPage);
    return PartiallyControlPage;
}());

//# sourceMappingURL=partially-control-page.js.map

/***/ }),

/***/ 1625:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ViewTagPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__view_tag_page_template__ = __webpack_require__(1626);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__models_sku_config__ = __webpack_require__(364);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__models_store_data_model__ = __webpack_require__(365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__component_sku_component_sku_component__ = __webpack_require__(1003);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8____ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};










var ViewTagPage = /** @class */ (function () {
    function ViewTagPage(navParams, logger, events, navProvider, navController, dataService) {
        this.navParams = navParams;
        this.logger = logger;
        this.events = events;
        this.navProvider = navProvider;
        this.navController = navController;
        this.dataService = dataService;
    }
    ViewTagPage.prototype.ionViewDidLoad = function () {
        var data = this.navParams.data;
        this.data = new __WEBPACK_IMPORTED_MODULE_6__models_store_data_model__["c" /* Tag */](data.data);
        this.configurePage(data.conf);
    };
    ViewTagPage.prototype.configurePage = function (value) {
        if (value) {
            this.app_type = this.dataService.appType;
            this.title = value.title;
            this.childCompsConfs = value.components_descriptor;
            this.view_controllers = value.view_controllers ? value.view_controllers : [];
            var sku_detail_conf = __WEBPACK_IMPORTED_MODULE_9__ministore_utils__["a" /* MUtils */].getComponentConfig('sku_details', this.childCompsConfs);
            this.sku_config = new __WEBPACK_IMPORTED_MODULE_3__models_sku_config__["a" /* SKUConfig */](sku_detail_conf);
        }
    };
    ViewTagPage.prototype.onDoneClick = function () {
        this.goToNextView(this.data, 'save-sku');
        this.events.publish('sku:saved', this.data, Date.now());
    };
    ViewTagPage.prototype.goToNextView = function (rowData, action) {
        var viewConf = this.getControllerConfig(action, this.view_controllers);
        var nextViewRef = viewConf.next_view_ref;
        if (nextViewRef) {
            var data = {};
            data = rowData ? rowData : {};
            this.navProvider.nextView(nextViewRef, data);
        }
        else {
            this.navController.pop();
        }
    };
    ViewTagPage.prototype.getControllerConfig = function (action_name, configs) {
        var config = {};
        if (action_name && configs) {
            config = configs.find(function (c) { return c.action_name === action_name; });
        }
        return config;
    };
    ViewTagPage.prototype.ionViewWillLeave = function () {
        if (this.skuComp) {
            this.skuComp.confirmItem();
        }
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('skuComp'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_7__component_sku_component_sku_component__["a" /* SKUComponent */])
    ], ViewTagPage.prototype, "skuComp", void 0);
    ViewTagPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'view-tag-page',
            template: __WEBPACK_IMPORTED_MODULE_2__view_tag_page_template__["a" /* SCANNER_READINGS_PAGE_TEMPLATE */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_4_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* Events */],
            __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__["m" /* NavigationManager */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_8____["d" /* StoreDataService */]])
    ], ViewTagPage);
    return ViewTagPage;
}());

//# sourceMappingURL=view-tag-page.js.map

/***/ }),

/***/ 1626:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SCANNER_READINGS_PAGE_TEMPLATE; });
var SCANNER_READINGS_PAGE_TEMPLATE = "\n<ion-header class=\"store-menubar-header\">\n<common-main-header [title]=\"title\"></common-main-header>\n</ion-header><ion-content class=\"main-content\">\n<div class=\"grid-wrapper\">\n<ion-grid class=\"main-grid\">\n<ion-row></ion-row>\n\n<ion-col>\n\t<sku-details-comp #skuComp *ngIf=\"data\" [config]=\"sku_config\" [data]=\"data\"\n  \t\t[show_ok]=\"false\" [show_cancel]=\"false\">\n \t</sku-details-comp>\n</ion-col>\n\n</ion-grid>\n</div>\n</ion-content>\n";
//# sourceMappingURL=view-tag-page.template.js.map

/***/ }),

/***/ 1627:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CurrentStatusPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__current_status_page_template__ = __webpack_require__(1628);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__providers_store_data_service__ = __webpack_require__(998);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6____ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};









var CurrentStatusPage = /** @class */ (function () {
    function CurrentStatusPage(logger, navParams, appService, dataService, renderer, elementRef) {
        this.logger = logger;
        this.navParams = navParams;
        this.appService = appService;
        this.dataService = dataService;
        this.renderer = renderer;
        this.elementRef = elementRef;
        this.selectedRows = [];
        this.segments = [];
    }
    CurrentStatusPage.prototype.initEventListeners = function () {
        var _this = this;
        this.appService.unsubscribe(__WEBPACK_IMPORTED_MODULE_4__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus);
        this.appService.subscribe(__WEBPACK_IMPORTED_MODULE_4__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, function (data, time) {
            _this.initTreeModel();
        });
    };
    CurrentStatusPage.prototype.onSearch = function (query) {
        this.treeTable.setFilter(query.value);
    };
    CurrentStatusPage.prototype.initTreeModel = function () {
        var _this = this;
        this.getCurrentStockInHand();
        setTimeout(function () {
            if (_this.treeTable) {
                _this.treeTable.initTable();
            }
        }, 20);
    };
    CurrentStatusPage.prototype.getCurrentStockInHand = function () {
        var _this = this;
        var inTags = this.dataService.getAllTagsForSourceAndStation('IN', this.subject);
        var outTags = this.dataService.getAllTagsForSourceAndStation('OUT', this.subject);
        var stockInHand = [];
        var distinctIn = [];
        inTags.forEach(function (inTag) {
            var code = inTag.tag_id.code;
            if (distinctIn.indexOf(code) === -1) {
                distinctIn.push(code);
                var outTagsFiltered = outTags.filter(function (tag) { return tag.tag_id.code === code; });
                var inTagsFiltered = inTags.filter(function (tag) { return tag.tag_id.code === code; });
                var currentSubTotal = _this.dataService.isPartially() ? inTag.actual_qty : inTag.tag_details['qty'];
                if (outTagsFiltered.length > 0 || inTagsFiltered.length > 0) {
                    try {
                        var outTotal_1 = 0;
                        var inTotal_1 = 0;
                        outTagsFiltered.forEach(function (outTag) {
                            outTotal_1 = outTotal_1 + Number(outTag.actual_qty);
                        });
                        inTagsFiltered.forEach(function (inTagItem) {
                            inTotal_1 = inTotal_1 + Number(inTagItem.actual_qty);
                        });
                        currentSubTotal = inTotal_1 - outTotal_1;
                    }
                    catch (e) {
                    }
                }
                var data = {};
                Object.assign(data, inTag.tag_details);
                data['qty'] = currentSubTotal;
                stockInHand.push(data);
            }
        });
        this.nodes = stockInHand;
    };
    CurrentStatusPage.prototype.configurePage = function (value) {
        if (value) {
            this.sku_type = this.dataService.skuType;
            this.subject = value.subject;
            this.title = value.title;
            this.component_descriptors = value.components_descriptor;
            var table_conf = __WEBPACK_IMPORTED_MODULE_8__ministore_utils__["a" /* MUtils */].getComponentConfig('tree_table', this.component_descriptors);
            if (table_conf) {
                this.segments = table_conf.segments;
                this.headerConf = table_conf.header_conf;
                this.calculate_field = table_conf.calculate_field;
                this.headerConf = table_conf.header_conf;
            }
        }
    };
    CurrentStatusPage.prototype.sendScanEvent = function (event) {
    };
    CurrentStatusPage.prototype.ionViewDidLoad = function () {
        var _this = this;
        var element = this.elementRef.nativeElement.querySelector('input');
        if (element) {
            // this.renderer.invokeElementMethod(element, 'focus', []);
        }
        setTimeout(function () {
            _this.inputToFocus.setFocus();
        }, 200);
        this.initEventListeners();
        var conf = this.navParams.data.conf;
        this.configurePage(conf);
        this.initTreeModel();
    };
    CurrentStatusPage.prototype.ionViewWillEnter = function () {
        this.initTreeModel();
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('treeTable'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_6____["f" /* TreeTableComp */])
    ], CurrentStatusPage.prototype, "treeTable", void 0);
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('inputToFocus'),
        __metadata("design:type", Object)
    ], CurrentStatusPage.prototype, "inputToFocus", void 0);
    CurrentStatusPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'current-status-page',
            template: __WEBPACK_IMPORTED_MODULE_2__current_status_page_template__["a" /* CURRENT_STATUS_PAGE_TEMPLATE */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */],
            __WEBPACK_IMPORTED_MODULE_5__providers_store_data_service__["a" /* StoreDataService */], __WEBPACK_IMPORTED_MODULE_0__angular_core__["Renderer"], __WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"]])
    ], CurrentStatusPage);
    return CurrentStatusPage;
}());

//# sourceMappingURL=current-status-page.js.map

/***/ }),

/***/ 1628:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CURRENT_STATUS_PAGE_TEMPLATE; });
var CURRENT_STATUS_PAGE_TEMPLATE = "\n<ion-content class=\"main-content\">\n<div class=\"grid-wrapper\">\n    <ion-grid class=\"main-grid\">\n<ion-row class=\"search-row\">\n<ion-col col-lg-8></ion-col>\n<ion-col col-lg-4><ion-searchbar #inputToFocus class=\"search\" (ionChange)=\"onSearch($event)\"\n                                   placeholder=\"search ..\">\n                    </ion-searchbar></ion-col>\n</ion-row>\n<ion-row class=\"table-container\" *ngIf=\"nodes && nodes.length > 0\">\n<ion-col><tree-table-comp *ngIf=\"nodes && segments && this.selectedRows && this.calculate_field\"\n#treeTable [segments]=\"segments\" [calculate_field]=\"calculate_field\"\n [data]=\"nodes\" [selectedRows]=\"selectedRows\" [headerConf]=\"headerConf\"></tree-table-comp></ion-col>\n</ion-row>\n<ion-row *ngIf=\"(nodes && nodes.length === 0)\" class=\"empty-container\">\n<ion-col>\n  <div class=\"message-container\">\n      <div class=\"message-overlay\">\n      <div><ion-icon class=\"data-empty-icon\" name=\"ios-alert-outline\"></ion-icon>No data available</div></div>\n    </div></ion-col>\n</ion-row></ion-grid>\n    </div>\n</ion-content>\n";
//# sourceMappingURL=current-status-page-template.js.map

/***/ }),

/***/ 1629:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StoreActivityLogPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__store_activity_log_page_template__ = __webpack_require__(1630);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_transaction_service__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ministore_utils__ = __webpack_require__(39);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__models_nc_smart_table_models__ = __webpack_require__(1000);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__index__ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__providers_master_data_service__ = __webpack_require__(55);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__models_filterModel__ = __webpack_require__(366);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};












var StoreActivityLogPage = /** @class */ (function () {
    function StoreActivityLogPage(navCtrl, navParams, txService, logger, navManager, appState, masterDataService, appCtx, loadingCtrl) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.txService = txService;
        this.logger = logger;
        this.navManager = navManager;
        this.appState = appState;
        this.masterDataService = masterDataService;
        this.appCtx = appCtx;
        this.loadingCtrl = loadingCtrl;
        this.filters = [];
        this.tables = [];
        this.columns = [];
        this.rows = [];
        this.total = 0;
        this.distinctMap = {};
        this.selectedFilterValuesMap = {};
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
        this.tagsGroup = {};
        this.paging = {
            page_num: 1,
            page_size: 8
        };
        this.dropdownList = new __WEBPACK_IMPORTED_MODULE_11__models_filterModel__["a" /* FilterListModel */]({});
        this.dropdownSettings = {};
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
    }
    StoreActivityLogPage.prototype.setDropDownSettings = function () {
        var _this = this;
        this.filters.forEach(function (filter) {
            _this.dropdownSettings[filter.name] = {
                text: filter.display_name,
                enableSearchFilter: true,
                classes: 'myclass custom-class',
                badgeShowLimit: 1,
                lazyLoading: true
            };
        });
    };
    StoreActivityLogPage.prototype.viewTable = function (dateRange, paging) {
        var _this = this;
        var selectedMap = {};
        if (this.selectedFilterValuesMap) {
            Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
                var array = _this.selectedFilterValuesMap[key];
                if (array && array.length > 0) {
                    var mappedArray = array.map(function (item) { return item.itemName; });
                    selectedMap[key] = mappedArray;
                }
            });
        }
        var filterArry = [];
        this.filters.forEach(function (f) {
            filterArry.push(f.name);
        });
        var filter = filterArry;
        this.txService.getActivityLog(this.dataSource, dateRange, paging, selectedMap, filter).then(function (value) {
            var temp = value.logs;
            // this.total = value.total_qty;
            _this.totalCount = value.total_count;
            _this.logger.trace('count-pagination', _this.totalCount);
            var tables = [];
            temp.forEach(function (t) {
                var conf = new __WEBPACK_IMPORTED_MODULE_8__models_nc_smart_table_models__["b" /* TableConfig */](__WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.tableConfig));
                conf.rows = t.items;
                t['config'] = conf;
                tables.push(t);
            });
            tables.sort(function (a, b) {
                return b.datetime - a.datetime;
            });
            _this.tables = tables;
            _this.temporyTables = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.tables);
            _this.distinctMap = value.filter_details;
            // this.distinctMap['event_type'] = ['deleted', 'edited' , 'added'];
            _this.tagsGroup = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
            //   this.filters = Object.keys(this.distinctMap);
            _this.tableConfig.rows = _this.rows;
            //     this.filters = this.tableConfig.filters;
            _this.tableConfig.distinctItemsMap = _this.distinctMap;
            var dTemp = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
            _this.dropdownList.setAllLists(dTemp, _this.selectedFilterValuesMap, 'init', {});
            _this.showLog = true;
            _this.dismissLoading();
        }).catch(function (reason) {
        });
    };
    StoreActivityLogPage.prototype.presentLoading = function () {
        /*this.loader = this.loadingCtrl.create({
         content: 'Please wait...'
         });
         this.loader.present();*/
    };
    StoreActivityLogPage.prototype.ionViewDidLoad = function () {
        this.presentLoading();
        var data = this.navParams.get('conf');
        this.paging = data.paging;
        this.configurePage(data);
        var start = new Date();
        start.setHours(0, 0, 0, 0);
        var end = new Date();
        end.setHours(23, 59, 59, 999);
        var dateRange = {
            start: start.getTime(),
            end: end.getTime()
        };
        this.selectedDateRange = dateRange;
        this.viewTable(this.selectedDateRange, this.paging);
    };
    StoreActivityLogPage.prototype.onPageChange = function (event) {
        if (event) {
            var range = {
                page_size: this.paging.page_size,
                page_num: (event.page + 1)
            };
            this.showLog = false;
            var start = new Date();
            start.setHours(0, 0, 0, 0);
            var end = new Date();
            end.setHours(23, 59, 59, 999);
            var dateRange = {
                start: start.getTime(),
                end: end.getTime()
            };
            this.viewTable(this.selectedDateRange, range);
        }
    };
    StoreActivityLogPage.prototype.dismissLoading = function () {
        /* if (this.loader) {
         this.loader.dismissAll();
         }*/
    };
    StoreActivityLogPage.prototype.configurePage = function (data) {
        if (!data) {
            return;
        }
        var tools = data.tools;
        if (tools) {
            this.tools = Object.assign(this.tools, tools);
        }
        this.title = data.title;
        this.dataSource = data.data_source;
        this.subTitle = data.sub_title;
        if (this.masterDataService.getSwitchStatus()) {
            var floor = this.masterDataService.getCurrentFloor();
            this.dataSource = data.data_source + '_' + floor;
            this.subTitle = this.subTitle + ' - ' + floor.toUpperCase();
        }
        this.filters = data.filters;
        this.setDropDownSettings();
        this.tableConfig = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getComponentConfig('nc-smart-table', data.component_descriptors);
        this.subTableHeaders = this.tableConfig.sub_table_headers;
        this.mappings = this.tableConfig.mappings;
        this.datePickerConfig = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getComponentConfig('nc-date-picker', data.component_descriptors);
    };
    StoreActivityLogPage.prototype.setFilterers = function (currentFilter) {
        var _this = this;
        this.paging.page_num = 1;
        var temp = {};
        Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
            var selected = _this.selectedFilterValuesMap[key];
            var tempSelected = [];
            if (selected) {
                selected.forEach(function (s) {
                    tempSelected.push(s.itemName);
                });
                temp[key] = tempSelected;
            }
        });
        this.refresh(currentFilter);
        // this.smartTable.setFilters(temp);
        // this.getFiltered(this.rows);
    };
    StoreActivityLogPage.prototype.refresh = function (currentFilter) {
        var data = this.navParams.get('conf');
        // this.configurePage(data);
        var start = new Date();
        start.setHours(0, 0, 0, 0);
        var end = new Date();
        end.setHours(23, 59, 59, 999);
        var dateRange = this.selectedDateRange ? this.selectedDateRange : {
            start: start.getTime(),
            end: end.getTime()
        };
        this.viewTable(this.selectedDateRange, this.paging);
    };
    /* setFilterers() {
         // this.presentLoading();
         this.showLog = false;
         this.removeInActiveFilters();
         let currentSelected = Object.keys(this.selectedFilterValuesMap);
         let temp = MUtils.getDeepCopy(this.temporyTables);
         this.getFiltered(temp);
         let filteredTables = [];
         if (currentSelected.length === 0) {
             filteredTables = temp;
         } else {
             this.doFilter(temp, currentSelected, this.selectedFilterValuesMap, filteredTables);
         }
         this.tables = filteredTables;
         this.tableConfig.rows = this.rows;
         this.tableConfig.distinctItemsMap = this.distinctMap;
         let dTemp = MUtils.getDeepCopy(this.distinctMap);
         this.dropdownList.setAllLists(dTemp, this.selectedFilterValuesMap, 'init', {});
         //  this.dismissLoading();
         this.showLog = true;
     }
 
     doFilter(rows: any[], filters: string[], filteredMap: any, filteredRows: any[]) {
         let currentFilteredRows = [];
         filters.forEach(filter => {
             rows.forEach(row => {
                 if (this.filters.findIndex(f => f.name === filter) !== -1 &&
                     (filteredMap[filter].findIndex(s => s.itemName === row[filter]) !== -1 || (filteredMap[filter]).length === 0)) {
                     if (filters.length === 1) {
                         filteredRows.push(row);
                     }
                     currentFilteredRows.push(row);
                 }
             });
             filters.splice(filters.indexOf(filter), 1);
             this.doFilter(currentFilteredRows, filters, filteredMap, filteredRows);
         });
     }*/
    StoreActivityLogPage.prototype.removeInActiveFilters = function () {
        var _this = this;
        Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
            if (_this.selectedFilterValuesMap[key].length === 0) {
                delete _this.selectedFilterValuesMap[key];
            }
        });
    };
    StoreActivityLogPage.prototype.getFiltered = function (data) {
        var _this = this;
        var filteredData = [];
        var filtered = Object.keys(this.selectedFilterValuesMap);
        var distinctMap = {};
        data.forEach(function (el) {
            var flag = false;
            if (filtered.length > 0) {
                var matchedCount_1 = 0;
                filtered.forEach(function (filter) {
                    var selectedTags = _this.selectedFilterValuesMap[filter];
                    var index = selectedTags.findIndex(function (s) { return s.itemName === el[filter]; });
                    if (index > -1) {
                        matchedCount_1++;
                    }
                });
                if (matchedCount_1 === filtered.length) {
                    filteredData.push(el);
                    flag = true;
                }
            }
            else {
                filteredData.push(el);
                flag = true;
            }
            if (flag) {
                _this.filters.forEach(function (filter) {
                    var name = filter.name;
                    if (el[name] && el[name] !== '' && distinctMap[name] && distinctMap[name].indexOf(el[name]) === -1) {
                        distinctMap[name].push(el[name]);
                    }
                    else if (el[name] && el[name] !== '' && !distinctMap[name]) {
                        var distinct = [];
                        distinct.push(el[name]);
                        distinctMap[name] = distinct;
                    }
                });
            }
        });
        this.distinctMap = distinctMap;
        return filteredData;
    };
    StoreActivityLogPage.prototype.onRangeSelect = function (dateRange) {
        this.showLog = false;
        this.selectedDateRange = dateRange;
        this.presentLoading();
        this.viewTable(this.selectedDateRange, this.paging);
        /* this.txService.getActivityLog(this.dataSource, dateRange, this.mappings).then(value => {

             let temp = value.logs;
             let tables = [];
             temp.forEach( t => {
                 let conf = new TableConfig(MUtils.getDeepCopy(this.tableConfig));
                 conf.rows = t.items;
                 t['config'] = conf;
                 tables.push(t);
             });

             this.tables = tables;
             this.temporyTables = MUtils.getDeepCopy( this.tables);
             this.distinctMap = value.distinctMap;
             // this.distinctMap['event_type'] = ['deleted', 'edited' , 'added'];
             this.tagsGroup = MUtils.getDeepCopy(this.distinctMap);
             let dTemp = MUtils.getDeepCopy(this.distinctMap);
             this.dropdownList.setAllLists(dTemp, this.selectedFilterValuesMap, 'init' , {});
             //  this.filters = Object.keys(this.distinctMap);
             this.tableConfig.rows = this.rows;
             // this.filters = this.tableConfig.filters;
             this.tableConfig.distinctItemsMap = this.distinctMap;
             this.showLog = true;
             this.dismissLoading();
         }).catch(reason => {
         }); */
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["ViewChild"])('smartTable'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_9__index__["c" /* NcSmartTable */])
    ], StoreActivityLogPage.prototype, "smartTable", void 0);
    StoreActivityLogPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["Component"])({
            selector: 'store-activity-log-page',
            template: __WEBPACK_IMPORTED_MODULE_0__store_activity_log_page_template__["a" /* MINISTORE_PAGE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_3__providers_transaction_service__["a" /* TransactionService */],
            __WEBPACK_IMPORTED_MODULE_5_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__["m" /* NavigationManager */], __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__["a" /* AppMasterProvider */],
            __WEBPACK_IMPORTED_MODULE_10__providers_master_data_service__["a" /* MasterDataService */], __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */],
            __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["k" /* LoadingController */]])
    ], StoreActivityLogPage);
    return StoreActivityLogPage;
}());

//# sourceMappingURL=store-activity-log-page.js.map

/***/ }),

/***/ 1630:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MINISTORE_PAGE_HTML; });
/**
 * Created by nisitha athukoarala on 5/3/18.
 */
var MINISTORE_PAGE_HTML = "<ion-header>\n    <common-main-header [title]=\"title\" [tools]=\"tools\" [shift_disabled]=\"tools?.shift\" [header_disabled]=\"tools?.line\"></common-main-header>\n</ion-header>\n<ion-content class=\"offwhite-bg main-content\">\n    <div class=\"grid-wrapper\">\n        <ion-grid no-padding>\n            <ion-row class=\"summary-row\">\n                <ion-col>\n\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n        <ion-grid class=\"main-grid top-margin-content\" no-padding>\n            <ion-row class=\"pg-hdr\">\n                <img *ngIf=\"subTitle !== 'OUT'\" class=\"in-icon\" src=\"assets/imgs/in.png\">\n                <img *ngIf=\"subTitle === 'OUT'\" class=\"out-icon\" src=\"assets/imgs/out.png\">\n                <div class=\"pgr-hdr-txt\">{{subTitle}}</div>\n                <div class=\"r-align-flx\"></div>\n                <nc-date-picker #ncDatePicker class=\"store-seg width-50\"\n                                (onRangeSelect)=\"onRangeSelect($event)\" [config]=\"datePickerConfig\"></nc-date-picker>\n                <ion-col class=\"filter-col\" col-2 *ngFor='let item of filters'>\n                    <angular2-multiselect [data]=\"dropdownList.getList(item.name)\"\n                                          [(ngModel)]=\"selectedFilterValuesMap[item.name]\"\n                                          [settings]=\"dropdownSettings[item.name]\"\n                                          (onSelect)=\"setFilterers()\"\n                                          (onDeSelect)=\"setFilterers()\"\n                                          (onSelectAll)=\"setFilterers()\"\n                                          (onDeSelectAll)=\"setFilterers()\">\n                    </angular2-multiselect>\n                </ion-col>\n            </ion-row>\n <div style=\"height:100%; overflow: auto;\" *ngIf=\"(tables && tables.length > 0)\">\n   <ion-grid class=\"activity-log-tbl\" *ngFor=\"let tx of tables\">\n     <ion-row class=\"date-row\">\n       <div class=\"item\">Date<span>{{tx.datetime | date : 'MMM d, y'}}</span></div>\n       <div class=\"item\">Time<span>{{tx.datetime | date : 'h:mm a'}}</span></div>\n       <div class=\"push-r\"></div>\n       <div class=\"item\" *ngFor=\"let subHeader of subTableHeaders\">{{subHeader.display_name}}<span class=\"bdg\">{{tx[subHeader.name]}}</span></div>\n     </ion-row>\n     <ion-row class=\"hdr\">\n       <ion-col *ngFor=\"let hdr of tableConfig.columns\" >{{hdr.title}}</ion-col>\n     </ion-row>\n     <ion-row class=\"data-row\" *ngFor=\"let drow of tx.config.rows\">\n       <ion-col *ngFor=\"let hdr of tableConfig.columns\" [ngClass]=\"{'prio-purple' : (hdr.classes === 'prio-purple'),\n       'prio-orange' : (hdr.classes === 'prio-orange')}\">{{drow[hdr.name]}}</ion-col>\n     </ion-row>\n   </ion-grid>\n </div>\n            <ion-row class=\"empty-container\" *ngIf=\"((!tables) || tables && tables.length === 0)\">\n                <ion-col class=\"empty-col\">\n                    <div class=\"message-container\">\n                        <div class=\"message-overlay\">\n                            <div class=\"message-inner\">\n                                <ion-icon class=\"data-empty-icon\" name=\"alert\"></ion-icon>No data available</div>\n                        </div>\n                    </div>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>\n<ion-footer class=\"footer\">\n <ion-row class=\"pagin-row\">\n                <p-paginator [rows]=\"paging.page_size\" [totalRecords]=\"totalCount\"\n                             pageLinkSize=\"5\" (onPageChange)=\"onPageChange($event)\"></p-paginator>\n            </ion-row>\n</ion-footer>";
//# sourceMappingURL=store-activity-log-page.template.js.map

/***/ }),

/***/ 1631:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SUMMARY_PAGE_TEMPLATE; });
var SUMMARY_PAGE_TEMPLATE = "\n<ion-content class=\"main-content\">\n<div class=\"grid-wrapper\">\n<ion-grid class=\"main-grid\" no-padding>\n<!--<ion-row class=\"search-row\">-->\n<!--<ion-col col-6 col-md-4 col-lg-4>-->\n                <!--<nc-date-picker #ncDatePicker class=\"store-seg\"-->\n                  <!--(onRangeSelect)=\"onRangeSelect($event)\"-->\n                 <!--[config]=\"datePickerConf\">-->\n                <!--</nc-date-picker>-->\n            <!--</ion-col>-->\n            <!--<ion-col col-6 col-md-3 col-lg-3><ion-item class=\"custom-item\">-->\n  <!--<ion-label>Filter By {{filterFieldName}}</ion-label>-->\n  <!--<ion-select [(ngModel)]=\"selectedFilter\" (ionChange)=\"refreshModel($event)\">-->\n    <!--<ion-option *ngFor=\"let op of distinct\" value=\"{{op.value}}\">{{op.value}}</ion-option>-->\n  <!--</ion-select>-->\n<!--</ion-item></ion-col>-->\n<!--<ion-col col-12 col-md-5 col-lg-5 class=\"search-col\"><ion-searchbar class=\"search\" (ionChange)=\"onSearch($event)\"-->\n                                   <!--placeholder=\"search ..\">-->\n                    <!--</ion-searchbar></ion-col>-->\n<!--</ion-row>-->\n\n<!--page header date and dropdown\n===============-->\n<ion-row class=\"pg-hdr\">\n    <ion-icon name=\"git-compare\" class=\"in-ioc\"></ion-icon>\n    <div class=\"pgr-hdr-txt\">Page Header</div>\n    <div class=\"r-align-flx\"></div>\n    <ion-item col-2 class=\"dt-picker\">\n        <ion-label class=\"dt-pickr-icon\"><ion-icon name=\"calendar\"></ion-icon></ion-label>\n        <ion-input type=\"text\" placeholder=\"Start Date\"></ion-input>\n    </ion-item>\n    <ion-item col-2 class=\"dt-picker\">\n        <ion-label class=\"dt-pickr-icon\"><ion-icon name=\"calendar\"></ion-icon></ion-label>\n        <ion-input type=\"text\" placeholder=\"End Date\"></ion-input>\n    </ion-item>\n    <!--<ion-item col-2 no-padding class=\"fltr-dd\">\n        <ion-select [(ngModel)]=\"gaming\" interface=\"popover\" placeholder=\"Washing Plant\" class=\"fltr-select\">\n          <ion-option value=\"nes\">NES</ion-option>\n          <ion-option value=\"n64\">sty124589632547895</ion-option>\n          <ion-option value=\"ps\">PlayStation</ion-option>\n          <ion-option value=\"genesis\">Sega Genesis</ion-option>\n          <ion-option value=\"saturn\">Sega Saturn</ion-option>\n          <ion-option value=\"snes\">SNES</ion-option>\n        </ion-select>\n    </ion-item>\n    <ion-item col-2 no-padding class=\"fltr-dd\">\n        <ion-select [(ngModel)]=\"gaming\" interface=\"popover\" placeholder=\"Washing Plant\" class=\"fltr-select\">\n          <ion-option value=\"nes\">NES</ion-option>\n          <ion-option value=\"n64\">sty124589632547895</ion-option>\n          <ion-option value=\"ps\">PlayStation</ion-option>\n          <ion-option value=\"genesis\">Sega Genesis</ion-option>\n          <ion-option value=\"saturn\">Sega Saturn</ion-option>\n          <ion-option value=\"snes\">SNES</ion-option>\n        </ion-select>\n    </ion-item>-->\n</ion-row>\n<!--page header date and dropdown\n===============-->\n\n<!--page header date and dropdown\n===============-->\n<!-- <ion-row class=\"pg-hdr with-tab-nav\">\n    <ion-icon name=\"git-compare\" class=\"in-ioc\"></ion-icon>\n    <div class=\"pgr-hdr-txt\">Page Header</div>\n    <div class=\"r-align-flx\"></div>\n      <ion-segment>\n        <ion-segment-button value=\"kittens\">\n          Pre Wash Stock\n        </ion-segment-button>\n        <ion-segment-button value=\"puppies\">\n          Wash Stock\n        </ion-segment-button>\n      </ion-segment>\n</ion-row> -->\n<!--page header date and dropdown\n===============-->\n\n<!--page filter\n===============-->\n<ion-row class=\"sto-fltr-sec\">\n  <!--<ion-item col-2 no-padding class=\"fltr-dd\">\n    <ion-select [(ngModel)]=\"gaming\" interface=\"popover\" placeholder=\"Washing Plant\" class=\"fltr-select\">\n      <ion-option value=\"nes\">NES</ion-option>\n      <ion-option value=\"n64\">sty124589632547895</ion-option>\n      <ion-option value=\"ps\">PlayStation</ion-option>\n      <ion-option value=\"genesis\">Sega Genesis</ion-option>\n      <ion-option value=\"saturn\">Sega Saturn</ion-option>\n      <ion-option value=\"snes\">SNES</ion-option>\n    </ion-select>\n  </ion-item>-->\n</ion-row>\n<!--page filter\n===============-->\n<!--<ion-row class=\"table-container\" *ngIf=\"nodes && nodes.length > 0\" >-->\n<!--<ion-col><tree-table-comp *ngIf=\"nodes && segments && this.selectedRows && this.calculate_field\"-->\n<!--#treeTable [segments]=\"segments\" [calculate_field]=\"calculate_field\"-->\n <!--[data]=\"nodes\" [selectedRows]=\"selectedRows\" [headerConf]=\"headerConf\"></tree-table-comp></ion-col>-->\n<!--</ion-row>-->\n<!--<ion-row class=\"empty-container\" *ngIf=\"(nodes && nodes.length === 0)\">-->\n<!--&lt;!&ndash;<ion-col>&ndash;&gt;-->\n <!--&lt;!&ndash;<div class=\"message-container\">&ndash;&gt;-->\n      <!--&lt;!&ndash;<div class=\"message-overlay\">&ndash;&gt;-->\n      <!--&lt;!&ndash;<div><ion-icon class=\"data-empty-icon\" name=\"ios-alert-outline\"></ion-icon>No data available</div></div>&ndash;&gt;-->\n    <!--&lt;!&ndash;</div></ion-col>&ndash;&gt;-->\n<!--</ion-row>-->\n<!--page content\n====================-->\n<ion-row class=\"page-content\">\n</ion-row>\n<!--page content\n====================-->\n<!--total\n====================-->\n<ion-row class=\"tol-row\">\n    <div class=\"tol-lbl\">Total</div>\n    <div class=\"tol-valu\">1450</div>\n</ion-row>\n<!--total\n====================-->\n</ion-grid>\n    </div>\n</ion-content>\n";
//# sourceMappingURL=summary-page-template.js.map

/***/ }),

/***/ 1632:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SummaryPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__providers_store_data_service__ = __webpack_require__(998);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__summary_page_template__ = __webpack_require__(1631);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index__ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};








var SummaryPage = /** @class */ (function () {
    function SummaryPage(logger, navParams, events, dataService, renderer, elementRef) {
        this.logger = logger;
        this.navParams = navParams;
        this.events = events;
        this.dataService = dataService;
        this.renderer = renderer;
        this.elementRef = elementRef;
        this.selectedRows = [];
        this.segments = [];
        this.date = new Date().toString();
        this.dateRange = {
            startDate: 0,
            endDate: 0
        };
        this.filterField = 'line';
        this.filterFieldName = 'Location';
        this.distinct = [];
        this.selectOptions = { interface: 'action-sheet' };
    }
    SummaryPage.prototype.initEventListeners = function () {
        var _this = this;
        this.events.subscribe(__WEBPACK_IMPORTED_MODULE_3__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, function (data, time) {
            _this.initTreeModel();
        });
    };
    SummaryPage.prototype.initTreeModel = function () {
        var _this = this;
        this.setUpFilters();
        this.getCurrentStockInHand();
        setTimeout(function () {
            if (_this.treeTable) {
                _this.treeTable.initTable();
            }
        }, 20);
    };
    SummaryPage.prototype.refreshModel = function (value) {
        var _this = this;
        this.getCurrentStockInHand();
        setTimeout(function () {
            if (_this.treeTable) {
                _this.treeTable.initTable();
            }
        }, 20);
    };
    SummaryPage.prototype.onSearch = function (query) {
        this.treeTable.setFilter(query.value);
    };
    SummaryPage.prototype.onRangeSelect = function (dateRange) {
        this.dateRange.startDate = dateRange.start;
        this.dateRange.endDate = dateRange.end;
        this.initTreeModel();
    };
    SummaryPage.prototype.setUpFilters = function () {
        var _this = this;
        this.distinct = [];
        var newRange = {
            start: this.dateRange.startDate,
            end: this.dateRange.endDate
        };
        var tags = this.dataService.filterByDateForSource(newRange.start, newRange.end, this.dataService.appType);
        tags.forEach(function (inTag) {
            _this.addToDistinct(inTag.tag_details);
        });
    };
    SummaryPage.prototype.getCurrentStockInHand = function () {
        var _this = this;
        var newRange = {
            start: this.dateRange.startDate,
            end: this.dateRange.endDate
        };
        var tags = this.dataService.filterByDateForSource(newRange.start, newRange.end, this.dataService.appType);
        if (this.selectedFilter) {
            tags = tags.filter(function (tag) { return (tag.tag_details[_this.filterField] === _this.selectedFilter); });
        }
        var stockInHand = [];
        tags.forEach(function (inTag) {
            var total = _this.dataService.isPartially() ? inTag.actual_qty : inTag.tag_details['qty'];
            var data = {};
            Object.assign(data, inTag.tag_details);
            data['qty'] = total;
            stockInHand.push(data);
        });
        this.nodes = stockInHand;
    };
    SummaryPage.prototype.addToDistinct = function (data) {
        var value = data[this.filterField];
        var index = this.distinct.findIndex(function (t) { return t.value === value; });
        if (value && index === -1) {
            this.distinct.push({ value: value });
        }
    };
    SummaryPage.prototype.configurePage = function (value) {
        if (value) {
            this.sku_type = this.dataService.skuType;
            this.title = value.title;
            this.component_descriptors = value.components_descriptor;
            var table_conf = __WEBPACK_IMPORTED_MODULE_7__ministore_utils__["a" /* MUtils */].getComponentConfig('tree_table', this.component_descriptors);
            if (table_conf) {
                this.segments = table_conf.segments;
                this.headerConf = table_conf.header_conf;
                this.calculate_field = table_conf.calculate_field;
                this.datePickerConf = table_conf.date_picker_conf;
                var filterConf = table_conf.filter_conf;
                if (filterConf) {
                    this.filterField = filterConf.filter_field;
                    this.filterFieldName = filterConf.filter_field_name;
                }
            }
        }
    };
    SummaryPage.prototype.sendScanEvent = function (event) {
    };
    SummaryPage.prototype.ionViewDidLoad = function () {
        var element = this.elementRef.nativeElement.querySelector('input');
        if (element) {
            // this.renderer.invokeElementMethod(element, 'focus', []);
        }
        this.initEventListeners();
        var conf = this.navParams.data.conf;
        this.configurePage(conf);
        this.initTreeModel();
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('treeTable'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_6__index__["f" /* TreeTableComp */])
    ], SummaryPage.prototype, "treeTable", void 0);
    SummaryPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'summary-page',
            template: __WEBPACK_IMPORTED_MODULE_5__summary_page_template__["a" /* SUMMARY_PAGE_TEMPLATE */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* Events */],
            __WEBPACK_IMPORTED_MODULE_4__providers_store_data_service__["a" /* StoreDataService */], __WEBPACK_IMPORTED_MODULE_0__angular_core__["Renderer"], __WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"]])
    ], SummaryPage);
    return SummaryPage;
}());

//# sourceMappingURL=summary-page.js.map

/***/ }),

/***/ 1633:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NewGroupPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__providers_store_data_service__ = __webpack_require__(998);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__ = __webpack_require__(365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_reader_dist_providers_scanner_listener__ = __webpack_require__(89);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__models_sku_config__ = __webpack_require__(364);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__new_group_page_template__ = __webpack_require__(1634);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__index__ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ministore_utils__ = __webpack_require__(39);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};













/**
 * Generated class for the NewScanPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */
var NewGroupPage = /** @class */ (function () {
    function NewGroupPage(navCtrl, navParams, logger, dataPro, scannerSvc, appState, navProvider, dataProvider) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.logger = logger;
        this.dataPro = dataPro;
        this.scannerSvc = scannerSvc;
        this.appState = appState;
        this.navProvider = navProvider;
        this.dataProvider = dataProvider;
        this.title = '';
        this.parentStoreLocation = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["b" /* StoreLocation */]({});
        this.viewConfig = {
            hasChildren: true,
            hasLocation: true,
            hasPartialEntry: true,
            userInputs: [
                {
                    type: 'text',
                    inputFor: 'actual_qty'
                },
                {
                    type: 'text',
                    inputFor: 'rack_no'
                }
            ]
        };
        this.setModel();
    }
    NewGroupPage.prototype.setModel = function () {
        this.disableControllers = false;
        var data = this.navParams.data.data;
        var config = this.navParams.data.conf;
        this.configurePage(config);
        this.setup(data);
    };
    NewGroupPage.prototype.setup = function (data) {
        var newTag = data.tag;
        var existingTag = this.dataPro.getGroupTag(newTag.tag_id.code);
        this.newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](newTag);
        this.currentParentTag = this.newTag;
        if (existingTag) {
            this.groupTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */](existingTag);
        }
        else {
            this.groupTag = this.createGroupTag();
        }
        this.initCheckBoxes(this.groupTag);
        this.currentParentTag.tag_details['added_datetime'] = this.getDate();
        if (this.newTag.tag_details['qty']) {
            this.newTag.actual_qty = Number(this.newTag.tag_details['qty']);
        }
        this.storeLocation = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["b" /* StoreLocation */]({ rack_no: '', label: '' });
        this.parentStoreLocation = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["b" /* StoreLocation */]({ rack_no: '', label: '' });
        this.dataPro.setCurrentPartiallyTag(this.groupTag);
        this.dataPro.setPartiallyOpen();
        this.startAutomatedProcess();
    };
    NewGroupPage.prototype.initCheckBoxes = function (tag) {
        tag.children.forEach(function (childTag) {
            childTag['value'] = true;
        });
    };
    NewGroupPage.prototype.ionViewDidLoad = function () {
        var _this = this;
        if (!this.currentParentTag) {
            this.disableChildTagScanners = true;
        }
        this.disable_ok = true;
        this.scannerSubscription = this.scannerSvc.scannerEventPublisher().subscribe(function (res) {
            _this.handleScanEvent(res);
        });
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].ReceivedScanItem, function (res, time) {
            _this.handleScanEvent(res);
        });
    };
    NewGroupPage.prototype.handleScanEvent = function (res) {
        if (res && res.data && res.topic) {
            var topic = res.topic;
            if (__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].ScanParentLocation === topic) {
                this.parentStoreLocation = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["b" /* StoreLocation */]({});
                Object.assign(this.parentStoreLocation, res.data);
            }
            else if (__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].NewChildReceived === topic) {
                var tag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({});
                tag.tag_id.type = 'qrcode';
                tag.tag_id.code = res.data['id'];
                tag.tag_details = res.data;
                tag.actual_qty = Number(tag.tag_details['qty']);
                this.newTag = tag;
                if (this.sku_type === 'group') {
                    this.currentParentTag = this.newTag;
                    this.startAutomatedProcess();
                    this.disable_add = false;
                }
            }
        }
    };
    NewGroupPage.prototype.addChildTag = function () {
        this.acceptScanned();
        // this.currentParentTag.addChild(this.newTag);
        this.disable_ok = true;
        this.disable_add = true;
    };
    NewGroupPage.prototype.ionViewWillUnload = function () {
        if (this.scannerSubscription) {
            this.scannerSubscription.unsubscribe();
        }
        this.dataPro.setPartiallyClose();
    };
    NewGroupPage.prototype.openScanner = function (topic) {
        this.scannerSvc.startScan(topic);
    };
    NewGroupPage.prototype.configurePage = function (config) {
        if (config) {
            this.sku_type = this.dataPro.skuType;
            this.displaySelectColumn = (this.sku_type === 'group' && this.dataPro.appType === 'OUT');
            this.child_comp_confs = config.components_descriptor;
            this.common_columns = config.common_columns;
            this.enablePartiallySelect = config.partially_select;
            this.editorConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('editor_conf', this.child_comp_confs);
            this.parentTagConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('parent_tag_editor_conf', this.child_comp_confs);
            this.view_controllers = config.view_controllers;
            var sku_detail_conf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('sku_details', this.child_comp_confs);
            this.tableConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getComponentConfig('table_conf', this.child_comp_confs);
            this.sku_config = new __WEBPACK_IMPORTED_MODULE_8__models_sku_config__["a" /* SKUConfig */](sku_detail_conf);
            this.title = config.title ? config.title : '';
            this.add_btn_config = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getButtonConfig('accept_scanned', this.view_controllers);
            this.issue_btn_config = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getButtonConfig('adding_confirmation', this.view_controllers);
        }
    };
    NewGroupPage.prototype.addNewParentTag = function () {
        var tagId = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["d" /* TagId */]({ code: '11', type: '', process_type: 'manual' });
        this.newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({ tag_id: tagId, actual_qty: 200 });
    };
    NewGroupPage.prototype.addNewChildTag = function () {
        this.disable_ok = false;
        var newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({});
        newTag.tag_id.type = 'manual';
        newTag.tag_id.code = 'm_' + __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getTimeId();
        newTag.tag_id.process_type = 'manual';
        newTag.source = this.dataPro.appType;
        newTag.subject_id = this.dataPro.currentStationId;
        if (this.currentParentTag) {
            var temp = {};
            Object.assign(temp, this.currentParentTag.tag_details);
            newTag.tag_details = temp;
        }
        else {
            newTag.tag_details = {};
        }
        this.newTag = newTag;
        this.disableControllers = false;
    };
    NewGroupPage.prototype.createGroupTag = function () {
        var newTag = new __WEBPACK_IMPORTED_MODULE_3__models_store_data_model__["c" /* Tag */]({});
        newTag.tag_id.type = 'manual';
        newTag.tag_id.code = 'm_g_' + __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getTimeId();
        newTag.tag_id.process_type = 'manual';
        newTag.source = this.dataPro.appType;
        newTag.subject_id = this.dataPro.currentStationId;
        newTag.tag_details = {};
        return newTag;
    };
    NewGroupPage.prototype.addNewStoreLocationToParent = function () {
        this.currentParentTag.tag_details['line'] = this.parentStoreLocation.rack_no;
    };
    NewGroupPage.prototype.issueTag = function () {
        this.copyCommonsToGroupTag();
        this.groupTag.tag_details['added_datetime'] = this.getDate();
        if (this.enablePartiallySelect && this.dataPro.skuType === 'group' && this.dataPro.appType === 'OUT') {
            this.updateTag(this.groupTag);
        }
        else {
            this.dataPro.addTag(this.groupTag);
        }
        this.navCtrl.pop();
        this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_' + this.sku_type, this.currentParentTag);
        this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, this.currentParentTag);
    };
    NewGroupPage.prototype.updateTag = function (tag) {
        var checked = tag.children.filter(function (c) { return (c['value'] === true); });
        var unChecked = tag.children.filter(function (c) { return (c['value'] === false); });
        var outTag = tag;
        var updateTag = tag;
        outTag.children = checked;
        updateTag.children = unChecked;
        this.dataPro.addTag(outTag);
        this.dataPro.updateTag(updateTag.tag_id.code, updateTag);
    };
    NewGroupPage.prototype.getDate = function () {
        var date = {
            ts: new Date().getTime(),
            offset: new Date().getTimezoneOffset()
        };
        this.logger.debug(date);
        return date;
    };
    NewGroupPage.prototype.acceptScanned = function () {
        this.newTag.tag_details['added_datetime'] = this.getDate();
        this.newTag.tag_details['line'] = this.storeLocation.rack_no;
        this.disableControllers = true;
        this.newTag.source = this.dataPro.appType;
        this.newTag.subject_id = this.dataPro.currentStationId;
        this.groupTag.addChild(this.newTag, (this.dataPro.appType === 'IN'));
    };
    NewGroupPage.prototype.addQty = function (numValue) {
        this.newTag.actual_qty = numValue + 1;
    };
    NewGroupPage.prototype.reduceQty = function (numValue) {
        this.newTag.actual_qty = numValue - 1;
    };
    NewGroupPage.prototype.goToNextView = function (tag, action) {
        var viewConf = __WEBPACK_IMPORTED_MODULE_12__ministore_utils__["a" /* MUtils */].getControllerConfig(action, this.view_controllers);
        if (viewConf.next_view_ref && tag) {
            var next_view_ref = viewConf.next_view_ref;
            tag['action'] = action;
            tag['app_type'] = this.dataPro.appType;
            this.navProvider.nextView(next_view_ref, tag);
        }
    };
    NewGroupPage.prototype.startAutomatedProcess = function () {
        var _this = this;
        if (this.add_btn_config.action_type === 'auto') {
            setTimeout(function () {
                _this.addChildTag();
            }, (this.add_btn_config.waiting_time) * 1000);
        }
        if (this.issue_btn_config.action_type === 'auto') {
            setTimeout(function () {
                _this.issueTag();
            }, (this.issue_btn_config.waiting_time) * 1000);
        }
    };
    NewGroupPage.prototype.copyCommonsToGroupTag = function () {
        var _this = this;
        if (this.common_columns) {
            if (this.groupTag && this.groupTag.children.length > 0) {
                this.common_columns.forEach(function (column) {
                    _this.groupTag.tag_details[column] = _this.groupTag.children[0].tag_details[column];
                });
            }
        }
    };
    NewGroupPage.prototype.onSearch = function (query) {
        var _this = this;
        this.dataProvider.onSearchSKUDetails(query).subscribe(function (data) {
            if (data) {
                data['topic'] = __WEBPACK_IMPORTED_MODULE_6__providers_store_event_service__["a" /* StoreEvent */].NewChildReceived;
                _this.handleScanEvent(data);
            }
        });
    };
    NewGroupPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'new-group-page',
            template: __WEBPACK_IMPORTED_MODULE_10__new_group_page_template__["a" /* NEW_GROUP_PAGE_TEMPLATE */],
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_5_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_2__providers_store_data_service__["a" /* StoreDataService */], __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_reader_dist_providers_scanner_listener__["a" /* ScannerListenerProvider */],
            __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */], __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__["a" /* NavigationManager */], __WEBPACK_IMPORTED_MODULE_11__index__["b" /* MiniStoreDataProvider */]])
    ], NewGroupPage);
    return NewGroupPage;
}());

//# sourceMappingURL=new-group-page.js.map

/***/ }),

/***/ 1634:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NEW_GROUP_PAGE_TEMPLATE; });
/**
 * Created by shadeeka on 6/8/18.
 */
var NEW_GROUP_PAGE_TEMPLATE = "\n<!--<ion-header class=\"store-menubar-header\">\n    <common-main-header [title]=\"title\"></common-main-header>\n</ion-header>\n<ion-content class=\"main-content\" no-padding>\n    <div class=\"grid-wrapper\">\n        <ion-grid class=\"main-grid\">\n            <ion-row class=\"custom-data-row\">\n                <ion-col col-12 col-md-5 col-lg-5>\n                    <ion-row>\n                        <sku-tag-comp [data]=\"currentParentTag\" [config]=\"sku_config\" (onSearch)=\"onSearch($event)\"></sku-tag-comp>\n                    </ion-row>\n                    <ion-row *ngIf=\"parentTagConf && parentStoreLocation\" class=\"parent-editor\">\n                        <ion-col *ngFor=\"let label of parentTagConf.labels\">\n                            <ion-label fixed class=\"form-label-ctm\">{{label.display_name}}</ion-label>\n                        </ion-col>\n                        <ion-col>\n                            <ion-input class=\"form-filed\" type=\"text\" [(ngModel)]=\"parentStoreLocation.line\"\n                                       [disabled]=\"disableControllers\" placeholder=\"line\"></ion-input>\n                        </ion-col>\n                        <ion-col>\n                            <button ion-button class=\"scanner-btn\" (click)=\"openScanner('ScanLocation')\">\n                                <ion-icon name=\"ios-barcode-outline\"></ion-icon>\n                            </button>\n                        </ion-col>\n                    </ion-row>\n                </ion-col>\n                <ion-col col-12 col-md-7 col-lg-7>\n                    <div class=\"info-section\">\n                        <ion-row class=\"header-row\">\n                            <ion-col><h4 class=\"header-text\">Add Child Tag</h4></ion-col>\n                            <ion-col>\n                                <button ion-button class=\"scanner-btn\" [disabled]=\"disableChildTagScanners\"\n                                 (click)=\"openScanner('NewChildReceived')\">\n                                    <ion-icon name=\"ios-barcode-outline\"></ion-icon>\n                                </button>\n                                <button ion-button class=\"add-btn\" (click)=\"addNewChildTag()\">\n                                    <ion-icon name=\"add\"></ion-icon>\n                                </button>\n                            </ion-col>\n                        </ion-row>\n                        <div class=\"cal-height pad-top-1\">\n                             <ion-row *ngFor=\"let label of editorConf.labels\">\n                                <ion-col>\n                                    <ion-label fixed class=\"form-label-ctm\">{{label.display_name}}</ion-label>\n                                </ion-col>\n                                <ion-col>\n                                    <ion-input type=\"number\" class=\"form-filed\" [(ngModel)]=\"newTag[label.label_name]\"\n                                               [disabled]=\"disableControllers\"></ion-input>\n                                </ion-col>\n                                <ion-col *ngIf=\"label.type === 'number'\">\n                                    <button ion-button class=\"calc-btn\"\n                                            (click)=\"addQty(newTag.actual_qty)\" [disabled]=\"disableControllers\">\n                                        <ion-icon name=\"add\"></ion-icon>\n                                    </button>\n                                    <button ion-button class=\"calc-btn\"\n                                            (click)=\"reduceQty(newTag.actual_qty)\" [disabled]=\"disableControllers\">\n                                        <ion-icon name=\"remove\"></ion-icon>\n                                    </button>\n                                </ion-col>\n                                <ion-col *ngIf=\"label.type !== 'number'\">\n                                </ion-col>\n                            </ion-row>\n                        </div>\n                        <ion-row class=\"border-top\">\n                            <ion-col></ion-col>\n                            <ion-col class=\"footer-col\">\n                                <button ion-button class=\"custom-btn\" (click)=\"addChildTag()\" [disabled]=\"disable_add\"\n                                 *ngIf=\"add_btn_config.visibility\">{{add_btn_config.display_name}}\n                                </button>\n                            </ion-col>\n                        </ion-row>\n                    </div>\n                </ion-col>\n            </ion-row>\n            <ion-row class=\"custom-data-row\">\n                <ion-col>\n                    <div class=\"info-section border-bottom-row\">\n                        <ion-row class=\"header-row\">\n                            <ion-col><h4 class=\"header-text\">{{tableConf.title}}</h4></ion-col>\n                            <ion-col></ion-col>\n                        </ion-row>\n                        <div *ngIf=\"groupTag && tableConf\"class=\"custom-scroll-content\">\n                            <ion-row class=\"child-tag-header\">\n                            <ion-col col-1 *ngIf=\"enablePartiallySelect\"></ion-col>\n                                <ion-col *ngFor=\"let column of tableConf.columns\">\n                                    <h5 class=\"header-data\">{{column.display_name}}</h5></ion-col>\n                                <ion-col class=\"action-col\"></ion-col>\n                            </ion-row>\n                            <ion-row class=\"bdr-bottom\" *ngFor=\"let tag of groupTag.children;let i = index\">\n                                <ion-col col-1 *ngIf=\"enablePartiallySelect\" class=\"table-data check-box-custom\">\n                                <ion-checkbox item-end [(ngModel)]=\"tag.value\"></ion-checkbox></ion-col>\n                                <ion-col class=\"table-data\" *ngFor=\"let column of tableConf.columns\">\n                                    <p *ngIf=\"column.type === 'text'\" class=\"table-text\">{{tag.tag_details[column.label_name]}}</p>\n                                     <p *ngIf=\"column.type === 'date'\" class=\"table-text\">\n                                        {{tag.tag_details[column.label_name].ts | date:\"hh/mm/yyyy hh:mm a\"}}</p></ion-col>\n                                <ion-col class=\"action-col\">\n                                    <ion-icon ion-button name=\"md-create\" (click)=\"goToNextView(tag ,'row_click')\"\n                                     class=\"action-icon\"></ion-icon>\n                                </ion-col>\n                            </ion-row>\n                        </div>\n                        <ion-row class=\"border-top\">\n                            <ion-col></ion-col>\n                            <ion-col class=\"footer-col\">\n                                <button ion-button class=\"custom-btn\" (click)=\"issueTag()\"\n                                 *ngIf=\"issue_btn_config.visibility\">{{issue_btn_config.display_name}}</button>\n                            </ion-col>\n                        </ion-row>\n                    </div>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>\n<ion-footer class=\"store-menubar-header\">\n<ion-navbar>\n<common-header-comp header_title=\"samples\"></common-header-comp>\n</ion-navbar>\n</ion-footer>-->\n";
//# sourceMappingURL=new-group-page-template.js.map

/***/ }),

/***/ 1635:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TransactionLogPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__providers_transaction_service__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__transaction_log_template__ = __webpack_require__(1636);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ministore_utils__ = __webpack_require__(39);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__models_nc_smart_table_models__ = __webpack_require__(1000);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6____ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__providers_master_data_service__ = __webpack_require__(55);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__models_filterModel__ = __webpack_require__(366);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__models_Item__ = __webpack_require__(214);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_jquery__ = __webpack_require__(208);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_jquery__);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};













window['jQuery'] = __WEBPACK_IMPORTED_MODULE_12_jquery__;
window['$'] = __WEBPACK_IMPORTED_MODULE_12_jquery__;
var TransactionLogPage = /** @class */ (function () {
    function TransactionLogPage(navCtrl, navParams, txService, alertCtr, toastCtrl, masterDataService, appState, loadingCtrl) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.txService = txService;
        this.alertCtr = alertCtr;
        this.toastCtrl = toastCtrl;
        this.masterDataService = masterDataService;
        this.appState = appState;
        this.loadingCtrl = loadingCtrl;
        this.initialFilters = {};
        this.columns = [];
        this.rows = [];
        this.total = 0;
        this.distinctMap = {};
        this.filters = [];
        this.selectedFilterValuesMap = {};
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
        this.subscribers = [];
        this.allRows = [];
        this.paging = {
            page_num: 1,
            page_size: 8
        };
        this.totalCount = 0;
        this.dropdownList = new __WEBPACK_IMPORTED_MODULE_10__models_filterModel__["a" /* FilterListModel */]({});
        this.dropdownSettings = {};
        this.smartTable = null;
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
    }
    TransactionLogPage.prototype.presentLoading = function () {
        this.loader = this.loadingCtrl.create({
            content: 'Please wait...'
        });
        this.loader.present();
    };
    TransactionLogPage.prototype.dismissLoading = function () {
        if (this.loader) {
            this.loader.dismissAll();
        }
    };
    TransactionLogPage.prototype.selectAllFilterTags = function () {
        if (!this.selectAll) {
            this.selectAll = true;
        }
        else {
            this.selectAll = false;
        }
    };
    TransactionLogPage.prototype.viewTable = function (store, dateRange, paging, currentKey) {
        var _this = this;
        this.showEmptyMsg = false;
        this.presentLoading();
        var selectedMap = {};
        if (this.selectedFilterValuesMap) {
            Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
                var array = _this.selectedFilterValuesMap[key];
                if (array && array.length > 0) {
                    var mappedArray = array.map(function (item) { return item.itemName; });
                    selectedMap[key] = mappedArray;
                }
            });
        }
        var filters = this.tableConfig.filtersStr;
        this.showLog = false;
        this.txService.getTransactionLog(store, dateRange, paging, selectedMap, filters).then(function (data) {
            _this.dismissLoading();
            if (data) {
                _this.rows = data.logs;
                _this.data = data.data;
                _this.total = data.total_qty;
                _this.totalCount = data.total_count;
                if ((!_this.rows) || _this.rows.length === 0) {
                    _this.showEmptyMsg = true;
                }
                _this.distinctMap = data.filter_details;
                _this.tableConfig.rows = _this.rows;
                _this.setDropDownSettings();
                _this.tableConfig.distinctItemsMap = _this.distinctMap;
                var temp = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
                if (currentKey === 'init') {
                    _this.initialFilters = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.distinctMap);
                }
                _this.dropdownList.setAllLists(temp, _this.selectedFilterValuesMap, currentKey, _this.initialFilters);
                _this.showLog = true;
            }
            else {
                _this.showEmptyMsg = true;
            }
        }).catch(function (reason) {
        });
    };
    TransactionLogPage.prototype.ionViewDidLoad = function () {
        var data = this.navParams.get('conf');
        this.configurePage(data);
        var start = new Date();
        start.setHours(0, 0, 0, 0);
        var end = new Date();
        end.setHours(23, 59, 59, 999);
        var dateRange = {
            start: start.getTime(),
            end: end.getTime()
        };
        this.selectedDateRange = dateRange;
        this.viewTable(this.dataSource, dateRange, this.paging, 'init');
        var self = this;
        var s1 = this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_9__providers_store_event_service__["a" /* StoreEvent */].OFFLINE, function (res) {
            self.smartTable.disableEditDelete();
        });
        var s2 = this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_9__providers_store_event_service__["a" /* StoreEvent */].ONLINE, function (res) {
            self.smartTable.enableEditDelete();
        });
        this.subscribers.push(s1);
        this.subscribers.push(s2);
    };
    TransactionLogPage.prototype.ionViewDidLeave = function () {
        var _this = this;
        try {
            this.subscribers.forEach(function (val) {
                if (val) {
                    _this.appState.unsubscribeMe(val);
                }
            });
        }
        catch (e) {
            // this.logger.debug(e);
        }
    };
    TransactionLogPage.prototype.deleteItem = function (row) {
        var _this = this;
        var tempRow = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(row);
        var tx_id = tempRow.tx_id;
        var key = tempRow.key;
        var qty = Number(tempRow.actual_qty);
        tempRow.details = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(tempRow);
        var item = new __WEBPACK_IMPORTED_MODULE_11__models_Item__["a" /* Item */](tempRow);
        this.txService.doDeleteItem(tx_id, qty, key, item).then(function (data) {
            if (data) {
                _this.total = _this.total - qty;
                _this.smartTable.deleteRow();
                var alert_1 = _this.alertCtr.create({
                    title: 'Deleted',
                    subTitle: 'Record deleted'
                });
                _this.resetPaging(tx_id, key);
                alert_1.present();
                setTimeout(function () {
                    alert_1.dismiss();
                }, 1000);
            }
            else {
                var message = _this.alertCtr.create({
                    title: 'Warning!',
                    subTitle: 'There are not enough quantities for delete this item!',
                    buttons: ['Ok'],
                    cssClass: 'errorMsg'
                });
                message.present();
            }
        });
    };
    TransactionLogPage.prototype.resetPaging = function (tx_id, key) {
        /*let rIndex = this.rows.findIndex(tR => tR.tx_id === tx_id && tR.key === key);
        if (rIndex > -1) {
         this.rows.slice(rIndex, 1);
         }*/
        if (this.rows.length === 0 && this.paging.page_num > 0) {
            this.onPageChange({ page: (this.paging.page_num - 1) });
        }
    };
    TransactionLogPage.prototype.setDropDownSettings = function () {
        var _this = this;
        this.filters.forEach(function (filter) {
            _this.dropdownSettings[filter.name] = {
                text: filter.title,
                enableSearchFilter: true,
                classes: 'myclass custom-class',
                badgeShowLimit: 1,
                singleSelection: false
            };
        });
    };
    TransactionLogPage.prototype.configurePage = function (data) {
        if (!data) {
            return;
        }
        var tools = data.tools;
        if (tools) {
            this.tools = Object.assign(this.tools, tools);
        }
        this.title = data.title;
        this.subTitle = data.sub_title;
        this.dataSource = data.data_source;
        if (this.masterDataService.getSwitchStatus()) {
            var floor = this.masterDataService.getCurrentFloor();
            this.dataSource = data.data_source + '_' + floor;
            this.subTitle = this.subTitle + ' - ' + floor.toUpperCase();
        }
        var componentDescriptors = data.component_descriptors;
        var tableConf = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getComponentConfig('nc-smart-table', componentDescriptors);
        this.datePickerConfig = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getComponentConfig('nc-date-picker', componentDescriptors);
        if (tableConf) {
            this.tableConfig = new __WEBPACK_IMPORTED_MODULE_5__models_nc_smart_table_models__["b" /* TableConfig */](tableConf);
            this.filters = this.tableConfig.filters;
            if (this.tableConfig.paging) {
                this.paging = Object.assign(this.paging, this.tableConfig.paging);
            }
        }
    };
    TransactionLogPage.prototype.setDateSelect = function (dateRange) {
        this.selectedDateRange = dateRange;
    };
    TransactionLogPage.prototype.onRangeSelect = function (dateRange) {
        this.selectedDateRange = dateRange;
        this.showLog = false;
        this.viewTable(this.dataSource, dateRange, this.paging, 'init');
    };
    TransactionLogPage.prototype.setFilterers = function (currentFilter) {
        var _this = this;
        this.paging.page_num = 1;
        var temp = {};
        Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
            var selected = _this.selectedFilterValuesMap[key];
            var tempSelected = [];
            if (selected) {
                selected.forEach(function (s) {
                    tempSelected.push(s.itemName);
                });
                temp[key] = tempSelected;
            }
        });
        this.refresh(currentFilter);
        // this.smartTable.setFilters(temp);
        // this.getFiltered(this.rows);
    };
    TransactionLogPage.prototype.refresh = function (currentFilter) {
        var data = this.navParams.get('conf');
        // this.configurePage(data);
        var start = new Date();
        start.setHours(0, 0, 0, 0);
        var end = new Date();
        end.setHours(23, 59, 59, 999);
        var dateRange = this.selectedDateRange ? this.selectedDateRange : {
            start: start.getTime(),
            end: end.getTime()
        };
        this.viewTable(this.dataSource, dateRange, this.paging, currentFilter);
    };
    TransactionLogPage.prototype.setTotal = function (value) {
        // this.total = value;
    };
    TransactionLogPage.prototype.editRow = function (editData) {
        var _this = this;
        var row = editData.row;
        var columns = editData.editable_columns;
        if (columns && columns.length > 0) {
            var inputs_1 = [];
            columns.forEach(function (column) {
                inputs_1.push({
                    name: column.name,
                    placeholder: column.title,
                    type: column.type,
                    value: row[column.name]
                });
            });
            var alert_2 = this.alertCtr.create({
                title: 'Editor',
                inputs: inputs_1,
                buttons: [
                    {
                        text: 'Cancel',
                    },
                    {
                        text: 'Ok',
                        handler: function (data) {
                            if (data) {
                                var errors_1 = [];
                                columns.forEach(function (col) {
                                    if (!(data.hasOwnProperty(col.name) && data[col.name] !== '')) {
                                        errors_1.push(col.title);
                                    }
                                });
                                if (errors_1.length > 0) {
                                    _this.showErrorToast('Invalid ' + errors_1[0]);
                                    return false;
                                }
                                else {
                                    _this.updateTable(row, data);
                                    return true;
                                }
                            }
                            else {
                                var errors_2 = [];
                                columns.forEach(function (col) {
                                    errors_2.push(col.title);
                                });
                                _this.showErrorToast('Invalid ' + errors_2.join(','));
                                return false;
                            }
                        }
                    }
                ]
            });
            alert_2.present();
        }
    };
    TransactionLogPage.prototype.showErrorToast = function (data) {
        var toast = this.toastCtrl.create({
            message: data,
            duration: 3000,
            position: 'top'
        });
        toast.onDidDismiss(function () {
        });
        toast.present();
    };
    TransactionLogPage.prototype.updateTable = function (row, data) {
        var _this = this;
        var tx_id = row.tx_id;
        var id = Number(row._id);
        var oldQty = Number(row.actual_qty);
        var newQty = Number(data.actual_qty);
        var index = this.data.findIndex(function (item) { return item._id === id; });
        var itemToSave = {};
        if (index > -1) {
            itemToSave = this.data[index];
            if (data.actual_qty) {
                itemToSave['actual_qty'] = newQty;
                delete data.actual_qty;
            }
            itemToSave['details'] = Object.assign(itemToSave['details'], data);
        }
        this.txService.editItem(tx_id, oldQty, newQty, itemToSave).then(function (result) {
            if (result) {
                var updated = Object.assign(row, data);
                updated['actual_qty'] = newQty;
                updated['old_qty'] = oldQty;
                _this.total = _this.total - oldQty + newQty;
                _this.smartTable.editRow(updated);
                var alert_3 = _this.alertCtr.create({
                    title: 'Successful',
                    subTitle: 'Record edited'
                });
                alert_3.present();
                setTimeout(function () {
                    alert_3.dismiss();
                }, 2000);
            }
            else {
                var message = _this.alertCtr.create({
                    title: 'Warning!',
                    subTitle: 'There are not enough quantities for edit this item',
                    buttons: ['Ok'],
                    cssClass: 'errorMsg'
                });
                message.present();
            }
        });
    };
    TransactionLogPage.prototype.removeInActiveFilters = function () {
        var _this = this;
        Object.keys(this.selectedFilterValuesMap).forEach(function (key) {
            if (_this.selectedFilterValuesMap[key].length === 0) {
                delete _this.selectedFilterValuesMap[key];
            }
        });
    };
    TransactionLogPage.prototype.getFiltered = function (data) {
        var _this = this;
        var filteredData = [];
        this.removeInActiveFilters();
        var filtered = Object.keys(this.selectedFilterValuesMap);
        var distinctMap = {};
        data.forEach(function (el) {
            var flag = false;
            if (filtered.length > 0) {
                var matchedCount_1 = 0;
                filtered.forEach(function (filter) {
                    var selectedTags = _this.selectedFilterValuesMap[filter];
                    var index = selectedTags.findIndex(function (s) { return s.itemName === el[filter]; });
                    if (index > -1) {
                        matchedCount_1++;
                    }
                });
                if (matchedCount_1 === filtered.length) {
                    filteredData.push(el);
                    flag = true;
                }
            }
            else {
                filteredData.push(el);
                flag = true;
            }
            if (flag) {
                _this.filters.forEach(function (filter) {
                    var name = filter.name;
                    if (el[name] && el[name] !== '' && distinctMap[name] && distinctMap[name].indexOf(el[name]) === -1) {
                        distinctMap[name].push(el[name]);
                    }
                    else if (el[name] && el[name] !== '' && !distinctMap[name]) {
                        var distinct = [];
                        distinct.push(el[name]);
                        distinctMap[name] = distinct;
                    }
                });
            }
        });
        this.distinctMap = distinctMap;
        this.dropdownList.setAllLists(__WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(this.distinctMap), this.selectedFilterValuesMap, 'init', {});
        return filteredData;
    };
    TransactionLogPage.prototype.onPageChange = function (event) {
        if (event) {
            var range = {
                page_size: this.paging.page_size,
                page_num: (event.page + 1)
            };
            this.showLog = false;
            this.viewTable(this.dataSource, this.selectedDateRange, range, 'init');
        }
    };
    TransactionLogPage.prototype.OnItemDeSelect = function (currentKey) {
    };
    TransactionLogPage.prototype.onSelectAll = function (items) {
    };
    TransactionLogPage.prototype.onDeSelectAll = function (items) {
    };
    TransactionLogPage.prototype.getRowsCount = function () {
    };
    TransactionLogPage.prototype.getPage = function (array, pageNum, perPage) {
        var temp = __WEBPACK_IMPORTED_MODULE_4__ministore_utils__["a" /* MUtils */].getDeepCopy(array);
        var start = (pageNum - 1) * perPage;
        var end = start + perPage;
        var count = array.length;
        if (start < 0 || count <= start) {
            return array;
        }
        else if (count <= end) {
            return temp.slice(start, count);
        }
        else {
            return temp.slice(start, end);
        }
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('smartTable'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_6____["c" /* NcSmartTable */])
    ], TransactionLogPage.prototype, "smartTable", void 0);
    TransactionLogPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'page-transaction-log',
            template: __WEBPACK_IMPORTED_MODULE_3__transaction_log_template__["a" /* TRANSACTION_LOG_PAGE_HTML */],
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_2__providers_transaction_service__["a" /* TransactionService */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["x" /* ToastController */],
            __WEBPACK_IMPORTED_MODULE_7__providers_master_data_service__["a" /* MasterDataService */], __WEBPACK_IMPORTED_MODULE_8__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["k" /* LoadingController */]])
    ], TransactionLogPage);
    return TransactionLogPage;
}());

//# sourceMappingURL=transaction-log.js.map

/***/ }),

/***/ 1636:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TRANSACTION_LOG_PAGE_HTML; });
/**
 * Created by nisitha athukoarala on 5/3/18.
 */
var TRANSACTION_LOG_PAGE_HTML = "\n<ion-header>\n    <common-main-header [title]=\"title\" [tools]=\"tools\" [shift_disabled]=\"tools?.shift\"\n                        [header_disabled]=\"tools?.line\"></common-main-header>\n</ion-header>\n<ion-content class=\"offwhite-bg main-content\">\n    <div class=\"grid-wrapper\">\n        <ion-grid no-padding>\n            <ion-row class=\"summary-row\">\n                <ion-col>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n        <ion-grid class=\"main-grid top-margin-content store-pg-height\" no-padding>\n            <ion-row class=\"pg-hdr\">\n                <img *ngIf=\"subTitle !== 'OUT'\" class=\"in-icon pad-lef-15\" src=\"assets/imgs/in.png\">\n                <img *ngIf=\"subTitle === 'OUT'\" class=\"out-icon pad-lef-15\" src=\"assets/imgs/out.png\">\n                <div class=\"pgr-hdr-txt pad-lef-15\">{{subTitle}}</div>\n                <div class=\"r-align-flx\"></div>\n                <nc-date-picker #ncDatePicker class=\"store-seg\" (onSelect)=\"setDateSelect($event)\"\n                                (onRangeSelect)=\"onRangeSelect($event)\" [config]=\"datePickerConfig\"></nc-date-picker>\n            </ion-row>\n            <ion-row class=\"sto-fltr-sec\" *ngIf=\"filters && filters.length\">\n                <ion-col col-2 *ngFor='let item of filters'>\n                    <angular2-multiselect [data]=\"dropdownList.getList(item.name)\"\n                                          [(ngModel)]=\"selectedFilterValuesMap[item.name]\"\n                                          [settings]=\"dropdownSettings[item.name]\"\n                                          (onSelect)=\"setFilterers(item.name)\"\n                                          (onDeSelect)=\"setFilterers(item.name)\"\n                                          (onSelectAll)=\"setFilterers(item.name)\"\n                                          (onDeSelectAll)=\"setFilterers(item.name)\">\n                    </angular2-multiselect>\n                </ion-col>\n            </ion-row>\n            <ion-row class=\"smrt-tbl-wrpper\" *ngIf=\"!showEmptyMsg\">\n                <nc-smart-table #smartTable *ngIf=\"showLog && !showEmptyMsg\"\n                                [config]=\"tableConfig\" (onTotalChange)=\"setTotal($event)\"\n                                (onRowDelete)=\"deleteItem($event)\"\n                                (onRowEdit)=\"editRow($event)\"></nc-smart-table>\n            </ion-row>\n            <ion-row class=\"empty-container\" *ngIf=\"showEmptyMsg\">\n                <ion-col class=\"empty-col\">\n                    <div class=\"message-container\">\n                        <div class=\"message-overlay\">\n                            <div class=\"message-inner\">\n                                <ion-icon class=\"data-empty-icon\" name=\"alert\"></ion-icon>\n                                No data available\n                            </div>\n                        </div>\n                    </div>\n                </ion-col>\n            </ion-row>\n            <ion-row class=\"pagin-row\">\n                <p-paginator [rows]=\"paging.page_size\" [totalRecords]=\"totalCount\"\n                             pageLinkSize=\"5\" (onPageChange)=\"onPageChange($event)\"></p-paginator>\n            </ion-row>\n            <ion-row class=\"tol-row\">\n                <div class=\"tol-lbl\">Total</div>\n                <div class=\"tol-valu\">{{total}}</div>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>";
//# sourceMappingURL=transaction-log-template.js.map

/***/ }),

/***/ 1637:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StoreGradingPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_text_to_speech__ = __webpack_require__(212);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_util__ = __webpack_require__(70);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_util___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_util__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_reader_dist_providers_scanner_listener__ = __webpack_require__(89);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__component_keypad_ion_digit_keyboard_cmp__ = __webpack_require__(1014);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__providers_shared_data_service__ = __webpack_require__(1002);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__ = __webpack_require__(369);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__store_grading_template__ = __webpack_require__(1638);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11____ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__ncinga_sp_nsp_app_core_dist_providers_business_context__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__providers_transaction_service__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__providers_store_domain_header_service__ = __webpack_require__(213);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__ministore_utils__ = __webpack_require__(39);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__providers_master_data_service__ = __webpack_require__(55);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__providers_offline_data_resolver_service__ = __webpack_require__(1017);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__providers_scanning_transaction_service__ = __webpack_require__(1018);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};






















var StoreGradingPage = /** @class */ (function () {
    function StoreGradingPage(tts, toastCtrl, logger, navParams, navProvider, sharedDataService, readerSvc, dataProvider, authSvc, bctxProvider, txService, appCntx, appState, storeDomainSrvc, alertCtr, masterDataService, offlineDataResolverService, test) {
        this.tts = tts;
        this.toastCtrl = toastCtrl;
        this.logger = logger;
        this.navParams = navParams;
        this.navProvider = navProvider;
        this.sharedDataService = sharedDataService;
        this.readerSvc = readerSvc;
        this.dataProvider = dataProvider;
        this.authSvc = authSvc;
        this.bctxProvider = bctxProvider;
        this.txService = txService;
        this.appCntx = appCntx;
        this.appState = appState;
        this.storeDomainSrvc = storeDomainSrvc;
        this.alertCtr = alertCtr;
        this.masterDataService = masterDataService;
        this.offlineDataResolverService = offlineDataResolverService;
        this.test = test;
        this.next_view_ref = '';
        this.this_view_conf = {};
        this.categoryCounts = {};
        this.anyNumber = '';
        this._selectedItemType = { icon: '', label: '', value: '' };
        this._selectedCatOne = {};
        this._selectedCatTwo = {};
        this.lastIndex = -1;
        this.lastOptionIdx = -1;
        this.quantityOptions = [];
        this.loading_msg = false;
        this.pgTitle = '';
        this.sub_header = true;
        this.setting_option = false;
        this.grade_data_set = [];
        this.bulk_record_arr = [];
        this.bulk_record_arr_temp = [];
        this.tools = {};
        this.sizeQuantityMap = {};
        this.disableButtons = true;
        this.currentKey = '';
        /*
         scanner reader
         */
        this.customOptions = {
            alert: false,
            types: {
                Code128: true,
                Code39: true,
                Code93: true,
                CodaBar: true,
                DataMatrix: true,
                EAN13: true,
                EAN8: true,
                ITF: true,
                QRCode: true,
                UPCA: true,
                UPCE: true,
                PDF417: true,
                Aztec: true
            }
        };
        // keyboard options
        this.keyboardSettings = {
            align: 'center',
            // width: '85%',
            visible: false,
            leftActionOptions: {
                iconName: 'ios-backspace-outline',
                fontSize: '1.4em'
            },
            rightActionOptions: {
                iconName: 'ios-checkmark-circle-outline',
                // text: '.',
                fontSize: '1.3em'
            },
            roundButtons: false,
            showLetters: true,
            swipeToHide: true,
            theme: 'dusk'
        };
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
        this.count = 0;
        this.readerSvc.setOptions(this.customOptions);
    }
    StoreGradingPage.prototype.ionViewDidLoad = function () {
        this.currentUser = this.authSvc.getLoggedInUser();
        this.listenToScanner();
        this.this_view_conf = this.navParams.get('conf');
        /*
         loading page master data set
         */
        this.disableButtons = true;
        this.pageDataLoader();
        /*
         qty option arr data set
         */
        if (this.view_model && this.view_model.qty_list.length > 0) {
            this.quantityOptions = this.view_model.qty_list;
        }
        else {
            if (this.this_view_conf && !Object(__WEBPACK_IMPORTED_MODULE_5_util__["isUndefined"])(this.this_view_conf.view_params)) {
                this.quantityOptions = this.this_view_conf.view_params.sec_categories.options.slice(0);
                this.title = this.this_view_conf.title;
                if (this.masterDataService.getSwitchStatus()) {
                    var floor = this.masterDataService.getCurrentFloor();
                    this.title = this.this_view_conf.title + ' - ' + floor.toUpperCase();
                }
                this.view_model.setQtyList(this.quantityOptions);
            }
        }
    };
    StoreGradingPage.prototype.initSizes = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var dataSource;
            return __generator(this, function (_a) {
                dataSource = this.domainHeaderConfig ? this.domainHeaderConfig.data_source : '';
                this.masterDataService.getSizeList(this.data_set.plan_data).then(function (result) {
                    var data = result.list;
                    var key = result.key;
                    _this.currentKey = key;
                    _this.loading_msg = true;
                    _this.view_model.setGrades([]);
                    _this.clickedGradings = [];
                    try {
                        _this.loading_msg = false;
                        var gradList = data;
                        //  this.logger.info('MINI STORE : grade list loaded', gradList);
                        _this.view_model.setGrades(gradList);
                        if (!_this.data_set.plan_data) {
                            _this.tempGradeList = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(data);
                            _this.tempKey = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(key);
                            _this.setRemainingStock(key, gradList).then(function (data1) {
                                _this.grade_data_set = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.view_model.grades);
                            });
                        }
                        else {
                            _this.grade_data_set = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.view_model.grades);
                        }
                        _this._selectedCatTwo = _this.quantityOptions[0];
                        if (_this.view_model.value === 0) {
                            _this.view_model.setValue(_this.quantityOptions[0].value);
                        }
                        else {
                            var qtyIndex_1 = _this.quantityOptions.findIndex(function (item) { return item.value === _this.view_model.value; });
                            // this.logger.trace('qty index', qtyIndex);
                            setTimeout(function () {
                                _this.slides.slideTo(qtyIndex_1, 400);
                            }, 400);
                        }
                        var index = _this.quantityOptions.findIndex(function (item) { return item.type === 'any'; });
                        if (index > -1) {
                            _this._hasCustomSize = true;
                        }
                    }
                    catch (e) {
                        _this.loading_msg = true;
                        _this.logger.error(e);
                    }
                }, function (err) {
                    _this.loading_msg = true;
                });
                return [2 /*return*/];
            });
        });
    };
    StoreGradingPage.prototype.updateSizes = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var dataSource;
            return __generator(this, function (_a) {
                dataSource = this.domainHeaderConfig ? this.domainHeaderConfig.data_source : '';
                this.masterDataService.getSizeList(this.data_set.plan_data).then(function (result) {
                    var data = result.list;
                    var key = result.key;
                    _this.currentKey = key;
                    _this.loading_msg = true;
                    var oldList = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.view_model.grades);
                    _this.view_model.setGrades([]);
                    // this.clickedGradings = [];
                    try {
                        _this.loading_msg = false;
                        var gradList = data;
                        //  this.logger.info('MINI STORE : grade list loaded', gradList);
                        _this.view_model.updateAllGrades(oldList, gradList);
                        if (!_this.data_set.plan_data) {
                            _this.tempGradeList = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(data);
                            _this.tempKey = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(key);
                            _this.setRemainingStock(key, gradList).then(function (data1) {
                                _this.grade_data_set = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.view_model.grades);
                            });
                        }
                        else {
                            _this.grade_data_set = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.view_model.grades);
                        }
                        _this._selectedCatTwo = _this.quantityOptions[0];
                        if (_this.view_model.value === 0) {
                            _this.view_model.setValue(_this.quantityOptions[0].value);
                        }
                        else {
                            var qtyIndex_2 = _this.quantityOptions.findIndex(function (item) { return item.value === _this.view_model.value; });
                            // this.logger.trace('qty index', qtyIndex);
                            setTimeout(function () {
                                _this.slides.slideTo(qtyIndex_2, 400);
                            }, 400);
                        }
                        var index = _this.quantityOptions.findIndex(function (item) { return item.type === 'any'; });
                        if (index > -1) {
                            _this._hasCustomSize = true;
                        }
                    }
                    catch (e) {
                        _this.loading_msg = true;
                        _this.logger.error(e);
                    }
                }, function (err) {
                    _this.loading_msg = true;
                });
                return [2 /*return*/];
            });
        });
    };
    /*
     scanner subscriber
     */
    StoreGradingPage.prototype.listenToScanner = function () {
        try {
            this.readerSvc.scannerEventPublisher().subscribe(function (res) {
                //  this.logger.trace(res.topic, 'topic');
                var data = res.data;
                // this.logger.trace(res);
            });
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    StoreGradingPage.prototype.selectCatOne = function (opt, i) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var addResult, tempModel, btnConf, btnConf, btnConf, gradList, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.clickedGradings) {
                            this.clickedGradings = [];
                        }
                        // ################################### MINI STORE SPECIFIC ####################################
                        this.initTransaction();
                        // ############################################################################################
                        opt['active'] = !opt['active'];
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 5, , 6]);
                        if (!opt['active']) return [3 /*break*/, 3];
                        this.btn_click_view_disabled = false;
                        if (this.view_model.value === 0) {
                            this.view_model.setValue(this.quantityOptions[0].value);
                        }
                        return [4 /*yield*/, this.addItem('size', opt.name, this.view_model.value, opt.value, opt.ct_id)];
                    case 2:
                        addResult = _a.sent();
                        if (addResult && addResult.status || (addResult && addResult.type === 'no_network')) {
                            tempModel = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(this.view_model);
                            this.clickedGradings.push({ name: opt.name, value: Number(tempModel.value) });
                            /*if (!this.data_set.plan_data ) {
                                this.view_model.grades.forEach(grade => {
                                    if (grade.name === opt.name) {
                                        let newVal = Number(grade.rc) - Number(this.view_model.value);
                                        if (newVal > -1) {
                                            grade.rc = newVal;
                                        }
                                    }
                                });
                            }*/
                            //  this.logger.debug('this changeCustomQuantity', opt, i, this._selectedCatTwo.value);
                            this._selectedCatOne = opt;
                            this.lastIndex = i;
                            this.lastOptionIdx = i;
                            this.categoryCounts[opt['name']] = this.categoryCounts[opt['name']] + this._selectedCatTwo.value;
                            this.view_model.setRecentGrade(opt['name']);
                            if (!this.this_view_conf.bulk_record) {
                                if (this.this_view_conf.next_view_ref && this.this_view_conf.next_page) {
                                    if (this.this_view_conf.next_view_ref === 'page_order_end') {
                                        this.view_model.updateGrades(opt['name']);
                                        this.view_model.increment();
                                        this.view_model.setReferenceData([]);
                                        // this.logger.debug('output', this.view_model.grades, this.data_set['model']);
                                        this.sharedDataService.updateSharedDataService(this.data_set['btnConf']['id'], this.view_model.value, this.view_model);
                                        btnConf = this.data_set['btnConf'];
                                        if (!Object(__WEBPACK_IMPORTED_MODULE_5_util__["isUndefined"])(this.data_set['btnConf']['undo_times'])) {
                                            //    this.logger.debug('undo set');
                                            this.undo_terms = this.clickedGradings ? this.clickedGradings.length : 0;
                                        }
                                        this.navProvider.exitToRoot(null);
                                    }
                                    else {
                                        this.next();
                                    }
                                }
                                else if (this.this_view_conf.one_click) {
                                    this.view_model.updateGrades(opt['name']);
                                    this.view_model.increment();
                                    //    this.logger.debug('output', this.view_model.grades, this.data_set['model']);
                                    this.sharedDataService.updateSharedDataService(this.data_set['btnConf']['id'], this.view_model.value, new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["a" /* StoreClassificationModel */](this.view_model));
                                    btnConf = this.data_set['btnConf'];
                                    if (!Object(__WEBPACK_IMPORTED_MODULE_5_util__["isUndefined"])(this.data_set['btnConf']['undo_times'])) {
                                        //   this.logger.debug('undo set');
                                        this.undo_terms = this.clickedGradings ? this.clickedGradings.length : 0;
                                    }
                                    this.view_disabled_btn_upper = true;
                                }
                                else {
                                    this.speakOut(this.view_model.value + ' ' + this.view_model.recent_grade_type + '   Added');
                                    this.view_model.updateGrades(opt['name']);
                                    this.view_model.increment();
                                    //   this.logger.debug('output', this.view_model.grades, this.data_set['model']);
                                    this.sharedDataService.updateSharedDataService(this.data_set['btnConf']['id'], this.view_model.value, this.view_model);
                                    btnConf = this.data_set['btnConf'];
                                    if (!Object(__WEBPACK_IMPORTED_MODULE_5_util__["isUndefined"])(this.data_set['btnConf']['undo_times'])) {
                                        //     this.logger.debug('undo set');
                                        this.undo_terms = this.clickedGradings ? this.clickedGradings.length : 0;
                                    }
                                    // this.view_model.decrement(this.view_model.count);
                                }
                            }
                            else {
                                //   this.logger.trace(this.this_view_conf.bulk_record, 'bulk_record');
                                this.speakOut(this.view_model.value + ' ' + this.view_model.recent_grade_type + '   Added');
                                this.view_model.updateGrades(opt['name']);
                                this.view_model.increment();
                                this.view_model.setGroupId(this.random_group_id);
                                gradList = this.view_model.grades;
                                this.view_model.grades = [];
                                gradList.forEach(function (v) {
                                    return _this.view_model.grades.push(Object.assign({}, v));
                                });
                                this.count = this.count + this.view_model.value;
                                this.bulk_record_arr.push(Object.assign({}, new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["c" /* StoreGradingModel */](this.view_model)));
                                if (!Object(__WEBPACK_IMPORTED_MODULE_5_util__["isUndefined"])(this.data_set['btnConf']['undo_times'])) {
                                    // this.logger.debug('undo set');
                                    this.undo_terms = this.clickedGradings ? this.clickedGradings.length : 0;
                                }
                            }
                        }
                        return [3 /*break*/, 4];
                    case 3:
                        this._selectedCatOne = {};
                        _a.label = 4;
                    case 4: return [3 /*break*/, 6];
                    case 5:
                        e_1 = _a.sent();
                        return [3 /*break*/, 6];
                    case 6:
                        this.lastOptionIdx = -1;
                        opt['active'] = false;
                        this.validateButtons();
                        return [2 /*return*/];
                }
            });
        });
    };
    StoreGradingPage.prototype.validateButtons = function () {
        if (this.view_model && this.view_model.count === 0) {
            this.disableButtons = true;
        }
        else {
            this.disableButtons = false;
        }
    };
    StoreGradingPage.prototype.selectCatTwo = function (opt) {
        opt['active'] = !opt['active'];
        if (opt['active']) {
            this._selectedCatTwo = opt;
        }
        else {
            this._selectedCatTwo = {};
        }
    };
    StoreGradingPage.prototype.showKeyboard = function () {
        this.view_disabled_btn_upper = true;
        this.view_disabled = true;
        this.keyboard.show();
    };
    // next lable view
    StoreGradingPage.prototype.nextLable = function () {
        var _this = this;
        try {
            if (!this._selectedItemType) {
                return;
            }
            var idx = this.this_view_conf.view_params.item_types.findIndex(function (item) { return item.value === _this.view_model.recent_grade_type; });
            if (idx < this.this_view_conf.view_params.item_types.length - 1) {
                idx = idx + 1;
            }
            else {
                idx = 0;
            }
            this._selectedItemType = this.this_view_conf.view_params.item_types[idx];
            this.view_model.setRecntGrdnType(this._selectedItemType.value);
            //  this.logger.trace('next', this._selectedItemType.value, this.this_view_conf.view_params.item_types);
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    // previous lable//
    StoreGradingPage.prototype.previousLable = function () {
        var _this = this;
        try {
            if (!this._selectedItemType) {
                return;
            }
            var idx = this.this_view_conf.view_params.item_types.findIndex(function (item) { return item.value === _this.view_model.recent_grade_type; });
            if (idx > 0) {
                idx = idx - 1;
            }
            else {
                idx = this.this_view_conf.view_params.item_types.length - 1;
            }
            this._selectedItemType = this.this_view_conf.view_params.item_types[idx];
            // this.logger.trace('previos', this._selectedItemType.value);
            this.view_model.setRecntGrdnType(this._selectedItemType.value);
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    // Event way
    StoreGradingPage.prototype.numberClick = function (key) {
        try {
            if (this.anyNumber === '') {
                this.anyNumber = this.anyNumber + '' + key;
            }
            else if (this.anyNumber === '00000') {
                this.speakOut('please insert standard value');
                this.anyNumber = '';
                this.keyboard.hide();
                this.view_disabled_btn_upper = false;
            }
            else if (parseInt(this.anyNumber) < 1000) {
                this.anyNumber = this.anyNumber + '' + key;
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    StoreGradingPage.prototype.numberBackSpace = function () {
        this.anyNumber = this.anyNumber.slice(0, -1);
    };
    StoreGradingPage.prototype.hideKeyboard = function (action) {
        var _this = this;
        try {
            var quantityLength = this.this_view_conf.view_params.sec_categories.options.length;
            this.view_disabled_btn_upper = false;
            this.view_disabled = false;
            if (action === 'done') {
                if (this.anyNumber !== '' && parseInt(this.anyNumber) !== 0) {
                    var anyValue = parseInt(this.anyNumber);
                    var index = this.quantityOptions.findIndex(function (item) { return item.type === 'any'; });
                    if (index > -1) {
                        this.quantityOptions.splice(index, 1);
                    }
                    // add new item
                    var newNum = parseInt(this.anyNumber);
                    this.quantityOptions[quantityLength] = {
                        name: newNum.toString(),
                        value: anyValue,
                        type: 'any',
                        color: 'red'
                    };
                    var idx_1 = quantityLength + 1;
                    // this.logger.trace('after add new', idx);
                    this._hasCustomSize = true;
                    this._selectedCatTwo = { name: this.anyNumber, value: anyValue, type: 'any', color: 'red' };
                    this.view_model.setValue(anyValue);
                    // this.dataLoader.storeGradingdata(this.this_view_conf.view_data, this.quantityOptions);
                    this.slides.update(10);
                    setTimeout(function () {
                        _this.slides.slideTo(idx_1 - 1, 400);
                    }, 400);
                    this.anyNumber = '';
                }
                else {
                    this.speakOut('please enter valid quantity');
                    this.anyNumber = '';
                }
                this.keyboard.hide();
            }
            else if (action === 'cancel') {
                this.keyboard.hide();
                this.anyNumber = '';
            }
        }
        catch (e) {
            // console.error('error occurred while hiding keyboard');
        }
    };
    StoreGradingPage.prototype.slideChanged = function () {
        try {
            var quantityLength = this.this_view_conf.view_params.sec_categories.options.length;
            var currentIndex = this.slides.getActiveIndex();
            // this.logger.debug('slider change', currentIndex);
            if (currentIndex > -1) {
                // this._selectedCatTwo = this.quantityOptions[currentIndex];
                this.view_model.setValue(this.quantityOptions[currentIndex].value);
            }
            //  this.logger.debug('slider change....', quantityLength, currentIndex, this._hasCustomSize);
            if (quantityLength > currentIndex) {
                this._hasCustomSize = false;
            }
            else {
                this._hasCustomSize = true;
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    StoreGradingPage.prototype.changeCustomQuantity = function (op) {
        var _this = this;
        try {
            var quantityLength_1 = this.this_view_conf.view_params.sec_categories.options.length;
            var index = this.slides.getActiveIndex();
            if (Object(__WEBPACK_IMPORTED_MODULE_5_util__["isUndefined"])(this.quantityOptions[quantityLength_1])) {
                this.quantityOptions[quantityLength_1] = { name: '', value: 0, type: 'any', color: 'red' };
            }
            if (op === '+' && index > -1) {
                if (parseInt(this.quantityOptions[index]['value']) < 10000) {
                    this.quantityOptions[quantityLength_1]['value'] = this.quantityOptions[index]['value'] + 1;
                }
            }
            else if (op === '-' && index > -1) {
                if (parseInt(this.quantityOptions[index]['value']) > 1) {
                    this.quantityOptions[quantityLength_1]['value'] = this.quantityOptions[index]['value'] - 1;
                }
            }
            this.quantityOptions[quantityLength_1]['name'] = '' + this.quantityOptions[quantityLength_1]['value'];
            this.view_model.setValue(this.quantityOptions[quantityLength_1]['value']);
            this.slides.update(10);
            setTimeout(function () {
                _this.slides.slideTo(quantityLength_1, 400);
            }, 400);
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    StoreGradingPage.prototype.speakOut = function (message) {
        try {
            this.tts.speak(message)
                .then(function () {
            } /*console.log('Success')*/)
                .catch(function (reason) {
            } /*console.log(reason)*/);
            var toast = this.toastCtrl.create({
                message: message,
                duration: 3000,
                position: 'top',
                cssClass: 'success-toast'
            });
            toast.onDidDismiss(function () {
            });
            toast.present();
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    // next method for page navigation //
    StoreGradingPage.prototype.next = function () {
        try {
            if (this.this_view_conf.next_view_ref === 'page_order_end') {
            }
            else {
                // this.logger.debug('data store', this.view_model);
                this.navProvider.nextView(this.this_view_conf.next_view_ref, {
                    data: this.previous_data_set, model: this.view_model,
                    btnConf: this.data_set['btnConf']
                });
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    // undo last update//
    StoreGradingPage.prototype.undoCounting = function () {
        var _this = this;
        try {
            // this.logger.debug('undo terms..', this.undo_terms);
            if (this.undo_terms > 0) {
                if (this.view_model.value > 0 && this.view_model.count) {
                    this.view_disabled_btn_upper = false;
                    this.sharedDataService.updateSharedDataService(this.data_set['btnConf']['id'], -this.view_model.value, this.view_model);
                    var dataModel_1 = this.sharedDataService.getDataSharedDataService(this.data_set['btnConf']['id']);
                    if (dataModel_1.grades.length === 0) {
                        dataModel_1.setGrades(this.grade_data_set);
                    }
                    if (dataModel_1.value === 0) {
                        setTimeout(function () {
                            _this.slides.slideTo(0, 400);
                        }, 400);
                    }
                    var qtyIndex_3 = this.quantityOptions.findIndex(function (item) { return item.value === dataModel_1.value; });
                    // this.logger.trace('qty index', qtyIndex, dataModel.value);
                    setTimeout(function () {
                        _this.slides.slideTo(qtyIndex_3, 400);
                    }, 400);
                    if (dataModel_1.recent_grade_type === null) {
                        var gradeType = this.this_view_conf.view_params.item_types;
                        dataModel_1.setRecntGrdnType(gradeType[0].value);
                        this._selectedItemType = this.this_view_conf.view_params.item_types[0];
                    }
                    else {
                        var qtyIndex1 = this.this_view_conf.view_params.item_types.findIndex(function (item) {
                            return item.value === dataModel_1.recent_grade_type;
                        });
                        this._selectedItemType = this.this_view_conf.view_params.item_types[qtyIndex1];
                    }
                    if (dataModel_1 instanceof __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["c" /* StoreGradingModel */]) {
                        this.view_model = new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["c" /* StoreGradingModel */](this.sharedDataService.getDataSharedDataService(this.data_set['btnConf']['id']));
                    }
                    else if (dataModel_1 instanceof __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["a" /* StoreClassificationModel */]) {
                        this.view_model = new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["a" /* StoreClassificationModel */](this.sharedDataService.getDataSharedDataService(this.data_set['btnConf']['id']));
                    }
                    var btnConf = this.data_set['btnConf'];
                    // todo: find better way to undo
                    // this.view_model.decrement(this.view_model.value);
                    if (this.clickedGradings && this.clickedGradings.length > 0) {
                        var lastActivity_1 = this.clickedGradings[this.clickedGradings.length - 1];
                        var index = this.view_model.grades.findIndex(function (gd) { return gd.name === lastActivity_1.name; });
                        if (index > -1) {
                            this.view_model.grades[index].value = this.view_model.grades[index].value - lastActivity_1.value;
                            dataModel_1.grades[index].value = dataModel_1.grades[index].value - lastActivity_1.value;
                            this.view_model.count = this.view_model.count - lastActivity_1.value;
                            dataModel_1.count = dataModel_1.count - lastActivity_1.value;
                            if (!this.data_set.plan_data) {
                                this.view_model.grades[index].rc = Number(this.view_model.grades[index].rc);
                                dataModel_1.grades[index].rc = Number(dataModel_1.grades[index].rc);
                            }
                            this.txService.editItemQty(lastActivity_1.name, dataModel_1.grades[index].value);
                        }
                        this.clickedGradings.splice(this.clickedGradings.length - 1, 1);
                        if (this.undo_terms === 0) {
                            this.clickedGradings = [];
                        }
                    }
                    this.undo_terms--;
                }
            }
        }
        catch (e) {
            this.logger.error(e);
        }
        if (this.view_model && this.view_model.count === 0) {
            this.disableButtons = true;
        }
        else {
            this.disableButtons = false;
        }
    };
    StoreGradingPage.prototype.resolveStyles = function (dataType) {
        var subjectKey = this.appCntx.getKeySubject();
        var bCTXs = [];
        if (this.data_set.plan_data) {
            var tags_1 = [];
            var combinations_1 = [];
            bCTXs = this.bctxProvider.getAllContexts();
            bCTXs.forEach(function (bCTX) {
                var cTX = bCTX['ctx'] ? bCTX['ctx'] : [];
                var id = '';
                cTX.forEach(function (c) {
                    id = id === '' ? c.v : id + '_' + c.v;
                    tags_1.push(c.v);
                });
                var currentCombination = {
                    'req_id': id,
                    'tags': tags_1,
                    'list_names': [
                        dataType
                    ],
                    'subject_key': subjectKey
                };
                combinations_1.push(currentCombination);
            });
            var body = {
                'query_name': 'get_all_lists',
                'subject_key': subjectKey,
                'combinations': combinations_1.splice(0, 5)
            };
            var response_1 = null;
            return this.dataProvider.getMasterDataList(body).then(function (data) {
                response_1 = data.response;
                return new Promise(function (resolve, reject) {
                    resolve(response_1);
                });
            });
        }
        else {
            return new Promise(function (resolve, reject) {
                resolve({});
            });
        }
    };
    StoreGradingPage.prototype.navigationClick = function (type) {
        var _this = this;
        try {
            if (type === 'cancel') {
                this.navProvider.exitToRoot(null);
            }
            else if (type === 'ok') {
                if (!this.this_view_conf.bulk_record) {
                    if (this.view_model.value !== this._selectedCatTwo.value) {
                    }
                    if (this.this_view_conf.next_view_ref === 'EXIT') {
                        var data = {};
                        data['type'] = 'push';
                        data['next_page'] = this.this_view_conf.next_view_ref;
                    }
                    else if (this.this_view_conf.next_view_ref !== 'page_order_end') {
                        // this.navigationProvider.rootView(this.classOne_selected_list);
                        // this.logger.debug('select View', this.this_view_conf.next_view_ref);
                        var data = {};
                        data['type'] = 'remove_all';
                        data['next_page'] = this.this_view_conf.next_view_ref;
                        this.navProvider.nextView(this.this_view_conf.next_view_ref, {
                            data: this.previous_data_set,
                            model: this.view_model,
                        });
                        // save event in recent list if this is the exit page
                    }
                    else if (this.this_view_conf.next_view_ref === 'page_order_end') {
                        this.logger.trace('end');
                        this.navProvider.exitToRoot(null);
                    }
                }
                else {
                    this.bulk_record_arr.forEach(function (data) {
                        _this.sharedDataService.updateSharedDataService(_this.data_set['btnConf']['id'], data.value, new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["c" /* StoreGradingModel */](data));
                        var btnConf = _this.data_set['btnConf'];
                    });
                    this.view_model.setGradesInit();
                    this.view_model.setValue(0);
                    this.view_model.setRecentGrade(null);
                    this.sharedDataService.UpdateSharedDataServiceOnly(this.data_set['btnConf']['id'], this.view_model);
                    this.navProvider.exitToRoot(null);
                }
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    // view disabled & enabled due to button collection sector//
    StoreGradingPage.prototype.viewUpdate = function (event) {
        this.view_disabled = event.view_disabled;
        this.view_disabled_btn = event.view_disabled;
    };
    /*
     loading page main data set
     */
    StoreGradingPage.prototype.pageDataLoader = function () {
        var _this = this;
        try {
            // ################################### MINI STORE SPECIFIC ####################################
            this.data_set = this.navParams.get('conf');
            this.adding_trough = this.data_set ? this.data_set['adding_trough'] : 'not_gate_pass';
            this.initEventListeners();
            if (!this.data_set['plan_data']) {
                this.showRemainValue = true;
                this.bctxProvider.setModalState(true);
            }
            var tools = this.data_set.tools;
            if (tools) {
                this.tools = Object.assign(this.tools, tools);
            }
            this.domainHeaderConfig = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getComponentConfig('domain_header', this.data_set.component_descriptors);
            this.navigationList = this.data_set.navigation_list;
            // ################################################################################################
            this.first_category_name = this.this_view_conf.first_category_name;
            this.sec_category_name = this.this_view_conf.sec_category_name;
            var qty = this.this_view_conf.view_params.sec_categories.options.slice(0);
            var gradeType = this.this_view_conf.view_params.item_types;
            if (!this.this_view_conf['next_page']) {
                this.view_model = new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["c" /* StoreGradingModel */](this.data_set['model']);
            }
            else if (this.this_view_conf['next_page']) {
                this.view_model = new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["a" /* StoreClassificationModel */](this.data_set['model']);
            }
            if (this.view_model.recent_grade_type === null) {
                this.view_model.setRecntGrdnType(gradeType[0].value);
                this._selectedItemType = this.this_view_conf.view_params.item_types[0];
            }
            else {
                var qtyIndex = this.this_view_conf.view_params.item_types.findIndex(function (item) {
                    return item.value === _this.view_model.recent_grade_type;
                });
                this._selectedItemType = this.this_view_conf.view_params.item_types[qtyIndex];
            }
            if (this.this_view_conf.bulk_record) {
                this.random_group_id = Math.random();
                this.bulk_record_arr_temp = [];
                this.bulk_record_arr_temp.push(Object.assign({}, new __WEBPACK_IMPORTED_MODULE_9__models_btnmodel__["c" /* StoreGradingModel */](this.view_model)));
                // this.logger.trace(this.bulk_record_arr_temp, 'bulk temp arr');
            }
            // this.logger.trace('view model', this.view_model);
            this.currentPagebuttons = this.this_view_conf.view_controllers;
            if (this.data_set.plan_data) {
                this.initSizes();
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    /*
     scanner call method
     */
    StoreGradingPage.prototype.openCamera = function () {
        this.logger.trace('scanner click');
        this.readerSvc.startScan('cncreader');
    };
    /*
     scanner qty set to grading
     */
    StoreGradingPage.prototype.setScannerQty = function (qty) {
        var _this = this;
        try {
            var quantityLength = this.this_view_conf.view_params.sec_categories.options.length;
            var anyValue = parseInt(qty);
            var index = this.quantityOptions.findIndex(function (item) { return item.type === 'any'; });
            if (index > -1) {
                this.quantityOptions.splice(index, 1);
            }
            // add new item
            this.quantityOptions[quantityLength] = { name: qty, value: anyValue, type: 'any', color: 'red' };
            var idx_2 = quantityLength + 1;
            // this.logger.trace('after add new', idx);
            this._hasCustomSize = true;
            this._selectedCatTwo = { name: qty, value: anyValue, type: 'any', color: 'red' };
            this.view_model.setValue(anyValue);
            // this.dataLoader.storeGradingdata(this.this_view_conf.view_data, this.quantityOptions);
            this.slides.update(10);
            setTimeout(function () {
                _this.slides.slideTo(idx_2 - 1, 400);
            }, 400);
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    /*
     grading btn auto detect
     */
    StoreGradingPage.prototype.autoDetectGrading = function (size, qty) {
        try {
            var opt_1;
            var boolVal_1 = false;
            this.view_model.grades.forEach(function (data) {
                if (data.name.toUpperCase() === size.toUpperCase()) {
                    opt_1 = data;
                    boolVal_1 = true;
                    //  this.logger.trace('read data', data, data.name.toUpperCase(), size.toUpperCase(), 'boolVal', boolVal);
                }
            });
            if (boolVal_1) {
                this.setScannerQty(qty);
                this.btn_click_view_disabled = false;
                this._selectedCatOne = opt_1;
                this.categoryCounts[opt_1['name']] = this.categoryCounts[opt_1['name']] + this._selectedCatTwo.value;
                this.view_model.setRecentGrade(opt_1['name']);
                if (this.this_view_conf.next_view_ref && this.this_view_conf.next_page) {
                    this.next();
                }
                else {
                    this.speakOut(this.view_model.value + ' Added');
                    this.view_model.updateGrades(opt_1['name']);
                    this.view_model.increment();
                    // this.logger.debug('output', this.view_model.grades, this.data_set['model']);
                    this.sharedDataService.updateSharedDataService(this.data_set['btnConf']['id'], this.view_model.value, this.view_model);
                    var btnConf = this.data_set['btnConf'];
                    /*this.sharedDataService.sendBackEndEvent({
                     ty: btnConf.event_type,
                     nm: btnConf.data_type, vl: this.view_model.value, cv: 1, ac: []
                     });*/
                    if (!Object(__WEBPACK_IMPORTED_MODULE_5_util__["isUndefined"])(this.data_set['btnConf']['undo_times'])) {
                        this.logger.debug('undo set');
                        this.undo_terms = this.clickedGradings ? this.clickedGradings.length : 0;
                    }
                }
            }
            else {
                this.speakOut('Size is not available...');
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    StoreGradingPage.prototype.clearValues = function () {
        this.count = 0;
        if (this.view_model) {
            this.view_model.count = 0;
            this.view_model.clearGradeValues();
            this.clickedGradings = [];
        }
    };
    StoreGradingPage.prototype.clearPartially = function () {
        this.count = 0;
        if (this.view_model) {
            this.view_model.count = 0;
        }
        this.undo_terms = this.clickedGradings ? this.clickedGradings.length : 0;
    };
    StoreGradingPage.prototype.doTransaction = function (event) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.clearValues();
                        this.validateButtons();
                        this.txService.closeTransaction();
                        if (!(this.adding_trough !== 'gate_pass')) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.txService.doTransaction(null, true).then(function (res) {
                                if (res && res.status === 'offline') {
                                    var alert_1 = _this.alertCtr.create({
                                        title: 'Warning',
                                        subTitle: res.msg
                                    });
                                    alert_1.present();
                                    setTimeout(function () {
                                        alert_1.dismiss();
                                    }, 2000);
                                    _this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_17__providers_store_event_service__["a" /* StoreEvent */].NEW_TRANSACTION, _this.txService.currentTransaction);
                                    _this.goToNextView(event, {});
                                }
                                else {
                                    _this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_17__providers_store_event_service__["a" /* StoreEvent */].NEW_TRANSACTION, _this.txService.currentTransaction);
                                    _this.goToNextView(event, {});
                                    _this.displayMsg(res.msg);
                                    _this.setRemainingStock(_this.currentKey, _this.grade_data_set).then(function (data1) {
                                        _this.grade_data_set = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.view_model.grades);
                                    });
                                }
                            }).catch(function (err) {
                                _this.logger.log(err);
                            })];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 4];
                    case 2: return [4 /*yield*/, this.txService.addTransactionToGatePass().then(function (res) {
                            _this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_17__providers_store_event_service__["a" /* StoreEvent */].NEW_TRANSACTION, _this.txService.currentTransaction);
                            _this.goToNextView(event, {});
                            _this.displayMsg(res.msg);
                        }).catch(function (err) {
                            _this.logger.log(err);
                        })];
                    case 3:
                        _a.sent();
                        _a.label = 4;
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    StoreGradingPage.prototype.displayMsg = function (msg) {
        try {
            var alert_2 = this.alertCtr.create({
                title: 'Success',
                subTitle: msg
            });
            alert_2.present();
            setTimeout(function () {
                alert_2.dismiss();
            }, 2000);
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    StoreGradingPage.prototype.initTransaction = function () {
        var ctx = [];
        if (this.this_view_conf.plan_data) {
            var bctx = this.bctxProvider.getCurrentContext();
            ctx = bctx.ctx;
        }
        else {
            ctx = this.storeDomainSrvc.getCurrentBCTX();
        }
        this.txService.startTransaction(ctx);
    };
    StoreGradingPage.prototype.addItem = function (itemType, itemName, itemQty, actualQty, opsCat) {
        var _this = this;
        return new Promise(function (resolve) {
            var newItem = _this.txService.currentTransaction.createItem(itemType, itemName, itemQty, opsCat);
            _this.txService.validateQty(actualQty + itemQty, newItem, _this.adding_trough).then(function (data) {
                if (data && data.status) {
                    _this.txService.addItem(itemType, itemName, itemQty, opsCat, true, false, true, data.item_details);
                }
                else if (data && data.type === 'no_network') {
                    _this.offlineDataResolverService.handleOffline(itemType, itemName, itemQty, opsCat, _this.adding_trough);
                }
                else {
                    var alert_3 = _this.alertCtr.create({
                        title: 'Failed',
                        subTitle: 'There are not enough quantity left !'
                    });
                    alert_3.present();
                    setTimeout(function () {
                        alert_3.dismiss();
                    }, 2000);
                }
                resolve(data);
            });
        });
    };
    StoreGradingPage.prototype.initEventListeners = function () {
        var _this = this;
        if (this.data_set.plan_data) {
            this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_BUSINESS_CTX_CHANGE, function (res) {
                _this.loading_msg = true;
                _this.initSizes();
                _this.clearValues();
            });
            this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_SUBJECT_CHANGE, function (res) {
                _this.loading_msg = true;
                _this.initSizes();
                _this.clearValues();
            });
            this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_SUBJECT_CHANGE_IN_CACHE, function (res) {
                _this.loading_msg = true;
                _this.initSizes();
                _this.clearValues();
                if (_this.masterDataService.getSwitchStatus()) {
                    var floor = _this.masterDataService.getCurrentFloor();
                    _this.title = _this.this_view_conf.title + ' - ' + floor.toUpperCase();
                }
            });
            this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_17__providers_store_event_service__["a" /* StoreEvent */].GRADING_LIST_LOADED_FOR_PLAND_BCTX, function (res) {
                _this.loading_msg = true;
                _this.initSizes();
                _this.clearValues();
            });
        }
        else {
            this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_17__providers_store_event_service__["a" /* StoreEvent */].CUSTOM_BCTX_SELECTED, function (res) {
                _this.loading_msg = true;
                _this.updateSizes();
                _this.clearPartially();
            });
            this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_17__providers_store_event_service__["a" /* StoreEvent */].BCTX_PARTIALLY_UPDATED, function (res) {
                _this.loading_msg = true;
                _this.updateSizes();
                _this.clearPartially();
            });
            this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_SUBJECT_CHANGE_IN_CACHE, function (res) {
                if (_this.masterDataService.getSwitchStatus()) {
                    var floor = _this.masterDataService.getCurrentFloor();
                    _this.title = _this.this_view_conf.title + ' - ' + floor.toUpperCase();
                }
            });
        }
    };
    StoreGradingPage.prototype.goToNextView = function (viewName, data) {
        if (viewName && viewName !== '') {
            this.navProvider.exitToRoot(data);
        }
    };
    StoreGradingPage.prototype.initSizeList = function () {
        this.loading_msg = true;
        this.initSizes();
        this.clearValues();
    };
    StoreGradingPage.prototype.setRemainingStock = function (key, gradeList) {
        var _this = this;
        var details = {};
        var ctx = this.storeDomainSrvc.getCurrentBCTX();
        var id = '';
        ctx.forEach(function (ci) {
            if (ci.type === 'dynamic') {
            }
            else {
                id = id && id !== '' ? id + '-' + ci.v : ci.v;
            }
            details[ci.k] = ci.v;
        });
        return new Promise((function (resolve) {
            _this.txService.getRemainingStock(id, details, gradeList, _this.adding_trough).then(function (data) {
                if (data.status) {
                    var dataArry_1 = data.data;
                    _this.view_model.grades.forEach(function (grade) {
                        var index = dataArry_1.findIndex(function (d) { return d.name === grade.name; });
                        if (index > -1) {
                            grade.rc = dataArry_1[index].qty;
                        }
                        else {
                            grade.rc = 0;
                            if (_this.data_set && !_this.data_set.plan_data) {
                                grade.hide = true;
                            }
                        }
                    });
                    _this.showRemainValue = true;
                }
                else {
                    _this.showRemainValue = false;
                }
                resolve(data);
            });
        }));
    };
    StoreGradingPage.prototype.resolveItem = function (item) {
        var _this = this;
        this.txService.validateQty(item.actual_qty, item, 'no-gate-pass').then(function (data) {
            if (data && data.status) {
                item.validationPassed = true;
                item.validated = true;
                var currentTx = _this.txService.currentTransaction;
                if (item.tx_id === currentTx.tx_id) {
                    _this.txService.currentTransaction.resolveOfflineItem(item);
                    _this.setRemainingStock(_this.currentKey, _this.grade_data_set).then(function (data1) {
                        _this.grade_data_set = __WEBPACK_IMPORTED_MODULE_18__ministore_utils__["a" /* MUtils */].getDeepCopy(_this.view_model.grades);
                    });
                }
            }
            else {
                item.validationPassed = false;
                item.validated = true;
            }
        });
    };
    StoreGradingPage.prototype.resetSizeList = function () {
        this.view_model.setGrades([]);
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])(__WEBPACK_IMPORTED_MODULE_7__component_keypad_ion_digit_keyboard_cmp__["a" /* IonDigitKeyboardCmp */]),
        __metadata("design:type", Object)
    ], StoreGradingPage.prototype, "keyboard", void 0);
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["u" /* Slides */]),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["u" /* Slides */])
    ], StoreGradingPage.prototype, "slides", void 0);
    StoreGradingPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'store-grading-page',
            template: __WEBPACK_IMPORTED_MODULE_10__store_grading_template__["a" /* STORE_GRADIN_TEMPLATE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__ionic_native_text_to_speech__["a" /* TextToSpeech */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["x" /* ToastController */],
            __WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__["a" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_8__providers_shared_data_service__["a" /* StoreSharedDataProvider */],
            __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_reader_dist_providers_scanner_listener__["a" /* ScannerListenerProvider */],
            __WEBPACK_IMPORTED_MODULE_11____["b" /* MiniStoreDataProvider */],
            __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_app_core_dist__["f" /* AuthProvider */],
            __WEBPACK_IMPORTED_MODULE_13__ncinga_sp_nsp_app_core_dist_providers_business_context__["a" /* BusinessContext */],
            __WEBPACK_IMPORTED_MODULE_14__providers_transaction_service__["a" /* TransactionService */],
            __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */],
            __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */],
            __WEBPACK_IMPORTED_MODULE_16__providers_store_domain_header_service__["a" /* StoreDomainHeaderService */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */],
            __WEBPACK_IMPORTED_MODULE_19__providers_master_data_service__["a" /* MasterDataService */],
            __WEBPACK_IMPORTED_MODULE_20__providers_offline_data_resolver_service__["a" /* OfflineDataResolverService */],
            __WEBPACK_IMPORTED_MODULE_21__providers_scanning_transaction_service__["a" /* ScanningTransactionService */]])
    ], StoreGradingPage);
    return StoreGradingPage;
}());

//# sourceMappingURL=store-grading.js.map

/***/ }),

/***/ 1638:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return STORE_GRADIN_TEMPLATE_HTML; });
/**
 * Created by dilshan on 5/3/18.
 */
var STORE_GRADIN_TEMPLATE_HTML = "\n<ion-header>\n<common-main-header [title]=\"title\" [tools]=\"tools\"></common-main-header>\n</ion-header>\n<ion-content class=\"offwhite-bg main-content\">\n   <ion-grid no-padding >\n      <ion-row class=\"summary-row\">\n         <ion-col *ngIf=\"this_view_conf?.order_heading && this_view_conf.plan_data\">\n            <core-domain-header></core-domain-header>\n         </ion-col>\n         <ion-col *ngIf=\"this_view_conf?.order_heading && !this_view_conf.plan_data\">\n            <store-domain-header [config]=\"domainHeaderConfig\" (onHeaderSelect)=\"initSizeList()\"\n             (onHeaderReset)=\"resetSizeList()\"></store-domain-header>\n         </ion-col>\n      </ion-row>\n   </ion-grid>\n   <ion-grid  class=\"main-grid top-margin-content\" no-padding>\n      <ion-row no-padding class=\"grading-body\">\n         <ion-col class=\"bottum-border bdr-rght bdr-top height-100\" col-12 col-lg-3 col-md-3 no-padding>\n            <ion-row no-padding class=\"bottum-border\">\n               <div class=\"category-title r-align-flx\">{{sec_category_name}}</div>\n               <div end class=\"sub-hdr-btn\" no-padding>\n                  <button [disabled]=\"this_view_conf?.advance_view\" class=\"help-category-btn\"\n                  ion-button end icon-right icon-only clear (click)=\"showKeyboard()\">\n                     <ion-icon name=\"add\"></ion-icon>\n                  </button>\n               </div>\n               <ion-col *ngIf=\"false\" end class=\"sub-hdr-btn-rght\" no-padding>\n                  <button class=\"help-category-btn\" ion-button end (click)=\"addGrading()\" icon-right icon-only clear>\n                     <ion-icon name=\"md-settings\"></ion-icon>\n                  </button>\n               </ion-col>\n            </ion-row>\n            <ion-row no-padding *ngIf=\"quantityOptions.length>0\" class=\"header-btn itm-slect\">\n                  <button [disabled]=\"arrow_disabled\" class=\"header-button btn-count-type\" ion-button\n                    icon-left clear (click)=\"previousLable()\">\n                     <ion-icon name=\"md-arrow-dropleft\"></ion-icon>\n                  </button>\n                  <button class=\"header-button btn-count-type label-btn r-align-flx\" ion-button clear>\n                     <ion-icon [name]=\"_selectedItemType.icon\"></ion-icon>\n                     {{view_model?.recent_grade_type}}\n                  </button>\n                  <button [disabled]=\"arrow_disabled\" class=\"header-button btn-count-type\" ion-button\n                    clear (click)=\"nextLable()\">\n                     <ion-icon name=\"md-arrow-dropright\"></ion-icon>\n                  </button>\n            </ion-row>\n            <ion-row class=\"slider-style\" >\n               <ion-slides pager (ionSlideDidChange)=\"slideChanged()\" >\n                  <ion-slide *ngFor=\"let qty of quantityOptions\">\n                     <button class=\"second-category-btn slide-btn btn-count-type count-btn\"\n                     (click)=\"selectCatTwo(qty)\" [ngClass]=\"qty.color\">{{qty.name}}</button>\n                  </ion-slide>\n               </ion-slides>\n            </ion-row>\n            <ion-row class=\"footer-btn\">\n               <ion-col col-6>\n                  <button ion-button [disabled]=\"this_view_conf?.advance_view\"\n                     class=\"help-category-btn red-btn\" (click)=\"changeCustomQuantity('-')\">-1\n                  </button>\n               </ion-col>\n               <ion-col col-6>\n                  <button ion-button [disabled]=\"this_view_conf?.advance_view\"\n                     class=\"help-category-btn green-btn\" (click)=\"changeCustomQuantity('+')\">\n                  +1\n                  </button>\n               </ion-col>\n            </ion-row>\n            <ion-digit-keyboard\n            [align]=\"keyboardSettings.align\"\n            [width]=\"keyboardSettings.width\"\n            [visible]=\"keyboardSettings.visible\"\n            [leftActionOptions]=\"keyboardSettings.leftActionOptions\"\n            [rightActionOptions]=\"keyboardSettings.rightActionOptions\"\n            [roundButtons]=\"keyboardSettings.roundButtons\"\n            [showLetters]=\"keyboardSettings.showLetters\"\n            [swipeToHide]=\"keyboardSettings.swipeToHide\"\n            [theme]=\"keyboardSettings.theme\"\n            (numberClick)=\"numberClick($event)\"\n            (leftActionClick)=\"numberBackSpace()\"\n            (rightActionClick)=\"hideKeyboard('done')\">\n            <ion-toolbar no-border-bottom>\n               <ion-title class=\"cutom_number\">{{anyNumber}}</ion-title>\n               <ion-buttons start>\n                  <button ion-button (click)=\"hideKeyboard('cancel')\">Cancel</button>\n               </ion-buttons>\n            </ion-toolbar>\n            </ion-digit-keyboard>\n         </ion-col>\n         <ion-col class=\"bottum-border spret-bdr bdr-top height-100\" col-12 col-lg-9 col-md-9>\n            <ion-row no-padding class=\"bottum-border left-border\">\n               <div class=\"category-title r-align-flx\">\n                  <div>{{first_category_name}}</div>\n               </div>\n               <!-- Button Label -->\n               <div class=\"sub-hdr-btn-lable counting-btn-lable\" no-padding>\n                  <span class=\"btn-type-lbl\">{{this_view_conf?.label}}</span>\n               </div>\n               <!-- Button Label -->\n               <div *ngIf=\"!this_view_conf?.bulk_record\" class=\"sub-hdr-btn-lable counting-btn-lable\" no-padding>\n                  <span>{{view_model?.count}}</span>\n               </div>\n               <div *ngIf=\"this_view_conf?.bulk_record\" class=\"sub-hdr-btn-lable counting-btn-lable\" no-padding>\n                  <span class=\"counting-btn-lable\" >{{count}}</span>\n               </div>\n               <ion-col color=\"c2\" class=\"left-border sub-hdr-btn\" no-padding >\n                  <button class=\"help-category-btn\" (click)=\"undoCounting()\" ion-button  icon-only clear>\n                     <ion-icon name=\"md-undo\" clear></ion-icon>\n                  </button>\n               </ion-col>\n               <ion-col *ngIf=\"this_view_conf?.scanner\" color=\"c3\" class=\"left-border sub-hdr-btn\" no-padding>\n                  <button class=\"help-category-btn\" (click)=\"openCamera()\" ion-button  icon-only clear>\n                     <ion-icon name=\"md-barcode\" clear></ion-icon>\n                  </button>\n               </ion-col>\n               <ion-col *ngIf=\"this_view_conf?.setting_option\" color=\"c2\" class=\"left-border sub-hdr-btn-rght\" no-padding>\n                  <button class=\"help-category-btn\" ion-button (click)=\"addGrading()\" icon-only clear>\n                     <ion-icon name=\"md-settings\"></ion-icon>\n                  </button>\n               </ion-col>\n            </ion-row>\n            <ion-row *ngIf=\"!loading_msg\" class=\"left-border hght-calc grd-size-list\">\n                <ion-col col-6 col-lg-3 col-md-3 [hidden]=\"option.hide\"\n                 *ngFor=\"let option of view_model?.grades; index as i\">\n                  <button [disabled]=\"view_disabled_btn_upper\" ion-button [outline]=\"lastOptionIdx != i \"\n                  class=\"first-category-btn blue-btn\" (click)=\"selectCatOne(option,i)\">\n                  <ion-badge class=\"qty-bag\"><span class=\"actu\">{{option.value}}</span>\n                   <span class=\"actu\" *ngIf=\"showRemainValue\"> / <b>{{option.rc}}</b></span> </ion-badge>\n                  {{option.name}}\n                  </button>\n                  </ion-col>\n            </ion-row>\n             <ion-row *ngIf=\"loading_msg\" no-padding class=\"data-loader-msg\">\n            {{first_category_name}} Loading <span class=\"d\">.</span><span class=\"d d-2\">.</span><span class=\"d d-3\">.</span>\n            <span class=\"d d-4\">.</span><span class=\"d d-5\">.</span>\n            </ion-row>\n         </ion-col>\n      </ion-row>\n   </ion-grid>\n</ion-content>\n<ion-footer  no-padding>\n   <ion-navbar  no-padding>\n      <ion-grid  no-padding>\n         <nc-page-navigator *ngIf=\"navigationList\" [navigationList]=\"navigationList\"></nc-page-navigator>\n         <ion-row justify-content-end class=\"right-pdn\">\n            <ion-col *ngFor=\"let button of currentPagebuttons \" col-5 col-lg-2 col-md-3 class=\"right-pdn\">\n               <button [ngClass]=\"button.action_type\" ion-button [hidden]=\"!button.visibility\" [disabled]=\"disableButtons\"\n               (click)=\"doTransaction(button.next_view_ref)\" class=\"page-button help-category-btn right-pdn\">\n               {{button.button_name}}\n               </button>\n            </ion-col>\n         </ion-row>\n      </ion-grid>\n   </ion-navbar>\n</ion-footer>\n";
//# sourceMappingURL=store-grading-template.js.map

/***/ }),

/***/ 1639:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ACTIVITY_LOG_NEW_PAGE_HTML; });
/**
 * Created by nisitha athukoarala on 5/3/18.
 */
var ACTIVITY_LOG_NEW_PAGE_HTML = "\n<ion-header>\n    <common-main-header [title]=\"title\" [tools]=\"tools\" [shift_disabled]=\"tools?.shift\" [header_disabled]=\"tools?.line\"></common-main-header>\n</ion-header>\n<ion-content class=\"offwhite-bg main-content\">\n    <div class=\"grid-wrapper\">\n        <ion-grid no-padding>\n            <ion-row class=\"summary-row\">\n                <ion-col>\n\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n        <ion-grid class=\"main-grid top-margin-content\" no-padding>\n            <ion-row class=\"pg-hdr\">\n                <img *ngIf=\"subTitle !== 'OUT'\" class=\"in-icon\" src=\"assets/imgs/in.png\">\n                <img *ngIf=\"subTitle === 'OUT'\" class=\"out-icon\" src=\"assets/imgs/out.png\">\n                <div class=\"pgr-hdr-txt\">{{subTitle}}</div>\n                <div class=\"r-align-flx\"></div>\n                <nc-date-picker #ncDatePicker class=\"store-seg width-50\"\n                                (onRangeSelect)=\"onRangeSelect($event)\" [config]=\"datePickerConfig\"></nc-date-picker>\n                <ion-col class=\"filter-col\" col-2 *ngFor='let item of filters'>\n                    <angular2-multiselect [data]=\"dropdownList.getList(item.name)\"\n                                          [(ngModel)]=\"selectedFilterValuesMap[item.name]\"\n                                          [settings]=\"dropdownSettings[item.name]\"\n                                          (onSelect)=\"setFilterers()\"\n                                          (onDeSelect)=\"setFilterers()\"\n                                          (onSelectAll)=\"setFilterers()\"\n                                          (onDeSelectAll)=\"setFilterers()\">\n                    </angular2-multiselect>\n                </ion-col>\n            </ion-row>\n <div style=\"height:100%; overflow: auto;\" *ngIf=\"(tables && tables.length > 0)\">\n   <ion-grid class=\"activity-log-tbl\" *ngFor=\"let tx of tables\">\n     <ion-row class=\"date-row\">\n       <div class=\"item\">Date<span>{{tx.datetime | date : 'MMM d, y'}}</span></div>\n       <div class=\"item\">Date<span>{{tx.datetime | date : 'h:mm a'}}</span></div>\n       <div class=\"push-r\"></div>\n       <div class=\"item\" *ngFor=\"let subHeader of subTableHeaders\">{{subHeader.display_name}}<span class=\"bdg\">{{tx[subHeader.name]}}</span></div>\n     </ion-row>\n     <ion-row class=\"hdr\">\n       <ion-col *ngFor=\"let hdr of tx.config.columns\">{{hdr.title}}</ion-col>\n     </ion-row>\n     <ion-row class=\"drow\" *ngFor=\"let drow of tx.config.rows\">\n       <ion-col *ngFor=\"let hdr of tx.config.columns\">{{drow[hdr.name]}}</ion-col>\n     </ion-row>\n   </ion-grid>\n </div>\n            <ion-row class=\"empty-container\" *ngIf=\"((!tables) || tables && tables.length === 0)\">\n                <ion-col class=\"empty-col\">\n                    <div class=\"message-container\">\n                        <div class=\"message-overlay\">\n                            <div class=\"message-inner\">\n                                <ion-icon class=\"data-empty-icon\" name=\"alert\"></ion-icon>No data available</div>\n                        </div>\n                    </div>\n                </ion-col>\n            </ion-row>\n\n        </ion-grid>\n    </div>\n\n</ion-content>\n";
//# sourceMappingURL=activity-log-new.template.js.map

/***/ }),

/***/ 1640:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StockInhandPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index__ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_store_event_service__ = __webpack_require__(88);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__providers_store_data_service__ = __webpack_require__(998);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__providers_transaction_service__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__stock_in_hand_template__ = __webpack_require__(1641);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__providers_master_data_service__ = __webpack_require__(55);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};










var StockInhandPage = /** @class */ (function () {
    function StockInhandPage(navCtrl, navParams, logger, appService, txService, dataService, masterDataService, renderer, elementRef, comService, appCtx, loadingCtrl) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.logger = logger;
        this.appService = appService;
        this.txService = txService;
        this.dataService = dataService;
        this.masterDataService = masterDataService;
        this.renderer = renderer;
        this.elementRef = elementRef;
        this.comService = comService;
        this.appCtx = appCtx;
        this.loadingCtrl = loadingCtrl;
        this.selectedRows = [];
        this.segments = [];
        this.total = 0;
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
        this.tableConfMap = new Map();
        this.keys = [];
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false,
            apps: false
        };
    }
    StockInhandPage.prototype.presentLoading = function () {
        this.loader = this.loadingCtrl.create({
            content: 'Please wait...'
        });
        this.loader.present();
    };
    StockInhandPage.prototype.dismissLoading = function () {
        if (this.loader) {
            this.loader.dismissAll();
        }
    };
    StockInhandPage.prototype.initEventListeners = function () {
        var _this = this;
        this.appService.unsubscribe(__WEBPACK_IMPORTED_MODULE_3__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus);
        this.appService.subscribe(__WEBPACK_IMPORTED_MODULE_3__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, function (data, time) {
            _this.initTreeModel(_this.defaultDataStore);
        });
    };
    StockInhandPage.prototype.onSearch = function (query) {
        //  this.treeTable.setFilter();
    };
    StockInhandPage.prototype.initTreeModel = function (store) {
        this.presentLoading();
        this.setupTreeTable(store);
        this.getCurrentStockInHand(store);
    };
    StockInhandPage.prototype.setupTreeTable = function (store) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var tableConf, data, keys, distinctMap;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        tableConf = this.tableConfMap.get(store);
                        this.segments = tableConf.segments;
                        this.segmentNames = [];
                        this.segments.forEach(function (segment) {
                            _this.segmentNames.push(segment.label_name);
                        });
                        return [4 /*yield*/, this.getTagsGroup(store)];
                    case 1:
                        data = _a.sent();
                        keys = data.keys;
                        distinctMap = __WEBPACK_IMPORTED_MODULE_2__index__["a" /* MUtils */].getDeepCopy(data.distinct_map);
                        this.filterData = {
                            keys: keys,
                            distinct_map: distinctMap
                        };
                        this.headerConf = tableConf.header_conf;
                        this.calculate_field = tableConf.calculate_field;
                        return [2 /*return*/];
                }
            });
        });
    };
    StockInhandPage.prototype.getTagsGroup = function (store) {
        var _this = this;
        return new Promise(function (resolve, reject) {
            _this.txService.getStockInHand(store).then(function (data) {
                var tags = data['logs'];
                var keys = [];
                var distinctMap = {};
                tags.forEach(function (tag) {
                    var details = tag.details;
                    keys.push(tag.key);
                    _this.segments.forEach(function (segment) {
                        var value = details[segment.label_name];
                        var distinct = distinctMap[segment.label_name];
                        if (distinct && value && distinct.indexOf(value) === -1) {
                            distinct.push(value);
                        }
                        else if (value && !distinct) {
                            distinctMap[segment.label_name] = [value];
                        }
                    });
                });
                var result = {
                    keys: _this.keys,
                    distinct_map: distinctMap
                };
                resolve(result);
            });
        });
    };
    StockInhandPage.prototype.getCurrentStockInHand = function (store) {
        var _this = this;
        this.currentStock = store;
        this.txService.getStockInHand(store).then(function (value) {
            var inTags = value['logs'];
            var outTags = [];
            var stockInHand = [];
            var distinctIn = [];
            inTags.forEach(function (inTag) {
                var code = inTag.key;
                if (distinctIn.indexOf(code) === -1) {
                    distinctIn.push(code);
                    var outTagsFiltered = outTags.filter(function (tag) { return tag.key === code; });
                    var inTagsFiltered = inTags.filter(function (tag) { return tag.key === code; });
                    var currentSubTotal = inTag.actual_qty;
                    if (outTagsFiltered.length > 0 || inTagsFiltered.length > 0) {
                        try {
                            var outTotal_1 = 0;
                            var inTotal_1 = 0;
                            outTagsFiltered.forEach(function (outTag) {
                                outTotal_1 = outTotal_1 + Number(outTag.actual_qty);
                            });
                            inTagsFiltered.forEach(function (inTagItem) {
                                inTotal_1 = inTotal_1 + Number(inTagItem.actual_qty);
                            });
                            currentSubTotal = inTotal_1 - outTotal_1;
                            // this.total = this.total + currentSubTotal;
                        }
                        catch (e) {
                        }
                    }
                    var data = {};
                    Object.assign(data, inTag.details);
                    data['qty'] = currentSubTotal;
                    stockInHand.push(data);
                }
            });
            _this.nodes = stockInHand;
            setTimeout(function () {
                if (_this.treeTable) {
                    _this.treeTable.init();
                }
            }, 20);
            _this.dismissLoading();
        }).catch(function (reason) {
        });
    };
    StockInhandPage.prototype.configurePage = function (value) {
        var _this = this;
        if (value) {
            var tools = value.tools;
            if (tools) {
                this.tools = Object.assign(this.tools, tools);
            }
            this.sku_type = this.dataService.skuType;
            this.subject = value.subject;
            this.title = value.title;
            this.subTitle = value.sub_title;
            if (this.masterDataService.getSwitchStatus()) {
                this.subTitle = this.subTitle + ' - ' + this.masterDataService.getCurrentFloor().toUpperCase();
            }
            this.defaultDataStore = '';
            this.component_descriptors = value.components_descriptor;
            var table_conf = __WEBPACK_IMPORTED_MODULE_2__index__["a" /* MUtils */].getComponentConfig('nc_tree_table', this.component_descriptors);
            if (table_conf && table_conf.tables) {
                this.stocks = [];
                table_conf.tables.forEach(function (table) {
                    var store = table.data_store;
                    var defaultStore = table.default;
                    var changeWithSubject = table.switch_store;
                    if (changeWithSubject) {
                        var floor = _this.masterDataService.getCurrentFloor();
                        store = store + '_' + floor;
                    }
                    if (defaultStore) {
                        _this.defaultDataStore = store;
                    }
                    _this.stocks.push({ name: table.name, data_store: store });
                    _this.tableConfMap.set(store, table);
                });
            }
            this.currentStock = this.defaultDataStore;
        }
    };
    StockInhandPage.prototype.sendScanEvent = function (event) {
    };
    StockInhandPage.prototype.ionViewDidLoad = function () {
        var element = this.elementRef.nativeElement.querySelector('input');
        if (element) {
            // this.renderer.invokeElementMethod(element, 'focus', []);
        }
        setTimeout(function () {
            // this.inputToFocus.setFocus();
        }, 200);
        //  this.initEventListeners();
        var conf = this.navParams.data.conf;
        this.configurePage(conf);
        this.initTreeModel(this.defaultDataStore);
    };
    StockInhandPage.prototype.ionViewWillEnter = function () {
        //  this.initTreeModel(this.dataSource);
    };
    StockInhandPage.prototype.setTotal = function (total) {
        this.total = Number(total);
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('treeTable'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_2__index__["f" /* TreeTableComp */])
    ], StockInhandPage.prototype, "treeTable", void 0);
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('inputToFocus'),
        __metadata("design:type", Object)
    ], StockInhandPage.prototype, "inputToFocus", void 0);
    StockInhandPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'page-stock-inhand',
            template: __WEBPACK_IMPORTED_MODULE_8__stock_in_hand_template__["a" /* STOCK_IN_HAND_TEMPLATE_HTML */],
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_5_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */], __WEBPACK_IMPORTED_MODULE_7__providers_transaction_service__["a" /* TransactionService */],
            __WEBPACK_IMPORTED_MODULE_6__providers_store_data_service__["a" /* StoreDataService */],
            __WEBPACK_IMPORTED_MODULE_9__providers_master_data_service__["a" /* MasterDataService */],
            __WEBPACK_IMPORTED_MODULE_0__angular_core__["Renderer"], __WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"], __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["i" /* CommunicationManager */],
            __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["k" /* LoadingController */]])
    ], StockInhandPage);
    return StockInhandPage;
}());

//# sourceMappingURL=stock-inhand.js.map

/***/ }),

/***/ 1641:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return STOCK_IN_HAND_TEMPLATE_HTML; });
/**
 * Created by nisitha on 9/11/18.
 */
var STOCK_IN_HAND_TEMPLATE_HTML = "<ion-header>\n<common-main-header [title]=\"title\" [tools]=\"tools\" [shift_disabled]=\"tools?.shift\" [header_disabled]=\"tools?.line\"></common-main-header>\n</ion-header>\n<ion-content class=\"offwhite-bg main-content\">\n<div class=\"grid-wrapper\">\n<ion-grid no-padding >\n  <ion-row class=\"summary-row\">\n     <ion-col>\n\n     </ion-col>\n  </ion-row>\n</ion-grid>\n<ion-grid  class=\"main-grid top-margin-content\" no-padding>\n<!-- Stockinhand -->\n<!--page header date and dropdown\n===============-->\n<ion-row class=\"pg-hdr with-tab-nav\">\n    <img *ngIf=\"subTitle !== 'OUT'\" class=\"in-icon\" src=\"assets/imgs/in.png\">\n    <img *ngIf=\"subTitle === 'OUT'\" class=\"out-icon\" src=\"assets/imgs/out.png\">\n    <div class=\"pgr-hdr-txt\">{{subTitle}}</div>\n    <div class=\"r-align-flx\"></div>\n      <ion-segment [(ngModel)]=\"currentStock\" *ngIf=\"stocks\">\n        <ion-segment-button class=\"stock-header\" *ngFor=\"let stock of stocks\" value=\"{{stock.data_store}}\" (ionSelect)=\"initTreeModel(stock.data_store)\">\n          {{stock.name}}\n        </ion-segment-button>\n      </ion-segment>\n</ion-row>\n<!--page header date and dropdown\n===============-->\n\n\n<!--page filter\n===============-->\n<!--page header date and dropdown\n===============-->\n<ion-row class=\"tree-tbl-wrpper\">\n   <tree-table-comp class=\"tree-table-width\" *ngIf=\"nodes && segments && selectedRows && calculate_field\"\n                     #treeTable [segments]=\"segments\" [calculate_field]=\"calculate_field\"\n                     [data]=\"nodes\" [selectedRows]=\"selectedRows\" [headerConf]=\"headerConf\"\n                     (onTotalChange)=\"setTotal($event)\" [filterData]=\"filterData\"></tree-table-comp>\n</ion-row>\n<!--page filter\n===============-->\n<!--page filter\n===============-->\n<!-- Stockinhand -->\n<!--total\n====================-->\n<ion-row class=\"tol-row\">\n    <div class=\"tol-lbl\">Total</div>\n    <div class=\"tol-valu\">{{total}}</div>\n</ion-row>\n<!--total\n====================-->\n</ion-grid>\n</div>\n\n</ion-content>";
//# sourceMappingURL=stock-in-hand-template.js.map

/***/ }),

/***/ 1699:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__multiselect_component__ = __webpack_require__(368);
/* unused harmony reexport AngularMultiSelect */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__clickOutside__ = __webpack_require__(373);
/* unused harmony reexport ClickOutsideDirective */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__list_filter__ = __webpack_require__(374);
/* unused harmony reexport ListFilterPipe */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__menu_item__ = __webpack_require__(210);
/* unused harmony reexport Item */
/* unused harmony reexport TemplateRenderer */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__virtual_scroll__ = __webpack_require__(1007);
/* unused harmony reexport VirtualScrollComponent */
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__multiselect_component__["a"]; });







//# sourceMappingURL=index.js.map

/***/ }),

/***/ 2243:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StoreSettingsPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_providers_business_context__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_common_http__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__store_settings_page_template__ = __webpack_require__(2244);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7____ = __webpack_require__(1556);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__providers_master_data_service__ = __webpack_require__(55);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
/**
 * Created by nisitha on 5/10/18.
 */









var StoreSettingsPage = /** @class */ (function () {
    function StoreSettingsPage(logger, bsCtx, navparams, imagePro, appCtx, envProvider, httpClient, masterDataService) {
        this.logger = logger;
        this.bsCtx = bsCtx;
        this.navparams = navparams;
        this.imagePro = imagePro;
        this.appCtx = appCtx;
        this.envProvider = envProvider;
        this.httpClient = httpClient;
        this.masterDataService = masterDataService;
        this.sync_components = [];
        this.httpOptions = {
            headers: new __WEBPACK_IMPORTED_MODULE_5__angular_common_http__["c" /* HttpHeaders */]({
                'Content-Type': 'application/json'
            })
        };
        this.pagetitle = 'App sync';
        this.check = false;
        this.close = false;
        this.bubble = false;
        this.sync_components = [];
        this.setupViewModel();
    }
    StoreSettingsPage.prototype.setupViewModel = function () {
        this.view_config = this.navparams.get('conf');
        if (this.view_config) {
            this.sync_components = this.view_config['component_descriptor'];
        }
        this.sync_components.forEach(function (data) {
            data['check'] = false;
            data['close'] = false;
            data['bubble'] = false;
        });
    };
    /*
     sync with backend call
     */
    StoreSettingsPage.prototype.syncClick = function (param, index, tp) {
        return __awaiter(this, void 0, void 0, function () {
            var selectSyncBtn, data, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        selectSyncBtn = this.sync_components[index];
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 7, , 8]);
                        this.bubble = true;
                        this.logger.trace('sync parameter', param);
                        data = null;
                        if (!(tp === 'dynamic_ctx')) return [3 /*break*/, 3];
                        return [4 /*yield*/, this.masterDataService.syncDynamicData()];
                    case 2:
                        data = _a.sent();
                        return [3 /*break*/, 6];
                    case 3:
                        if (!(tp === 'ctx')) return [3 /*break*/, 4];
                        data = this.bsCtx.reloadContextData();
                        this.logger.trace('bsns Cntxt listenForStateChanges');
                        return [3 /*break*/, 6];
                    case 4:
                        if (!(tp === 'size_list')) return [3 /*break*/, 6];
                        return [4 /*yield*/, this.masterDataService.cacheSizeList(param)];
                    case 5:
                        data = _a.sent();
                        _a.label = 6;
                    case 6:
                        if (data) {
                            this.check = true;
                            this.bubble = false;
                            this.close = false;
                        }
                        else {
                            this.check = false;
                            this.close = true;
                            this.bubble = false;
                        }
                        selectSyncBtn['check'] = this.check;
                        selectSyncBtn['close'] = this.close;
                        selectSyncBtn['bubble'] = this.bubble;
                        return [3 /*break*/, 8];
                    case 7:
                        e_1 = _a.sent();
                        selectSyncBtn['check'] = false;
                        selectSyncBtn['close'] = true;
                        selectSyncBtn['bubble'] = false;
                        this.logger.error(e_1);
                        return [3 /*break*/, 8];
                    case 8: return [2 /*return*/];
                }
            });
        });
    };
    /*
     sync all sync btn at once
     */
    StoreSettingsPage.prototype.syncAll = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var res, temp_sync_comp;
            return __generator(this, function (_a) {
                this.logger.trace('App sync all');
                res = null;
                temp_sync_comp = [];
                this.sync_components.forEach(function (data, index) {
                    _this.bubble = true;
                    var selectSyncBtn = _this.sync_components[index];
                    if (data.type === 'file') {
                        _this.logger.trace('file downloaded');
                        res = _this.imagePro.loadImages(true);
                        if (res) {
                            _this.check = true;
                            _this.bubble = false;
                            _this.close = false;
                        }
                        else {
                            _this.check = false;
                            _this.close = true;
                            _this.bubble = false;
                        }
                    }
                    else if (data.type === 'ctx') {
                        res = _this.bsCtx.reloadContextData();
                        _this.logger.trace('bsns Cntxt listenForStateChanges');
                        if (res) {
                            _this.check = true;
                            _this.bubble = false;
                            _this.close = false;
                        }
                        else {
                            _this.check = false;
                            _this.close = true;
                            _this.bubble = false;
                        }
                    }
                    else {
                        temp_sync_comp.push(data);
                        _this.check = false;
                        _this.bubble = true;
                        _this.close = false;
                    }
                    selectSyncBtn['check'] = _this.check;
                    selectSyncBtn['close'] = _this.close;
                    selectSyncBtn['bubble'] = _this.bubble;
                });
                res = ''; // await this.appMsDtCntrl.appSyncAllData();
                temp_sync_comp.forEach(function (dt, index) {
                    var selectSyncBtn = temp_sync_comp[index];
                    if (res) {
                        _this.check = true;
                        _this.bubble = false;
                        _this.close = false;
                    }
                    else {
                        _this.check = false;
                        _this.close = true;
                        _this.bubble = false;
                    }
                    _this.logger.trace('change selectSyncBtn', selectSyncBtn);
                    selectSyncBtn['check'] = _this.check;
                    selectSyncBtn['close'] = _this.close;
                    selectSyncBtn['bubble'] = _this.bubble;
                });
                return [2 /*return*/];
            });
        });
    };
    /*
    app status get
     */
    StoreSettingsPage.prototype.appStatusSync = function () {
        var _self = this;
        _self.appSync().subscribe(function (res) {
            if (res) {
                // this.appMsDtCntrl.replaceAppStatusInCache(res.result);
            }
            else {
            }
        });
    };
    StoreSettingsPage.prototype.appSync = function () {
        var subKey = this.appCtx.getKeySubject();
        var subId = this.appCtx.getCurrentSubject();
        var hsk = this.appCtx.getCurrentSubjectIdentityKey();
        var appType = this.appCtx.getAppType();
        var body = JSON.stringify({
            'app_type': appType,
            'hsk': hsk,
            'subject_id': subId['id'],
            'subject_key': subKey
        });
        var url = ''; // this.envProvider.getEnvVar(CCServiceEndPoints.DEPLOY_REG );
        url = url.replace('$data_type', 'find');
        return this.httpClient.post(url, body, this.httpOptions);
    };
    /*
    app satatus save
     */
    StoreSettingsPage.prototype.appStatuSave = function () {
        var _self = this;
        return new Promise(function (resolve) {
        });
    };
    StoreSettingsPage.prototype.saveCurrentSatus = function (currentSate) {
        var subKey = this.appCtx.getKeySubject();
        var subId = this.appCtx.getCurrentSubject();
        var hsk = this.appCtx.getCurrentSubjectIdentityKey();
        var appType = this.appCtx.getAppType();
        var messageBody = {
            'data': currentSate,
            'app_type': appType,
            'hsk': hsk,
            'subject_id': subId['id'],
            'subject_key': subKey
        };
        var url = ''; // this.envProvider.getEnvVar(CCServiceEndPoints.DEPLOY_REG);
        url = url.replace('$data_type', 'save');
        return this.httpClient.post(url, messageBody, this.httpOptions);
    };
    StoreSettingsPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'store-setting-view',
            template: __WEBPACK_IMPORTED_MODULE_6__store_settings_page_template__["a" /* STORE_SETTING_TEMPLATE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_providers_business_context__["a" /* BusinessContext */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["l" /* ImagesProvider */], __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */],
            __WEBPACK_IMPORTED_MODULE_7____["e" /* StoreEnvProvider */], __WEBPACK_IMPORTED_MODULE_5__angular_common_http__["a" /* HttpClient */],
            __WEBPACK_IMPORTED_MODULE_8__providers_master_data_service__["a" /* MasterDataService */]])
    ], StoreSettingsPage);
    return StoreSettingsPage;
}());

//# sourceMappingURL=store-settings-page.js.map

/***/ }),

/***/ 2244:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return STORE_SETTING_TEMPLATE_HTML; });
/**
 * Created by nisitha on 5/10/18.
 */
var STORE_SETTING_TEMPLATE_HTML = "\n<ion-header>\n      <common-main-header [title]=\"pagetitle\"></common-main-header>\n</ion-header>\n<ion-content>\n<ion-grid class=\"syc-list\">\n\t<ion-row no-padding class=\"info-row\">\n\t\t<div class=\"info-msg r-align-flx\"><ion-icon name=\"information-circle\"></ion-icon> Please click<ion-icon class=\"ref-btn\" name=\"refresh\">\n</ion-icon> button to load application data</div>\n       \t<button ion-button class=\"lod-all-btn\" (click)=\"syncAll()\"><ion-icon name=\"refresh\"></ion-icon> Load All App Data </button>\n\t</ion-row>\n\t<ion-row class=\"syc-lst-itm\" *ngFor=\"let item of sync_components; let i=index\">\n\t\t<ion-icon *ngIf=\"item.check\" class=\"syced\" name=\"checkmark-circle\"></ion-icon>\n\t\t<ion-icon *ngIf=\"item.close && item.type !='file' \" class=\"sycfl\" name=\"close-circle\"></ion-icon>\n\t\t<ion-spinner *ngIf=\"item.bubble\" name=\"bubbles\"></ion-spinner>\n\t\t<div class=\"r-align-flx\" (click)=\"syncClick(item.value, i, item.type)\">{{item.name}}</div>\n\t\t<button ion-button (click)=\"syncClick(item.value, i, item.type)\"><ion-icon name=\"refresh\"></ion-icon></button>\n\t</ion-row>\n\t<ion-row>\n\t<!--<button ion-button (click)=\"appStatusSync()\">App Sync<ion-icon name=\"refresh\"></ion-icon></button>\n\t<button ion-button (click)=\"appStatuSave()\">App Save<ion-icon name=\"add\"></ion-icon></button>-->\n</ion-row>\n</ion-grid>\n</ion-content>\n<ion-footer></ion-footer>\n";
//# sourceMappingURL=store-settings-page-template.js.map

/***/ })

});
//# sourceMappingURL=2.js.map