webpackJsonp([13],{

/***/ 1478:
/***/ (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__(1578);
/* 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__(990);
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

/***/ }),

/***/ 1577:
/***/ (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

/***/ }),

/***/ 1578:
/***/ (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__(1577);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__models_sku_group_config__ = __webpack_require__(994);
/* 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__(45);
/* 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

/***/ })

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