webpackJsonp([5],{

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

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivityLogPageModule", function() { return ActivityLogPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__activity_log_page__ = __webpack_require__(1547);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__component_common_module__ = __webpack_require__(956);
/**
 * Created by nisitha on 4/27/18.
 */
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 ActivityLogPageModule = /** @class */ (function () {
    function ActivityLogPageModule() {
    }
    ActivityLogPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_1__activity_log_page__["a" /* ActivityLogPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_1__activity_log_page__["a" /* ActivityLogPage */]), __WEBPACK_IMPORTED_MODULE_3__component_common_module__["a" /* StoreComponentsModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_1__activity_log_page__["a" /* ActivityLogPage */]]
        })
    ], ActivityLogPageModule);
    return ActivityLogPageModule;
}());

//# sourceMappingURL=activity-log-page.module.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TableSettingsModel; });
/* unused harmony export Column */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ButtonConfig; });
var TableSettingsModel = /** @class */ (function () {
    function TableSettingsModel(obj) {
        if (obj && obj.columns) {
            this.columns = this.getColumns(obj.columns);
        }
        this.actions = obj && obj.actions;
        this.pager = obj && obj.pager;
    }
    TableSettingsModel.prototype.getColumns = function (columns) {
        var converted = {};
        var timeColumn = {
            'data_type': 'time',
            'display_name': 'Time',
            'editable': false,
            'key': 'added_datetime'
        };
        converted['added_datetime'] = new Column(timeColumn);
        columns.forEach(function (column) {
            // todo: change field name to formal names
            var key = column.key;
            converted[key] = new Column(column);
        });
        return converted;
    };
    return TableSettingsModel;
}());

var Column = /** @class */ (function () {
    function Column(obj) {
        this.type = 'text';
        this.title = obj && obj.display_name;
        this.filter = false;
        this.editable = obj && obj.editable;
        if (obj && obj.editor) {
            this.editor = obj.editor;
        }
        if (obj && (obj.data_type === 'date')) {
            this.type = 'custom';
            this.editable = false;
        }
        else if (obj && (obj.data_type === 'time')) {
            this.type = 'custom';
            this.editable = false;
        }
    }
    return Column;
}());

var ButtonConfig = /** @class */ (function () {
    function ButtonConfig(obj) {
        this.visibility = obj && obj.visibility;
        this.waiting_time = obj && obj.waiting_time;
        this.action_type = obj && obj.action_type;
        this.button_name = obj && obj.button_name;
        this.display_name = obj && obj.display_name;
        this.next_view_ref = obj && obj.next_view_ref;
    }
    return ButtonConfig;
}());

//# sourceMappingURL=scanned-report-model.js.map

/***/ }),

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

