(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-cadastro-sis-dashboard-sis-dashboard-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-favoritos/sis-dashboard-favoritos.component.html":
/*!***************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-favoritos/sis-dashboard-favoritos.component.html ***!
  \***************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <h4>{{ 'titles.favoritos' | translate }}</h4>\n    <div class=\"row mt-2\">\n        <div class=\"col-lg-6 col-md-6 col-xs-12\">\n            <ngx-treeview [items]=\"items\" (selectedChange)=\"onSelectedChange($event)\">\n            </ngx-treeview>\n        </div>\n        <div class=\"col-lg-6 col-md-6 col-xs-12\">\n            <button type=\"button\" class=\"btn btn-block btn-success\" (click)=\"onSaveFavorites()\">\n                <i class=\"fa fa-save\"></i>\n                {{ 'labels.salvarFavoritos' | translate }}\n            </button>\n\n            <div class=\"mt-5\" *ngIf=\"rows.length > 0\">\n                <ul class=\"list-group\">\n                    <li class=\"list-group-item list-group-item-secondary\">\n                        <strong>{{ 'labels.itensSelecionados' | translate }}</strong>\n                    </li>\n                    <li class=\"list-group-item d-flex justify-content-between align-items-center\"\n                        *ngFor=\"let item of rows\">\n                        <div class=\"col-6\">\n                            {{ item.link }}\n                        </div>\n                        <div class=\"col-6\">\n                            <app-combo-icone id=\"imageIcon\"\n                                             name=\"imageIcon\"\n                                             [selected]=\"item.icon\"\n                                             (outObjeto)=\"item.icon = $event\"></app-combo-icone>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n        </div>\n    </div>\n</div>\n\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-form/sis-dashboard-form.component.html":
/*!*****************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-form/sis-dashboard-form.component.html ***!
  \*****************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [formAction]=\"actionForm\" [itemData]=\"data.sisDashboardId\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <app-form-legenda></app-form-legenda>\n            <div class=\"card-body widget-body\">\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"row\">\n                        <div class=\"col-lg-3\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"sisDashboardId\">{{'labels.id' | translate}}</label>\n                                <input id=\"sisDashboardId\" name=\"sisDashboardId\" [(ngModel)]=\"data.sisDashboardId\"\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row mt-3\">\n                        <div class=\"col-lg-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <div class=\"custom-control custom-checkbox\">\n                                    <input id=\"favorito\" type=\"checkbox\" name=\"favorito\"\n                                        class=\"custom-control-input checkbox-success\" [(ngModel)]=\"data.favorito\"\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" />\n                                    <label class=\"custom-control-label\" for=\"favorito\">{{ 'labels.favorito' | translate\n                                        }}</label>\n                                </div>\n                                <div class=\"custom-control custom-checkbox\">\n                                    <input id=\"graficos\" type=\"checkbox\" name=\"grafico\"\n                                        class=\"custom-control-input checkbox-success\" [(ngModel)]=\"data.grafico\"\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" />\n                                    <label class=\"custom-control-label\" for=\"graficos\">{{ 'labels.grafico' | translate\n                                        }}</label>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"rotina\" class=\"required\">{{'labels.rotina' | translate}}</label>\n                                <select id=\"rotina\" name=\"rotina\" [(ngModel)]=\"data.codRotina\" required=\"true\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    class=\"form-control form-control-sm\">\n                                    <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                                    <option [value]=\"r.sisFormularioId\" *ngFor=\"let r of menus\">{{\n                                        r.descricao }}\n                                    </option>\n                                </select>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"operador\">{{'labels.operador' | translate}}</label>\n                                <app-combo-padrao id=\"operador\" name=\"operador\" tabela=\"usuarios\" chave=\"usuario\"\n                                    descricao=\"usuario\" ativos=\"true\" [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    [(ngModel)]=\"data.operador\">\n                                </app-combo-padrao>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6\" *ngIf=\"data.favorito === 'S' || data.favorito === true\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"grupousuario\">{{ 'labels.grupousuario' | translate }}</label>\n                                <app-combo-padrao id=\"grupousuario\" name=\"gruposDeUsuarioId\" tabela=\"GruposDeUsuario\"\n                                    chave=\"CodGrupoUser\" descricao=\"DescrGrupoUser\" ativos=\"true\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    [(ngModel)]=\"data.gruposDeUsuarioId\">\n                                </app-combo-padrao>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6\" *ngIf=\"data.favorito === 'S' || data.favorito === true\">\n                            <div class=\"form-group form-group-sm\" [ngStyle]=\"{'min-height':'45px', 'height':'100%'}\">\n                                <label for=\"imageIcon\">{{'labels.icone' | translate}}</label>\n                                <app-combo-icone id=\"imageIcon\" name=\"imageIcon\" required=\"false\"\n                                    [selected]=\"data.imageIcon\" [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    (outObjeto)=\"outImage($event)\"></app-combo-icone>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row mt-3\">\n                        <div class=\"col-lg-12\">\n                            <div class=\"form-group\">\n                                <button class=\"btn btn-success mr-2\" type=\"submit\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                    {{ 'buttons.salvar' | translate }}\n                                </button>\n                                <button class=\"btn btn-success\" (click)=\"saveAndCreate(f)\" type=\"button\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvarNovo' | translate\n                                    }}</button>\n                            </div>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-index/sis-dashboard-index.component.html":
/*!*******************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-index/sis-dashboard-index.component.html ***!
  \*******************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"data.sisDashboardId\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtSisDashboard\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n");

/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-favoritos/sis-dashboard-favoritos.component.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard-favoritos/sis-dashboard-favoritos.component.ts ***!
  \***********************************************************************************************************/
/*! exports provided: ProductTreeviewConfig, SisDashboardFavoritosComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProductTreeviewConfig", function() { return ProductTreeviewConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboardFavoritosComponent", function() { return SisDashboardFavoritosComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ngx_treeview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ngx-treeview */ "./node_modules/ngx-treeview/src/index.js");
/* harmony import */ var _pages_admin_corporate_corporate_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../pages/admin/corporate/corporate.service */ "./src/app/pages/admin/corporate/corporate.service.ts");
/* harmony import */ var _pages_dashboard_dashboard_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../pages/dashboard/dashboard.service */ "./src/app/pages/dashboard/dashboard.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _admin_corporate_sis_rotina_sis_rotina_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../admin/corporate/sis-rotina/sis-rotina.service */ "./src/app/pages/admin/corporate/sis-rotina/sis-rotina.service.ts");
/* harmony import */ var _login_login_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../login/login.model */ "./src/app/pages/login/login.model.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../sis-dashboard.constants */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.constants.ts");
/* harmony import */ var _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../sis-dashboard.model */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.model.ts");
/* harmony import */ var _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../sis-dashboard.service */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.service.ts");
/* harmony import */ var _app_settings__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./../../../../app.settings */ "./src/app/app.settings.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
















