webpackJsonp([25],{

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

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExtraInputModule", function() { return ExtraInputModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__extra_input__ = __webpack_require__(1843);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ngx_translate_core__ = __webpack_require__(86);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_components_module__ = __webpack_require__(991);
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;
};
/**
 * Created by dilshan on 8/22/18.
 */






var ExtraInputModule = /** @class */ (function () {
    function ExtraInputModule() {
    }
    ExtraInputModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_1__extra_input__["a" /* ExtraInput */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */],
                __WEBPACK_IMPORTED_MODULE_5__components_components_module__["a" /* ComponentsModule */],
                __WEBPACK_IMPORTED_MODULE_3_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_1__extra_input__["a" /* ExtraInput */]),
                __WEBPACK_IMPORTED_MODULE_4__ngx_translate_core__["b" /* TranslateModule */].forChild()
            ],
            exports: [
                __WEBPACK_IMPORTED_MODULE_1__extra_input__["a" /* ExtraInput */]
            ],
            providers: []
        })
    ], ExtraInputModule);
    return ExtraInputModule;
}());

//# sourceMappingURL=extra.input.module.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ExtraInput; });
/* 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__extra_input_template__ = __webpack_require__(1844);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__models_btnModel__ = __webpack_require__(56);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__providers_shared_data_service_shared_data_service__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__angular_common__ = __webpack_require__(21);
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);
};
/**
 * Created by dilshan on 8/22/18.
 */








var ExtraInput = /** @class */ (function () {
    function ExtraInput(logger, navParams, navProvider, alertCtrl, sharedDataService, _location) {
        this.logger = logger;
        this.navParams = navParams;
        this.navProvider = navProvider;
        this.alertCtrl = alertCtrl;
        this.sharedDataService = sharedDataService;
        this._location = _location;
        this.fld_one_data = null;
        this.fld_two_data = null;
        this.input_list = [];
        this.bulk_record_arr = [];
        this.ac_event = [];
        this.model = {};
        this.tools = {
            line: true,
            menu: true,
            shift: true,
            user: true,
        };
        this.data_set = this.navParams.get('data');
        this.view_model = this.data_set['model'][this.data_set['model'].length - 1];
        this.bulk_record_arr = this.data_set['model'];
        this.this_view_conf = this.navParams.get('conf');
        for (var key in this.view_model.grade_qtys) {
            if (key) {
                this.input_list.push({
                    nm: key,
                    val: this.view_model.grade_qtys[key]
                });
            }
        }
    }
    ExtraInput.prototype.ionViewWillEnter = function () {
        var _this = this;
        this.this_view_conf.field_set.forEach(function (fld) {
            _this.model[fld] = '';
        });
        // this.fld_one = this.this_view_conf.field_set[0];
        // this.fld_two = this.this_view_conf.field_set[1];
        this.logger.trace('<< page view config >>', this.this_view_conf);
        this.currentPagebuttons = this.this_view_conf.view_controles;
        // this.data_set = this.navParams.get('data');
        // this.view_model = this.data_set['model'][this.data_set['model'].length - 1];1
        this.logger.trace('<< page view model >>', this.view_model);
        /*
         listenForStateChanges page master data set
         */
        // this.pageDataLoader();
        // this.setQuantityOptions();
        // this.loadSelectDataList();
    };
    // copied from rectified.ts file//
    ExtraInput.prototype.navigationClick = function (type) {
        var _this = this;
        try {
            var bool = true;
            for (var key in this.model) {
                if (this.model[key] === '') {
                    bool = false;
                }
            }
            if (bool) {
                if (type === 'cancel') {
                    this.navProvider.exitToRoot(null);
                }
                else if (type === 'ok') {
                    this.bulk_record_arr.forEach(function (data) {
                        _this.ac_event = [
                            {
                                size: {
                                    name: data.recent_grade
                                }
                            }
                        ];
                        var evt = data.event_actual;
                        var grdt = new __WEBPACK_IMPORTED_MODULE_5__models_btnModel__["c" /* GradingModel */](data);
                        grdt.setEventActual(evt);
                        var inp_arr = [];
                        _this.this_view_conf.field_set.forEach(function (objdt) {
                            var act_params = new Object();
                            act_params[objdt] = _this.model[objdt];
                            inp_arr.push(act_params);
                        });
                        grdt.setActParam(inp_arr);
                        _this.data_set['btnConf']['extra_input'] = _this.model;
                        _this.sharedDataService.updateSharedDataService(_this.data_set['btnConf'], data.value, new __WEBPACK_IMPORTED_MODULE_5__models_btnModel__["c" /* GradingModel */](grdt), _this.ac_event);
                    });
                    this.presentAlert();
                    this.navProvider.exitToRoot(null);
                }
            }
            else {
                this.fieldValidation();
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    /*
    alert for filed validation
     */
    ExtraInput.prototype.fieldValidation = function () {
        var alert = this.alertCtrl.create({
            title: 'Error',
            subTitle: 'Please fill all fields',
            buttons: ['Ok']
        });
        alert.present();
    };
    /*
     alert present for bulk scenario
     */
    ExtraInput.prototype.presentAlert = function () {
        var msg = this.this_view_conf.popup;
        var alert = this.alertCtrl.create({
            title: msg.title,
            subTitle: msg.subTitle
        });
        alert.present();
        setTimeout(function () {
            alert.dismiss();
        }, 2000);
    };
    ExtraInput = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'extra-input',
            template: __WEBPACK_IMPORTED_MODULE_2__extra_input_template__["a" /* EXTRA_INPUT_TEMPLATE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist__["m" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */], __WEBPACK_IMPORTED_MODULE_6__providers_shared_data_service_shared_data_service__["a" /* SharedDataProvider */],
            __WEBPACK_IMPORTED_MODULE_7__angular_common__["Location"]])
    ], ExtraInput);
    return ExtraInput;
}());

