webpackJsonp([18],{

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

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrRecentPageModule", function() { return TrRecentPageModule; });
/* 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__tr_recent__ = __webpack_require__(1884);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
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 TrRecentPageModule = /** @class */ (function () {
    function TrRecentPageModule() {
    }
    TrRecentPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__tr_recent__["a" /* TrRecentPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */],
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__tr_recent__["a" /* TrRecentPage */]),
            ],
        })
    ], TrRecentPageModule);
    return TrRecentPageModule;
}());

//# sourceMappingURL=tr-recent.module.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TrRecentPage; });
/* 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__tr_recent_template__ = __webpack_require__(1885);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_tracking_recent_defect_service__ = __webpack_require__(225);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__providers_app_runtime_provider__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_business_context__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__providers_tracking_context__ = __webpack_require__(35);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__providers_tr_rework_service__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__providers_masterdata_service__ = __webpack_require__(119);
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 TrRecentPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */
var TrRecentPage = /** @class */ (function () {
    function TrRecentPage(navCtrl, navParams, logger, navMngr, appRunTime, trCtxtService, rwkSrv, appMstrData, bsnsCtx, alert, recentSrv) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.logger = logger;
        this.navMngr = navMngr;
        this.appRunTime = appRunTime;
        this.trCtxtService = trCtxtService;
        this.rwkSrv = rwkSrv;
        this.appMstrData = appMstrData;
        this.bsnsCtx = bsnsCtx;
        this.alert = alert;
        this.recentSrv = recentSrv;
        this.pagesize = 4;
        this.lastIndex = 0;
        this.recent_issue_list = [];
        this.tools = {
            line: true,
            menu: true,
            shift: true,
            user: true,
        };
        this.full_list = [];
        this.full_list = this.rwkSrv.getCrntList();
        this.recent_issue_list = this.recentSrv.getCrrntList();
        this.page_conf = this.navParams.get('conf');
        // this.page_issue_list = [];
        if (this.page_conf) {
            this.footer_view = this.page_conf.footer_view;
            this.counterModel = this.navParams.get('data').model;
            this.btnConfig = this.navParams.get('data').btnConf;
            if (this.navParams.get('data').reference) {
                this.refData = this.navParams.get('data').reference;
            }
            else {
                if (this.counterModel) {
                    this.counterModel.ref_data_actual = [];
                    this.counterModel.reference_data = [];
                }
            }
            this.bsns = this.bsnsCtx.getCurrentContext();
        }
    }
    TrRecentPage.prototype.ngAfterViewInit = function () {
        // this.pageIssueList();
    };
    // page view end //
    TrRecentPage.prototype.pageViewEnd = function () {
        var _this = this;
        var selectedItems = [];
        var timstmp = new Date();
        var gId = this.counterModel.count + 1 + '@' + this.generateCtxId() + '@' + timstmp.getTime();
        this.counterModel.gId = gId;
        var obj = new Object();
        // if (this.page_conf.store_record) {
        var ctx = new Object();
        this.bsns.ctx.forEach(function (dta) {
            ctx[dta.k] = dta.v;
        });
        obj['bsns'] = ctx;
        obj['gId'] = gId;
        obj['timestamp'] = new Date().getTime();
        obj['cat_data'] = [];
        this.recent_issue_list.forEach(function (issue) {
            if (issue.status) {
                issue.status = false;
                obj['cat_data'].push(Object.assign({}, issue));
                if (_this.page_conf.store_record) {
                    // this.recentSrv.addNewItem(issue);
                }
            }
        });
        if (obj['cat_data'].length > 0) {
            selectedItems.push(Object.assign({}, obj));
        }
        else {
            this.zeroSelectItemPopup();
            return;
        }
        // }
        var currentCtxId = this.trCtxtService.getId();
        this.counterModel.classificationData = [];
        this.counterModel.classificationData = selectedItems.slice(0);
        var actual = [];
        if (obj['cat_data'].length > 0) {
            obj['cat_data'].forEach(function (d) {
                var ac = new Object();
                ac['issues'] = Object.assign({}, d);
                actual.push(Object.assign({}, ac));
            });
        }
        // if (this.page_conf.store_record) {
        this.rwkSrv.updateList(selectedItems.slice(0), false);
        // }
        this.counterModel.setEventActual(actual);
        if (this.refData) {
            this.counterModel.setRefData(this.refData);
            if (this.refData['cat_data'].length > 0) {
                var ac_1 = [];
                this.refData['cat_data'].forEach(function (d) {
                    var dt = new Object();
                    dt['issues'] = Object.assign({}, d);
                    ac_1.push(dt);
                });
                this.counterModel.setRefDataActual(ac_1);
            }
        }
        this.appRunTime.updateSharedDataService(currentCtxId, this.btnConfig, 1, this.counterModel, this.btnConfig.id);
        this.endAndExit();
    };
    // navogation handle in footer //
    TrRecentPage.prototype.navigationClick = function (type) {
        if (type === 'cancel') {
            this.navMngr.exitToRoot(null);
        }
        else if (type === 'ok') {
            // if (this.isSelected()) {
            if (this.page_conf.next_view !== 'page_order_end') {
            }
            else {
                this.pageViewEnd();
            }
            // }
        }
    };
    // end the page view and exit from page //
    TrRecentPage.prototype.endAndExit = function () {
        this.navMngr.exitToRoot(null);
    };
    // generate context id //
    TrRecentPage.prototype.generateCtxId = function () {
        var bsnsCtx = this.bsnsCtx.getCurrentContext();
        var id = null;
        if (bsnsCtx.ctx) {
            bsnsCtx.ctx.forEach(function (dt) {
                if (id === null) {
                    id = dt.v;
                }
                else {
                    id = id + '-' + dt.v;
                }
            });
        }
        return id;
    };
    // not select on of item popup //
    TrRecentPage.prototype.zeroSelectItemPopup = function () {
        var alrt = this.alert.create({
            title: 'Prohibited Action',
            subTitle: 'Please select item(s)'
        });
        alrt.present();
    };
    TrRecentPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'page-tr-recent',
            template: __WEBPACK_IMPORTED_MODULE_2__tr_recent_template__["a" /* TRRECENTTEMPLATE */],
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_7_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["m" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_5__providers_app_runtime_provider__["a" /* TRAppRuntimeProvider */],
            __WEBPACK_IMPORTED_MODULE_8__providers_tracking_context__["a" /* TrackingContext */],
            __WEBPACK_IMPORTED_MODULE_9__providers_tr_rework_service__["a" /* TrReworkService */],
            __WEBPACK_IMPORTED_MODULE_10__providers_masterdata_service__["a" /* TRMasterDataCntrl */],
            __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_business_context__["a" /* BusinessContext */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */],
            __WEBPACK_IMPORTED_MODULE_3__providers_tracking_recent_defect_service__["a" /* TrackingRecentDefectService */]])
    ], TrRecentPage);
    return TrRecentPage;
}());