var ProductTreeviewConfig = /** @class */ (function (_super) {
    __extends(ProductTreeviewConfig, _super);
    function ProductTreeviewConfig() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.hasAllCheckBox = false;
        _this.hasFilter = true;
        _this.hasCollapseExpand = true;
        _this.maxHeight = 450;
        return _this;
    }
    ProductTreeviewConfig = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])()
    ], ProductTreeviewConfig);
    return ProductTreeviewConfig;
}(ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["TreeviewConfig"]));

var SisDashboardFavoritosComponent = /** @class */ (function (_super) {
    __extends(SisDashboardFavoritosComponent, _super);
    function SisDashboardFavoritosComponent(appSettings, messageService, funcoesService, permissoesUtils, sisDashboardService, dashboardService, loginService, funcoes, sisRotinaService, corporate) {
        var _this = _super.call(this, new _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_12__["SisDashboardConstants"], funcoesService) || this;
        _this.appSettings = appSettings;
        _this.messageService = messageService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.sisDashboardService = sisDashboardService;
        _this.dashboardService = dashboardService;
        _this.loginService = loginService;
        _this.funcoes = funcoes;
        _this.sisRotinaService = sisRotinaService;
        _this.corporate = corporate;
        _this.favoritesOld = [];
        _this.rows = [];
        _this.icons = [];
        _this.graficosOld = [];
        return _this;
    }
    SisDashboardFavoritosComponent.prototype.ngOnInit = function () {
        return __awaiter(this, void 0, void 0, function () {
            var err_1;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.appSettings.getMenusAsync()];
                    case 1:
                        _a.sent();
                        this.sisRotinas = [];
                        _a.label = 2;
                    case 2:
                        _a.trys.push([2, 4, , 5]);
                        return [4 /*yield*/, this.getSisRotina()];
                    case 3:
                        _a.sent();
                        return [3 /*break*/, 5];
                    case 4:
                        err_1 = _a.sent();
                        return [2 /*return*/, console.log(err_1.message)];
                    case 5:
                        // Carrega a lista de ícones.
                        this.icons = this.appSettings.settings.icons;
                        // Carregar a lista de menus aplicando validação.
                        this.listMenus = this.appSettings.settings.menus.filter(function (m) { return m.apresenta !== "Admin"; });
                        // Carregar a lista com os "favoritos que já foram cadastrados anteriormente".
                        this.dashboardService.get().subscribe(function (resp) {
                            _this.favoritesOld = [];
                            if (_this.funcoes.isNotUndefinedOrNull(resp)) {
                                resp.forEach(function (v) {
                                    if (v.grafico === "S") {
                                        _this.graficosOld.push(v);
                                    }
                                    var c = {
                                        title: v.descricao,
                                        icon: v.imageIcon,
                                        sisDashboardId: v.sisDashboardId,
                                        sisRotina: v.sisRotina,
                                        routerLink: v.stateUrl,
                                        stateUrlPop: v.stateUrlPop
                                    };
                                    _this.favoritesOld.push(c);
                                });
                            }
                            _this.onLoadTreeViewItems();
                        });
                        return [2 /*return*/];
                }
            });
        });
    };
    SisDashboardFavoritosComponent.prototype.ngAfterViewInit = function () {
        // this.onSetOptionSelected();
    };
    SisDashboardFavoritosComponent.prototype.ngAfterViewChecked = function () {
        this.onSetOptionSelected();
    };
    SisDashboardFavoritosComponent.prototype.onLoadTreeViewItems = function () {
        var _this = this;
        var arrResult = [];
        var parents = this.listMenus.filter(function (m) { return m.parentId === 0; });
        parents.forEach(function (element) {
            var isset = false;
            _this.favoritesOld.forEach(function (itm) {
                if (itm.sisDashboardId === element.id) {
                    isset = true;
                }
            });
            var menuAdd = new ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["TreeviewItem"]({
                checked: isset,
                text: element.descricao,
                value: { id: element.id, rotinaId: element.sisRotinaId, sisDashboardId: element.sisDashboardId, icon: element.icon },
                children: _this.getChidrenMenus(element.id)
            });
            if (menuAdd.children !== undefined) {
                arrResult.push(menuAdd);
            }
        });
        this.items = arrResult;
    };
    SisDashboardFavoritosComponent.prototype.getChidrenMenus = function (parentId) {
        var _this = this;
        var arrResult = [];
        var menus = this.appSettings.settings.menus.filter(function (m) { return m.apresenta !== "Admin"; });
        var listChildren = menus.filter(function (m) { return m.parentId === parentId; });
        var arrayGraficoOld = [];
        listChildren.forEach(function (element) {
            var isset = false;
            var issetGrafico = false;
            _this.favoritesOld.forEach(function (itm) {
                if (itm.routerLink === element.routerLink && itm.stateUrlPop === element.routerLinkPopUp) {
                    isset = true;
                }
            });
            _this.graficosOld.forEach(function (itm) {
                if (itm.routerLink === element.routerLink && itm.stateUrlPop === element.routerLinkPopUp) {
                    issetGrafico = true;
                }
            });
            if (issetGrafico) {
                arrayGraficoOld.push({ id: element.id, rotinaId: element.sisRotinaId, sisDashboardId: element.sisDashboardId, icon: element.icon });
            }
            var newItem = {
                checked: isset,
                text: element.descricao,
                value: { id: element.id, rotinaId: element.sisRotinaId, sisDashboardId: element.sisDashboardId, icon: element.icon },
                children: _this.getChidrenMenus(element.id)
            };
            arrResult.push(newItem);
        });
        this.graficosOld = arrayGraficoOld;
        return arrResult;
    };
    ;
    SisDashboardFavoritosComponent.prototype.onSelectedChange = function (downlineItems) {
        var _this = this;
        this.rows = [];
        downlineItems.forEach(function (downlineItem) {
            var item = downlineItem.item;
            var value = item.value;
            var texts = [item.text];
            var reverseTexts = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["reverse"])(texts);
            var itemAdded = _this.favoritesOld.find(function (l) { return l.sisRotinaId === value.rotinaId; });
            var row = {
                sisDashboardId: itemAdded ? itemAdded.sisDashboardId : 0,
                rotinaId: value.rotinaId,
                link: reverseTexts.join(' > '),
                icon: value.icon
            };
            _this.rows.push(row);
        });
        if (this.rows.length > 0) {
            this.onSetOptionSelected();
        }
    };
    SisDashboardFavoritosComponent.prototype.getSisRotina = function () {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.sisRotinaService.get().subscribe(function (data) {
                if (_this.appSettings.settings.menus) {
                    var listMenus = _this.appSettings.settings.menus.filter(function (c) { return c.sisRotinaId > 0 && c.apresenta !== 'Admin'; });
                    listMenus.forEach(function (e) {
                        var s = data.filter(function (c) { return c.sisRotinaId === e.sisRotinaId; })[0];
                        if (s !== undefined) {
                            _this.sisRotinas.push(s);
                        }
                    });
                    resolve(_this.sisRotinas);
                }
            });
        });
        return promise;
    };
    SisDashboardFavoritosComponent.prototype.onSetOptionSelected = function () {
        var _this = this;
        this.rows.forEach(function (r) {
            var selectId = "ddl-icon-" + r['rotinaId'];
            _this.selects.forEach(function (sel) {
                if (sel.nativeElement.attributes.id.value === selectId) {
                    sel.nativeElement.value = r['icon'];
                }
            });
        });
    };
    SisDashboardFavoritosComponent.prototype.onSaveFavorites = function () {
        var _this = this;
        var user = this.loginService.getLogin();
        var list = [];
        this.rows.forEach(function (elem) {
            var issetGrafico = false;
            for (var i = 0; i < _this.graficosOld.length; i++) {
                if (_this.graficosOld[i].rotinaId === elem.rotinaId) {
                    issetGrafico = true;
                    _this.graficosOld.splice(i, 1);
                    break;
                }
            }
            var itemAdd = new _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_13__["SisDashboard"]();
            if (issetGrafico === true) {
                itemAdd.grafico = "S";
            }
            itemAdd.sisDashboardId = elem['sisDashboardId'];
            //itemAdd.sisRotinaId = elem['rotinaId'];
            itemAdd.imageIcon = elem['icon'];
            itemAdd.sequencia = 0;
            itemAdd.ativo = 'A';
            itemAdd.operador = user.usuario;
            itemAdd.gruposDeUsuarioId = +user.grupoDeUsuarioId;
            itemAdd.favorito = "S";
            itemAdd.descricao = elem['link'];
            for (var i = 0; i < _this.sisRotinas.length; i++) {
                if (_this.sisRotinas[i].sisRotinaId === elem.rotinaId) {
                    itemAdd.stateUrl = _this.sisRotinas[i].stateUrl;
                    itemAdd.stateUrlPop = _this.sisRotinas[i].stateUrlPop;
                    break;
                }
            }
            list.push(itemAdd);
        });
        this.graficosOld.forEach(function (elem) {
            var itemAdd = new _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_13__["SisDashboard"]();
            itemAdd.sisDashboardId = elem['sisDashboardId'];
            //itemAdd.sisRotinaId = elem['rotinaId'];
            itemAdd.imageIcon = elem['icon'];
            itemAdd.sequencia = 0;
            itemAdd.ativo = 'A';
            itemAdd.operador = user.usuario;
            itemAdd.gruposDeUsuarioId = +user.grupoDeUsuarioId;
            itemAdd.grafico = "S";
            itemAdd.descricao = elem['link'];
            for (var i = 0; i < _this.sisRotinas.length; i++) {
                if (_this.sisRotinas[i].sisRotinaId === elem.rotinaId) {
                    itemAdd.stateUrl = _this.sisRotinas[i].stateUrl;
                    itemAdd.stateUrlPop = _this.sisRotinas[i].stateUrlPop;
                    break;
                }
            }
            list.push(itemAdd);
        });
        this.sisDashboardService.saveFavorites(list).subscribe(function (resp) {
            if (resp) {
                _this.messageService.saveSuccess("titles.favoritos");
                var object_1;
                list.forEach(function (itm) {
                    object_1 = new _login_login_model__WEBPACK_IMPORTED_MODULE_10__["SetFavotiroFiltro"]();
                    for (var i = 0; i < _this.sisRotinas.length; i++) {
                        if (_this.sisRotinas[i].sisRotinaId === itm.sisRotinaId) {
                            object_1.url = _this.sisRotinas[i].stateUrl;
                            object_1.isFavorito = itm.favorito === "S" ? true : false;
                            object_1.isDashboard = itm.grafico === "S" ? true : false;
                            break;
                        }
                    }
                });
            }
            else {
                _this.messageService.error("titles.erro", "messages.erroRequisicao");
            }
        });
    };
    SisDashboardFavoritosComponent.ctorParameters = function () { return [
        { type: _app_settings__WEBPACK_IMPORTED_MODULE_15__["AppSettings"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_14__["SisDashboardService"] },
        { type: _pages_dashboard_dashboard_service__WEBPACK_IMPORTED_MODULE_4__["DashboardService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _admin_corporate_sis_rotina_sis_rotina_service__WEBPACK_IMPORTED_MODULE_9__["SisRotinaService"] },
        { type: _pages_admin_corporate_corporate_service__WEBPACK_IMPORTED_MODULE_3__["CorporateService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["TreeviewComponent"], { static: true }),
        __metadata("design:type", ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["TreeviewComponent"])
    ], SisDashboardFavoritosComponent.prototype, "treeviewComponent", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChildren"])('selects'),
        __metadata("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__["QueryList"])
    ], SisDashboardFavoritosComponent.prototype, "selects", void 0);
    SisDashboardFavoritosComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-dashboards-favoritos",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sis-dashboard-favoritos.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-favoritos/sis-dashboard-favoritos.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            providers: [
                { provide: ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["TreeviewEventParser"], useClass: ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["OrderDownlineTreeviewEventParser"] },
                { provide: ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["TreeviewConfig"], useClass: ProductTreeviewConfig }
            ]
        }),
        __metadata("design:paramtypes", [_app_settings__WEBPACK_IMPORTED_MODULE_15__["AppSettings"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_14__["SisDashboardService"],
            _pages_dashboard_dashboard_service__WEBPACK_IMPORTED_MODULE_4__["DashboardService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _admin_corporate_sis_rotina_sis_rotina_service__WEBPACK_IMPORTED_MODULE_9__["SisRotinaService"],
            _pages_admin_corporate_corporate_service__WEBPACK_IMPORTED_MODULE_3__["CorporateService"]])
    ], SisDashboardFavoritosComponent);
    return SisDashboardFavoritosComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-form/sis-dashboard-form.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard-form/sis-dashboard-form.component.ts ***!
  \*************************************************************************************************/
/*! exports provided: SisDashboardFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboardFormComponent", function() { return SisDashboardFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_app_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/app.settings */ "./src/app/app.settings.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../sis-dashboard.constants */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.constants.ts");
/* harmony import */ var _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../sis-dashboard.model */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.model.ts");
/* harmony import */ var _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../sis-dashboard.service */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};













