webpackJsonp([26],{

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

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AqlOperationPageModule", function() { return AqlOperationPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__aql_operation__ = __webpack_require__(1775);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_components_module__ = __webpack_require__(959);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ngx_translate_core__ = __webpack_require__(136);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(7);
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 AqlOperationPageModule = /** @class */ (function () {
    function AqlOperationPageModule() {
    }
    AqlOperationPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__aql_operation__["a" /* AqlOperationPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__aql_operation__["a" /* AqlOperationPage */]),
                __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */],
                __WEBPACK_IMPORTED_MODULE_3__components_components_module__["a" /* ComponentsModule */],
                __WEBPACK_IMPORTED_MODULE_4__ngx_translate_core__["b" /* TranslateModule */].forChild()
            ],
        })
    ], AqlOperationPageModule);
    return AqlOperationPageModule;
}());

//# sourceMappingURL=aql-operation.module.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AqlOperationPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__ = __webpack_require__(50);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__providers_ccenv_provider__ = __webpack_require__(140);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_common_http__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__aql_operaton_template__ = __webpack_require__(1776);
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 AqlOperationPage = /** @class */ (function () {
    function AqlOperationPage(logger, navigationProvider, navParams, http, envPro) {
        this.logger = logger;
        this.navigationProvider = navigationProvider;
        this.navParams = navParams;
        this.http = http;
        this.envPro = envPro;
        this.aql_ops_all_list_temp = [];
        this.aql_ops_all_list = [];
        this.aql_ops_selected_list = [];
        this.sub_header = true;
        this.operation_list = [];
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false
        };
        this.currentPageConfig = this.navParams.get('conf');
        this.data_set = this.navParams.get('data');
        this.previous_data = this.data_set['data'];
        this.logger.info(this.previous_data);
        // load page header and footer
        this.currentPageheader = this.currentPageConfig['title'];
        this.currentPagebuttons = this.currentPageConfig['view_controles'];
        // 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';
        }
        this.logger.debug('loading data  in aql-ops', this.currentPageConfig);
        this.prepareData();
    }
    AqlOperationPage.prototype.prepareData = function () {
        var _this = this;
        var urlDept = this.envPro.getEnvVar('SAMPLE_SCHENARIOS');
        urlDept = urlDept.replace('$name', this.currentPageConfig['view_data']);
        this.http.get(urlDept).subscribe(function (operationRes) {
            _this.operation_list = operationRes;
            _this.previous_data.forEach(function (preItem, prevIdx) {
                var ops_items = [];
                _this.operation_list.forEach(function (opsItem, opsIdx) {
                    opsItem.group_id.forEach(function (grpItem, grpIdx) {
                        if (grpItem === preItem.station) {
                            var temp = {};
                            temp['department'] = preItem.department;
                            temp['station'] = grpItem;
                            temp['operation'] = opsItem.name;
                            temp['status'] = false;
                            ops_items.push(temp);
                        }
                    });
                });
                var item = {};
                item['department'] = preItem.department;
                item['station'] = preItem.station;
                item['data'] = ops_items;
                item['status'] = true;
                _this.aql_ops_all_list.push(item);
            });
            _this.logger.info(_this.aql_ops_all_list);
        });
    };
    AqlOperationPage.prototype.addCurrentOperation = function () {
        /*  let modelData = {'model': this.data_store_dum, 'btnConf': this.data_set['btnConf'], pgConf: this.currentPageConfig};
          let modal = this.modalCtrl.create(ClassOneSelected, modelData , { cssClass: 'class-one-selected'});
      
          modal.onDidDismiss(dataRes => {
            this.logger.log(dataRes);
      
            this.prepareData();
      
          });
      
          modal.present();*/
    };
    AqlOperationPage.prototype.addCurrentIssues = function () { };
    AqlOperationPage.prototype.navigationClick = function (type) {
        var _this = this;
        if (type === 'cancel') {
            this.navigationProvider.exitToRoot(null);
        }
        else if (type === 'ok') {
            this.aql_ops_all_list.forEach(function (itemMain, idxMain) {
                itemMain.data.forEach(function (itemSub, idxSub) {
                    if (itemSub.status === true) {
                        delete itemSub['status'];
                        _this.aql_ops_selected_list.push(itemSub);
                    }
                });
            });
            this.logger.debug(this.aql_ops_selected_list);
            this.navigationProvider.nextView(this.nextPage, {
                data: this.aql_ops_selected_list
            });
        }
    };
    AqlOperationPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'page-aql-operation',
            template: __WEBPACK_IMPORTED_MODULE_6__aql_operaton_template__["a" /* AQL_OPERATION_HTML */],
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__["a" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_5__angular_common_http__["a" /* HttpClient */],
            __WEBPACK_IMPORTED_MODULE_4__providers_ccenv_provider__["a" /* CCEnvProvider */]])
    ], AqlOperationPage);
    return AqlOperationPage;
}());