"use strict";
/* unused harmony export AUDIO_MESSAGES1 */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActivityLogPage; });
/* 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__providers_ministore_data_provider__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__models_scanned_report_model__ = __webpack_require__(1520);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__activity_log_page_template__ = __webpack_require__(1548);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__ = __webpack_require__(50);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__ = __webpack_require__(346);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__ = __webpack_require__(79);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__providers_store_data_service__ = __webpack_require__(957);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ncinga_sp_nsp_app_core_dist_providers_app_events__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_reader_dist_providers_scanner_listener__ = __webpack_require__(137);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__component_nc_date_picker_nc_date_picker__ = __webpack_require__(963);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_jquery__ = __webpack_require__(197);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_jquery__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__ministore_utils__ = __webpack_require__(38);
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);
};
















window['jQuery'] = __WEBPACK_IMPORTED_MODULE_14_jquery__;
window['$'] = __WEBPACK_IMPORTED_MODULE_14_jquery__;
// let footable = require('assets/js/footable-bootstrap.latest/js/footable.min.js');
var AUDIO_MESSAGES1 = {
    ERROR: 'assets/audio/Wrong-alert-beep-sound.mp3',
    PASSED: 'assets/audio/beep-accept.mp3',
    RECEIVED: 'assets/audio/beep-07.mp3'
};
var ActivityLogPage = /** @class */ (function () {
    function ActivityLogPage(navCtrl, navParams, dataProvider, logger, navProvider, alertCtrl, dataService, appContext, appState, readerSvc, modalCtrl, toastCtrl, renderer, elementRef) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.dataProvider = dataProvider;
        this.logger = logger;
        this.navProvider = navProvider;
        this.alertCtrl = alertCtrl;
        this.dataService = dataService;
        this.appContext = appContext;
        this.appState = appState;
        this.readerSvc = readerSvc;
        this.modalCtrl = modalCtrl;
        this.toastCtrl = toastCtrl;
        this.renderer = renderer;
        this.elementRef = elementRef;
        this.current_barcode_index = -1;
        this.selectedDate = 'today';
        this.app_type = '';
        this.app_name = 'Store';
        this.adding_manually = false;
        this.active_today_view = false;
        this.dataRange = {
            start: 0,
            end: 0
        };
        this.date = new Date().toString();
        this.dateRangeForFilter = {
            startDate: this.date,
            endDate: this.date
        };
        this.isInitialized = false;
    }
    ActivityLogPage.prototype.listenToScanner = function () {
        var _this = this;
        var subscription = this.readerSvc.scannerEventPublisher().subscribe(function (res) {
            _this.handleScanEvent(res);
        });
        this.dataService.setEventSubscriber(subscription);
    };
    ActivityLogPage.prototype.handleScanEvent = function (res) {
        var message;
        if (res) {
            message = res.topic;
        }
        if (res && res.data && res.topic === __WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].ScanMainTag) {
            var tag = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["c" /* Tag */]({});
            tag.tag_id.type = 'qrcode';
            tag.tag_id.code = res.data.id;
            tag.tag_details = res.data;
            if (this.isPartially) {
                if (this.app_type === 'OUT') {
                    // find whether this item is duplicating in OUT app
                    if (this.sku_type === 'group' && this.dataService.getGroupTag(tag.tag_id.code)) {
                        this.showAlert('duplicate', null);
                        return;
                    }
                    else if (!this.dataService.checkExisting(tag.tag_id.code, 'IN')) {
                        this.showAlert('not_found', null);
                        return;
                    }
                    if (this.sku_type === 'group') {
                        this.openScanReport(tag, 'scan_event');
                    }
                    else if (this.dataService.isPartiallyOpened() && this.dataService.isSamePartiallyTag(tag)) {
                        this.sendNewChildToPartially(res);
                    }
                    else {
                        this.openScanReport(tag, 'scan_event');
                    }
                }
                else {
                    if (this.sku_type === 'group' && this.dataService.checkExisting(tag.tag_id.code, 'IN')) {
                        this.showAlert('duplicate', null);
                        return;
                    }
                    else if (this.dataService.isPartiallyOpened() && this.sku_type === 'group') {
                        this.sendNewChildToPartially(res);
                    }
                    else if (this.dataService.isPartiallyOpened() && this.dataService.isSamePartiallyTag(tag)) {
                        this.sendNewChildToPartially(res);
                    }
                    else {
                        this.openScanReport(tag, 'scan_event');
                    }
                }
            }
            else {
                if (this.app_type === 'OUT') {
                    // find whether this item is duplicating in OUT app
                    /*if (this.dataService.checkExisting(tag.tag_id.code, this.app_type)) {
                        this.showAlert('duplicate', null);
                    } else*/ if (!this.dataService.checkExisting(tag.tag_id.code, 'IN')) {
                        // find whether this item is not found in system
                        this.showAlert('not_found', null);
                    }
                    else {
                        this.openScanReport(tag, 'scan_event');
                    }
                }
                else {
                    /* if (this.dataService.checkExisting(tag.tag_id.code, this.app_type)) {
                         this.showAlert('duplicate', null);
                     } else {*/
                    this.openScanReport(tag, 'scan_event');
                    // }
                }
            }
        }
        this.presentToast(message);
    };
    ActivityLogPage.prototype.presentToast = function (message) {
        /*const toast = this.toastCtrl.create({
            message: message + ' Detected',
            duration: 3000
        });
        toast.present();*/
    };
    ActivityLogPage.prototype.openPartiallyUpdate = function (tag) {
        if (this.isPartially) {
            var existingTag = this.dataService.getTag(tag.tag_id.code);
            this.openScanReport(tag, 'scan_event');
        }
    };
    ActivityLogPage.prototype.showAlert = function (msg_type, event) {
        var _this = this;
        if (msg_type === 'delete_confirm_msg') {
            var message = this.delete_confirm_msg;
            var alert_1 = this.alertCtrl.create({
                title: 'Warning !',
                subTitle: 'Are you sure you want to delete this?',
                buttons: [{
                        text: 'Ok',
                        role: 'ok',
                        handler: function () {
                            _this.confirmDelete(event);
                            // this.logger.debug(event.source.data);
                        }
                    },
                    {
                        text: 'Cancel',
                        role: 'cancel'
                    }],
                cssClass: 'deleteCnfMsg'
            });
            this.delete_confirm_msg = alert_1;
            alert_1.present();
        }
        else if (msg_type === 'edit_confirm_msg') {
            var message = this.edit_confirm_msg;
            var alert_2 = this.alertCtrl.create({
                title: 'Warning !',
                subTitle: 'Do you want to save changes?',
                buttons: [{
                        text: 'Ok',
                        role: 'ok',
                        handler: function () {
                            _this.confirmEdit(event);
                            // this.logger.debug(event.source.data);
                        }
                    },
                    {
                        text: 'Cancel',
                        role: 'cancel'
                    }],
                cssClass: 'warningMsg'
            });
            this.edit_confirm_msg = alert_2;
            alert_2.present();
        }
        else if (msg_type === 'not_found') {
            var message_1 = this.alertCtrl.create({
                title: 'Error !',
                subTitle: 'Item does not available in the stock.!',
                buttons: ['Ok'],
                cssClass: 'errorMsg'
            });
            message_1.present();
            setTimeout(function () {
                message_1.dismiss();
            }, 2000);
        }
        else if (msg_type === 'duplicate') {
            var message = this.alertCtrl.create({
                title: 'Duplicate detected !',
                subTitle: 'This item is already scanned!',
                buttons: ['Ok'],
                cssClass: 'errorMsg'
            });
            message.present();
            setTimeout(function () {
                // message.dismiss();
            }, 2000);
        }
    };
    ActivityLogPage.prototype.initEventListeners = function () {
        var _this = this;
        this.dataService.unsubscribeQRScanner();
        this.listenToScanner();
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_11__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_SUBJECT_CHANGE, function (res) {
            if (res) {
                _this.stationId = res;
                setTimeout(function () {
                    _this.setRecentData(_this.dataRange.start, _this.dataRange.end);
                }, 500);
            }
        });
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].UpdateActivityLog, function (data, time) {
            _this.refreshSource();
        });
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_group', function (group, time) {
            _this.refreshSource();
        });
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_single', function (tag, time) {
            _this.refreshSource();
        });
        this.appState.subscribe('group:created', function (group, time) {
            _this.addNewData(group);
        });
        this.appState.subscribe('group:updated', function (group, time) {
            _this.selected_sku_group = group;
        });
        this.appState.subscribe('sku:created', function (sku) {
            _this.addNewData(sku.sku_group);
        });
        this.appState.unsubscribe(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].ReceivedScanItem);
        this.appState.subscribe(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].ReceivedScanItem, function (res) {
            _this.handleScanEvent(res);
        });
        this.appState.subscribe('sku:manual_add', function (sku) {
            if (_this.app_type === 'OUT') {
                _this.getExistingGroup(sku);
            }
            else {
                if (!_this.selected_sku_group) {
                    _this.selected_sku_group = [];
                }
                sku['existing_group'] = _this.selected_sku_group;
                _this.goToNextView(sku, null, 'manual_add');
            }
        });
        this.appState.subscribe('save:data', function (sku, time) {
            _this.saveData(sku);
        });
        this.appState.subscribe('sku:saved', function (sku, time) {
        });
    };
    ActivityLogPage.prototype.sendNewChildToPartially = function (childTag) {
        childTag['topic'] = __WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].NewChildReceived;
        this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].NewChildReceived, childTag);
    };
    ActivityLogPage.prototype.refreshSource = function () {
        this.setRecentData(this.dataRange.start, this.dataRange.end);
    };
    // todo : remove after barcode module integration
    ActivityLogPage.prototype.setTemporarySkuData = function () {
        if (this.current_barcode_index === (this.barcodes_data.length - 1)) {
            this.current_barcode_index = -1;
        }
        else {
            this.current_barcode_index++;
        }
        // this.logger.debug('scanning item with bar code: ' + this.barcodes[this.current_barcode_index]);
        this.scanned_sku = this.barcodes_data[this.current_barcode_index];
    };
    ActivityLogPage.prototype.goToNextView = function (rowData, group, action) {
        var viewConf = __WEBPACK_IMPORTED_MODULE_15__ministore_utils__["a" /* MUtils */].getControllerConfig(action, this.view_controllers);
        var tag = this.dataService.getTag(rowData.id);
        if (viewConf.next_view_ref && tag && !this.isPartially) {
            var newViewRef = viewConf.next_view_ref[this.dataService.skuType];
            tag['action'] = action;
            tag['app_type'] = this.app_type;
            tag['existing_group'] = this.selected_sku_group;
            this.navProvider.nextView(newViewRef, tag);
        }
        else if (viewConf.next_view_ref && tag && this.isPartially) {
            var next_view_ref = viewConf.next_view_ref;
            var newData = {
                tag: tag
            };
            this.navProvider.nextView(next_view_ref, newData);
        }
    };
    ActivityLogPage.prototype.openScanReport = function (tag, action) {
        var viewConf = __WEBPACK_IMPORTED_MODULE_15__ministore_utils__["a" /* MUtils */].getControllerConfig(action, this.view_controllers);
        if (viewConf && viewConf.next_view_ref) {
            var next_view_ref = viewConf.next_view_ref;
            var data = {
                args: {
                    action: action,
                    app_type: this.app_type,
                    sku_type: this.sku_type,
                },
                tag: tag
            };
            this.navProvider.nextView(next_view_ref, data);
        }
    };
    ActivityLogPage.prototype.getTempData = function () {
        var _this = this;
        this.dataProvider.getBarCodes().subscribe(function (data) {
            _this.barcodes = data['data'];
        });
    };
    /*
     *  recent data
     *  == this.dataHandler.getTodayActivates();
     * */
    ActivityLogPage.prototype.setData = function (data) {
        var new_data = [];
        if (Array.isArray(data)) {
            data.forEach(function (item) {
                var sku = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["a" /* SKU */](item);
                new_data.push(sku);
            });
        }
        this.recent_data = new_data;
    };
    /*
     * is this ti create table model from sku data
     * */
    ActivityLogPage.prototype.setSource = function (tags) {
        var new_source = [];
        tags.forEach(function (tag) {
            var details = tag.tag_details;
            details['id'] = tag.tag_id.code;
            new_source.push(details);
        });
        if (this.table_setting && this.table_setting.actions) {
            this.setEditDeletePermissions();
        }
        if (new_source.length === 0) {
            this.isEmpty = true;
        }
        else {
            this.isEmpty = false;
        }
        // this.source = new LocalDataSource(new_source);
        this.source.refresh();
    };
    ActivityLogPage.prototype.configurePage = function (value) {
        if (value) {
            this.view_descriptor = value;
            this.sku_type = this.dataService.skuType;
            this.app_type = this.dataService.appType;
            this.app_name = value.app_name;
            this.isPartially = this.dataService.isPartially();
            this.reset_on_log = value.reset_on_log;
            this.view_controllers = value.view_controllers ? value.view_controllers : [];
            this.component_descriptors = value.components_descriptor;
            var table_conf = __WEBPACK_IMPORTED_MODULE_15__ministore_utils__["a" /* MUtils */].getComponentConfig('recent_table', this.component_descriptors);
            if (table_conf) {
                this.pickerConf = table_conf.date_picker_conf;
                this.table_setting = new __WEBPACK_IMPORTED_MODULE_4__models_scanned_report_model__["b" /* TableSettingsModel */](table_conf.settings);
                this.filter_columns = table_conf.search_settings && table_conf.search_settings.filter_columns;
                this.setColumns(table_conf.common_columns);
                this.setFilterColumnsNames(this.filter_columns);
                this.table_setting['attr'] = {
                    class: 'table table-bordered'
                };
                if (this.table_setting.actions) {
                    this.setEditDeletePermissions();
                }
            }
        }
    };
    ActivityLogPage.prototype.setEditDeletePermissions = function () {
        var action = {};
        this.table_setting['edit'] = {
            editButtonContent: '<button><i class="ion-md-create store-icon"></i></button>',
            confirmSave: true
        };
        this.table_setting['delete'] = {
            deleteButtonContent: '<button><i class="ion-ios-trash-outline store-icon"></i></button>',
            confirmDelete: true
        };
        action['delete'] = this.table_setting.actions['delete'];
        action['edit'] = this.table_setting.actions['edit'];
        action['add'] = this.table_setting.actions['add'];
        if (Object.keys(action).length === 0) {
            this.table_setting.actions = false;
        }
        else {
            action['columnTitle'] = this.table_setting.actions['columnTitle'];
            action['position'] = this.table_setting.actions['position'];
            this.table_setting.actions = action;
        }
    };
    ActivityLogPage.prototype.setFilterColumnsNames = function (filter_columns) {
        var _this = this;
        var names = [];
        var columns = this.table_setting.columns;
        filter_columns.forEach(function (column) {
            if (_this.table_setting.columns.hasOwnProperty(column)) {
                names.push(columns[column].title);
            }
        });
        this.filter_names = names;
        this.filter_names_str = this.filter_names.join(' , ');
    };
    ActivityLogPage.prototype.setColumns = function (common_columns) {
        this.columns = common_columns;
    };
    ActivityLogPage.prototype.onSearch = function (query) {
        if (query.value !== '') {
            var filters_1 = [];
            this.filter_columns.forEach(function (column) {
                var filterData = {};
                filterData['field'] = column;
                filterData['search'] = query.value;
                filters_1.push(filterData);
            });
            this.source.setFilter(filters_1, false);
        }
        else if (query.value === '') {
            this.source.setFilter([]);
        }
    };
    ActivityLogPage.prototype.addNewData = function (data) {
        data['store_id'] = 'store_' + (Date.now() + Math.random()).toString(36).substr(2, 9);
        if (this.recent_data) {
            this.recent_data.splice(0, -1, data);
        }
        else {
            this.recent_data = [];
            this.recent_data.splice(0, -1, data);
        }
        this.source.refresh();
        this.selected_sku_group = [];
    };
    ActivityLogPage.prototype.onRowClick = function (event) {
        if (event) {
            this.selected_item = event.data;
            this.goToNextView(event.data, null, 'row_click');
        }
    };
    ActivityLogPage.prototype.saveData = function (data) {
        this.source.add(data);
    };
    ActivityLogPage.prototype.getExistingGroup = function (barcode) {
        var _this = this;
        this.dataProvider.getGroupData(barcode.barcode_id).subscribe(function (item) {
            _this.selected_sku_group = item['data'];
            _this.goToNextView(barcode, _this.selected_sku_group, 'scan_event');
        });
    };
    ActivityLogPage.prototype.addManually = function () {
        // this.navProvider.nextView('simple_grading_page', {});
        this.adding_manually = true;
        var tag = new __WEBPACK_IMPORTED_MODULE_7__models_store_data_model__["c" /* Tag */]({});
        tag.tag_id.code = 'manual_' + Math.random() + '_' + Date.now().toString();
        tag.tag_id.type = 'manual';
        tag.tag_id.process_type = 'manual';
        if (!this.selected_sku_group) {
            this.selected_sku_group = [];
        }
        tag.tag_details = {};
        this.openScanReport(tag, 'manual_add');
    };
    ActivityLogPage.prototype.deleteItem = function (event) {
        this.showAlert('delete_confirm_msg', event);
    };
    ActivityLogPage.prototype.editItem = function (event) {
        this.showAlert('edit_confirm_msg', event);
    };
    ActivityLogPage.prototype.confirmDelete = function (event) {
        event.confirm.resolve(event.source.data);
        this.dataService.removeTag(event.data.id);
        this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, event);
    };
    ActivityLogPage.prototype.confirmEdit = function (event) {
        event.confirm.resolve(event.source.data);
        this.dataService.updateTag(event.data.id, event.newData);
        this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].UpdateCurrentStatus, event);
        this.refreshSource();
    };
    ActivityLogPage.prototype.ionViewWillUnload = function () {
    };
    /*openCalender() {
        if (this.ncDatePicker) {
            this.ncDatePicker.openCalender();
        }
    }*/
    ActivityLogPage.prototype.test = function (event) {
        //  console.log(event);
    };
    ActivityLogPage.prototype.ionViewDidLoad = function () {
        var element = this.elementRef.nativeElement.querySelector('input');
        if (element) {
            // this.renderer.invokeElementMethod(element, 'focus', []);
        }
        if (!this.isInitialized) {
            this.isInitialized = true;
            this.initEventListeners();
            this.adding_manually = false;
            this.getTempData();
            this.configurePage(this.navParams.data.conf);
            this.active_today_view = true;
            this.stationId = this.appContext.getCurrentSubject().id;
            this.setRecentData(0, 0);
        }
    };
    ActivityLogPage.prototype.getTimeRange = function (start, end) {
        var dateRange = {
            start: 0,
            end: 0
        };
        var startDate = new Date();
        var endDate = new Date();
        startDate.setDate(startDate.getDate() + start);
        endDate.setDate(endDate.getDate() + end);
        startDate.setUTCHours(0, 0, 0, 0);
        endDate.setUTCHours(23, 59, 59, 999);
        dateRange.start = startDate.getTime();
        dateRange.end = endDate.getTime();
        return dateRange;
    };
    ActivityLogPage.prototype.setRecentData = function (start, end) {
        this.dataRange.start = start;
        this.dataRange.end = end;
        var dateRange = this.getTimeRange(start, end);
        var filteredData = this.dataService.filterByDate(dateRange.start, dateRange.end);
        // this.setSource(filteredData);
    };
    ActivityLogPage.prototype.setDateSelect = function (dateRange) {
        this.setRecentData(dateRange.start, dateRange.end);
    };
    ActivityLogPage.prototype.onRangeSelect = function (dateRange) {
        // console.log(dateRange);
        var filteredData = this.dataService.filterByDate(dateRange.start, dateRange.end);
        // this.setSource(filteredData);
    };
    ActivityLogPage.prototype.openParttiallyAddPage = function () {
        this.navProvider.nextView('new-scan-page', {});
    };
    ActivityLogPage.prototype.openCamera = function () {
        this.readerSvc.startScan(__WEBPACK_IMPORTED_MODULE_8__providers_store_event_service__["a" /* StoreEvent */].ScanMainTag);
    };
    ActivityLogPage.prototype.hideActionColumn = function () {
        this.table_setting.actions = false;
    };
    ActivityLogPage.prototype.openGradingPage = function () {
        this.navProvider.nextView('store-grading-page', '');
    };
    ActivityLogPage.prototype.openGatePassPage = function () {
        this.navProvider.nextView('gate-pass-page', '');
    };
    ActivityLogPage.prototype.openTransactionLog = function () {
        this.navProvider.nextView('page-transaction-log', '');
    };
    ActivityLogPage.prototype.openStockInhand = function () {
        this.navProvider.nextView('page-stock-inhand', '');
    };
    ActivityLogPage.prototype.openActivityLogNew = function () {
        this.navProvider.nextView('page-activity-log-new', '');
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])('ncDatePicker'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_13__component_nc_date_picker_nc_date_picker__["a" /* NcDatePicker */])
    ], ActivityLogPage.prototype, "ncDatePicker", void 0);
    ActivityLogPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'activity-log-page',
            template: __WEBPACK_IMPORTED_MODULE_5__activity_log_page_template__["a" /* MINISTORE_PAGE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_2__providers_ministore_data_provider__["a" /* MiniStoreDataProvider */], __WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_navigation_manager__["a" /* NavigationManager */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */],
            __WEBPACK_IMPORTED_MODULE_9__providers_store_data_service__["a" /* StoreDataService */], __WEBPACK_IMPORTED_MODULE_10__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */],
            __WEBPACK_IMPORTED_MODULE_10__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */], __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_reader_dist_providers_scanner_listener__["a" /* ScannerListenerProvider */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["m" /* ModalController */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["w" /* ToastController */], __WEBPACK_IMPORTED_MODULE_0__angular_core__["Renderer"], __WEBPACK_IMPORTED_MODULE_0__angular_core__["ElementRef"]])
    ], ActivityLogPage);
    return ActivityLogPage;
}());