var SisDashboardFormComponent = /** @class */ (function (_super) {
    __extends(SisDashboardFormComponent, _super);
    function SisDashboardFormComponent(appSettings, router, messageService, activatedRoute, sisDashboardService, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_10__["SisDashboardConstants"](), funcoesService) || this;
        _this.appSettings = appSettings;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.sisDashboardService = sisDashboardService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.constantes = new _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_10__["SisDashboardConstants"]();
        _this.data = new _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_11__["SisDashboard"]();
        _this.mensagens = [];
        _this.json = JSON;
        _this.target = _this.funcoesService.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    SisDashboardFormComponent.prototype.ngOnInit = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.icons = this.appSettings.settings.icons;
                this.getMenus();
                this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
                    var id = _this.activatedRoute.snapshot.paramMap.get("id");
                    if (id) {
                        _this.sisDashboardService.getById(id).subscribe(function (resp) {
                            _this.data = resp;
                            _this.data.grafico = resp.grafico === 'S';
                            _this.data.favorito = resp.favorito === 'S';
                        });
                    }
                    else {
                        _this.data = new _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_11__["SisDashboard"]();
                    }
                }, function () { return _this.permissoesUtils.back(); });
                this.getIcones().subscribe(function (r) { return _this.icons = r; });
                return [2 /*return*/];
            });
        });
    };
    SisDashboardFormComponent.prototype.getMenus = function () {
        this.menus = this.appSettings.settings.menus.filter(function (c) { return +c.sisFormularioId > 0 && c.apresenta !== 'Admin'; });
        this.menus = this.menus.sort(function (p1, p2) { return (p1.title < p2.title) ? 1 : (p1.title > p2.title) ? -1 : 0; });
    };
    SisDashboardFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_6__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (this.funcoesService.isUndefinedOrNull(this.data.gruposDeUsuarioId) && this.funcoesService.isUndefinedOrNull(this.data.operador)) {
            this.messageService.warning("titles.favoritos", "messages.informeUsuarioOuGrupoUsuario");
            return;
        }
        if ((this.data.favorito === false || this.data.favorito === 'N') && (this.data.grafico === false || this.data.grafico === 'N')) {
            this.messageService.warning("titles.favoritos", "messages.tipoFavorito");
            return;
        }
        this.data.logRotina = "Manutenção SisDashboard";
        var menu = this.menus.find(function (c) { return +c.sisFormularioId === +_this.data.codRotina; });
        this.data.descricao = menu.title;
        this.data.stateUrl = menu.routerLink;
        this.data.stateUrlPop = menu.routerLinkPopUp;
        this.data.codRotina = menu.sisFormularioId;
        if (app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["BooleanUtilsStaticService"].toBoolean(this.data.grafico)) {
            var grafico = this.constantes.graphics.find(function (c) { return +c.sisFormularioId === +menu.sisFormularioId; });
            this.data.tipoGrafico = grafico.id;
        }
        this.data.grafico = this.data.grafico ? 'S' : 'N';
        this.data.favorito = this.data.favorito ? 'S' : 'N';
        this.sisDashboardService
            .save(this.data, this.data.sisDashboardId > 0)
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_6__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.favoritos");
                _this.appSettings.getFavoritos(true);
                if (create) {
                    _this.data = new _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_11__["SisDashboard"]();
                }
                else {
                    _this.back();
                }
            }
        });
    };
    SisDashboardFormComponent.prototype.edit = function () {
        this.router.navigate([
            this.target + "/cadastro/dashboardFavoritos/edit/" + this.data.sisDashboardId
        ]);
    };
    SisDashboardFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    SisDashboardFormComponent.prototype.back = function () {
        this.router.navigate([this.target + "/cadastro/dashboardFavoritos"]);
    };
    SisDashboardFormComponent.prototype.getIcones = function () {
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(this.appSettings.settings.icons);
    };
    SisDashboardFormComponent.prototype.outImage = function (event) {
        this.data.imageIcon = event;
    };
    SisDashboardFormComponent.ctorParameters = function () { return [
        { type: app_app_settings__WEBPACK_IMPORTED_MODULE_2__["AppSettings"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_12__["SisDashboardService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] }
    ]; };
    SisDashboardFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-dashboard-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sis-dashboard-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-form/sis-dashboard-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_app_settings__WEBPACK_IMPORTED_MODULE_2__["AppSettings"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_12__["SisDashboardService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"]])
    ], SisDashboardFormComponent);
    return SisDashboardFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-index/sis-dashboard-index.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard-index/sis-dashboard-index.component.ts ***!
  \***************************************************************************************************/
