webpackJsonp([27],{

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

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AqlDepartmentPageModule", function() { return AqlDepartmentPageModule; });
/* 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_department__ = __webpack_require__(1773);
/* 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 AqlDepartmentPageModule = /** @class */ (function () {
    function AqlDepartmentPageModule() {
    }
    AqlDepartmentPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__aql_department__["a" /* AqlDepartmentPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__aql_department__["a" /* AqlDepartmentPage */]),
                __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()
            ],
        })
    ], AqlDepartmentPageModule);
    return AqlDepartmentPageModule;
}());

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

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AqlDepartmentPage; });
/* 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_department_template__ = __webpack_require__(1774);
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 AqlDepartmentPage = /** @class */ (function () {
    function AqlDepartmentPage(logger, navigationProvider, navCtrl, navParams, http, envPro) {
        this.logger = logger;
        this.navigationProvider = navigationProvider;
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.http = http;
        this.envPro = envPro;
        this.sub_header = true;
        this.dept_station_display_list = [];
        this.dept_station_selected_list = [];
        this.tools = {
            line: false,
            menu: false,
            shift: false,
            user: false
        };
        this.currentPageConfig = this.navParams.get('conf');
        // 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-dept', this.currentPageConfig);
        this.prepareData();
    }
    AqlDepartmentPage.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 (departmentRes) {
            _this.department_list = departmentRes;
            var urlSt = _this.envPro.getEnvVar('SAMPLE_SCHENARIOS');
            urlSt = urlSt.replace('$name', 'aql_station');
            _this.http.get(urlSt).subscribe(function (stationRes) {
                _this.station_list = stationRes;
                _this.department_list.forEach(function (deptItem, deptIdx) {
                    var station_list = [];
                    var tempDept = {};
                    tempDept['dept_name'] = deptItem.name;
                    _this.station_list.forEach(function (stationItem, stationIdx) {
                        stationItem.group_id.forEach(function (stGrpItem, stGrpIdx) {
                            if (stGrpItem === deptItem.name) {
                                var temp = {};
                                temp['department'] = deptItem.name;
                                temp['station'] = stationItem.name;
                                temp['status'] = false;
                                station_list.push(temp);
                            }
                        });
                    });
                    if (station_list.length > 0) {
                        tempDept['data'] = station_list;
                        _this.dept_station_display_list.push(tempDept);
                    }
                });
                _this.logger.debug(_this.dept_station_display_list);
            });
        });
    };
    AqlDepartmentPage.prototype.navigationClick = function (type) {
        var _this = this;
        if (type === 'cancel') {
            this.navigationProvider.exitToRoot(null);
        }
        else if (type === 'ok') {
            this.dept_station_display_list.forEach(function (itemMain, idxMain) {
                itemMain.data.forEach(function (itemSub, idxSub) {
                    if (itemSub.status === true) {
                        delete itemSub['status'];
                        _this.dept_station_selected_list.push(itemSub);
                    }
                });
            });
            this.logger.debug(this.dept_station_selected_list);
            this.navigationProvider.nextView(this.nextPage, {
                data: this.dept_station_selected_list
            });
        }
    };
    AqlDepartmentPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'page-aql-department',
            template: __WEBPACK_IMPORTED_MODULE_6__aql_department_template__["a" /* AQL_DEPARTMENT_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__["o" /* NavController */], __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 */]])
    ], AqlDepartmentPage);
    return AqlDepartmentPage;
}());

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

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AQL_DEPARTMENT_HTML; });
/**
 * Created by Paramee Gunethilake on 7/10/2018.
 */
var AQL_DEPARTMENT_HTML = "\n\n<ion-header>\n    <common-main-header [title]=\"currentPageConfig.title\" [tools]=\"tools\"></common-main-header>\n</ion-header>\n\n\n<ion-content class=\"main-container\">\n<ion-grid no-padding>\n<ion-row class=\"summary-row\">\n  <ion-col class=\"summary-col\">\n      <core-domain-header></core-domain-header>\n  </ion-col>\n</ion-row>\n</ion-grid>\n\n  <ion-grid class=\"main-grid_none_header\">\n  <ion-row class=\"add-btn-row\" align-items-center>\n    <div class=\"hdr r-align-flx\">Departments</div>\n   <button class=\"add-button\" ion-button><ion-icon name=\"add\"></ion-icon></button>\n  </ion-row>\n\n    <ion-row *ngFor=\" let mainItem of dept_station_display_list\">\n  <ion-list *ngFor=\"let subItem of mainItem.data\"  class=\"selection-list\">\n    <ion-item class=\"selection-item\" [ngClass]=\"{'item-slct':subItem.status == true,\n                       'item-not-slct':subItem.status == false}\">\n        <ion-label  class=\"selection-header\">{{subItem.department}}</ion-label>\n      <ion-checkbox [(ngModel)]=\"subItem.status\"></ion-checkbox>\n    </ion-item>\n  </ion-list>\n    </ion-row>\n\n    <!-- <ion-row no-padding class=\"data-empty-time\">\n      <ion-col>\n      <div class=empt-msg><ion-icon name=\"md-alert\" class=\"ion-icon\" item-left></ion-icon><span class=\"space-rem\"></span>\n        Please Click <ion-icon name=\"add\" class=\"pls-ioc\"></ion-icon> button to add Department\n       </div>\n      </ion-col>\n    </ion-row> -->\n  </ion-grid>\n</ion-content>\n\n<ion-footer no-padding>\n  <ion-navbar no-padding>\n\n    <ion-grid no-padding>\n      <ion-row justify-content-end no-padding>\n        <ion-col *ngFor=\"let button of currentPagebuttons \" col-2 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-department-template.js.map

/***/ })

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