//# sourceMappingURL=extra.input.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EXTRA_INPUT_TEMPLATE_HTML; });
/**
 * Created by dilshan on 8/22/18.
 */
var EXTRA_INPUT_TEMPLATE_HTML = "\n<ion-header>\n      <common-main-header [title]=\"this_view_conf?.title\" [tools]=\"tools\" [header_disabled]=\"this_view_conf?.subject_disable\">\n      </common-main-header>\n</ion-header>\n<ion-content class=\"offwhite-bg\">\n   <ion-grid no-padding >\n      <ion-row class=\"summary-row\">\n         <ion-col *ngIf=\"this_view_conf?.order_heading\">\n            <core-domain-header [lable]=\"this_view_conf?.lable\"></core-domain-header>\n         </ion-col>\n      </ion-row>\n   </ion-grid>\n   <ion-grid  class=\"mid-content\" no-padding>\n   <ion-row class=\"input-row\">\n        <ion-item col *ngFor=\"let fld of this_view_conf.field_set\">\n          <ion-label fixed>{{fld}}</ion-label>\n          <ion-input type=\"text\"  [(ngModel)]=\"model[fld]\"></ion-input>\n        </ion-item>\n      <!-- <ion-label>{{fld_one}}</ion-label><ion-input></ion-input>\n      <ion-label>{{fld_two}}</ion-label><ion-input></ion-input> -->\n   </ion-row>\n   <ion-row class=\"selc-size-lst\">\n            <!-- <ion-col col-6 col-lg-3 col-md-3 *ngFor=\"let option of view_model.grades; index as i\">\n               <button *ngIf=\"option.value > 0\" ion-button\n               class=\"first-category-btn blue-btn\">\n               <ion-badge >{{view_model.grade_qtys[option.name]}}</ion-badge>\n               {{option.name}}\n               </button>\n            </ion-col> -->\n            <ion-col>\n            <ion-row col-12 class=\"selc-hdr\">Selected Sizes</ion-row>\n            <ion-row class=\"selc-size-row\">\n               <!-- size block -->\n               <ion-col col-6 col-lg-3 col-md-3 class=\"selec-size\" *ngFor=\"let option of input_list; index as i\">\n                  <ion-row class=\"size-row\">\n                     <div class=\"lbl r-align-flx\">Size</div>\n                     <div class=\"cont\">{{option.nm}}</div>\n                  </ion-row>\n                  <ion-row>\n                     <div class=\"lbl-ct r-align-flx\">Qty</div>\n                     <div class=\"qty\">{{option.val}}</div>\n                  </ion-row>\n               </ion-col>\n               <!-- size block -->\n            </ion-row>\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 class=\"right-pdn\">\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\" [disabled]=\"btn_click_view_disabled\" ion-button [hidden]=\"!button.display\"\n               (click)=\"navigationClick(button.button_type)\" class=\"page-button help-category-btn right-pdn\">\n               {{button.button_name}}\n               </button>\n            </ion-col>\n         </ion-row>\n      </ion-grid>\n   </ion-navbar>\n</ion-footer>\n";
//# sourceMappingURL=extra-input-template.js.map

/***/ })

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