/*! exports provided: SisDashboardIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboardIndexComponent", function() { return SisDashboardIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../sis-dashboard.constants */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.constants.ts");
/* harmony import */ var _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../sis-dashboard.model */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.model.ts");
/* harmony import */ var _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../sis-dashboard.service */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};











var SisDashboardIndexComponent = /** @class */ (function (_super) {
    __extends(SisDashboardIndexComponent, _super);
    function SisDashboardIndexComponent(router, sisDashboardService, datatablesService, messageService, funcoesService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_8__["SisDashboardConstants"], funcoesService) || this;
        _this.router = router;
        _this.sisDashboardService = sisDashboardService;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.data = new _sis_dashboard_model__WEBPACK_IMPORTED_MODULE_9__["SisDashboard"]();
        _this.constantes = new _sis_dashboard_constants__WEBPACK_IMPORTED_MODULE_8__["SisDashboardConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.configure = function () {
            _this.router.navigate([_this.target + "/cadastro/dashboardFavoritos/multi"]);
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    SisDashboardIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        _super.prototype.addFuncoes.call(this, [
            { action: 'configure', func: function () { return _this.configure; } },
        ]);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.refresh();
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    SisDashboardIndexComponent.prototype.create = function () {
        this.router.navigate([this.target + "/cadastro/dashboardFavoritos/create"]);
    };
    SisDashboardIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.sisDashboardService.get().subscribe(function (resp) {
            var columns = [
                _this.datatablesService.getDataString("sisDashboardId", "id", "10%"),
                _this.datatablesService.getDataString("descricao", "rotina"),
                _this.datatablesService.getDataString("sequencia", "sequencia", "10%"),
                {
                    data: "imageIcon",
                    title: _this.messageService.getTranslates("labels", "imagem"),
                    width: "10%",
                    render: function (data, type, row) {
                        if (type === 'display') {
                            return '<img class="' + data + '">';
                        }
                        return data;
                    }
                },
                _this.datatablesService.getDataObject("grupoUsuario", "descrGrupoUser", "grupousuario"),
                _this.datatablesService.getDataString("operador", "operador", "10%"),
            ];
            var translate;
            resp = resp.map(function (item) {
                if (item.descricao) {
                    translate = item.descricao.split(".");
                    if (translate.length === 2) {
                        item.descricao = _this.messageService.getTranslates(translate[0], translate[1]);
                    }
                }
                return item;
            });
            _this.datatablesService.datatable("dtSisDashboard", columns, resp, function (aData) {
                _this.data = aData;
            });
        });
    };
    SisDashboardIndexComponent.prototype.edit = function () {
        if (!!(this.data.sisDashboardId)) {
            this.router.navigate([this.target + "/cadastro/dashboardFavoritos/edit/" + this.data.sisDashboardId]);
        }
    };
    SisDashboardIndexComponent.prototype.detail = function () {
        if (!!(this.data.sisDashboardId)) {
            this.router.navigate([
                this.target + "/cadastro/dashboardFavoritos/detail/" + this.data.sisDashboardId
            ]);
        }
    };
    SisDashboardIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    SisDashboardIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    SisDashboardIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.data.sisDashboardId)) {
            var url = this.data.stateUrl.replace('/pages/', 'pages/');
            this.messageService.removeConfirm(function () {
                _this.sisDashboardService
                    .remove(_this.data)
                    .subscribe(function () {
                    _this.datatablesService.remove("dtSisDashboard");
                });
            });
        }
    };
    SisDashboardIndexComponent.prototype.print = function () {
        this.constantes.paramRelatorio = {
            usuarioId: this.loginService.getLogin().usuario,
            grupoDeUsuarioId: this.loginService.getLogin().grupoDeUsuarioId
        };
        _super.prototype.print.call(this);
    };
    SisDashboardIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_10__["SisDashboardService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"] }
    ]; };
    SisDashboardIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-dashboards-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sis-dashboard-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/sis-dashboard/sis-dashboard-index/sis-dashboard-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _sis_dashboard_service__WEBPACK_IMPORTED_MODULE_10__["SisDashboardService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"]])
    ], SisDashboardIndexComponent);
    return SisDashboardIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.constants.ts":
