webpackJsonp([23],{

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

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RectifiedPageModule", function() { return RectifiedPageModule; });
/* 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__rectified__ = __webpack_require__(1853);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_components_module__ = __webpack_require__(991);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist_pagination_ngx_pagination_module__ = __webpack_require__(89);
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 RectifiedPageModule = /** @class */ (function () {
    function RectifiedPageModule() {
    }
    RectifiedPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__rectified__["a" /* RectifiedPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */],
                __WEBPACK_IMPORTED_MODULE_3__components_components_module__["a" /* ComponentsModule */],
                __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist_pagination_ngx_pagination_module__["a" /* NgxPaginationModule */],
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__rectified__["a" /* RectifiedPage */]),
            ],
        })
    ], RectifiedPageModule);
    return RectifiedPageModule;
}());

//# sourceMappingURL=rectified.module.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RectifiedPage; });
/* 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_navigation_manager__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__rectified_template__ = __webpack_require__(1854);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__models_reworkedModel__ = __webpack_require__(220);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__providers_shared_data_service_shared_data_service__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rxjs__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rxjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_rxjs__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_util__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_util___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_util__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__providers_application_cache_service_app_cache_service__ = __webpack_require__(148);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__providers_reference_data_list_reference_data_list__ = __webpack_require__(152);
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 RectifiedPage = /** @class */ (function () {
    function RectifiedPage(logger, appCtx, appCacheSvc, navParams, navigationProvider, toastCtrl, sharedDataService, _refDataList) {
        this.logger = logger;
        this.appCtx = appCtx;
        this.appCacheSvc = appCacheSvc;
        this.navParams = navParams;
        this.navigationProvider = navigationProvider;
        this.toastCtrl = toastCtrl;
        this.sharedDataService = sharedDataService;
        this._refDataList = _refDataList;
        this.REFERENCE_DATA_FIELD = 'recent_category_list';
        this.rectified_all_list = [];
        this.rectified_selected_list = [];
        this.view_disabled = true;
        this.btn_view_disabled = true;
        this.sub_header = true;
        this.btn_click_capture = [];
        this.select_items = [];
        this.selected_items = new __WEBPACK_IMPORTED_MODULE_7_rxjs__["Subject"]();
        this.p = 1;
        this.updates = this.selected_items.asObservable();
        this.tools = {
            line: true,
            menu: true,
            shift: true,
            user: true,
        };
        this.page_data_type_set = this.navParams.get('data');
        this.data_store_dum = new __WEBPACK_IMPORTED_MODULE_5__models_reworkedModel__["a" /* ReworkedModel */](this.page_data_type_set['model']);
        this.currentPageConfig = this.navParams.get('conf');
        this.sub_header = this.currentPageConfig['order_heading'];
        if (!this.sub_header) {
            this.grid_class = 'main-grid_none_header';
        }
    }
    RectifiedPage.prototype.ngAfterViewInit = function () {
        var _this = this;
        try {
            this.logger.debug('rectified called  2');
            var id_1 = this.currentPageConfig['reference_data_type_id'];
            // let ref_data = this.sharedDataService.getDataSharedDataService(id);
            var ref_data = this._refDataList.getCrntRefList();
            // this.currentPageData = ref_data ? ref_data['recent_main_cat_list'] : null;
            this.currentPageData = ref_data ? ref_data : null;
            // this.currentPageData = this.recentEvtSvc.rectified_display_list;
            this.view_disabled = this.currentPageConfig.view_disabled;
            this.logger.info(this.currentPageData);
            // load page header and footer
            this.currentPageheader = this.currentPageConfig['title'];
            this.currentPagebuttons = this.currentPageConfig['view_controles'];
            /*
             * TODO: get according to a combination of key
             * */
            var currentSubject = this.appCtx.getCurrentSubject();
            var dataset = this.appCacheSvc.getDataFromMemory(currentSubject.id, 'appdata');
            this.logger.debug('RCT', dataset);
            this.data_store_dum.recent_category_list = [];
            dataset.forEach(function (item) {
                if (item[id_1]) {
                    if (item[id_1][_this.REFERENCE_DATA_FIELD]) {
                        item[id_1][_this.REFERENCE_DATA_FIELD].forEach(function (data) {
                            // collect recent items here
                        });
                    }
                }
            });
            // set reference data type id //
            this.sharedDataService.setReference(this.currentPageConfig['reference_data_type_id']);
            // generate page body data
            if (this.currentPageData !== null) {
                this.currentPageData.forEach(function (itemX, idX) {
                    var ops_list = [];
                    var size;
                    var cntxt;
                    var event_ac;
                    var date;
                    var show_cntxt = [];
                    itemX.result.forEach(function (item, index) {
                        if (ops_list.indexOf(item.data.operation) === -1) {
                            ops_list.push(item.data.operation);
                        }
                        size = item.size;
                        cntxt = item.bsns_cntxt;
                        event_ac = item.event_ac;
                        date = item.date;
                    });
                    if (!Object(__WEBPACK_IMPORTED_MODULE_8_util__["isUndefined"])(cntxt)) {
                        cntxt.forEach(function (dt) {
                            if (_this.currentPageConfig['shown_params'].includes((dt.d))) {
                                show_cntxt.push(dt.v);
                            }
                        });
                    }
                    var accordian_show_tick = false;
                    if ('name' in itemX.result[0].data) {
                        accordian_show_tick = true;
                    }
                    // this.logger.debug(accordian_show_tick);
                    _this.rectified_all_list.push({
                        'id': idX,
                        'display_item': itemX,
                        'accordian_header': ops_list,
                        'status': false,
                        'size': size,
                        'context': show_cntxt,
                        'event_ac': event_ac,
                        'date': date,
                        'accordian_show_tick': accordian_show_tick,
                        'accordian_status': false
                    });
                });
            }
            this.data_store_dum.setReferenceDataType(this.currentPageConfig['reference_data_type']);
            this.data_store_dum.setRecentCategoryList(this.rectified_all_list);
            // this.logger.debug(this.rectified_all_list);
            // check whether next page available
            if (this.currentPageConfig['next_view_ref'] !== 'EXIT') {
                this.nextPage = this.currentPageConfig['next_view_ref'];
            }
            else {
                this.nextPage = 'page_order_end';
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    RectifiedPage.prototype.navigationClick = function (type) {
        var _this = this;
        this.rectified_selected_list = [];
        this.data_store_dum.recent_category_list.forEach(function (item, index) {
            if (item.status === true) {
                _this.rectified_selected_list.push(item.display_item);
            }
        });
        var finalSelectedList = [];
        var finalMap = {};
        finalMap['result'] = this.rectified_selected_list;
        finalSelectedList.push(finalMap);
        if (type === 'cancel') {
            this.navigationProvider.exitToRoot(null);
        }
        else if (type === 'ok') {
            if (this.rectified_selected_list.length > 0) {
                if (this.nextPage !== 'page_order_end') {
                    var data = {};
                    data['type'] = 'push';
                    data['next_page'] = this.nextPage;
                    data['result'] = this.rectified_selected_list;
                    this.data_store_dum.setRecentCategoryList(this.data_store_dum.recent_category_list);
                    this.navigationProvider.nextView(this.nextPage, {
                        data: this.rectified_selected_list,
                        event: this.data_store_dum, btnConf: this.page_data_type_set['btnConf']
                    });
                }
                else {
                    var data = {};
                    data['type'] = 'remove_all';
                    data['next_page'] = this.nextPage;
                    data['result'] = this.rectified_selected_list;
                    data['result_type'] = this.data_store_dum.name;
                    this.navigationProvider.exitToRoot(data);
                }
            }
            else {
                var toast = this.toastCtrl.create({
                    message: 'Please Select Item(s) to Proceed',
                    duration: 3000,
                    position: 'middle',
                    showCloseButton: true,
                    closeButtonText: 'OK'
                });
                toast.present();
            }
        }
    };
    // view disabled & enabled due to button collection sector//
    RectifiedPage.prototype.viewUpdate = function (event) {
        this.btn_view_disabled = event.btn_view_disabled;
    };
    /*
     btn collection disabled and enabled
     */
    RectifiedPage.prototype.btndisabled = function (index, singleItem1) {
        if (this.currentPageConfig.no_of_selected_items === 1) {
            if (this.select_items.length > 0) {
                if (this.select_items[0]['id'] === singleItem1['id']) {
                    this.select_items = [];
                }
                else {
                    this.select_items = [];
                    this.select_items.push(singleItem1);
                }
            }
            else {
                this.select_items.push(singleItem1);
            }
            this.data_store_dum.recent_category_list.forEach(function (dt) {
                if (singleItem1.id !== dt.id) {
                    dt.status = false;
                }
            });
            if (this.currentPageConfig.no_of_selected_items === this.select_items.length) {
                this.view_disabled = false;
            }
            else {
                this.view_disabled = true;
            }
        }
        else {
            if (this.btn_click_capture.indexOf(index) > -1) {
                this.btn_click_capture.splice(this.btn_click_capture.indexOf(index), 1);
                this.select_items.splice(this.select_items.indexOf(index), 1);
            }
            else {
                this.btn_click_capture.push(index);
                this.select_items.push(singleItem1);
            }
            if (this.currentPageConfig.no_of_selected_items >= this.btn_click_capture.length && this.btn_click_capture.length !== 0) {
                this.view_disabled = false;
            }
            else {
                this.view_disabled = true;
            }
        }
        this.selected_items.next('selected-item-update');
    };
    RectifiedPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'page-rectified',
            template: __WEBPACK_IMPORTED_MODULE_4__rectified_template__["a" /* RECTIFIED_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */], __WEBPACK_IMPORTED_MODULE_10__providers_application_cache_service_app_cache_service__["a" /* AppCacheService */],
            __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__["x" /* ToastController */], __WEBPACK_IMPORTED_MODULE_6__providers_shared_data_service_shared_data_service__["a" /* SharedDataProvider */],
            __WEBPACK_IMPORTED_MODULE_11__providers_reference_data_list_reference_data_list__["a" /* ReferenceDataList */]])
    ], RectifiedPage);
    return RectifiedPage;
}());