//# sourceMappingURL=tr-recent.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TRRECENTTEMPLATE; });
/**
 * Created by dilshan on 3/29/19.
 */
var TRRECENTTEMPLATE = "\n<ion-header>\n<common-main-header [title]=\"page_conf?.title\" [tools]=\"tools\"\n    [header_disabled]=\"page_conf?.subject_disable\" [shift_disabled]=\"page_conf?.shift_disabled\"></common-main-header>\n    </ion-header>\n<ion-content class=\"main-container\">\n  <ion-grid>\n  <ion-row class=\"summary-row margin-b-6\">\n    <ion-col no-padding>\n<!--<core-domain-header></core-domain-header>-->\n<core-domain-search-header [lable]=\"true\"></core-domain-search-header>\n</ion-col>\n</ion-row>\n  <ion-row class=\"category-row\">\n  <ion-col col-6 class=\"select-col\" no-padding *ngFor=\"let rowData of recent_issue_list\" >\n  <ion-item class=\"selection-item\" [ngClass]=\"{'item-slct':rowData.status == true, 'item-not-slct':rowData.status == false}\">\n    <ion-label  class=\"selection-header\">{{rowData.name}}\n    </ion-label>\n    <ion-checkbox [(ngModel)]=\"rowData.status\">\n    </ion-checkbox>\n  </ion-item>\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      <ion-row justify-content-end no-padding>\n        <ion-col *ngFor=\"let button of footer_view \" col-5 col-lg-2 col-md-3 class=\"right-pdn\">\n          <button [ngClass]=\"button.button_type\" ion-button [hidden]=\"!button.display\"\n          (click)=\"navigationClick(button.button_type)\" class=\"page-button help-category-btn\">\n        {{button.button_name}}</button>\n      </ion-col>\n    </ion-row>\n  </ion-grid>\n  </ion-navbar>\n  </ion-footer>\n";
//# sourceMappingURL=tr-recent-template.js.map

/***/ })

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