/*!*************************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard.constants.ts ***!
  \*************************************************************************/
/*! exports provided: SisDashboardConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboardConstants", function() { return SisDashboardConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var SisDashboardConstants = /** @class */ (function () {
    function SisDashboardConstants() {
        this.sisFormularioId = 8;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.dashboard";
        this.reportId = "CAD0216";
        this.reportTitulo = { "titulo": "Dashboard/Favoritos", "subTitulo": "" };
        this.tabela = "SisDashBoard";
        this.paramRelatorio = {};
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, exime: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, exime: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, exime: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, exime: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, exime: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, exime: true, menuName: 'Arquivo' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, exime: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, exime: true, menuName: 'Movimento' },
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, exime: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, exime: true, menuName: 'Arquivo' },
        ];
        this.graphics = [
            { id: 'movimentacaoProdutoDia', title: 'Movimentação de Produtos por Dia', sisFormularioId: 125032 },
            { id: 'tempoOperacao', title: '	Tempo de Operação', sisFormularioId: 125054 },
            { id: 'situacaoVeículo', title: 'Situação de Veículos', sisFormularioId: 125043 },
            { id: 'movimentacaoDeVeiculoHorario', title: 'Movimentação de Veículos por Horário', sisFormularioId: 125029 },
            { id: 'movimentacaoVehiculos', title: 'Movimentação de Veículos', sisFormularioId: 125027 },
            { id: 'barraPorHora', title: 'Barras por Hora', sisFormularioId: 35075 },
            { id: 'linhaPorHora', title: 'Linhas por Hora', sisFormularioId: 35076 },
            { id: 'linhaPorDia', title: 'Linhas por Dia', sisFormularioId: 35074 },
            { id: 'linhaPorMes', title: 'Linhas por Mês', sisFormularioId: 35073 }
        ];
    }
    return SisDashboardConstants;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.model.ts":