//# sourceMappingURL=rectified.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RECTIFIED_HTML; });
/**
 * Created by Paramee Gunethilake on 5/9/2018.
 */
var RECTIFIED_HTML = "\n\n<ion-header>\n<common-main-header [title]=\"currentPageheader\" [tools]=\"tools\" [header_disabled]=\"currentPageConfig?.subject_disable\"></common-main-header>\n</ion-header>\n<ion-content  class=\"main-container\">\n  <ion-grid class=\"summary-grid\">\n    <ion-row class=\"summary-row\" *ngIf=\"sub_header\">\n            <ion-col class=\"summary-col\">\n                <core-domain-header></core-domain-header>\n            </ion-col>\n        </ion-row>\n  </ion-grid>\n<ion-grid [ngClass]=\"grid_class\" no-padding class=\"main-grid\">\n<ion-row no-padding class=\"main-content-row\">\n<ion-col col-12 col-lg-9 col-md-9 no-padding class=\"overflow-rework\">\n\n<ion-row no-padding class=\"data-empty-time\" *ngIf=\"data_store_dum.recent_category_list.length === 0\">\n       <div class=\"empt-msg\">\n       <ion-icon name=\"md-alert\" class=\"ion-icon\" item-left></ion-icon><span class=\"space-rem\"></span>\n        <span *ngIf=\"currentPageConfig.error_msg\">{{currentPageConfig?.error_msg}}</span>\n        <span *ngIf=\"!currentPageConfig.error_msg\">Please configure me</span>\n       </div>\n</ion-row>\n\n<ion-grid *ngFor=\"let singleItem1 of data_store_dum.recent_category_list | paginate: {itemsPerPage: 10, currentPage: p};let indx = index\">\n    <ion-row class=\"main-data-row\">\n      <div class=\"main-data-row-data-col rgt-align\">\n      <ion-item class=\"main-data-row-data-col-item\" >\n        <ion-checkbox (click)=\"btndisabled(indx, singleItem1)\" [(ngModel)]=\"singleItem1.status\"></ion-checkbox>\n          <ion-label class=\"dress-info\">\n                <div>\n      <span *ngIf=\"singleItem1.date\" class=\"date-formate\">\n        {{singleItem1.date}}\n</span>\n      </div>\n          <div class=\"lable-right sty-po-info\">\n             <span *ngFor=\"let itemset of singleItem1.context\"\n          class=\"main-data-row-data-col-item-lable-end secondary-data-col-row-class-one one-info\" item-right>\n        {{itemset}}</span>\n        <span class=\"main-data-row-data-col-item-lable-end secondary-data-col-row-class-one one-info\" item-right>\n        {{singleItem1.size}}\n</span>\n</div>\n<div class=\"main-data-row-data-col-item-span\">\n          {{singleItem1.accordian_header[0]}}\n            </div>\n             <div *ngFor=\"let single of singleItem1.display_item.result; let j = index\"\n          class=\"lable-left secondary-data-col-row-class-two-name\">\n        <span *ngIf=\"j===0\">\n        {{single.data.name}}\n</span></div>\n        </ion-label>\n      </ion-item>\n      </div>\n      <div [hidden]=\"!singleItem1.accordian_show_tick\" class=\"main-data-row-tick-col\"\n      (click)=\"!singleItem1.accordian_status=!singleItem1.accordian_status\">\n        <ion-icon name=\"arrow-dropdown-circle\" class=\"main-data-row-tick-col-icon\"></ion-icon>\n      </div>\n    </ion-row>\n    <ion-row [hidden]=\"!singleItem1.accordian_status\">\n      <span class=\"secondary-data-col\">\n        <ion-row *ngFor=\"let single of singleItem1.display_item.result; let i = index\" class=\"secondary-data-col-row\">\n        <!--<span *ngIf=\"i !==0\">-->\n     <ion-col col-12 *ngIf=\"i !==0\" class=\"main-data-row-data-col-item-span\" no-padding>{{single.data.operation}}</ion-col>\n     <br>\n     <!--     <ion-col class=\"secondary-data-col-row-class-two-id\" col-1> {{single.data.category_id}}</ion-col>-->\n     <ion-col col-12 *ngIf=\"i !==0\" class=\"secondary-data-col-row-class-two-name\" no-padding>{{single.data.name}}</ion-col>\n<!--</span>-->\n        </ion-row>\n      </span>\n    </ion-row>\n</ion-grid>\n</ion-col>\n<ion-col col-12 col-lg-3 col-md-3 class=\"left-border\" *ngIf=\"currentPageConfig\">\n<btn-collection [select_items]=\"select_items\" [page_btn_conf]=\"currentPageConfig\" [data_set]=\"page_data_type_set['btnConf']\"\n[input_event_json]=\"data_store_dum\" [view_disabled]=\"view_disabled\" (btn_view_disabled)=\"viewUpdate($event)\">\n</btn-collection>\n</ion-col>\n</ion-row>\n</ion-grid >\n</ion-content>\n<ion-footer>\n  <!--<ion-navbar>\n    <ion-grid no-padding>\n      <ion-row justify-content-end no-padding class=\"right-pdn\">\n        <ion-col *ngFor=\"let button of currentPagebuttons \" col-5 col-lg-2 col-md-3 no-padding class=\"right-pdn\">\n          <button [ngClass]=\"button.button_type\" [disabled]=\"btn_view_disabled\" ion-button [hidden]=\"!button.display\"\n           (click)=\"navigationClick(button.button_type)\" class=\"page-button help-category-btn\">\n            {{button.button_name}}\n          </button>\n        </ion-col>\n      </ion-row>\n    </ion-grid>\n  </ion-navbar> -->\n  <pagination-controls (pageChange)=\"p = $event\"></pagination-controls>\n</ion-footer>\n\n\n";
//# sourceMappingURL=rectified-template.js.map

/***/ })

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