//# sourceMappingURL=aql-operation.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AQL_OPERATION_HTML; });
/**
 * Created by Paramee Gunethilake on 7/10/2018.
 */
var AQL_OPERATION_HTML = "\n<ion-header>\n    <common-main-header [title]=\"currentPageConfig.title\" [tools]=\"tools\"></common-main-header>\n</ion-header>\n\n\n<ion-content padding>\n<ion-grid>\n<ion-row>\n\n\n <ion-col col-12 col-lg-4 col-md-4>\n          <ion-grid class=\"class-one-grid\">\n              <ion-row no-padding>\n                  <ion-list   *ngFor=\"let Singledata of aql_ops_all_list\" style=\"width: 100% ; margin-bottom: 2%\">\n                      <ion-item class=\"selection-item\" [ngClass]=\"{'item-slct':Singledata.status == true,\n                       'item-not-slct':Singledata.status == false}\">\n                          <ion-label >{{Singledata.department}}</ion-label>\n                           <ion-label >{{Singledata.station}}</ion-label>\n                          <ion-checkbox [(ngModel)]=\"Singledata.status\"  >\n                          </ion-checkbox>\n                      </ion-item>\n </ion-list>\n              </ion-row>\n </ion-grid>\n</ion-col>\n      <ion-col col-12 col-lg-8 col-md-8  class=\"overflow-page\">\n          <div class=\"class-two-grid-div\">\n          <ion-grid class=\"class-two-grid\">\n           <ion-row style=\"height: 15%\">\n<ion-col col-2 offset-10>\n <ion-fab  right edge>\n    <button ion-fab mini (click)=\"addCurrentIssues()\">\n    <ion-icon name=\"add\"></ion-icon>\n    </button>\n</ion-fab>\n</ion-col>\n</ion-row>\n <ion-row   *ngFor=\"let Singledata of aql_ops_all_list\" style=\"width: 100%\">\n                      <span [hidden]=\"!Singledata.status\" style=\"width: 100%\">\n                      <ion-label class=\"class_one_label\" >{{Singledata.station}}</ion-label>\n                      <ion-list *ngFor=\"let singleD of Singledata.data\" class=\"class-two-grid-list\">\n                             <ion-item style=\"width: 100%\" class=\"class-two-grid-list-item\">\n                                  <ion-label >\n                                  <span class=\"id_label\">{{singleD.operation}}</span>\n                                   </ion-label>\n                                  <ion-checkbox [(ngModel)]=\"singleD.status\"  >\n                                  </ion-checkbox>\n                              </ion-item>\n                       </ion-list>\n                          </span>\n                  </ion-row>\n          </ion-grid>\n          </div>\n\n      </ion-col>\n</ion-row>\n</ion-grid>\n\n</ion-content>\n<ion-footer no-padding>\n  <ion-navbar no-paddin>\n\n    <ion-grid no-padding>\n      <ion-row justify-content-end no-padding>\n        <ion-col *ngFor=\"let button of currentPagebuttons \" 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\n  </ion-navbar>\n</ion-footer>\n";
//# sourceMappingURL=aql-operaton-template.js.map

/***/ })

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