/*!*********************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard.model.ts ***!
  \*********************************************************************/
/*! exports provided: SisDashboard */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboard", function() { return SisDashboard; });
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var SisDashboard = /** @class */ (function (_super) {
    __extends(SisDashboard, _super);
    function SisDashboard() {
        var _this = _super.call(this) || this;
        _this.tipoGrafico = "";
        _this.gruposDeUsuarioId = "";
        _this.codRotina = "";
        return _this;
    }
    return SisDashboard;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.module.ts":
/*!**********************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard.module.ts ***!
  \**********************************************************************/
/*! exports provided: SisDashboardModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboardModule", function() { return SisDashboardModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _sis_dashboard_index_sis_dashboard_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sis-dashboard-index/sis-dashboard-index.component */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-index/sis-dashboard-index.component.ts");
/* harmony import */ var _sis_dashboard_form_sis_dashboard_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sis-dashboard-form/sis-dashboard-form.component */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-form/sis-dashboard-form.component.ts");
/* harmony import */ var _sis_dashboard_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sis-dashboard.routing.module */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.routing.module.ts");
/* harmony import */ var _sis_dashboard_favoritos_sis_dashboard_favoritos_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sis-dashboard-favoritos/sis-dashboard-favoritos.component */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-favoritos/sis-dashboard-favoritos.component.ts");
var __decorate = (undefined && undefined.__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 __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};






var SisDashboardModule = /** @class */ (function () {
    function SisDashboardModule() {
    }
    SisDashboardModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _sis_dashboard_routing_module__WEBPACK_IMPORTED_MODULE_4__["SisDashboardRoutingModule"]],
            declarations: [_sis_dashboard_form_sis_dashboard_form_component__WEBPACK_IMPORTED_MODULE_3__["SisDashboardFormComponent"], _sis_dashboard_index_sis_dashboard_index_component__WEBPACK_IMPORTED_MODULE_2__["SisDashboardIndexComponent"], _sis_dashboard_favoritos_sis_dashboard_favoritos_component__WEBPACK_IMPORTED_MODULE_5__["SisDashboardFavoritosComponent"]],
            exports: [_sis_dashboard_form_sis_dashboard_form_component__WEBPACK_IMPORTED_MODULE_3__["SisDashboardFormComponent"], _sis_dashboard_index_sis_dashboard_index_component__WEBPACK_IMPORTED_MODULE_2__["SisDashboardIndexComponent"], _sis_dashboard_favoritos_sis_dashboard_favoritos_component__WEBPACK_IMPORTED_MODULE_5__["SisDashboardFavoritosComponent"]]
        })
    ], SisDashboardModule);
    return SisDashboardModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.routing.module.ts":