//# sourceMappingURL=activity-log-page.js.map

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MINISTORE_PAGE_HTML; });
/**
 * Created by nisitha athukoarala on 5/3/18.
 */
var MINISTORE_PAGE_HTML = "\n<ion-content class=\"main-content\">\n    <div class=\"grid-wrapper\">\n        <ion-grid no-padding class=\"main-grid\">\n                <!--<ion-row>\n                    <ion-col><button ion-button (click)=\"openGradingPage()\">Grading Page</button></ion-col>\n                    <ion-col><button ion-button (click)=\"openGatePassPage()\">Gate Pass Page</button></ion-col>\n                    <ion-col><button ion-button (click)=\"openTransactionLog()\">Transaction Log</button></ion-col>\n                    <ion-col><button ion-button (click)=\"openStockInhand()\">In sock</button></ion-col>\n                    <ion-col><button ion-button (click)=\"openActivityLogNew()\">Activity</button></ion-col>\n                </ion-row>-->\n <ion-row class=\"table-toolbar\" *ngIf=\"filter_columns\">\n                <div class=store-id>\n                    <ion-icon class=\"direction-in\"  *ngIf=\"app_type === 'IN'\" name=\"ios-log-in-outline\">\n                    <span class=\"app-name\">{{app_name}} {{app_type}}</span></ion-icon>\n                    <ion-icon class=\"direction-out\"  *ngIf=\"app_type === 'OUT'\" name=\"ios-log-out-outline\">\n                    <span class=\"app-name\">{{app_name}} {{app_type}}</span></ion-icon>\n                </div>\n                 <nc-date-picker #ncDatePicker class=\"store-seg\" (onSelect)=\"setDateSelect($event)\"\n                  (onRangeSelect)=\"onRangeSelect($event)\" [config]=\"pickerConf\"></nc-date-picker>\n                <div class=\"store-search hid-on-mobile\">\n                   <ion-searchbar class=\"search\" (ionChange)=\"onSearch($event)\" *ngIf=\"filter_names_str\"\n                                   placeholder=\"{{filter_names_str}}\">\n                    </ion-searchbar>\n                </div>\n                <button ion-button class=\"add-btn\" small (click)=\"addManually()\">\n                    <ion-icon name=\"add\"></ion-icon>\n                </button>\n                <button ion-button class=\"scanner-btn\" small (click)=\"openCamera()\">\n                    <ion-icon name=\"ios-barcode-outline\"></ion-icon>\n                </button>\n            </ion-row>\n            <ion-row class=\"table-container\" *ngIf=\"!isEmpty\">\n                <ion-col class=\"table-wrapper\">\n                    <div *ngIf=\"isEmpty\" class=\"message-container\">\n      <div class=\"message-overlay\">\n      <div class=\"message-inner\"><ion-icon class=\"data-empty-icon\" name=\"ios-alert-outline\"></ion-icon>No data available</div></div>\n    </div>\n                </ion-col>\n            </ion-row>\n            <ion-row class=\"empty-container\" *ngIf=\"isEmpty\">\n                <ion-col class=\"table-wrapper\">\n                    <div *ngIf=\"isEmpty\" class=\"message-container\">\n      <div class=\"message-overlay\">\n      <div class=\"message-inner\"><ion-icon class=\"data-empty-icon\" name=\"ios-alert-outline\"></ion-icon>No data available</div></div>\n    </div>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>";
//# sourceMappingURL=activity-log-page.template.js.map

/***/ })

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