/*!******************************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard.routing.module.ts ***!
  \******************************************************************************/
/*! exports provided: SisDashboardRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboardRoutingModule", function() { return SisDashboardRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _sis_dashboard_index_sis_dashboard_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sis-dashboard-index/sis-dashboard-index.component */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-index/sis-dashboard-index.component.ts");
/* harmony import */ var _sis_dashboard_form_sis_dashboard_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sis-dashboard-form/sis-dashboard-form.component */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-form/sis-dashboard-form.component.ts");
/* harmony import */ var _sis_dashboard_favoritos_sis_dashboard_favoritos_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sis-dashboard-favoritos/sis-dashboard-favoritos.component */ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard-favoritos/sis-dashboard-favoritos.component.ts");
var __decorate = (undefined && undefined.__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 __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};






var MRoutes = [
    {
        path: "",
        component: _sis_dashboard_index_sis_dashboard_index_component__WEBPACK_IMPORTED_MODULE_3__["SisDashboardIndexComponent"],
        data: { breadcrumb: "Favoritos", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "create",
        component: _sis_dashboard_form_sis_dashboard_form_component__WEBPACK_IMPORTED_MODULE_4__["SisDashboardFormComponent"],
        data: {
            breadcrumb: "Favoritos",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "edit/:id",
        component: _sis_dashboard_form_sis_dashboard_form_component__WEBPACK_IMPORTED_MODULE_4__["SisDashboardFormComponent"],
        data: {
            breadcrumb: "Favoritos",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id",
        component: _sis_dashboard_form_sis_dashboard_form_component__WEBPACK_IMPORTED_MODULE_4__["SisDashboardFormComponent"],
        data: {
            breadcrumb: "Favoritos",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    },
    {
        path: "multi",
        component: _sis_dashboard_favoritos_sis_dashboard_favoritos_component__WEBPACK_IMPORTED_MODULE_5__["SisDashboardFavoritosComponent"],
        data: {
            breadcrumb: "Favoritos",
            formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var SisDashboardRoutingModule = /** @class */ (function () {
    function SisDashboardRoutingModule() {
    }
    SisDashboardRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], SisDashboardRoutingModule);
    return SisDashboardRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/sis-dashboard/sis-dashboard.service.ts":
/*!***********************************************************************!*\
  !*** ./src/app/pages/cadastro/sis-dashboard/sis-dashboard.service.ts ***!
  \***********************************************************************/
/*! exports provided: SisDashboardService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SisDashboardService", function() { return SisDashboardService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var ngx_treeview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ngx-treeview */ "./node_modules/ngx-treeview/src/index.js");
/* harmony import */ var app_app_settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/app.settings */ "./src/app/app.settings.ts");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../login/login.service */ "./src/app/pages/login/login.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};









var SisDashboardService = /** @class */ (function (_super) {
    __extends(SisDashboardService, _super);
    function SisDashboardService(http, appSettings, loginService) {
        var _this = _super.call(this, http, "corporate/sisDashboard") || this;
        _this.appSettings = appSettings;
        _this.loginService = loginService;
        return _this;
    }
    SisDashboardService.prototype.saveFavorites = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].service_url + "/api/v1/corporate/sisDashboard/favorites", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_6__["ErrorHandler"].handleError));
    };
    SisDashboardService.prototype.getTreeview = function () {
        var _this = this;
        var arResult = [];
        var menus = this.appSettings.settings.menus;
        var parents = menus.filter(function (m) { return m.parentId === 0; });
        parents.forEach(function (element) {
            var menuAdd = new ngx_treeview__WEBPACK_IMPORTED_MODULE_2__["TreeviewItem"]({
                checked: false,
                value: { id: element.id, rotinaId: element.sisRotinaId, sisDashboardId: 0 },
                text: element.descricao,
                children: _this.getChidrenMenus(element.id)
            });
            if (menuAdd.children !== undefined) {
                arResult.push(menuAdd);
            }
        });
        return arResult;
    };
    SisDashboardService.prototype.getChidrenMenus = function (parentId) {
        var arrResult = [];
        var menus = this.appSettings.settings.menus;
        var lista = menus.filter(function (m) { return m.parentId === parentId; });
        lista.forEach(function (element) {
            var newItem = {
                checked: false,
                text: element.descricao,
                value: { id: element.id, rotinaId: element.sisRotinaId, sisDashboardId: 0 },
            };
            arrResult.push(newItem);
        });
        return arrResult;
    };
    ;
    SisDashboardService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] },
        { type: app_app_settings__WEBPACK_IMPORTED_MODULE_3__["AppSettings"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"] }
    ]; };
    SisDashboardService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"],
            app_app_settings__WEBPACK_IMPORTED_MODULE_3__["AppSettings"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"]])
    ], SisDashboardService);
    return SisDashboardService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_4__["BaseService"]));



/***/ }),

/***/ "./src/app/pages/dashboard/dashboard.service.ts":
/*!******************************************************!*\
  !*** ./src/app/pages/dashboard/dashboard.service.ts ***!
  \******************************************************/
/*! exports provided: DashboardService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DashboardService", function() { return DashboardService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__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 = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};



var DashboardService = /** @class */ (function (_super) {
    __extends(DashboardService, _super);
    function DashboardService(http) {
        var _this = _super.call(this, http, "corporate/sisDashboard") || this;
        _this.http = http;
        return _this;
    }
    DashboardService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    DashboardService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], DashboardService);
    return DashboardService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-cadastro-sis-dashboard-sis-dashboard-module.js.map